RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.activity.panel.ActivityPanel Class Reference

Handles the activity panel. More...

Static Public Member Functions

static void clear (Player player)
 Clears the activity panel.
static void timedClear (Player player, int delay)
 Clears the activity panel after a defined set of time.
static void update (Activity_Panel panel)
 Sends all the information for the activity panel.
static void update (Player player, int amount, String header, String footer, Item container, String... strings)
 Sends all the information for the activity panel.
static void update (Player player, int amount, String header, String footer, Item[] container, String... strings)
 Sends all the information for the activity panel.
static void update (Player player, int amount, String title, Item item, String... strings)
 Sends all the information for the activity panel.
static void update (Player player, int amount, String title, String footer, String... strings)
 Sends all the information for the activity panel.

Detailed Description

Handles the activity panel.

Author
Daniel.

Definition at line 18 of file ActivityPanel.java.

Member Function Documentation

◆ clear()

void com.runehive.content.activity.panel.ActivityPanel.clear ( Player player)
static

Clears the activity panel.

Definition at line 57 of file ActivityPanel.java.

57 {
58 player.send(new SendItemOnInterface(38016));
59 player.send(new SendString("", 38003));
60 player.send(new SendString("", 38004));
61 player.send(new SendString("", 38005));
62 player.send(new SendString("", 38006));
63 player.send(new SendString("", 38007));
64 player.send(new SendString("", 38008));
65 player.send(new SendProgressBar(38008, -1));
66 player.send(new SendForceTab(Config.INVENTORY_TAB));
67 player.interfaceManager.setSidebar(Config.ACTIVITY_TAB, -1);
68 }

References com.runehive.Config.ACTIVITY_TAB, com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.Config.INVENTORY_TAB, com.runehive.game.world.entity.mob.player.Player.send(), and com.runehive.game.world.entity.mob.player.InterfaceManager.setSidebar().

Referenced by com.runehive.content.activity.impl.fightcaves.FightCaves.cleanup(), com.runehive.content.activity.impl.godwars.GodwarsActivity.cleanup(), com.runehive.content.activity.impl.recipefordisaster.RecipeForDisaster.cleanup(), com.runehive.content.activity.inferno.Inferno.cleanup(), com.runehive.content.activity.impl.barrows.Barrows.finish(), com.runehive.content.activity.impl.magearena.MageArena.finish(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.finish(), com.runehive.game.action.impl.TutorialActivity.finish(), and timedClear().

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

◆ timedClear()

void com.runehive.content.activity.panel.ActivityPanel.timedClear ( Player player,
int delay )
static

Clears the activity panel after a defined set of time.

Definition at line 71 of file ActivityPanel.java.

71 {
72 World.schedule(delay, () -> clear(player));
73 }

References clear(), and com.runehive.game.world.World.schedule().

Here is the call graph for this function:

◆ update() [1/5]

void com.runehive.content.activity.panel.ActivityPanel.update ( Activity_Panel panel)
static

Sends all the information for the activity panel.

Definition at line 35 of file ActivityPanel.java.

35 {
36 update(panel.getPlayer(), panel.getProgress(), panel.getHeader(), panel.getFooter(), new Item[]{panel.getItem()}, panel.getText());
37 }

References update().

Here is the call graph for this function:

◆ update() [2/5]

void com.runehive.content.activity.panel.ActivityPanel.update ( Player player,
int amount,
String header,
String footer,
Item container,
String... strings )
static

Sends all the information for the activity panel.

Definition at line 30 of file ActivityPanel.java.

30 {
31 update(player, amount, header, footer, new Item[]{container}, strings);
32 }

References update().

Here is the call graph for this function:

◆ update() [3/5]

void com.runehive.content.activity.panel.ActivityPanel.update ( Player player,
int amount,
String header,
String footer,
Item[] container,
String... strings )
static

Sends all the information for the activity panel.

Definition at line 40 of file ActivityPanel.java.

40 {
41 player.interfaceManager.setSidebar(Config.ACTIVITY_TAB, 38000);
42 if (!player.interfaceManager.isSidebar(Config.ACTIVITY_TAB, 38000)) {
43 player.send(new SendForceTab(Config.ACTIVITY_TAB));
44 }
45 for (int index = 0, string = 38005; index < strings.length; index++, string += 1) {
46 player.send(new SendString(strings[index], string));
47 }
48 if (container != null) {
49 player.send(new SendItemOnInterface(38016, container));
50 }
51 player.send(new SendString(header, 38003));
52 player.send(new SendProgressBar(38015, amount));
53 player.send(new SendString(amount == -1 ? "" : footer, 38004));
54 }
val index

References com.runehive.Config.ACTIVITY_TAB, com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.game.world.entity.mob.player.InterfaceManager.isSidebar(), com.runehive.game.world.entity.mob.player.Player.send(), and com.runehive.game.world.entity.mob.player.InterfaceManager.setSidebar().

Here is the call graph for this function:

◆ update() [4/5]

void com.runehive.content.activity.panel.ActivityPanel.update ( Player player,
int amount,
String title,
Item item,
String... strings )
static

Sends all the information for the activity panel.

Definition at line 25 of file ActivityPanel.java.

25 {
26 update(player, amount, title, "Activity Completion:", new Item[]{item}, strings);
27 }

References update().

Here is the call graph for this function:

◆ update() [5/5]

void com.runehive.content.activity.panel.ActivityPanel.update ( Player player,
int amount,
String title,
String footer,
String... strings )
static

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