mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
[GH-ISSUE #84] Cannot buy runes if inventory full (have runes) #8379
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RedSparr0w on GitHub (Oct 22, 2019).
Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/84
You can't buy runes from a shop if you have no space in your inventory (but already have that rune in your inventory)
@Gptaqbc commented on GitHub (Oct 23, 2019):
There is a little fix to do in the 2006rebotted/2006Redone Server/src/redone/game/shops/ShopAssistant.java to solve this issue.
The problem is here :
This should be changed to also check if the player have a stack of the items he tries to buy in his inventory.
I don't know if it's possible as I can't look at all the code as of right now but it doesn't seem really hard to check the inventory for an item at this step.
@Gptaqbc commented on GitHub (Oct 23, 2019):
|| player.getItemAssistant().playerHasItem(itemID)
This is what needs to be added but I can seem to figure out how to know if the itemId is a stackable item. I'll be back later
Edit: got it
@Gptaqbc commented on GitHub (Oct 23, 2019):
It now works for stackable items! I'll just have to do some testing to be sure it's all good.
Could I be assigned to the task real quick? thx!