item_value refactored to template

This commit is contained in:
2024-03-03 13:18:16 -05:00
parent 70f331d025
commit f11fcc535a
5 changed files with 20 additions and 32 deletions
+1 -12
View File
@@ -45,7 +45,6 @@ public class ItemBase {
public EnumSet<Enum.ClassType> requiredClasses;
public EnumSet<Enum.DisciplineType> requiredDiscs;
public EnumSet<Enum.DisciplineType> restrictedDiscs;
private final int value;
private final short weight;
private final short color;
private final ItemType type;
@@ -91,7 +90,6 @@ public class ItemBase {
this.uuid = rs.getInt("ID");
this.value = rs.getInt("value");
this.weight = rs.getShort("weight");
this.color = rs.getShort("color");
this.type = ItemType.valueOf(rs.getString("Type"));
@@ -258,15 +256,6 @@ public class ItemBase {
DbManager.ItemBaseQueries.LOAD_BAKEDINSTATS(this);
}
//TODO fix this later. Shouldn't be gotten from item base
public int getMagicValue() {
return this.value;
}
public int getBaseValue() {
return this.value;
}
public short getWeight() {
return this.weight;
}
@@ -463,7 +452,7 @@ public class ItemBase {
if (this.canCharacterEquip(abstractCharacter) == false)
return false;
return item.getItemBase().value != 0 || Kit.IsNoobGear(item.getItemBase().uuid);
return item.template.item_value != 0 || Kit.IsNoobGear(item.getItemBase().uuid);
//players can't wear 0 value items.
}