From 0f18258d1bdd6cc88bb2648abf2386c50ca58662 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 22 Mar 2024 12:35:47 -0400 Subject: [PATCH] Variable rename --- src/engine/objects/NPC.java | 2 +- src/engine/objects/ProducedItem.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 6e7b3c62..f2ac5483 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -917,7 +917,7 @@ public class NPC extends AbstractCharacter { DbManager.NPCQueries.LOAD_ALL_ITEMS_TO_PRODUCE(this); for (ProducedItem producedItem : this.forgedItems) { - MobLoot ml = new MobLoot(this, ItemTemplate.templates.get(producedItem.getItemBaseID()), false); + MobLoot ml = new MobLoot(this, ItemTemplate.templates.get(producedItem.getTemplateID()), false); DbManager.NPCQueries.UPDATE_ITEM_ID(producedItem.getID(), currentID, ml.getObjectUUID()); diff --git a/src/engine/objects/ProducedItem.java b/src/engine/objects/ProducedItem.java index 3e3caafb..41e496a0 100644 --- a/src/engine/objects/ProducedItem.java +++ b/src/engine/objects/ProducedItem.java @@ -25,7 +25,7 @@ public class ProducedItem { private int ID; private int npcUID; - private int itemBaseID; + private int templateID; private DateTime dateToUpgrade; private boolean isRandom; @@ -47,7 +47,7 @@ public class ProducedItem { public ProducedItem(ResultSet rs) throws SQLException { this.ID = rs.getInt("ID"); this.npcUID = rs.getInt("npcUID"); - this.itemBaseID = rs.getInt("itemBaseID"); + this.templateID = rs.getInt("itemBaseID"); Date sqlDateTime = rs.getTimestamp("dateToUpgrade"); @@ -64,11 +64,11 @@ public class ProducedItem { this.playerID = rs.getInt("playerID"); } - public ProducedItem(int ID, int npcUID, int itemBaseID, DateTime dateToUpgrade, boolean isRandom, String prefix, String suffix, String name, int playerID) { + public ProducedItem(int ID, int npcUID, int templateID, DateTime dateToUpgrade, boolean isRandom, String prefix, String suffix, String name, int playerID) { super(); this.ID = ID; this.npcUID = npcUID; - this.itemBaseID = itemBaseID; + this.templateID = templateID; this.dateToUpgrade = dateToUpgrade; this.isRandom = isRandom; this.prefix = prefix; @@ -88,12 +88,12 @@ public class ProducedItem { return dateToUpgrade; } - public int getItemBaseID() { - return itemBaseID; + public int getTemplateID() { + return templateID; } - public void setItemBaseID(int itemBaseID) { - this.itemBaseID = itemBaseID; + public void setTemplateID(int templateID) { + this.templateID = templateID; } public boolean isRandom() { @@ -199,7 +199,7 @@ public class ProducedItem { } - Item item = npc.produceItem(0, this.getAmount(), this.isRandom(), pToken, sToken, this.getName(), this.getItemBaseID()); + Item item = npc.produceItem(0, this.getAmount(), this.isRandom(), pToken, sToken, this.getName(), this.getTemplateID()); if (item == null) return false;