mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-21 09:02:07 -07:00
Fixed mining gem random reward logic to actually drop the gem if player inventory is full
This commit is contained in:
parent
5c4134e2e3
commit
135dcb136c
1 changed files with 2 additions and 1 deletions
|
|
@ -189,9 +189,10 @@ class MiningSkillPulse(private val player: Player, private val node: Node) : Pul
|
|||
if (RandomFunction.roll(chance)) {
|
||||
val gem = GEM_REWARDS.random()
|
||||
sendMessage(player,"You find a ${gem.name}!")
|
||||
if (!addItem(player, gem.id)) {
|
||||
if (freeSlots(player) == 0) {
|
||||
sendMessage(player,"You do not have enough space in your inventory, so you drop the gem on the floor.")
|
||||
}
|
||||
addItemOrDrop(player, gem.id)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue