RuneHive-Game
Loading...
Searching...
No Matches
PrestigeData.java
Go to the documentation of this file.
1package com.runehive.content.prestige;
2
3import com.google.common.collect.ImmutableMap;
4import com.runehive.game.world.entity.skill.Skill;
5
6import java.util.HashMap;
7import java.util.Map;
8
9/**
10 * Holds the prestige data.
11 *
12 * @author Daniel.
13 */
14public enum PrestigeData {
15 ATTACK("Attack", Skill.ATTACK, -13504, 52010),
16 DEFENCE("Defence", Skill.DEFENCE, -13498, 52012),
17 STRENGTH("Strength", Skill.STRENGTH, -13501, 52011),
18 HITPOINTS("Hitpoints", Skill.HITPOINTS, -13483, 52017),
19 RANGE("Ranged", Skill.RANGED, -13495, 52013),
20 PRAYER("Prayer", Skill.PRAYER, -13492, 52014),
21 MAGIC("Magic", Skill.MAGIC, -13489, 52015),
22 COOKING("Cooking", Skill.COOKING, -13453, 52027),
23 WOODCUTTING("Woodcutting", Skill.WOODCUTTING, -13447, 52029),
24 FLETCHING("Fletching", Skill.FLETCHING, -13468, 52022),
25 FISHING("Fishing", Skill.FISHING, -13456, 52026),
26 FIREMAKING("Firemaking", Skill.FIREMAKING, -13450, 52028),
27 CRAFTING("Crafting", Skill.CRAFTING, -13471, 52021),
28 SMITHING("Smithing", Skill.SMITHING, -13459, 52025),
29 MINING("Mining", Skill.MINING, -13462, 52024),
30 HERBLORE("Herblore", Skill.HERBLORE, -13477, 52019),
31 AGILITY("Agility", Skill.AGILITY, -13480, 52018),
32 THIEVING("Thieving", Skill.THIEVING, -13474, 52020),
33 SLAYER("Slayer", Skill.SLAYER, -13465, 52023),
34 FARMING("Farming", Skill.FARMING, -13444, 52030),
35 RUNECRAFTING("Runecraft", Skill.RUNECRAFTING, -13486, 52016),
36 HUNTER("Hunter", Skill.HUNTER, -13441, 52031);
37
38 public static final PrestigeData[] values = values();
39 private static final Map<Integer, PrestigeData> prestigeMap;
40
41 static {
42 final Map<Integer, PrestigeData> map = new HashMap<>();
43 for (PrestigeData p : values) {
44 map.put(p.button, p);
45 }
46
47 prestigeMap = ImmutableMap.copyOf(map);
48 }
49
50 /**
51 * The name of the prestige.
52 */
53 public final String name;
54
55 /**
56 * The skill identification of the prestige.
57 */
58 public final int skill;
59
60 /**
61 * The button identification of the prestige.
62 */
63 public final int button;
64
65 /**
66 * The string identification of the prestige.
67 */
68 public final int string;
69
70 /**
71 * Constructs a new <code>Prestige</code>.
72 */
73 PrestigeData(String name, int skill, int button, int string) {
74 this.name = name;
75 this.skill = skill;
76 this.button = button;
77 this.string = string;
78 }
79
80 /**
81 * Grabs the prestige data based on the button identification.
82 */
83 public static PrestigeData forButton(int button) {
84 return prestigeMap.get(button);
85 }
86}
Represents a trainable and usable skill.
Definition Skill.java:18
static final int SLAYER
The slayer skill id.
Definition Skill.java:75
static final int WOODCUTTING
The woodcutting skill id.
Definition Skill.java:45
static final int PRAYER
The prayer skill id.
Definition Skill.java:36
static final int RANGED
The ranged skill id.
Definition Skill.java:33
static final int CRAFTING
The crafting skill id.
Definition Skill.java:57
static final int HERBLORE
The herblore skill id.
Definition Skill.java:66
static final int SMITHING
The smithing skill id.
Definition Skill.java:60
static final int FISHING
The fishing skill id.
Definition Skill.java:51
static final int DEFENCE
The defence skill id.
Definition Skill.java:24
static final int FLETCHING
The fletching skill id.
Definition Skill.java:48
static final int FIREMAKING
The firemaking skill id.
Definition Skill.java:54
static final int MAGIC
The magic skill id.
Definition Skill.java:39
static final int ATTACK
The attack skill id.
Definition Skill.java:21
static final int FARMING
The farming skill id.
Definition Skill.java:78
static final int AGILITY
The agility skill id.
Definition Skill.java:69
static final int THIEVING
The thieving skill id.
Definition Skill.java:72
static final int HUNTER
The hunter skill id.
Definition Skill.java:87
static final int STRENGTH
The strength skill id.
Definition Skill.java:27
static final int COOKING
The cooking skill id.
Definition Skill.java:42
static final int MINING
The mining skill id.
Definition Skill.java:63
static final int HITPOINTS
The hitpoints skill id.
Definition Skill.java:30
static final int RUNECRAFTING
The runecrafting skill id.
Definition Skill.java:81
PrestigeData(String name, int skill, int button, int string)
Constructs a new Prestige.
static PrestigeData forButton(int button)
Grabs the prestige data based on the button identification.
final int skill
The skill identification of the prestige.
final int button
The button identification of the prestige.
static final Map< Integer, PrestigeData > prestigeMap
final int string
The string identification of the prestige.
final String name
The name of the prestige.