Minor Cash Shop + cash items fixes

Fixed minor issues regarding the Cash Shop not selling items and usable
cash items.
This commit is contained in:
ronancpl
2017-05-17 22:56:07 -03:00
parent d736d00964
commit 39a53e88fd
6 changed files with 37 additions and 22 deletions

View File

@@ -188,17 +188,12 @@ public class AbstractPlayerInteraction {
}
public boolean canHold(int itemid) {
return canHold(itemid, 1);
}
return canHold(itemid, 1);
}
public boolean canHold(int itemid, int quantity) {
if(haveItem(itemid)) {
if(getPlayer().getItemQuantity(itemid, false) + quantity <= MapleItemInformationProvider.getInstance().getSlotMax(c, itemid))
return true;
}
return getPlayer().getInventory(MapleItemInformationProvider.getInstance().getInventoryType(itemid)).getNextFreeSlot() > -1;
}
return getPlayer().canHold(itemid, quantity);
}
//---- \/ \/ \/ \/ \/ \/ \/ NOT TESTED \/ \/ \/ \/ \/ \/ \/ \/ \/ ----