Browse Source

resource dupe

lakebane-master
FatBoy-DOTC 10 months ago
parent
commit
512aba5cd9
  1. 15
      src/engine/net/client/ClientMessagePump.java

15
src/engine/net/client/ClientMessagePump.java

@ -1443,20 +1443,6 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1443,20 +1443,6 @@ public class ClientMessagePump implements NetMsgHandler {
ChatManager.chatSystemError(sourcePlayer, "Failed To Buy Item");
return;
}
if(ib.getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) {
int count = 1;
for(Item item : itemMan.getInventory()){
if(item.getItemBaseID() == ib.getUUID()){
if(item.getNumOfItems() + count <= Warehouse.getMaxResources().get(ib.getUUID())){
count += item.getNumOfItems();
itemMan.delete(item);
}
}
}
Item resource = new MobLoot(sourcePlayer,ib,count,false).promoteToItem(sourcePlayer);
itemMan.addItemToInventory(resource);
}else {
buy = Item.createItemForPlayer(sourcePlayer, ib);
if (buy != null) {
me.transferEnchants(buy);
@ -1465,7 +1451,6 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1465,7 +1451,6 @@ public class ClientMessagePump implements NetMsgHandler {
}
}
}
}
} else if (msg.getItemType() == GameObjectType.Item.ordinal()) {
CharacterItemManager npcCim = npc.getCharItemManager();

Loading…
Cancel
Save