forked from MagicBane/Server
Refactored isShield and removed equipflag.
This commit is contained in:
@@ -42,8 +42,8 @@ public class ItemBase {
|
||||
private final int useID;
|
||||
private int hashID;
|
||||
private final byte useAmount;
|
||||
|
||||
// Armor and weapon related values
|
||||
private final int equipFlag;
|
||||
private final int restrictFlag;
|
||||
private final String skillRequired;
|
||||
private final short percentRequired;
|
||||
@@ -83,8 +83,6 @@ public class ItemBase {
|
||||
this.hashID = rs.getInt("itemHashID");
|
||||
|
||||
this.isConsumable = false;
|
||||
|
||||
this.equipFlag = rs.getInt("equipFlag");
|
||||
this.restrictFlag = rs.getInt("restrictFlag");
|
||||
this.skillRequired = rs.getString("skillRequired");
|
||||
this.percentRequired = rs.getShort("percentRequired");
|
||||
@@ -228,16 +226,6 @@ public class ItemBase {
|
||||
return this.isConsumable;
|
||||
}
|
||||
|
||||
public int getEquipFlag() {
|
||||
|
||||
if ((this.type == ItemType.ARMOR)
|
||||
|| (this.type == ItemType.WEAPON)
|
||||
|| (this.type == ItemType.JEWELRY))
|
||||
return this.equipFlag;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean isRune() {
|
||||
int ID = uuid;
|
||||
if (ID > 2499 && ID < 3050) //class, discipline runes
|
||||
@@ -442,18 +430,6 @@ public class ItemBase {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public boolean isRing() {
|
||||
return ((this.equipFlag & (64 | 128 | 192)) != 0);
|
||||
}
|
||||
|
||||
public boolean isNecklace() {
|
||||
return (this.equipFlag == 256);
|
||||
}
|
||||
|
||||
public boolean isShield() {
|
||||
return this.type.equals(ItemType.ARMOR) && this.equipFlag == 2;
|
||||
}
|
||||
|
||||
public boolean isLightArmor() {
|
||||
return this.skillRequired.equals("Wear Armor, Light");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user