RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.dialogue.impl.ConstructionDialogue Class Reference
Inheritance diagram for com.runehive.content.dialogue.impl.ConstructionDialogue:
Collaboration diagram for com.runehive.content.dialogue.impl.ConstructionDialogue:

Public Member Functions

void sendDialogues (DialogueFactory factory)
 Sends a player a dialogue.

Private Attributes

final int id = 5419

Additional Inherited Members

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.
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.

Detailed Description

Definition at line 9 of file ConstructionDialogue.java.

Member Function Documentation

◆ sendDialogues()

void com.runehive.content.dialogue.impl.ConstructionDialogue.sendDialogues ( DialogueFactory factory)

Sends a player a dialogue.

Parameters
factoryThe factory for this dialogue.

Reimplemented from com.runehive.content.dialogue.Dialogue.

Definition at line 14 of file ConstructionDialogue.java.

14 {
15 Player player = factory.getPlayer();
16
17 factory.sendNpcChat(id, Expression.HAPPY, "Hello #name, how may I assist you?").sendOption("I would like to purchase a house (<col=ff0000>1m coins</col>)", () -> {
18 factory.onAction(() -> {
19 player.house.purchase();
20 });
21
22 }, "I want to change my house location", () -> {
23
24 factory.onAction(() -> {
25 factory.sendNpcChat(id, Expression.HAPPY, "Be advised, changing home location will result", "in you <col=ff0000>losing</col> all house object.").sendOption("Small cave (100,000gp)", () -> {
26 factory.onAction(() -> {
27 player.house.location(BuildableMap.SMALL_CAVE);
28 });
29
30 }, "Throne room (15,000,000gp)", () -> {
31 factory.onAction(() -> {
32 player.house.location(BuildableMap.THRONE_ROOM);
33 });
34 }).execute();
35 });
36
37 }, "Nevermind", () -> {
38 factory.onAction(() -> {
39 player.interfaceManager.close();
40 });
41
42 }).execute();
43 }

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.house, com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.content.skill.impl.construction.House.location(), com.runehive.content.dialogue.DialogueFactory.onAction(), com.runehive.content.skill.impl.construction.House.purchase(), com.runehive.content.dialogue.DialogueFactory.sendNpcChat(), com.runehive.content.dialogue.DialogueFactory.sendOption(), com.runehive.content.skill.impl.construction.BuildableMap.SMALL_CAVE, and com.runehive.content.skill.impl.construction.BuildableMap.THRONE_ROOM.

Here is the call graph for this function:

Member Data Documentation

◆ id

final int com.runehive.content.dialogue.impl.ConstructionDialogue.id = 5419
private

Definition at line 11 of file ConstructionDialogue.java.


The documentation for this class was generated from the following file: