forked from MagicBane/Server
Refactor item_type
This commit is contained in:
@@ -162,7 +162,7 @@ public class BuyFromNPCWindowMsg extends ClientNetMsg {
|
||||
for (Item item : inventory) {
|
||||
if (item.getOwnerID() != ownerID)
|
||||
continue;
|
||||
if (item.getItemBase().getType().equals(ItemType.GOLD)) {
|
||||
if (item.template.item_type.equals(ItemType.GOLD)) {
|
||||
if (item.getNumOfItems() == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class UpdateInventoryMsg extends ClientNetMsg {
|
||||
|
||||
|
||||
for (Item item : list) {
|
||||
if (item.getItemBase().getType().equals(ItemType.GOLD)) {
|
||||
if (item.template.item_type.equals(ItemType.GOLD)) {
|
||||
if (item.getNumOfItems() == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class UseCharterMsg extends ClientNetMsg {
|
||||
|
||||
if (close) {
|
||||
for (Item i : player.getInventory()) {
|
||||
if (i.getItemBase().getType().equals(ItemType.GUILDCHARTER)) {
|
||||
if (i.template.item_type.equals(ItemType.CHARTER)) {
|
||||
charterUUID = i.getObjectUUID();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user