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 { @@ -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());

18
src/engine/objects/ProducedItem.java

@ -25,7 +25,7 @@ public class ProducedItem { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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;

Loading…
Cancel
Save