Fixed the bug where an NPC would show up on an item dialogue

Refactored both item and double item dialogues
This commit is contained in:
Oven Bread
2025-04-06 08:18:17 +00:00
committed by Ryan
parent 300b714048
commit 7c74bfcb71
4 changed files with 73 additions and 71 deletions
+2 -2
View File
@@ -1842,8 +1842,8 @@ fun sendItemDialogue(player: Player, item: Any, message: String) {
*/
fun sendDoubleItemDialogue(player: Player, item1: Any, item2: Any, message: String) {
when (item1) {
is Item -> player.dialogueInterpreter.sendDoubleItemMessage(item1, item2 as Item, message)
is Int -> player.dialogueInterpreter.sendDoubleItemMessage(item1, item2 as Int, message)
is Item -> player.dialogueInterpreter.sendDoubleItemMessage(item1, item2 as Item, *splitLines(message))
is Int -> player.dialogueInterpreter.sendDoubleItemMessage(item1, item2 as Int, *splitLines(message))
}
}