fix cannonballs
This commit is contained in:
@@ -36,6 +36,7 @@ import core.game.world.update.flag.chunk.AnimateObjectUpdateFlag
|
|||||||
import core.game.world.update.flag.context.Animation
|
import core.game.world.update.flag.context.Animation
|
||||||
import core.game.world.update.flag.context.Graphics
|
import core.game.world.update.flag.context.Graphics
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import rs09.game.content.dialogue.DialogueFile
|
||||||
|
import rs09.game.content.dialogue.SkillDialogueHandler
|
||||||
import rs09.game.content.global.GlobalKillCounter;
|
import rs09.game.content.global.GlobalKillCounter;
|
||||||
import rs09.game.system.SystemLogger
|
import rs09.game.system.SystemLogger
|
||||||
import rs09.game.system.config.ItemConfigParser;
|
import rs09.game.system.config.ItemConfigParser;
|
||||||
@@ -611,6 +612,7 @@ fun openDialogue(player: Player, dialogue: Any, vararg args: Any) {
|
|||||||
when (dialogue) {
|
when (dialogue) {
|
||||||
is Int -> player.dialogueInterpreter.open(dialogue, *args)
|
is Int -> player.dialogueInterpreter.open(dialogue, *args)
|
||||||
is DialogueFile -> player.dialogueInterpreter.open(dialogue, *args)
|
is DialogueFile -> player.dialogueInterpreter.open(dialogue, *args)
|
||||||
|
is SkillDialogueHandler -> dialogue.open()
|
||||||
else -> SystemLogger.logErr("Invalid object type passed to openDialogue() -> ${dialogue.javaClass.simpleName}")
|
else -> SystemLogger.logErr("Invalid object type passed to openDialogue() -> ${dialogue.javaClass.simpleName}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class AmmoMouldOnFurnace : InteractionListener(){
|
|||||||
private fun cannonBallOnUseWithHandler(player: Player, used: Node, with: Node): Boolean {
|
private fun cannonBallOnUseWithHandler(player: Player, used: Node, with: Node): Boolean {
|
||||||
face(player, with.centerLocation)
|
face(player, with.centerLocation)
|
||||||
|
|
||||||
if(isQuestComplete(player, DwarfCannon.NAME)) {
|
if(!isQuestComplete(player, DwarfCannon.NAME)) {
|
||||||
sendDialogue(player, "You need to complete the ${DwarfCannon.NAME} quest in order to do this.")
|
sendDialogue(player, "You need to complete the ${DwarfCannon.NAME} quest in order to do this.")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user