Begin constructor refactor
This commit is contained in:
@@ -37,9 +37,10 @@ public class MakeItemCmd extends AbstractDevCmd {
|
||||
if (ibID == 7)
|
||||
continue;
|
||||
|
||||
ItemBase ib = ItemBase.getItemBase(ibID);
|
||||
ItemTemplate template = ItemTemplate.itemTemplates.get(ibID);
|
||||
|
||||
int weight = template.item_wt;
|
||||
|
||||
short weight = ib.getWeight();
|
||||
if (!pc.getCharItemManager().hasRoomInventory(weight)) {
|
||||
throwbackError(pc, "Not enough room in inventory for any more of this item");
|
||||
|
||||
@@ -48,10 +49,10 @@ public class MakeItemCmd extends AbstractDevCmd {
|
||||
}
|
||||
|
||||
boolean worked = false;
|
||||
Item item = new Item(ib, pc.getObjectUUID(),
|
||||
OwnerType.PlayerCharacter, (byte) 0, (byte) 0, (short) ib.getDurability(), (short) ib.getDurability(),
|
||||
true, false, ItemContainerType.INVENTORY, (byte) 0,
|
||||
new ArrayList<>(), "");
|
||||
Item item = new Item(template.template_id);
|
||||
item.ownerID = pc.getObjectUUID();
|
||||
item.ownerType = OwnerType.PlayerCharacter;
|
||||
item.containerType = ItemContainerType.INVENTORY;
|
||||
|
||||
item.setNumOfItems(Warehouse.getMaxResources().get(ibID));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user