Browse Source

isConsumable not used as driven by switch.

combat-2
MagicBot 8 months ago
parent
commit
20a42ab3e5
  1. 22
      src/engine/objects/ItemBase.java

22
src/engine/objects/ItemBase.java

@ -39,14 +39,12 @@ public class ItemBase { @@ -39,14 +39,12 @@ public class ItemBase {
private final short maxDamage;
private final String mastery;
private final engine.Enum.SourceType damageType;
private boolean isConsumable;
private final boolean isStrBased;
public ItemBase(ResultSet rs) throws SQLException {
this.uuid = rs.getInt("ID");
this.modTable = rs.getInt("modTable");
this.isConsumable = false;
this.percentRequired = rs.getShort("percentRequired");
this.defense = rs.getShort("defense");
this.dexPenalty = rs.getFloat("dexPenalty");
@ -63,22 +61,6 @@ public class ItemBase { @@ -63,22 +61,6 @@ public class ItemBase {
if (template == null)
Logger.error(this.getUUID() + " null template");
else
switch (ItemTemplate.itemTemplates.get(this.getUUID()).item_type) {
case RUNE:
case SCROLL:
case WAND:
case POTION:
case CHARTER:
case DEED:
case EMPLOYMENTCONTRACT:
case BUCKET:
case REALMCHARTER:
case TREASURE:
case OFFERING:
this.isConsumable = true;
break;
}
}
@ -130,10 +112,6 @@ public class ItemBase { @@ -130,10 +112,6 @@ public class ItemBase {
DbManager.ItemBaseQueries.LOAD_ALL_ITEMBASES();
}
public boolean isConsumable() {
return this.isConsumable;
}
public boolean isDiscRune() {
int ID = uuid;
//class, discipline runes

Loading…
Cancel
Save