Refactor item_type

This commit is contained in:
2024-03-10 13:34:24 -04:00
parent 87290baa52
commit df5c607375
24 changed files with 137 additions and 203 deletions
+2 -3
View File
@@ -69,7 +69,7 @@ public final class MobLoot extends Item {
this.ownerID = mob.getObjectUUID();
this.objectUUID = generateId();
if (quantity == 0 && ib.getType() == ItemType.RESOURCE)
if (quantity == 0 && ItemTemplate.itemTemplates.get(ib.getUUID()).item_type == ItemType.RESOURCE)
quantity = 1;
if (quantity > 0)
@@ -129,10 +129,9 @@ public final class MobLoot extends Item {
if (isDeleted)
return null;
if (this.getItemBase().getType().equals(ItemType.GOLD))
if (this.template.item_type.equals(ItemType.GOLD))
return null;
Item item = (Item) this;
item.setOwner(looter);