RuneHive-Game
Loading...
Searching...
No Matches
ClanUtility.java
Go to the documentation of this file.
1package com.runehive.content.clanchannel;
2
3import com.runehive.content.clanchannel.content.ClanLevel;
4
5/**
6 * This class holds all the util methods for the clan channel system.
7 *
8 * @author Daniel
9 */
10public class ClanUtility {
11
12 /** Gets the ordinal of a member based on the button. */
13 public static int getRankOrdinal(int button) {
14 int base_button = -32003;
15 int modified_button = (base_button - button) / 4;
16 return Math.abs(modified_button);
17 }
18
19 /** Gets the ordinal of a member based on the button. */
20 public static int getUnbanOrdinal(int button) {
21 int base_button = -14225;
22 int modified_button = (base_button - button);
23 return Math.abs(modified_button);
24 }
25
26 /** Gets the rewards based on the clan level. */
27 public static int[] getRewardItems(ClanLevel level) {
28 int[] items = new int[30];
29 switch (level) {
30 case BRONZE:
31 items = BRONZE_ITEMS;
32 break;
33 case IRON:
34 items = IRON_ITEMS;
35 break;
36 case STEEL:
37 items = STEEL_ITEMS;
38 break;
39 case BLACK:
40 items = BLACK_ITEMS;
41 break;
42 case MITHRIL:
43 items = MITHRIL_ITEMS;
44 break;
45 case ADAMANT:
46 items = ADAMANT_ITEMS;
47 break;
48 case RUNE:
49 items = RUNE_ITEMS;
50 break;
51 case DRAGON:
52 items = DRAGON_ITEMS;
53 break;
54 case BARROW:
55 break;
56 case GILDED:
57 break;
58 case GODLY:
59 break;
60 case THIRD_AGE:
61 break;
62 case RARE:
63 break;
64 }
65 return items;
66 }
67
68 /** Holds all the possible bronze item rewards from the mystery box. */
69 private static final int[] BRONZE_ITEMS = {
70 1155,//Bronze full helm
71 1117,//Bronze platebody
72 1075,//Bronze platelegs
73 1189,//Bronze kiteshield
74 1139,//Bronze med helm
75 1103,//Bronze chainbody
76 1087,//Bronze plateskirt
77 1173,//Bronze sq shield
78 1321,//Bronze scimitar
79 1307,//Bronze 2h sword
80 1291,//Bronze longsword
81 1277,//Bronze sword
82 1265,//Bronze pickaxe
83 1351,//Bronze axe
84 1375,//Bronze battleaxe
85 1337,//Bronze warhammer
86 1205,//Bronze dagger
87 1422,//Bronze mace
88 3095,//Bronze claws
89 3190,//Bronze halberd
90 4119,//Bronze boots
91 7454,//Bronze gloves
92 9174,//Bronze crossbow
93 8844,//Bronze defender
94 12363,//Bronze dragon mask
95 2349,//Bronze bar
96 12211,//Bronze full helm (g)
97 12205,//Bronze platebody (g)
98 12207,//Bronze platelegs (g)
99 12213,//Bronze kiteshield (g)
100 12209,//Bronze plateskirt (g)
101 12221,//Bronze full helm (t)
102 12215,//Bronze platebody (t)
103 12217,//Bronze platelegs (t)
104 12223,//Bronze kiteshield (t)
105 12219,//Bronze plateskirt (t)
106 };
107
108 /** Holds all the possible iron item rewards from the mystery box. */
109 private static final int[] IRON_ITEMS = {
110 1153,//Iron full helm
111 1115,//Iron platebody
112 1067,//Iron platelegs
113 1191,//Iron kiteshield
114 1137,//Iron med helm
115 1101,//Iron chainbody
116 1081,//Iron plateskirt
117 1175,//Iron sq shield
118 1323,//Iron scimitar
119 1309,//Iron 2h sword
120 1293,//Iron longsword
121 1279,//Iron sword
122 1335,//Iron warhammer
123 1363,//Iron battleaxe
124 1420,//Iron mace
125 1203,//Iron dagger
126 1267,//Iron pickaxe
127 1349,//Iron axe
128 4121,//Iron boots
129 9177,//Iron crossbow
130 8845,//Iron defender
131 2351,//Iron bar
132 12225,//Iron platebody (t)
133 12227,//Iron platelegs (t)
134 12229,//Iron plateskirt (t)
135 12231,//Iron full helm (t)
136 12233,//Iron kiteshield (t)
137 12235,//Iron platebody (g)
138 12237,//Iron platelegs (g)
139 12239,//Iron plateskirt (g)
140 12241,//Iron full helm (g)
141 12243,//Iron kiteshield (g)
142 12365,//Iron dragon mask
143 7455,//Iron gloves
144 3096,//Iron claws
145 };
146
147 /** Holds all the possible steel item rewards from the mystery box. */
148 private static final int[] STEEL_ITEMS = {
149 1157,//Steel full helm
150 1119,//Steel platebody
151 1069,//Steel platelegs
152 1193,//Steel kiteshield
153 1141,//Steel med helm
154 1105,//Steel chainbody
155 1083,//Steel plateskirt
156 1177,//Steel sq shield
157 1207,//Steel dagger
158 1325,//Steel scimitar
159 1311,//Steel 2h sword
160 1295,//Steel longsword
161 1281,//Steel sword
162 1339,//Steel warhammer
163 1353,//Steel axe
164 1365,//Steel battleaxe
165 1424,//Steel mace
166 2353,//Steel bar
167 1269,//Steel pickaxe
168 3097,//Steel claws
169 4123,//Steel boots
170 7456,//Steel gloves
171 8846,//Steel defender
172 9179,//Steel crossbow
173 20169,//Steel platebody (g)
174 20172,//Steel platelegs (g)
175 20175,//Steel plateskirt (g)
176 20178,//Steel full helm (g)
177 20181,//Steel kiteshield (g)
178 20184,//Steel platebody (t)
179 20187,//Steel platelegs (t)
180 20190,//Steel plateskirt (t)
181 20193,//Steel full helm (t)
182 20196,//Steel kiteshield (t)
183 12367,//Steel dragon mask
184 };
185
186 /** Holds all the possible black item rewards from the mystery box. */
187 private static final int[] BLACK_ITEMS = {
188 1165,//Black full helm
189 1125,//Black platebody
190 1077,//Black platelegs
191 1195,//Black kiteshield
192 1151,//Black med helm
193 1107,//Black chainbody
194 1179,//Black sq shield
195 1089,//Black plateskirt
196 1217,//Black dagger
197 8847,//Black defender
198 1283,//Black sword
199 1297,//Black longsword
200 1313,//Black 2h sword
201 1327,//Black scimitar
202 1341,//Black warhammer
203 1361,//Black axe
204 1367,//Black battleaxe
205 1426,//Black mace
206 4125,//Black boots
207 7457,//Black gloves
208 2583,//Black platebody (t)
209 2585,//Black platelegs (t)
210 2587,//Black full helm (t)
211 2589,//Black kiteshield (t)
212 2591,//Black platebody (g)
213 2593,//Black platelegs (g)
214 2595,//Black full helm (g)
215 2597,//Black kiteshield (g)
216 3472,//Black plateskirt (t)
217 3473,//Black plateskirt (g)
218 3098,//Black claws
219 };
220
221 /** Holds all the possible mithril item rewards from the mystery box. */
222 private static final int[] MITHRIL_ITEMS = {
223 1159,//Mithril full helm
224 1121,//Mithril platebody
225 1071,//Mithril platelegs
226 1197,//Mithril kiteshield
227 1143,//Mithril med helm
228 1109,//Mithril chainbody
229 1085,//Mithril plateskirt
230 1181,//Mithril sq shield
231 1209,//Mithril dagger
232 1273,//Mithril pickaxe
233 1285,//Mithril sword
234 1299,//Mithril longsword
235 1315,//Mithril 2h sword
236 1329,//Mithril scimitar
237 1343,//Mithril warhammer
238 1355,//Mithril axe
239 1369,//Mithril battleaxe
240 1428,//Mithril mace
241 2359,//Mithril bar
242 3099,//Mithril claws
243 8848,//Mithril defender
244 4127,//Mithril boots
245 7458,//Mithril gloves
246 12369,//Mithril dragon mask
247 12277,//Mithril platebody (g)
248 12279,//Mithril platelegs (g)
249 12281,//Mithril kiteshield (g)
250 12283,//Mithril full helm (g)
251 12285,//Mithril plateskirt (g)
252 12287,//Mithril platebody (t)
253 12289,//Mithril platelegs (t)
254 12291,//Mithril kiteshield (t)
255 12293,//Mithril full helm (t)
256 12295,//Mithril plateskirt (t)
257 };
258
259 /** Holds all the possible adamant item rewards from the mystery box. */
260 private static final int[] ADAMANT_ITEMS = {
261 1161,//Adamant full helm
262 1123,//Adamant platebody
263 1073,//Adamant platelegs
264 1199,//Adamant kiteshield
265 1145,//Adamant med helm
266 1111,//Adamant chainbody
267 1091,//Adamant plateskirt
268 1183,//Adamant sq shield
269 1211,//Adamant dagger
270 1271,//Adamant pickaxe
271 1287,//Adamant sword
272 1301,//Adamant longsword
273 1317,//Adamant 2h sword
274 1331,//Adamant scimitar
275 1345,//Adamant warhammer
276 1357,//Adamant axe
277 1371,//Adamant battleaxe
278 1430,//Adamant mace
279 2361,//Adamantite bar
280 3100,//Adamant claws
281 4129,//Adamant boots
282 2361,//Adamantite bar
283 8849,//Adamant defender
284 7459,//Adamant gloves
285 2599,//Adamant platebody (t)
286 2601,//Adamant platelegs (t)
287 2603,//Adamant kiteshield (t)
288 2605,//Adamant full helm (t)
289 2607,//Adamant platebody (g)
290 2609,//Adamant platelegs (g)
291 2611,//Adamant kiteshield (g)
292 2613,//Adamant full helm (g)
293 3474,//Adamant plateskirt (t)
294 3475,//Adamant plateskirt (g)
295 };
296
297 /** Holds all the possible rune item rewards from the mystery box. */
298 private static final int[] RUNE_ITEMS = {
299 1163,//Rune full helm
300 1127,//Rune platebody
301 1079,//Rune platelegs
302 1201,//Rune kiteshield
303 1147,//Rune med helm
304 1113,//Rune chainbody
305 1093,//Rune plateskirt
306 1185,//Rune sq shield
307 1333,//Rune scimitar
308 1319,//Rune 2h sword
309 1303,//Rune longsword
310 1289,//Rune sword
311 1275,//Rune pickaxe
312 1347,//Rune warhammer
313 1213,//Rune dagger
314 1359,//Rune axe
315 1373,//Rune battleaxe
316 1432,//Rune mace
317 3101,//Rune claws
318 4131,//Rune boots
319 7460,//Rune gloves
320 8850,//Rune defender
321 2363,//Runite bar
322 2615,//Rune platebody (g)
323 2617,//Rune platelegs (g)
324 2619,//Rune full helm (g)
325 2621,//Rune kiteshield (g)
326 2623,//Rune platebody (t)
327 2625,//Rune platelegs (t)
328 2627,//Rune full helm (t)
329 2629,//Rune kiteshield (t)
330 3476,//Rune plateskirt (g)
331 3477,//Rune plateskirt (t)
332 };
333
334 /** Holds all the possible dragon item rewards from the mystery box. */
335 private static final int[] DRAGON_ITEMS = {
336 11335,//Dragon full helm
337 2513,//Dragon chainbody
338 4087,//Dragon platelegs
339 1187,//Dragon sq shield
340 1149,//Dragon med helm
341 4585,//Dragon plateskirt
342 1215,//Dragon dagger
343 1249,//Dragon spear
344 1305,//Dragon longsword
345 1377,//Dragon battleaxe
346 1434,//Dragon mace
347 4587,//Dragon scimitar
348 6739,//Dragon axe
349 7158,//Dragon 2h sword
350 7461,//Dragon gloves
351 11840,//Dragon boots
352 11920,//Dragon pickaxe
353 12954,//Dragon defender
354 13576,//Dragon warhammer
355 13652,//Dragon claws
356 21009,//Dragon sword
357 21012,//Dragon hunter crossbow
358 21028,//Dragon harpoon
359 12414,//Dragon chainbody (g)
360 12415,//Dragon platelegs (g)
361 12416,//Dragon plateskirt (g)
362 12417,//Dragon full helm (g)
363 12418,//Dragon sq shield (g)
364 20000,//Dragon scimitar (or)
365 19722,//Dragon defender (t)
366 };
367}
This class holds all the util methods for the clan channel system.
static final int[] ADAMANT_ITEMS
Holds all the possible adamant item rewards from the mystery box.
static int getRankOrdinal(int button)
Gets the ordinal of a member based on the button.
static final int[] DRAGON_ITEMS
Holds all the possible dragon item rewards from the mystery box.
static final int[] BLACK_ITEMS
Holds all the possible black item rewards from the mystery box.
static final int[] IRON_ITEMS
Holds all the possible iron item rewards from the mystery box.
static int[] getRewardItems(ClanLevel level)
Gets the rewards based on the clan level.
static final int[] RUNE_ITEMS
Holds all the possible rune item rewards from the mystery box.
static final int[] STEEL_ITEMS
Holds all the possible steel item rewards from the mystery box.
static int getUnbanOrdinal(int button)
Gets the ordinal of a member based on the button.
static final int[] MITHRIL_ITEMS
Holds all the possible mithril item rewards from the mystery box.
static final int[] BRONZE_ITEMS
Holds all the possible bronze item rewards from the mystery box.
Handles the clan levels (based off the total experience earned).
Definition ClanLevel.java:8