Logic update in byfromnpc
This commit is contained in:
@@ -61,7 +61,10 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler {
|
|||||||
if (gold == null)
|
if (gold == null)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Item buy = null;
|
Item buy = Item.getFromCache(buyFromNPCMsg.getItemID());
|
||||||
|
|
||||||
|
if (buy == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (buyFromNPCMsg.getItemType() == Enum.GameObjectType.Item.ordinal()) {
|
if (buyFromNPCMsg.getItemType() == Enum.GameObjectType.Item.ordinal()) {
|
||||||
|
|
||||||
@@ -72,7 +75,7 @@ public class BuyFromNPCMsgHandler extends AbstractClientMsgHandler {
|
|||||||
|
|
||||||
for (Item me : sellInventory) {
|
for (Item me : sellInventory) {
|
||||||
|
|
||||||
if (me.getObjectUUID() == buyFromNPCMsg.getItemID()) {
|
if (me.templateID == buy.templateID) {
|
||||||
|
|
||||||
//test room available for item
|
//test room available for item
|
||||||
if (!itemMan.hasRoomInventory(me.template.item_wt))
|
if (!itemMan.hasRoomInventory(me.template.item_wt))
|
||||||
|
|||||||
Reference in New Issue
Block a user