Schema update
This commit is contained in:
@@ -86,7 +86,7 @@ public class Item extends AbstractWorldObject {
|
||||
public Item(ResultSet rs) throws SQLException {
|
||||
super(rs);
|
||||
|
||||
this.templateID = rs.getInt("item_itemBaseID");
|
||||
this.templateID = rs.getInt("templateID");
|
||||
this.template = ItemTemplate.templates.get(this.templateID);
|
||||
|
||||
if (this.template == null)
|
||||
@@ -94,14 +94,14 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
// Name override in db.
|
||||
|
||||
this.name = rs.getString("item_name");
|
||||
this.name = rs.getString("name");
|
||||
|
||||
if (this.name == null)
|
||||
this.name = "";
|
||||
|
||||
// Set container enumeration
|
||||
|
||||
String container = rs.getString("item_container");
|
||||
String container = rs.getString("container");
|
||||
|
||||
switch (container) {
|
||||
case "inventory":
|
||||
@@ -126,9 +126,9 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
this.ownerID = rs.getInt("parent");
|
||||
|
||||
this.chargesRemaining = rs.getByte("item_chargesRemaining");
|
||||
this.chargesRemaining = rs.getByte("chargesRemaining");
|
||||
|
||||
this.combat_health_current = rs.getShort("item_durabilityCurrent");
|
||||
this.combat_health_current = rs.getShort("combat_health_current");
|
||||
|
||||
DbObjectType ownerType;
|
||||
ownerType = DbManager.BuildingQueries.GET_UID_ENUM(this.ownerID);
|
||||
@@ -147,18 +147,18 @@ public class Item extends AbstractWorldObject {
|
||||
|
||||
this.canDestroy = true;
|
||||
|
||||
this.equipSlot = EquipSlotType.values()[rs.getByte("item_equipSlot")];
|
||||
this.equipSlot = EquipSlotType.values()[rs.getByte("equipSlot")];
|
||||
|
||||
this.numberOfItems = rs.getInt("item_numberOfItems");
|
||||
this.numberOfItems = rs.getInt("numberOfItems");
|
||||
|
||||
String flagString = rs.getString("item_flags");
|
||||
String flagString = rs.getString("flags");
|
||||
|
||||
if (flagString.isEmpty() == false)
|
||||
for (String itemFlag : flagString.split(";"))
|
||||
this.flags.add(Enum.ItemFlags.valueOf(itemFlag));
|
||||
|
||||
this.dateToUpgrade = rs.getLong("item_dateToUpgrade");
|
||||
this.value = rs.getInt("item_value");
|
||||
this.dateToUpgrade = rs.getLong("dateToUpgrade");
|
||||
this.value = rs.getInt("value");
|
||||
|
||||
if (this.value == 0)
|
||||
this.value = this.template.item_value;
|
||||
|
||||
Reference in New Issue
Block a user