|
|
@ -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; |
|
|
|