mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 16:49:06 +00:00
Astraeus Dialogue System Port (#512)
* - Marked As Deprecated - Reorganized DialogueOptions.java so that option buttons are grouped with each interface - Added temporary Dialogue Executor to make new Dialogue System function - Remove Man, Woman, and Banker Dialogue and Dialogue Options * - Refactored Dialogue.java into DialoguePacket.java - Moved DialoguePacket.java into impl packets package - Added Astraeus dialogue executor * - Removed useless file - Reorganized the Misc.java file * - Ported Astraeus Dialogue System - Rewrote Man, Woman, and Banker Dialogues - Added line splitter in AstraeusDialogueFactory.java * - Renamed Astraeus* classes to *Plugin - Fixed an issue where the Dialogue Option buttons were not executed through the Kotlin file
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package plugin.buttons
|
||||
|
||||
import com.rs2.event.SubscribesTo
|
||||
import com.rs2.event.impl.ButtonActionEvent
|
||||
import com.rs2.game.dialogues.DialoguePlugin
|
||||
import com.rs2.game.players.Player
|
||||
import plugin.buttons.ButtonClick
|
||||
|
||||
@SubscribesTo(ButtonActionEvent::class)
|
||||
class DialogueOptionButtons : ButtonClick() {
|
||||
|
||||
override fun execute(player: Player, event: ButtonActionEvent) {
|
||||
|
||||
when (event.button) {
|
||||
|
||||
// First Option (Option Interfaces 2, 3, 4, and 5)
|
||||
9157, 9167, 9178, 9190 ->
|
||||
player.dialogueFactory.executeOption(0, player.optionDialogue)
|
||||
|
||||
// Second Option (Option Interfaces 2, 3, 4, and 5)
|
||||
9158, 9168, 9179, 9191 ->
|
||||
player.dialogueFactory.executeOption(1, player.optionDialogue)
|
||||
|
||||
// Third Option (Option Interfaces 3, 4, and 5)
|
||||
9169, 9180, 9192 ->
|
||||
player.dialogueFactory.executeOption(2, player.optionDialogue)
|
||||
|
||||
// Fourth Option (Option Interfaces 4 and 5)
|
||||
9181, 9193 ->
|
||||
player.dialogueFactory.executeOption(3, player.optionDialogue)
|
||||
|
||||
// Fifth Option (Option Interface 5)
|
||||
9194 ->
|
||||
player.dialogueFactory.executeOption(4, player.optionDialogue)
|
||||
}
|
||||
}
|
||||
|
||||
override fun test(event: ButtonActionEvent): Boolean {
|
||||
return DialoguePlugin.isDialogueButton(event.button)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user