From 0070b99d3796676fed0da8eb70139bb64cba26b8 Mon Sep 17 00:00:00 2001 From: NixWigton Date: Thu, 29 Jul 2021 12:56:12 -0500 Subject: [PATCH] Fixed issue where cert random event wouldn't give a reward if your inventory was full. --- .../rs09/game/content/ame/events/certer/CerterDialogue.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterDialogue.kt b/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterDialogue.kt index 728480e8e..b29c231f8 100644 --- a/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterDialogue.kt +++ b/Server/src/main/kotlin/rs09/game/content/ame/events/certer/CerterDialogue.kt @@ -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 }