You can't buy runes from a shop if you have no space in your inventory (but already have that rune in your inventory)
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)
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 :
if (player.getItemAssistant().freeSlots() > 0)
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.
<!-- gh-comment-id:545615903 -->
@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 :
> if (player.getItemAssistant().freeSlots() > 0)
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.
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
<!-- gh-comment-id:545660808 -->
@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
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!
<!-- gh-comment-id:545662744 -->
@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!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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!