From 36bdf883f1b72228f1017cebddb1f9ef2c7345d5 Mon Sep 17 00:00:00 2001 From: eugene-hong <58686228+eugene-doobu@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:34:37 +0900 Subject: [PATCH] remove redundant casting --- Lib9c/Action/Synthesize.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Lib9c/Action/Synthesize.cs b/Lib9c/Action/Synthesize.cs index 5660d3ba02..417acc506d 100644 --- a/Lib9c/Action/Synthesize.cs +++ b/Lib9c/Action/Synthesize.cs @@ -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."); } }