forked from 2009Scape/Server
Fixed issue where cert random event wouldn't give a reward if your inventory was full.
This commit is contained in:
parent
d3b3c0ec60
commit
0070b99d37
1 changed files with 3 additions and 1 deletions
|
|
@ -1,6 +1,8 @@
|
|||
package rs09.game.content.ame.events.certer
|
||||
|
||||
import api.ContentAPI
|
||||
import core.game.component.Component
|
||||
import core.game.node.item.GroundItemManager
|
||||
import rs09.game.content.dialogue.DialogueFile
|
||||
import rs09.tools.END_DIALOGUE
|
||||
|
||||
|
|
@ -21,7 +23,7 @@ class CerterDialogue(val initial: Boolean) : DialogueFile() {
|
|||
0 -> if(!isCorrect) npc("Sorry, I don't think so.").also { stage = END_DIALOGUE; player!!.antiMacroHandler.event?.terminate() } else npc("Oh yes! That's right.").also { stage++ }
|
||||
1 -> {
|
||||
npc("Please, take this as a thanks.")
|
||||
player!!.antiMacroHandler.event?.loot!!.roll(player!!).forEach { player!!.inventory.add(it) }
|
||||
player!!.antiMacroHandler.event?.loot!!.roll().forEach { ContentAPI.addItemOrDrop(player!!, it.id, it.amount) }
|
||||
player!!.antiMacroHandler.event?.terminate()
|
||||
stage = END_DIALOGUE
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue