RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.dialogue.impl.RoyalKingDialogue Class Reference

The royal king dialogue. More...

Inheritance diagram for com.runehive.content.dialogue.impl.RoyalKingDialogue:
Collaboration diagram for com.runehive.content.dialogue.impl.RoyalKingDialogue:

Public Member Functions

 RoyalKingDialogue (int index)
void sendDialogues (DialogueFactory factory)
 Sends a player a dialogue.

Private Member Functions

void claim (DialogueFactory factory)
void myStats (DialogueFactory factory)
void store (DialogueFactory factory)

Private Attributes

int index

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

The royal king dialogue.

Author
Daniel

Definition at line 16 of file RoyalKingDialogue.java.

Constructor & Destructor Documentation

◆ RoyalKingDialogue()

com.runehive.content.dialogue.impl.RoyalKingDialogue.RoyalKingDialogue ( int index)

Definition at line 20 of file RoyalKingDialogue.java.

20 {
21 this.index = index;
22 }
val index

References index.

Member Function Documentation

◆ claim()

void com.runehive.content.dialogue.impl.RoyalKingDialogue.claim ( DialogueFactory factory)
private

Definition at line 47 of file RoyalKingDialogue.java.

47 {
48 Player player = factory.getPlayer();
49 player.send(new SendMessage("Claiming is temporarily disabled until EverythingRS is replaced."));
50 /*new Thread(() -> {
51 try {
52 Donation[] donations = Donation.donations(
53 "V48tgd7OxwrvPMmZZbjkVt6qTYB2MrZ5sw6PD4DBJnM83zepnUlIT8DiFoND3BYEQjqxPamH", player.getName());
54 if (donations.length == 0) {
55 player.send(new SendMessage("You currently don't have any items waiting. You must donate first!"));
56 return;
57 }
58 if (donations[0].message != null) {
59 player.send(new SendMessage(donations[0].message));
60 return;
61 }
62 for (Donation donate : donations) {
63 player.inventory.add(new Item(donate.product_id, donate.product_amount));
64 }
65 player.send(new SendMessage("Thank you for donating!"));
66 } catch (Exception e) {
67 player.send(new SendMessage("Api Services are currently offline. Please check back shortly"));
68 e.printStackTrace();
69 }
70 }).start();*/
71 }

References com.runehive.content.dialogue.DialogueFactory.getPlayer(), and com.runehive.game.world.entity.mob.player.Player.send().

Referenced by sendDialogues().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ myStats()

void com.runehive.content.dialogue.impl.RoyalKingDialogue.myStats ( DialogueFactory factory)
private

Definition at line 42 of file RoyalKingDialogue.java.

42 {
43 factory.sendStatement("Money spent: $" + factory.getPlayer().donation.getSpent(), "Current credits: " + factory.getPlayer().donation.getCredits());
44 }

References com.runehive.game.world.entity.mob.player.Player.donation, com.runehive.content.donators.Donation.getCredits(), com.runehive.content.dialogue.DialogueFactory.getPlayer(), com.runehive.content.donators.Donation.getSpent(), and com.runehive.content.dialogue.DialogueFactory.sendStatement().

Referenced by sendDialogues().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendDialogues()

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

Sends a player a dialogue.

Parameters
factoryThe factory for this dialogue.

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

Definition at line 25 of file RoyalKingDialogue.java.

25 {
26 if (index == 1) {
27 claim(factory);
28 factory.execute();
29 return;
30 }
31 if (index == 2) {
32 store(factory);
33 factory.execute();
34 return;
35 }
36 Player player = factory.getPlayer();
37 factory.sendNpcChat(5523, Expression.HAPPY, "Hello adventurer, how may I help you?");
38 factory.sendOption("Claim Purchase", () -> claim(factory), "Donator Information", () -> player.send(new SendURL("https://runehive.com")), "My donation statistics", () -> myStats(factory), "Open Store", () -> store(factory), "Nevermind", factory::clear);
39 factory.execute();
40 }

References claim(), com.runehive.content.dialogue.DialogueFactory.execute(), com.runehive.content.dialogue.DialogueFactory.getPlayer(), com.runehive.content.dialogue.Expression.HAPPY, index, myStats(), com.runehive.game.world.entity.mob.player.Player.send(), com.runehive.content.dialogue.DialogueFactory.sendNpcChat(), com.runehive.content.dialogue.DialogueFactory.sendOption(), and store().

Here is the call graph for this function:

◆ store()

void com.runehive.content.dialogue.impl.RoyalKingDialogue.store ( DialogueFactory factory)
private

Definition at line 74 of file RoyalKingDialogue.java.

74 {
75 factory.sendOption("Open Donator Store", () -> Store.STORES.get("Donator Store").open(factory.getPlayer()), "Ironman Donator Store", () -> Store.STORES.get("Ironman Donator Store").open(factory.getPlayer()),"Nevermind", factory::clear);
76 }

References com.runehive.content.dialogue.DialogueFactory.getPlayer(), com.runehive.content.dialogue.DialogueFactory.sendOption(), and com.runehive.content.store.Store.STORES.

Referenced by sendDialogues().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ index

int com.runehive.content.dialogue.impl.RoyalKingDialogue.index
private

Definition at line 18 of file RoyalKingDialogue.java.

Referenced by RoyalKingDialogue(), and sendDialogues().


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