|
|
@ -68,7 +68,6 @@ public class Item extends AbstractWorldObject { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
this.templateID = templateID; |
|
|
|
this.templateID = templateID; |
|
|
|
this.template = ItemTemplate.templates.get(templateID); |
|
|
|
this.template = ItemTemplate.templates.get(templateID); |
|
|
|
this.name = this.template.item_base_name; |
|
|
|
|
|
|
|
this.chargesRemaining = this.template.item_initial_charges; |
|
|
|
this.chargesRemaining = this.template.item_initial_charges; |
|
|
|
this.durabilityCurrent = this.template.combat_health_full; |
|
|
|
this.durabilityCurrent = this.template.combat_health_full; |
|
|
|
this.equipSlot = EquipSlotType.NONE; |
|
|
|
this.equipSlot = EquipSlotType.NONE; |
|
|
@ -90,12 +89,12 @@ public class Item extends AbstractWorldObject { |
|
|
|
if (this.template == null) |
|
|
|
if (this.template == null) |
|
|
|
Logger.error("Null template of " + this.templateID); |
|
|
|
Logger.error("Null template of " + this.templateID); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Name override in db.
|
|
|
|
|
|
|
|
|
|
|
|
this.name = rs.getString("item_name"); |
|
|
|
this.name = rs.getString("item_name"); |
|
|
|
|
|
|
|
|
|
|
|
if (this.name == null) |
|
|
|
if (this.name == null) |
|
|
|
this.name = this.template.item_base_name; |
|
|
|
this.name = ""; |
|
|
|
else if (this.name.isEmpty()) |
|
|
|
|
|
|
|
this.name = this.template.item_base_name; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set container enumeration
|
|
|
|
// Set container enumeration
|
|
|
|
|
|
|
|
|
|
|
|