Fixed issue where cert random event wouldn't give a reward if your inventory was full.
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
package rs09.game.content.ame.events.certer
|
package rs09.game.content.ame.events.certer
|
||||||
|
|
||||||
|
import api.ContentAPI
|
||||||
import core.game.component.Component
|
import core.game.component.Component
|
||||||
|
import core.game.node.item.GroundItemManager
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import rs09.game.content.dialogue.DialogueFile
|
||||||
import rs09.tools.END_DIALOGUE
|
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++ }
|
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 -> {
|
1 -> {
|
||||||
npc("Please, take this as a thanks.")
|
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()
|
player!!.antiMacroHandler.event?.terminate()
|
||||||
stage = END_DIALOGUE
|
stage = END_DIALOGUE
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user