forked from MagicBane/Server
Logic update in byfromnpc
This commit is contained in:
@@ -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 {
|
||||
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user