Refactor item_type
This commit is contained in:
@@ -219,7 +219,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
return;
|
||||
|
||||
if (item.containerType == ItemContainerType.INVENTORY && itemManager.isBankOpen())
|
||||
if (item.getItemBase().getType().equals(engine.Enum.ItemType.GOLD)) {
|
||||
if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) {
|
||||
if (!itemManager.moveGoldToBank(item, msg.getNumItems()))
|
||||
return;
|
||||
UpdateGoldMsg goldMes = new UpdateGoldMsg(player);
|
||||
@@ -274,7 +274,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
if (item.containerType == ItemContainerType.BANK && itemManager.isBankOpen() == false)
|
||||
return;
|
||||
|
||||
if (item.getItemBase().getType().equals(engine.Enum.ItemType.GOLD)) {
|
||||
if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) {
|
||||
|
||||
if (!itemManager.moveGoldToInventory(item, msg.getNumItems()))
|
||||
return;
|
||||
@@ -738,7 +738,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
return;
|
||||
|
||||
|
||||
if (item.getItemBase().getType().equals(engine.Enum.ItemType.GOLD)) {
|
||||
if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) {
|
||||
// this is done to prevent the temporary goldItem item
|
||||
// (from the mob) from appearing in player's inventory.
|
||||
// It also updates the goldItem quantity display
|
||||
@@ -769,7 +769,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
//TODO send group loot message if player is grouped and visible
|
||||
Group group = GroupManager.getGroup(player);
|
||||
|
||||
if (group != null && group.getSplitGold() && (item.getItemBase().getType().equals(engine.Enum.ItemType.GOLD) == false)) {
|
||||
if (group != null && group.getSplitGold() && (item.template.item_type.equals(engine.Enum.ItemType.GOLD) == false)) {
|
||||
String name = item.getName();
|
||||
String text = player.getFirstName() + " has looted " + name + '.';
|
||||
ChatManager.chatGroupInfoCanSee(player, text);
|
||||
@@ -787,7 +787,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.getItemBase().getType().equals(engine.Enum.ItemType.GOLD)) {
|
||||
if (item.template.item_type.equals(engine.Enum.ItemType.GOLD)) {
|
||||
// this is done to prevent the temporary goldItem item
|
||||
// (from the mob) from appearing in player's inventory.
|
||||
// It also updates the goldItem quantity display
|
||||
@@ -826,7 +826,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
//TODO send group loot message if player is grouped and visible
|
||||
Group group = GroupManager.getGroup(player);
|
||||
|
||||
if (group != null && group.getSplitGold() && (item.getItemBase().getType().equals(engine.Enum.ItemType.GOLD) == false)) {
|
||||
if (group != null && group.getSplitGold() && (item.template.item_type.equals(engine.Enum.ItemType.GOLD) == false)) {
|
||||
String name = item.getName();
|
||||
String text = player.getFirstName() + " has looted " + name + '.';
|
||||
ChatManager.chatGroupInfoCanSee(player, text);
|
||||
|
||||
Reference in New Issue
Block a user