Browse Source

Logic update in byfromnpc

combat-2
MagicBot 8 months ago
parent
commit
d7eef4c623
  1. 7
      src/engine/net/client/handlers/BuyFromNPCMsgHandler.java

7
src/engine/net/client/handlers/BuyFromNPCMsgHandler.java

@ -61,7 +61,10 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler { @@ -61,7 +61,10 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler {
if (gold == null)
return true;
Item buy = null;
Item buy = Item.getFromCache(buyFromNPCMsg.getItemID());
if (buy == null)
return true;
if (buyFromNPCMsg.getItemType() == Enum.GameObjectType.Item.ordinal()) {
@ -72,7 +75,7 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler { @@ -72,7 +75,7 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler {
for (Item me : sellInventory) {
if (me.getObjectUUID() == buyFromNPCMsg.getItemID()) {
if (me.templateID == buy.templateID) {
//test room available for item
if (!itemMan.hasRoomInventory(me.template.item_wt))

Loading…
Cancel
Save