RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.skill.guides.SkillGuides Class Reference

Static Public Member Functions

static void openInterface (Player player, int skillId, int optionId, boolean update)

Static Public Attributes

static final int INTERFACE_ID = 42550

Static Private Member Functions

static void cleanInterface (Player player, int menuLength, int start)

Static Private Attributes

static final int CATEGORY_ID = 42558
static final int ITEMS_ID = 42574
static final int RIGHT_OPTIONS_START = 42559
static final int SCROLL_LAYER = 42573
static final int TEXT_LAYER_START = 42575
static final int TITLE_ID = 42557

Detailed Description

Definition at line 11 of file SkillGuides.java.

Member Function Documentation

◆ cleanInterface()

void com.runehive.content.skill.guides.SkillGuides.cleanInterface ( Player player,
int menuLength,
int start )
staticprivate

Cleans the right side

Definition at line 63 of file SkillGuides.java.

63 {
64 /**
65 * Cleans the right side
66 */
67 for(int index = menuLength; index < 14; index++) {
68 System.out.println("RIGHT_OPTIONS_START + index: " + (RIGHT_OPTIONS_START + index));
69 player.send(new SendString("", RIGHT_OPTIONS_START + index));
70 }
71 //for(int index = 2, child = RIGHT_OPTIONS_START + menuLength; index < 12; index++, child++)
72 // player.send(new SendString("", child));
73
74 if(start < 7) {
75 for (int index = 0, id = TEXT_LAYER_START + (2 * start); index < 7; index++, id += 2) {
76 player.send(new SendString("", id));
77 player.send(new SendString("", id + 1));
78 }
79 }
80 /*for(int index = 0, id = TEXT_LAYER_START + (2 * length) + 1; index < 7; index++, id += 2) {
81 player.send(new SendString("", id));
82 player.send(new SendString("", id + 1));
83 }*/
84 }
val index

References RIGHT_OPTIONS_START, com.runehive.game.world.entity.mob.player.Player.send(), and TEXT_LAYER_START.

Referenced by openInterface().

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

◆ openInterface()

void com.runehive.content.skill.guides.SkillGuides.openInterface ( Player player,
int skillId,
int optionId,
boolean update )
static

Definition at line 22 of file SkillGuides.java.

22 {
23 if(player.menuOpened == skillId && player.optionOpened == optionId) return;
24
25 GuideData data = GuideData.values()[skillId];
26
27 player.send(new SendString(Utility.capitalizeSentence(data.name().toLowerCase()), TITLE_ID));
28 player.send(new SendString(data.options[optionId], CATEGORY_ID));
29
30 int menuLength = data.options.length, length = data.menus[optionId].option.length;
31 for(int index = 0; index < menuLength; index++)
32 player.send(new SendString(data.options[index], RIGHT_OPTIONS_START + index));
33
34
35 Item[] items = new Item[length];
36 for(int i = 0; i < length; i++)
37 items[i] = new Item(data.menus[optionId].option[i].itemId);
38
39 for(int i = 0, id = TEXT_LAYER_START; i < length; i++, id += 2) {
40 String level = data.menus[optionId].option[i].level == -1 ? "" : data.menus[optionId].option[i].level + "";
41 System.out.println("id: " + id);
42 System.out.println("level: " + level);
43 System.out.println("data.menus[optionId].option[i].name: " + data.menus[optionId].option[i].name);
44 player.send(new SendString(data.menus[optionId].option[i].name, id));
45 player.send(new SendString(level, id + 1));
46 }
47
48 player.send(new SendItemOnInterface(ITEMS_ID, items));
49
50 cleanInterface(player, menuLength, length);
51
52 int scrollMax = 1;
53 if(length == 58) scrollMax = ((length + 3) * 33) + 1;
54 else if(length >= 7) scrollMax = (length * 33) + 1;
55 player.send(new SendScrollbar(SCROLL_LAYER, scrollMax));
56
57 player.menuOpened = skillId;
58 player.optionOpened = optionId;
59
60 if(!update) player.send(new SendInterface(INTERFACE_ID));
61 }

References com.runehive.util.Utility.capitalizeSentence(), CATEGORY_ID, cleanInterface(), INTERFACE_ID, com.runehive.content.skill.guides.MenuOption.Option.itemId, ITEMS_ID, com.runehive.content.skill.guides.MenuOption.Option.level, com.runehive.game.world.entity.mob.player.Player.menuOpened, com.runehive.content.skill.guides.GuideData.menus, com.runehive.content.skill.guides.MenuOption.Option.name, com.runehive.content.skill.guides.MenuOption.option, com.runehive.game.world.entity.mob.player.Player.optionOpened, com.runehive.content.skill.guides.GuideData.options, RIGHT_OPTIONS_START, SCROLL_LAYER, com.runehive.game.world.entity.mob.player.Player.send(), TEXT_LAYER_START, and TITLE_ID.

Here is the call graph for this function:

Member Data Documentation

◆ CATEGORY_ID

final int com.runehive.content.skill.guides.SkillGuides.CATEGORY_ID = 42558
staticprivate

Definition at line 15 of file SkillGuides.java.

Referenced by openInterface().

◆ INTERFACE_ID

final int com.runehive.content.skill.guides.SkillGuides.INTERFACE_ID = 42550
static

Definition at line 13 of file SkillGuides.java.

Referenced by openInterface().

◆ ITEMS_ID

final int com.runehive.content.skill.guides.SkillGuides.ITEMS_ID = 42574
staticprivate

Definition at line 18 of file SkillGuides.java.

Referenced by openInterface().

◆ RIGHT_OPTIONS_START

final int com.runehive.content.skill.guides.SkillGuides.RIGHT_OPTIONS_START = 42559
staticprivate

Definition at line 16 of file SkillGuides.java.

Referenced by cleanInterface(), and openInterface().

◆ SCROLL_LAYER

final int com.runehive.content.skill.guides.SkillGuides.SCROLL_LAYER = 42573
staticprivate

Definition at line 17 of file SkillGuides.java.

Referenced by openInterface().

◆ TEXT_LAYER_START

final int com.runehive.content.skill.guides.SkillGuides.TEXT_LAYER_START = 42575
staticprivate

Definition at line 19 of file SkillGuides.java.

Referenced by cleanInterface(), and openInterface().

◆ TITLE_ID

final int com.runehive.content.skill.guides.SkillGuides.TITLE_ID = 42557
staticprivate

Definition at line 14 of file SkillGuides.java.

Referenced by openInterface().


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