diff --git a/src/engine/devcmd/cmds/CreateItemCmd.java b/src/engine/devcmd/cmds/CreateItemCmd.java index 813f2b41..31e77836 100644 --- a/src/engine/devcmd/cmds/CreateItemCmd.java +++ b/src/engine/devcmd/cmds/CreateItemCmd.java @@ -11,7 +11,6 @@ package engine.devcmd.cmds; import engine.devcmd.AbstractDevCmd; import engine.objects.AbstractGameObject; -import engine.objects.ItemBase; import engine.objects.ItemFactory; import engine.objects.PlayerCharacter; @@ -27,28 +26,20 @@ public class CreateItemCmd extends AbstractDevCmd { @Override protected void _doCmd(PlayerCharacter pc, String[] words, AbstractGameObject target) { + if (words.length < 2) { this.sendUsage(pc); return; } - int id; - id = ItemBase.getIDByName(words[0]); - if (id == 0) - id = Integer.parseInt(words[0]); - if (id == 7) { - this.throwbackInfo(pc, "use /addgold to add gold....."); - return; - } + int templateID = Integer.parseInt(words[0]); int size = 1; - if (words.length < 3) { + if (words.length == 2) size = Integer.parseInt(words[1]); - } - - ItemFactory.fillInventory(pc, id, size); + ItemFactory.fillInventory(pc, templateID, size); } @Override