Skip to content

Commit

Permalink
remove redundant casting
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-doobu committed Dec 17, 2024
1 parent 498c511 commit 36bdf88
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions Lib9c/Action/Synthesize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,20 +124,9 @@ public override IWorld Execute(IActionContext context)
// Check Invalid Item
foreach (var materialItem in materialItems)
{
switch (materialItem)
if (InvalidMaterialItemId.Contains(materialItem.Id))
{
case Equipment equipment:
if (InvalidMaterialItemId.Contains(equipment.Id))
{
throw new InvalidItemIdException($"{equipment.Id} is invalid item id.");
}
break;
case Costume costume:
if (InvalidMaterialItemId.Contains(costume.Id))
{
throw new InvalidItemIdException($"{costume.Id} is invalid item id.");
}
break;
throw new InvalidItemIdException($"{materialItem.Id} is invalid item id.");
}
}

Expand Down

0 comments on commit 36bdf88

Please sign in to comment.