diff --git a/src/engine/devcmd/cmds/CreateItemCmd.java b/src/engine/devcmd/cmds/CreateItemCmd.java index 4e2d0b87..d934c6d4 100644 --- a/src/engine/devcmd/cmds/CreateItemCmd.java +++ b/src/engine/devcmd/cmds/CreateItemCmd.java @@ -31,7 +31,6 @@ public class CreateItemCmd extends AbstractDevCmd { @Override protected void _doCmd(PlayerCharacter playerCharacter, String[] words, AbstractGameObject target) { - boolean worked = false; if (words.length < 2) { this.sendUsage(playerCharacter); @@ -43,7 +42,6 @@ public class CreateItemCmd extends AbstractDevCmd { if (template == null) return; - ; int size = 1; @@ -51,7 +49,6 @@ public class CreateItemCmd extends AbstractDevCmd { size = Integer.parseInt(words[1]); for (int i = 0; i < size; i++) { - worked = false; if (!playerCharacter.charItemManager.hasRoomInventory(template.item_wt)) { ChatManager.chatSystemInfo(playerCharacter, "You can not carry any more of that item."); @@ -65,13 +62,10 @@ public class CreateItemCmd extends AbstractDevCmd { try { item = DbManager.ItemQueries.PERSIST(item); - worked = true; + playerCharacter.charItemManager.addItemToInventory(item); } catch (Exception e) { Logger.error(e); } - if (worked) { - playerCharacter.charItemManager.addItemToInventory(item); - } } playerCharacter.charItemManager.updateInventory(); }