forked from MagicBane/Server
isConsumable not used as driven by switch.
This commit is contained in:
@@ -39,14 +39,12 @@ public class ItemBase {
|
|||||||
private final short maxDamage;
|
private final short maxDamage;
|
||||||
private final String mastery;
|
private final String mastery;
|
||||||
private final engine.Enum.SourceType damageType;
|
private final engine.Enum.SourceType damageType;
|
||||||
private boolean isConsumable;
|
|
||||||
private final boolean isStrBased;
|
private final boolean isStrBased;
|
||||||
|
|
||||||
public ItemBase(ResultSet rs) throws SQLException {
|
public ItemBase(ResultSet rs) throws SQLException {
|
||||||
|
|
||||||
this.uuid = rs.getInt("ID");
|
this.uuid = rs.getInt("ID");
|
||||||
this.modTable = rs.getInt("modTable");
|
this.modTable = rs.getInt("modTable");
|
||||||
this.isConsumable = false;
|
|
||||||
this.percentRequired = rs.getShort("percentRequired");
|
this.percentRequired = rs.getShort("percentRequired");
|
||||||
this.defense = rs.getShort("defense");
|
this.defense = rs.getShort("defense");
|
||||||
this.dexPenalty = rs.getFloat("dexPenalty");
|
this.dexPenalty = rs.getFloat("dexPenalty");
|
||||||
@@ -63,22 +61,6 @@ public class ItemBase {
|
|||||||
|
|
||||||
if (template == null)
|
if (template == null)
|
||||||
Logger.error(this.getUUID() + " null template");
|
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 {
|
|||||||
DbManager.ItemBaseQueries.LOAD_ALL_ITEMBASES();
|
DbManager.ItemBaseQueries.LOAD_ALL_ITEMBASES();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isConsumable() {
|
|
||||||
return this.isConsumable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isDiscRune() {
|
public boolean isDiscRune() {
|
||||||
int ID = uuid;
|
int ID = uuid;
|
||||||
//class, discipline runes
|
//class, discipline runes
|
||||||
|
|||||||
Reference in New Issue
Block a user