Browse Source

Variable rename

combat-2
MagicBot 8 months ago
parent
commit
0f18258d1b
  1. 2
      src/engine/objects/NPC.java
  2. 18
      src/engine/objects/ProducedItem.java

2
src/engine/objects/NPC.java

@ -917,7 +917,7 @@ public class NPC extends AbstractCharacter {
DbManager.NPCQueries.LOAD_ALL_ITEMS_TO_PRODUCE(this); DbManager.NPCQueries.LOAD_ALL_ITEMS_TO_PRODUCE(this);
for (ProducedItem producedItem : this.forgedItems) { 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()); DbManager.NPCQueries.UPDATE_ITEM_ID(producedItem.getID(), currentID, ml.getObjectUUID());

18
src/engine/objects/ProducedItem.java

@ -25,7 +25,7 @@ public class ProducedItem {
private int ID; private int ID;
private int npcUID; private int npcUID;
private int itemBaseID; private int templateID;
private DateTime dateToUpgrade; private DateTime dateToUpgrade;
private boolean isRandom; private boolean isRandom;
@ -47,7 +47,7 @@ public class ProducedItem {
public ProducedItem(ResultSet rs) throws SQLException { public ProducedItem(ResultSet rs) throws SQLException {
this.ID = rs.getInt("ID"); this.ID = rs.getInt("ID");
this.npcUID = rs.getInt("npcUID"); this.npcUID = rs.getInt("npcUID");
this.itemBaseID = rs.getInt("itemBaseID"); this.templateID = rs.getInt("itemBaseID");
Date sqlDateTime = rs.getTimestamp("dateToUpgrade"); Date sqlDateTime = rs.getTimestamp("dateToUpgrade");
@ -64,11 +64,11 @@ public class ProducedItem {
this.playerID = rs.getInt("playerID"); 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(); super();
this.ID = ID; this.ID = ID;
this.npcUID = npcUID; this.npcUID = npcUID;
this.itemBaseID = itemBaseID; this.templateID = templateID;
this.dateToUpgrade = dateToUpgrade; this.dateToUpgrade = dateToUpgrade;
this.isRandom = isRandom; this.isRandom = isRandom;
this.prefix = prefix; this.prefix = prefix;
@ -88,12 +88,12 @@ public class ProducedItem {
return dateToUpgrade; return dateToUpgrade;
} }
public int getItemBaseID() { public int getTemplateID() {
return itemBaseID; return templateID;
} }
public void setItemBaseID(int itemBaseID) { public void setTemplateID(int templateID) {
this.itemBaseID = itemBaseID; this.templateID = templateID;
} }
public boolean isRandom() { 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) if (item == null)
return false; return false;

Loading…
Cancel
Save