From 6b2569873cd55bd5e455e7f88eb674116c8b01b0 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 16 Mar 2024 17:24:17 -0400 Subject: [PATCH] bugfix: templateid wasn't being set --- src/engine/objects/MobEquipment.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/engine/objects/MobEquipment.java b/src/engine/objects/MobEquipment.java index 5cdf9a21..b09e0af6 100644 --- a/src/engine/objects/MobEquipment.java +++ b/src/engine/objects/MobEquipment.java @@ -56,12 +56,13 @@ public class MobEquipment extends AbstractGameObject { setMagicValue(); } - public MobEquipment(int itemBaseID, float dropChance) { + public MobEquipment(int templateID, float dropChance) { super(MobEquipment.getNewID()); - this.itemBase = ItemBase.getItemBase(itemBaseID); - this.template = ItemTemplate.templates.get(itemBaseID); + this.itemBase = ItemBase.getItemBase(templateID); + this.templateID = templateID; + this.template = ItemTemplate.templates.get(this.templateID); - Enum.EquipSlotType equipSlot = template.item_eq_slots_and.iterator().next(); + Enum.EquipSlotType equipSlot = template.item_eq_slots_or.iterator().next(); this.slot = equipSlot; this.dropChance = dropChance;