Variable renamed to conform with json

This commit is contained in:
2024-03-25 05:25:09 -04:00
parent 28b0fd6fd4
commit f523e4832e
6 changed files with 15 additions and 15 deletions
+6 -6
View File
@@ -47,7 +47,7 @@ public class Item extends AbstractWorldObject {
public float drop_chance;
public EnumSet<Enum.ItemFlags> flags = EnumSet.noneOf(ItemFlags.class);
public int numberOfItems;
public float durabilityCurrent;
public float combat_health_current;
public int chargesRemaining;
public Enum.EquipSlotType equipSlot;
private boolean canDestroy;
@@ -70,7 +70,7 @@ public class Item extends AbstractWorldObject {
this.templateID = templateID;
this.template = ItemTemplate.templates.get(templateID);
this.chargesRemaining = this.template.item_initial_charges;
this.durabilityCurrent = this.template.combat_health_full;
this.combat_health_current = this.template.combat_health_full;
this.equipSlot = EquipSlotType.NONE;
this.containerType = ItemContainerType.NONE;
this.numberOfItems = 1;
@@ -128,7 +128,7 @@ public class Item extends AbstractWorldObject {
this.chargesRemaining = rs.getByte("item_chargesRemaining");
this.durabilityCurrent = rs.getShort("item_durabilityCurrent");
this.combat_health_current = rs.getShort("item_durabilityCurrent");
DbObjectType ownerType;
ownerType = DbManager.BuildingQueries.GET_UID_ENUM(this.ownerID);
@@ -232,7 +232,7 @@ public class Item extends AbstractWorldObject {
writer.put((byte) 1); // End Datablock byte
writer.putFloat(item.template.item_health_full);
writer.putFloat((float) item.durabilityCurrent);
writer.putFloat((float) item.combat_health_current);
writer.put((byte) 1); // End Datablock byte
@@ -700,8 +700,8 @@ public class Item extends AbstractWorldObject {
return true;
}
public void setDurabilityCurrent(float value) {
this.durabilityCurrent = value;
public void setCombat_health_current(float value) {
this.combat_health_current = value;
}
public boolean isCanDestroy() {