|
RuneHive-Game
|
Public Member Functions | |
| AIDialogueHandler (Npc npc) | |
| void | sendDialogues (DialogueFactory factory) |
| Sends a player a dialogue. | |
Static Public Member Functions | |
| static void | handleAICommand (Player player, String message) |
| Process AI command input (called from command handler) | |
| Static Public Member Functions inherited from com.runehive.content.dialogue.Dialogue | |
| static final boolean | isDialogueButton (int button) |
| Checks if the button triggered is an optional dialogue button. | |
Private Member Functions | |
| void | processGandalfAIMessage (Player player, Npc npc, String message) |
| String | sanitizeInput (String input) |
| void | streamGandalfResponse (Player player, Npc npc, String response) |
| String[] | wrapTextToLines (String text, int maxCharsPerLine) |
Static Private Member Functions | |
| static Npc | findNearbyNpc (Player player, int npcId, int targetX, int targetY, int maxDistance) |
| Find an NPC by ID near specific coordinates. | |
Private Attributes | |
| final Npc | npc |
Static Private Attributes | |
| static final int | GANDALF_AI_ID = 2108 |
| static final Logger | logger = LoggerFactory.getLogger(AIDialogueHandler.class) |
Additional Inherited Members | |
| Static Public Attributes inherited from com.runehive.content.dialogue.Dialogue | |
| static final ImmutableList< Integer > | DIALOGUE_BUTTONS = ImmutableList.of(2461, 2471, 2482, 2462, 2472, 2483, 2473, 2484, 2485, 2494, 2495, 2496, 2497, 2498) |
| The action buttons responsible for dialogues. | |
Definition at line 17 of file AIDialogueHandler.java.
| com.runehive.content.ai.AIDialogueHandler.AIDialogueHandler | ( | Npc | npc | ) |
Definition at line 24 of file AIDialogueHandler.java.
References npc.
Referenced by handleAICommand(), and streamGandalfResponse().
|
staticprivate |
Find an NPC by ID near specific coordinates.
Definition at line 101 of file AIDialogueHandler.java.
References com.runehive.game.world.position.Position.getHeight(), com.runehive.game.world.World.getNpcs(), com.runehive.game.world.entity.Entity.getPosition(), and npc.
Referenced by handleAICommand().
|
static |
Process AI command input (called from command handler)
Definition at line 53 of file AIDialogueHandler.java.
References AIDialogueHandler(), com.runehive.game.world.entity.mob.Mob.face(), findNearbyNpc(), GANDALF_AI_ID, com.runehive.game.world.position.Position.getHeight(), com.runehive.game.world.entity.Entity.getPosition(), com.runehive.game.world.entity.mob.player.Player.getUsername(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), com.runehive.content.ai.LazyAIManager.isInitialized(), com.runehive.game.world.entity.mob.Locking.lock, com.runehive.game.world.entity.mob.Mob.locking, com.runehive.content.ai.LazyAIManager.markInstructionsReceived(), com.runehive.game.world.entity.mob.player.Player.message(), com.runehive.game.world.entity.mob.Mob.move(), and com.runehive.game.world.position.Position.Position().
|
private |
Definition at line 122 of file AIDialogueHandler.java.
References com.runehive.content.dialogue.Expression.ANGRY, com.runehive.game.world.entity.mob.player.InterfaceManager.close(), com.runehive.content.ai.LazyAIManager.getOpenAIService(), com.runehive.game.world.entity.mob.player.Player.getUsername(), com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.game.world.entity.Entity.isRegistered(), com.runehive.game.world.entity.mob.Locking.lock, com.runehive.game.world.entity.mob.Mob.locking, logger, npc, com.runehive.content.ai.OpenAIService.processPlayerMessage(), com.runehive.game.world.object.CustomGameObject.register(), com.runehive.content.dialogue.Expression.SAD, com.runehive.game.world.World.schedule(), streamGandalfResponse(), com.runehive.game.world.entity.mob.Locking.unlock(), com.runehive.game.world.object.CustomGameObject.unregister(), and com.runehive.game.world.object.ObjectDirection.WEST.
|
private |
Definition at line 114 of file AIDialogueHandler.java.
| void com.runehive.content.ai.AIDialogueHandler.sendDialogues | ( | DialogueFactory | factory | ) |
Sends a player a dialogue.
| factory | The factory for this dialogue. |
Reimplemented from com.runehive.content.dialogue.Dialogue.
Definition at line 29 of file AIDialogueHandler.java.
References com.runehive.game.world.entity.mob.player.InterfaceManager.close(), com.runehive.content.dialogue.DialogueFactory.getPlayer(), com.runehive.content.dialogue.Expression.HAPPY, com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.game.world.entity.mob.Locking.lock, com.runehive.game.world.entity.mob.Mob.locking, npc, com.runehive.content.dialogue.DialogueFactory.onAction(), com.runehive.content.dialogue.DialogueFactory.sendNpcChat(), and com.runehive.game.world.entity.mob.Locking.unlock().
|
private |
Definition at line 211 of file AIDialogueHandler.java.
References AIDialogueHandler(), com.runehive.content.ai.LazyAIManager.clearPlayerConsent(), com.runehive.game.world.entity.mob.player.InterfaceManager.close(), com.runehive.game.world.entity.mob.player.Player.dialogueFactory, com.runehive.content.dialogue.DialogueFactory.execute(), com.runehive.game.world.entity.mob.player.Player.getUsername(), com.runehive.content.dialogue.Expression.HAPPY, com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.game.world.entity.mob.Mob.locking, logger, npc, com.runehive.content.dialogue.DialogueFactory.onAction(), com.runehive.content.dialogue.DialogueFactory.player, com.runehive.game.world.World.schedule(), com.runehive.content.dialogue.DialogueFactory.sendDialogue(), com.runehive.content.dialogue.DialogueFactory.sendNpcChat(), com.runehive.content.dialogue.DialogueFactory.sendOption(), com.runehive.game.world.entity.mob.Mob.speak(), com.runehive.game.world.entity.mob.Locking.unlock(), and wrapTextToLines().
Referenced by processGandalfAIMessage().
|
private |
Definition at line 291 of file AIDialogueHandler.java.
Referenced by streamGandalfResponse().
|
staticprivate |
Definition at line 20 of file AIDialogueHandler.java.
Referenced by handleAICommand().
|
staticprivate |
Definition at line 19 of file AIDialogueHandler.java.
Referenced by processGandalfAIMessage(), and streamGandalfResponse().
|
private |
Definition at line 22 of file AIDialogueHandler.java.
Referenced by AIDialogueHandler(), findNearbyNpc(), processGandalfAIMessage(), sendDialogues(), and streamGandalfResponse().