· 8 years ago · Jan 27, 2018, 07:54 PM
1Index: java/com/l2jserver/Config.java
2IDEA additional info:
3Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
4<+>UTF-8
5===================================================================
6--- java/com/l2jserver/Config.java (revision 34)
7+++ java/com/l2jserver/Config.java (revision )
8@@ -36,8 +36,7 @@
9 import java.util.logging.Level;
10 import java.util.logging.Logger;
11
12-public final class Config
13-{
14+public final class Config {
15 //--------------------------------------------------
16 // L2J Property File Definitions
17 //--------------------------------------------------
18@@ -680,9 +679,11 @@
19 public static String TVT_EVENT_TEAM_1_NAME;
20 public static int[] TVT_EVENT_TEAM_1_COORDINATES = new int[3];
21 public static int[] TVT_EVENT_TEAM_1_BUFF_COORDINATES = new int[3];
22+ public static Map<Integer, int[]> TVT_EVENT_TEAM_1_RESPAWN_LOC = new HashMap();
23 public static String TVT_EVENT_TEAM_2_NAME;
24 public static int[] TVT_EVENT_TEAM_2_COORDINATES = new int[3];
25 public static int[] TVT_EVENT_TEAM_2_BUFF_COORDINATES = new int[3];
26+ public static Map<Integer, int[]> TVT_EVENT_TEAM_2_RESPAWN_LOC = new HashMap();
27 public static List<int[]> TVT_EVENT_REWARDS;
28 public static boolean TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED;
29 public static boolean TVT_EVENT_SCROLL_ALLOWED;
30@@ -1107,8 +1108,8 @@
31 public static String VOTES_SITE_HOPZONE_URL;
32 public static String VOTES_SITE_TOPZONE_URL;
33 public static boolean VOTE_TOPZONE_ENABLED;
34- private Config()
35- {
36+
37+ private Config() {
38 }
39
40 /**
41@@ -1117,10 +1118,8 @@
42 *
43 * @see CONFIGURATION_FILE (properties file) for configuring your server.
44 */
45- public static void load()
46- {
47- if (Server.serverMode == Server.MODE_GAMESERVER)
48- {
49+ public static void load() {
50+ if (Server.serverMode == Server.MODE_GAMESERVER) {
51 FLOOD_PROTECTOR_USE_ITEM = new FloodProtectorConfig("UseItemFloodProtector");
52 FLOOD_PROTECTOR_ROLL_DICE = new FloodProtectorConfig("RollDiceFloodProtector");
53 FLOOD_PROTECTOR_FIREWORK = new FloodProtectorConfig("FireworkFloodProtector");
54@@ -1140,10 +1139,8 @@
55
56 _log.info("Loading GameServer Configuration Files...");
57 InputStream is = null;
58- try
59- {
60- try
61- {
62+ try {
63+ try {
64 L2Properties serverSettings = new L2Properties();
65 is = new FileInputStream(new File(CONFIGURATION_FILE));
66 serverSettings.load(is);
67@@ -1174,21 +1171,15 @@
68
69 String[] protocols = serverSettings.getProperty("AllowedProtocolRevisions", "146;152").split(";");
70 PROTOCOL_LIST = new TIntArrayList(protocols.length);
71- for (String protocol : protocols)
72- {
73- try
74- {
75+ for (String protocol : protocols) {
76+ try {
77 PROTOCOL_LIST.add(Integer.parseInt(protocol.trim()));
78- }
79- catch (NumberFormatException e)
80- {
81+ } catch (NumberFormatException e) {
82 _log.info("Wrong config protocol version: " + protocol + ". Skipped.");
83 }
84 }
85
86- }
87- catch (Exception e)
88- {
89+ } catch (Exception e) {
90 e.printStackTrace();
91 throw new Error("Failed to Load " + CONFIGURATION_FILE + " File.");
92 }
93@@ -1197,48 +1188,47 @@
94 Document doc = null;
95 ArrayList<String> subnets = new ArrayList<String>(5);
96 ArrayList<String> hosts = new ArrayList<String>(5);
97- try
98- {
99+ try {
100 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
101 factory.setValidating(false);
102 factory.setIgnoringComments(true);
103 doc = factory.newDocumentBuilder().parse(file);
104
105- for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
106- {
107+ for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) {
108 NamedNodeMap attrs;
109 Node att;
110
111- if ("gameserver".equalsIgnoreCase(n.getNodeName()))
112- {
113- for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
114- {
115- if ("define".equalsIgnoreCase(d.getNodeName()))
116- {
117+ if ("gameserver".equalsIgnoreCase(n.getNodeName())) {
118+ for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) {
119+ if ("define".equalsIgnoreCase(d.getNodeName())) {
120 attrs = d.getAttributes();
121
122 att = attrs.getNamedItem("subnet");
123- if (att == null)
124- { continue; }
125+ if (att == null) {
126+ continue;
127+ }
128
129 subnets.add(att.getNodeValue());
130
131 att = attrs.getNamedItem("address");
132- if (att == null)
133- { continue; }
134+ if (att == null) {
135+ continue;
136+ }
137
138 hosts.add(att.getNodeValue());
139
140- if (hosts.size() != subnets.size())
141- { throw new Error("Failed to Load " + IP_CONFIG_FILE + " File - subnets does not match server addresses."); }
142+ if (hosts.size() != subnets.size()) {
143+ throw new Error("Failed to Load " + IP_CONFIG_FILE + " File - subnets does not match server addresses.");
144+ }
145 }
146 }
147
148 attrs = n.getAttributes();
149
150 att = attrs.getNamedItem("address");
151- if (att == null)
152- { throw new Error("Failed to Load " + IP_CONFIG_FILE + " File - default server address is missing."); }
153+ if (att == null) {
154+ throw new Error("Failed to Load " + IP_CONFIG_FILE + " File - default server address is missing.");
155+ }
156
157 subnets.add("0.0.0.0/0");
158 hosts.add(att.getNodeValue());
159@@ -1246,16 +1236,13 @@
160 }
161 GAME_SERVER_SUBNETS = subnets.toArray(new String[subnets.size()]);
162 GAME_SERVER_HOSTS = hosts.toArray(new String[hosts.size()]);
163- }
164- catch (Exception e)
165- {
166+ } catch (Exception e) {
167 e.printStackTrace();
168 throw new Error("Failed to Load " + IP_CONFIG_FILE + " File.");
169 }
170
171 // Load Community Properties file (if exists)
172- try
173- {
174+ try {
175 L2Properties communityServerSettings = new L2Properties();
176 is = new FileInputStream(new File(COMMUNITY_CONFIGURATION_FILE));
177 communityServerSettings.load(is);
178@@ -1264,16 +1251,13 @@
179 COMMUNITY_SERVER_PORT = Integer.parseInt(communityServerSettings.getProperty("CommunityServerPort", "9013"));
180 COMMUNITY_SERVER_HEX_ID = new BigInteger(communityServerSettings.getProperty("CommunityServerHexId"), 16).toByteArray();
181 COMMUNITY_SERVER_SQL_DP_ID = Integer.parseInt(communityServerSettings.getProperty("CommunityServerSqlDpId", "200"));
182- }
183- catch (Exception e)
184- {
185+ } catch (Exception e) {
186 e.printStackTrace();
187 throw new Error("Failed to Load " + COMMUNITY_CONFIGURATION_FILE + " File.");
188 }
189
190 // Load Feature L2Properties file (if exists)
191- try
192- {
193+ try {
194 L2Properties Feature = new L2Properties();
195 is = new FileInputStream(new File(FEATURE_CONFIG_FILE));
196 Feature.load(is);
197@@ -1330,8 +1314,7 @@
198 CH_FRONT2_FEE = Integer.parseInt(Feature.getProperty("ClanHallFrontPlatformFunctionFeeLvl2", "4000"));
199
200 String[] propertySplit = Feature.getProperty("SiegeTime", "-1").split(":");
201- for (int i = 0; i < SIEGE_TIME.length && i < propertySplit.length; i++)
202- {
203+ for (int i = 0; i < SIEGE_TIME.length && i < propertySplit.length; i++) {
204 SIEGE_TIME[i] = Integer.parseInt(propertySplit[i]);
205 }
206 CH_BUFF_FREE = Boolean.parseBoolean(Feature.getProperty("AltClanHallMpBuffFree", "False"));
207@@ -1340,43 +1323,34 @@
208 SIEGE_HOUR_LIST_MORNING = new ArrayList<Integer>();
209 SIEGE_HOUR_LIST_AFTERNOON = new ArrayList<Integer>();
210 String[] sstl = Feature.getProperty("CLSetSiegeTimeList", "").split(",");
211- if (sstl.length != 0)
212- {
213+ if (sstl.length != 0) {
214 boolean isHour = false;
215- for (String st : sstl)
216- {
217- if (st.equalsIgnoreCase("day") || st.equalsIgnoreCase("hour") || st.equalsIgnoreCase("minute"))
218- {
219- if (st.equalsIgnoreCase("hour"))
220- { isHour = true; }
221+ for (String st : sstl) {
222+ if (st.equalsIgnoreCase("day") || st.equalsIgnoreCase("hour") || st.equalsIgnoreCase("minute")) {
223+ if (st.equalsIgnoreCase("hour")) {
224+ isHour = true;
225+ }
226 CL_SET_SIEGE_TIME_LIST.add(st.toLowerCase());
227- }
228- else
229- {
230+ } else {
231 _log.warning(StringUtil.concat("[CLSetSiegeTimeList]: invalid config property -> CLSetSiegeTimeList \"", st, "\""));
232 }
233 }
234- if (isHour)
235- {
236+ if (isHour) {
237 String[] shl = Feature.getProperty("SiegeHourList", "").split(",");
238- for (String st : shl)
239- {
240- if (!st.equalsIgnoreCase(""))
241- {
242+ for (String st : shl) {
243+ if (!st.equalsIgnoreCase("")) {
244 int val = Integer.parseInt(st);
245- if (val > 23 || val < 0)
246- { _log.warning(StringUtil.concat("[SiegeHourList]: invalid config property -> SiegeHourList \"", st, "\"")); }
247- else if (val < 12)
248- { SIEGE_HOUR_LIST_MORNING.add(val); }
249- else
250- {
251+ if (val > 23 || val < 0) {
252+ _log.warning(StringUtil.concat("[SiegeHourList]: invalid config property -> SiegeHourList \"", st, "\""));
253+ } else if (val < 12) {
254+ SIEGE_HOUR_LIST_MORNING.add(val);
255+ } else {
256 val -= 12;
257 SIEGE_HOUR_LIST_AFTERNOON.add(val);
258 }
259 }
260 }
261- if (Config.SIEGE_HOUR_LIST_AFTERNOON.isEmpty() && Config.SIEGE_HOUR_LIST_AFTERNOON.isEmpty())
262- {
263+ if (Config.SIEGE_HOUR_LIST_AFTERNOON.isEmpty() && Config.SIEGE_HOUR_LIST_AFTERNOON.isEmpty()) {
264 _log.warning("[SiegeHourList]: invalid config property -> SiegeHourList is empty");
265 CL_SET_SIEGE_TIME_LIST.remove("hour");
266 }
267@@ -1490,30 +1464,24 @@
268 CLAN_LEVEL_10_REQUIREMENT = Integer.parseInt(Feature.getProperty("ClanLevel10Requirement", "140"));
269 CLAN_LEVEL_11_REQUIREMENT = Integer.parseInt(Feature.getProperty("ClanLevel11Requirement", "170"));
270 ALLOW_WYVERN_DURING_SIEGE = Boolean.parseBoolean(Feature.getProperty("AllowRideWyvernDuringSiege", "True"));
271- }
272- catch (Exception e)
273- {
274+ } catch (Exception e) {
275 e.printStackTrace();
276 throw new Error("Failed to Load " + FEATURE_CONFIG_FILE + " File.");
277 }
278
279 // Vote system!!
280- try
281- {
282+ try {
283 L2Properties vote = new L2Properties();
284 is = new FileInputStream("./config/vote.properties");
285 vote.load(is);
286 VOTE_REWARD_ITEM_ID = Integer.valueOf(vote.getProperty("VoteItemRewardId"));
287 VOTE_REWARD_ITEM_COUNT = Integer.valueOf(vote.getProperty("VoteItemRewardCount"));
288- }
289- catch (Exception e)
290- {
291+ } catch (Exception e) {
292 e.printStackTrace();
293 }
294
295 // Load Character L2Properties file (if exists)
296- try
297- {
298+ try {
299 L2Properties Character = new L2Properties();
300 is = new FileInputStream(new File(CHARACTER_CONFIG_FILE));
301 Character.load(is);
302@@ -1536,25 +1504,18 @@
303 ENABLE_MODIFY_SKILL_DURATION = Boolean.parseBoolean(Character.getProperty("EnableModifySkillDuration", "false"));
304
305 // Create Map only if enabled
306- if (ENABLE_MODIFY_SKILL_DURATION)
307- {
308+ if (ENABLE_MODIFY_SKILL_DURATION) {
309 String[] propertySplit = Character.getProperty("SkillDurationList", "").split(";");
310 SKILL_DURATION_LIST = new TIntIntHashMap(propertySplit.length);
311- for (String skill : propertySplit)
312- {
313+ for (String skill : propertySplit) {
314 String[] skillSplit = skill.split(",");
315- if (skillSplit.length != 2)
316- { _log.warning(StringUtil.concat("[SkillDurationList]: invalid config property -> SkillDurationList \"", skill, "\"")); }
317- else
318- {
319- try
320- {
321+ if (skillSplit.length != 2) {
322+ _log.warning(StringUtil.concat("[SkillDurationList]: invalid config property -> SkillDurationList \"", skill, "\""));
323+ } else {
324+ try {
325 SKILL_DURATION_LIST.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
326- }
327- catch (NumberFormatException nfe)
328- {
329- if (!skill.isEmpty())
330- {
331+ } catch (NumberFormatException nfe) {
332+ if (!skill.isEmpty()) {
333 _log.warning(StringUtil.concat("[SkillDurationList]: invalid config property -> SkillList \"", skillSplit[0], "\"", skillSplit[1]));
334 }
335 }
336@@ -1563,25 +1524,20 @@
337 }
338 ENABLE_MODIFY_SKILL_REUSE = Boolean.parseBoolean(Character.getProperty("EnableModifySkillReuse", "false"));
339 // Create Map only if enabled
340- if (ENABLE_MODIFY_SKILL_REUSE)
341- {
342+ if (ENABLE_MODIFY_SKILL_REUSE) {
343 String[] propertySplit = Character.getProperty("SkillReuseList", "").split(";");
344 SKILL_REUSE_LIST = new TIntIntHashMap(propertySplit.length);
345- for (String skill : propertySplit)
346- {
347+ for (String skill : propertySplit) {
348 String[] skillSplit = skill.split(",");
349- if (skillSplit.length != 2)
350- { _log.warning(StringUtil.concat("[SkillReuseList]: invalid config property -> SkillReuseList \"", skill, "\"")); }
351- else
352- {
353- try
354- {
355+ if (skillSplit.length != 2) {
356+ _log.warning(StringUtil.concat("[SkillReuseList]: invalid config property -> SkillReuseList \"", skill, "\""));
357+ } else {
358+ try {
359 SKILL_REUSE_LIST.put(Integer.valueOf(skillSplit[0]), Integer.valueOf(skillSplit[1]));
360- }
361- catch (NumberFormatException nfe)
362- {
363- if (!skill.isEmpty())
364- { _log.warning(StringUtil.concat("[SkillReuseList]: invalid config property -> SkillList \"", skillSplit[0], "\"", skillSplit[1])); }
365+ } catch (NumberFormatException nfe) {
366+ if (!skill.isEmpty()) {
367+ _log.warning(StringUtil.concat("[SkillReuseList]: invalid config property -> SkillList \"", skillSplit[0], "\"", skillSplit[1]));
368+ }
369 }
370 }
371 }
372@@ -1606,8 +1562,9 @@
373 ALLOW_CLASS_MASTERS = Boolean.parseBoolean(Character.getProperty("AllowClassMasters", "False"));
374 ALLOW_ENTIRE_TREE = Boolean.parseBoolean(Character.getProperty("AllowEntireTree", "False"));
375 ALTERNATE_CLASS_MASTER = Boolean.parseBoolean(Character.getProperty("AlternateClassMaster", "False"));
376- if (ALLOW_CLASS_MASTERS || ALTERNATE_CLASS_MASTER)
377- { CLASS_MASTER_SETTINGS = new ClassMasterSettings(Character.getProperty("ConfigClassMaster")); }
378+ if (ALLOW_CLASS_MASTERS || ALTERNATE_CLASS_MASTER) {
379+ CLASS_MASTER_SETTINGS = new ClassMasterSettings(Character.getProperty("ConfigClassMaster"));
380+ }
381 LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(Character.getProperty("LifeCrystalNeeded", "true"));
382 SP_BOOK_NEEDED = Boolean.parseBoolean(Character.getProperty("SpBookNeeded", "false"));
383 ES_SP_BOOK_NEEDED = Boolean.parseBoolean(Character.getProperty("EnchantSkillSpBookNeeded", "true"));
384@@ -1655,8 +1612,9 @@
385 ENCHANT_SAFE_MAX_FULL = Integer.parseInt(Character.getProperty("EnchantSafeMaxFull", "4"));
386 String[] notenchantable = Character.getProperty("EnchantBlackList", "7816,7817,7818,7819,7820,7821,7822,7823,7824,7825,7826,7827,7828,7829,7830,7831,13293,13294,13296").split(",");
387 ENCHANT_BLACKLIST = new int[notenchantable.length];
388- for (int i = 0; i < notenchantable.length; i++)
389- { ENCHANT_BLACKLIST[i] = Integer.parseInt(notenchantable[i]); }
390+ for (int i = 0; i < notenchantable.length; i++) {
391+ ENCHANT_BLACKLIST[i] = Integer.parseInt(notenchantable[i]);
392+ }
393 Arrays.sort(ENCHANT_BLACKLIST);
394
395 AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(Character.getProperty("AugmentationNGSkillChance", "15"));
396@@ -1673,8 +1631,9 @@
397 String[] array = Character.getProperty("AugmentationBlackList", "6656,6657,6658,6659,6660,6661,6662,8191,10170,10314").split(",");
398 AUGMENTATION_BLACKLIST = new int[array.length];
399
400- for (int i = 0; i < array.length; i++)
401- { AUGMENTATION_BLACKLIST[i] = Integer.parseInt(array[i]); }
402+ for (int i = 0; i < array.length; i++) {
403+ AUGMENTATION_BLACKLIST[i] = Integer.parseInt(array[i]);
404+ }
405
406 Arrays.sort(AUGMENTATION_BLACKLIST);
407
408@@ -1725,20 +1684,17 @@
409 PLAYER_SPAWN_PROTECTION = Integer.parseInt(Character.getProperty("PlayerSpawnProtection", "0"));
410 String[] items = Character.getProperty("PlayerSpawnProtectionAllowedItems", "0").split(",");
411 SPAWN_PROTECTION_ALLOWED_ITEMS = new ArrayList<Integer>(items.length);
412- for (String item : items)
413- {
414+ for (String item : items) {
415 Integer itm = 0;
416- try
417- {
418+ try {
419 itm = Integer.parseInt(item);
420- }
421- catch (NumberFormatException nfe)
422- {
423+ } catch (NumberFormatException nfe) {
424 _log.warning("Player Spawn Protection: Wrong ItemId passed: " + item);
425 _log.warning(nfe.getMessage());
426 }
427- if (itm != 0)
428- { SPAWN_PROTECTION_ALLOWED_ITEMS.add(itm); }
429+ if (itm != 0) {
430+ SPAWN_PROTECTION_ALLOWED_ITEMS.add(itm);
431+ }
432 }
433 SPAWN_PROTECTION_ALLOWED_ITEMS.trimToSize();
434 PLAYER_TELEPORT_PROTECTION = Integer.parseInt(Character.getProperty("PlayerTeleportProtection", "0"));
435@@ -1762,63 +1718,51 @@
436 STORE_RECIPE_SHOPLIST = Boolean.parseBoolean(Character.getProperty("StoreRecipeShopList", "False"));
437 STORE_UI_SETTINGS = Boolean.parseBoolean(Character.getProperty("StoreCharUiSettings", "False"));
438 FORBIDDEN_NAMES = Character.getProperty("ForbiddenNames", "").split(",");
439- }
440- catch (Exception e)
441- {
442+ } catch (Exception e) {
443 e.printStackTrace();
444 throw new Error("Failed to Load " + CHARACTER_CONFIG_FILE + " file.");
445 }
446
447 // Load L2J Server Version L2Properties file (if exists)
448- try
449- {
450+ try {
451 L2Properties serverVersion = new L2Properties();
452 is = new FileInputStream(new File(SERVER_VERSION_FILE));
453 serverVersion.load(is);
454
455 SERVER_VERSION = serverVersion.getProperty("version", "Unsupported Custom Version.");
456 SERVER_BUILD_DATE = serverVersion.getProperty("builddate", "Undefined Date.");
457- }
458- catch (Exception e)
459- {
460+ } catch (Exception e) {
461 //Ignore L2Properties file if it doesnt exist
462 SERVER_VERSION = "Unsupported Custom Version.";
463 SERVER_BUILD_DATE = "Undefined Date.";
464 }
465
466 // Load L2J Datapack Version L2Properties file (if exists)
467- try
468- {
469+ try {
470 L2Properties serverVersion = new L2Properties();
471 is = new FileInputStream(new File(DATAPACK_VERSION_FILE));
472 serverVersion.load(is);
473
474 DATAPACK_VERSION = serverVersion.getProperty("version", "Unsupported Custom Version.");
475- }
476- catch (Exception e)
477- {
478+ } catch (Exception e) {
479 //Ignore L2Properties file if it doesnt exist
480 DATAPACK_VERSION = "Unsupported Custom Version.";
481 }
482
483 // Load Telnet L2Properties file (if exists)
484- try
485- {
486+ try {
487 L2Properties telnetSettings = new L2Properties();
488 is = new FileInputStream(new File(TELNET_FILE));
489 telnetSettings.load(is);
490
491 IS_TELNET_ENABLED = Boolean.parseBoolean(telnetSettings.getProperty("EnableTelnet", "false"));
492- }
493- catch (Exception e)
494- {
495+ } catch (Exception e) {
496 e.printStackTrace();
497 throw new Error("Failed to Load " + TELNET_FILE + " File.");
498 }
499
500 // MMO
501- try
502- {
503+ try {
504 //_log.info("Loading " + MMO_CONFIG_FILE.replaceAll("./config/", ""));
505 L2Properties mmoSettings = new L2Properties();
506 is = new FileInputStream(new File(MMO_CONFIG_FILE));
507@@ -1827,16 +1771,13 @@
508 MMO_MAX_SEND_PER_PASS = Integer.parseInt(mmoSettings.getProperty("MaxSendPerPass", "12"));
509 MMO_MAX_READ_PER_PASS = Integer.parseInt(mmoSettings.getProperty("MaxReadPerPass", "12"));
510 MMO_HELPER_BUFFER_COUNT = Integer.parseInt(mmoSettings.getProperty("HelperBufferCount", "20"));
511- }
512- catch (Exception e)
513- {
514+ } catch (Exception e) {
515 e.printStackTrace();
516 throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File.");
517 }
518
519 // Load IdFactory L2Properties file (if exists)
520- try
521- {
522+ try {
523 L2Properties idSettings = new L2Properties();
524 is = new FileInputStream(new File(ID_CONFIG_FILE));
525 idSettings.load(is);
526@@ -1845,16 +1786,13 @@
527 SET_TYPE = ObjectSetType.valueOf(idSettings.getProperty("L2Set", "WorldObjectSet"));
528 IDFACTORY_TYPE = IdFactoryType.valueOf(idSettings.getProperty("IDFactory", "Compaction"));
529 BAD_ID_CHECKING = Boolean.parseBoolean(idSettings.getProperty("BadIdChecking", "True"));
530- }
531- catch (Exception e)
532- {
533+ } catch (Exception e) {
534 e.printStackTrace();
535 throw new Error("Failed to Load " + ID_CONFIG_FILE + " file.");
536 }
537
538 // Load General L2Properties file (if exists)
539- try
540- {
541+ try {
542 L2Properties General = new L2Properties();
543 is = new FileInputStream(new File(GENERAL_CONFIG_FILE));
544 General.load(is);
545@@ -1907,11 +1845,13 @@
546 GENERAL_THREAD_CORE_SIZE = Integer.parseInt(General.getProperty("GeneralThreadCoreSize", "4"));
547 AI_MAX_THREAD = Integer.parseInt(General.getProperty("AiMaxThread", "6"));
548 CLIENT_PACKET_QUEUE_SIZE = Integer.parseInt(General.getProperty("ClientPacketQueueSize", "0"));
549- if (CLIENT_PACKET_QUEUE_SIZE == 0)
550- { CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 2; }
551+ if (CLIENT_PACKET_QUEUE_SIZE == 0) {
552+ CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 2;
553+ }
554 CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = Integer.parseInt(General.getProperty("ClientPacketQueueMaxBurstSize", "0"));
555- if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0)
556- { CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS + 1; }
557+ if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0) {
558+ CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS + 1;
559+ }
560 CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND = Integer.parseInt(General.getProperty("ClientPacketQueueMaxPacketsPerSecond", "80"));
561 CLIENT_PACKET_QUEUE_MEASURE_INTERVAL = Integer.parseInt(General.getProperty("ClientPacketQueueMeasureInterval", "5"));
562 CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND = Integer.parseInt(General.getProperty("ClientPacketQueueMaxAveragePacketsPerSecond", "40"));
563@@ -1927,8 +1867,7 @@
564 HERB_AUTO_DESTROY_TIME = Integer.parseInt(General.getProperty("AutoDestroyHerbTime", "60")) * 1000;
565 String[] split = General.getProperty("ListOfProtectedItems", "0").split(",");
566 LIST_PROTECTED_ITEMS = new TIntArrayList(split.length);
567- for (String id : split)
568- {
569+ for (String id : split) {
570 LIST_PROTECTED_ITEMS.add(Integer.parseInt(id));
571 }
572 CHAR_STORE_INTERVAL = Integer.parseInt(General.getProperty("CharacterDataStoreInterval", "15"));
573@@ -2030,16 +1969,21 @@
574 FS_TIME_ENTRY = Integer.parseInt(General.getProperty("TimeOfEntry", "3"));
575 FS_TIME_WARMUP = Integer.parseInt(General.getProperty("TimeOfWarmUp", "2"));
576 FS_PARTY_MEMBER_COUNT = Integer.parseInt(General.getProperty("NumberOfNecessaryPartyMembers", "4"));
577- if (FS_TIME_ATTACK <= 0)
578- { FS_TIME_ATTACK = 50; }
579- if (FS_TIME_COOLDOWN <= 0)
580- { FS_TIME_COOLDOWN = 5; }
581- if (FS_TIME_ENTRY <= 0)
582- { FS_TIME_ENTRY = 3; }
583- if (FS_TIME_ENTRY <= 0)
584- { FS_TIME_ENTRY = 3; }
585- if (FS_TIME_ENTRY <= 0)
586- { FS_TIME_ENTRY = 3; }
587+ if (FS_TIME_ATTACK <= 0) {
588+ FS_TIME_ATTACK = 50;
589+ }
590+ if (FS_TIME_COOLDOWN <= 0) {
591+ FS_TIME_COOLDOWN = 5;
592+ }
593+ if (FS_TIME_ENTRY <= 0) {
594+ FS_TIME_ENTRY = 3;
595+ }
596+ if (FS_TIME_ENTRY <= 0) {
597+ FS_TIME_ENTRY = 3;
598+ }
599+ if (FS_TIME_ENTRY <= 0) {
600+ FS_TIME_ENTRY = 3;
601+ }
602 RIFT_MIN_PARTY_SIZE = Integer.parseInt(General.getProperty("RiftMinPartySize", "5"));
603 RIFT_MAX_JUMPS = Integer.parseInt(General.getProperty("MaxRiftJumps", "4"));
604 RIFT_SPAWN_DELAY = Integer.parseInt(General.getProperty("RiftSpawnDelay", "10000"));
605@@ -2069,36 +2013,31 @@
606 CUSTOM_NPCBUFFER_TABLES = Boolean.valueOf(General.getProperty("CustomNpcBufferTables", "false"));
607 ENABLE_BLOCK_CHECKER_EVENT = Boolean.valueOf(General.getProperty("EnableBlockCheckerEvent", "false"));
608 MIN_BLOCK_CHECKER_TEAM_MEMBERS = Integer.valueOf(General.getProperty("BlockCheckerMinTeamMembers", "2"));
609- if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1)
610- { MIN_BLOCK_CHECKER_TEAM_MEMBERS = 1; }
611- else if (MIN_BLOCK_CHECKER_TEAM_MEMBERS > 6)
612- { MIN_BLOCK_CHECKER_TEAM_MEMBERS = 6; }
613+ if (MIN_BLOCK_CHECKER_TEAM_MEMBERS < 1) {
614+ MIN_BLOCK_CHECKER_TEAM_MEMBERS = 1;
615+ } else if (MIN_BLOCK_CHECKER_TEAM_MEMBERS > 6) {
616+ MIN_BLOCK_CHECKER_TEAM_MEMBERS = 6;
617+ }
618 HBCE_FAIR_PLAY = Boolean.parseBoolean(General.getProperty("HBCEFairPlay", "false"));
619- }
620- catch (Exception e)
621- {
622+ } catch (Exception e) {
623 e.printStackTrace();
624 throw new Error("Failed to Load " + GENERAL_CONFIG_FILE + " File.");
625 }
626
627 // Load FloodProtector L2Properties file
628- try
629- {
630+ try {
631 L2Properties security = new L2Properties();
632 is = new FileInputStream(new File(FLOOD_PROTECTOR_FILE));
633 security.load(is);
634
635 loadFloodProtectorConfigs(security);
636- }
637- catch (Exception e)
638- {
639+ } catch (Exception e) {
640 e.printStackTrace();
641 throw new Error("Failed to Load " + FLOOD_PROTECTOR_FILE);
642 }
643
644 // Load NPC L2Properties file (if exists)
645- try
646- {
647+ try {
648 L2Properties NPC = new L2Properties();
649 is = new FileInputStream(new File(NPC_CONFIG_FILE));
650 NPC.load(is);
651@@ -2124,8 +2063,7 @@
652 ALLOW_WYVERN_UPGRADER = Boolean.parseBoolean(NPC.getProperty("AllowWyvernUpgrader", "False"));
653 String[] split = NPC.getProperty("ListPetRentNpc", "30827").split(",");
654 LIST_PET_RENT_NPC = new TIntArrayList(split.length);
655- for (String id : split)
656- {
657+ for (String id : split) {
658 LIST_PET_RENT_NPC.add(Integer.parseInt(id));
659 }
660 RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(NPC.getProperty("RaidHpRegenMultiplier", "100")) / 100;
661@@ -2146,30 +2084,22 @@
662 PET_MP_REGEN_MULTIPLIER = Double.parseDouble(NPC.getProperty("PetMpRegenMultiplier", "100")) / 100;
663 split = NPC.getProperty("NonTalkingNpcs", "18684,18685,18686,18687,18688,18689,18690,19691,18692,31557,31606,31671,31672,31673,31674,32026,32030,32031,32032,32306,32619,32620,32621").split(",");
664 NON_TALKING_NPCS = new TIntArrayList(split.length);
665- for (String npcId : split)
666- {
667- try
668- {
669+ for (String npcId : split) {
670+ try {
671 NON_TALKING_NPCS.add(Integer.parseInt(npcId));
672- }
673- catch (NumberFormatException nfe)
674- {
675- if (!npcId.isEmpty())
676- {
677+ } catch (NumberFormatException nfe) {
678+ if (!npcId.isEmpty()) {
679 _log.warning("Could not parse " + npcId + " id for NonTalkingNpcs. Please check that all values are digits and coma separated.");
680 }
681 }
682 }
683- }
684- catch (Exception e)
685- {
686+ } catch (Exception e) {
687 e.printStackTrace();
688 throw new Error("Failed to Load " + NPC_CONFIG_FILE + " File.");
689 }
690
691 // Load Rates L2Properties file (if exists)
692- try
693- {
694+ try {
695 L2Properties ratesSettings = new L2Properties();
696 is = new FileInputStream(new File(RATES_CONFIG_FILE));
697 ratesSettings.load(is);
698@@ -2228,16 +2158,15 @@
699 PLAYER_XP_PERCENT_LOST = new double[Byte.MAX_VALUE + 1];
700
701 // Default value
702- for (int i = 0; i <= Byte.MAX_VALUE; i++)
703- { PLAYER_XP_PERCENT_LOST[i] = 1.; }
704+ for (int i = 0; i <= Byte.MAX_VALUE; i++) {
705+ PLAYER_XP_PERCENT_LOST[i] = 1.;
706+ }
707
708 // Now loading into table parsed values
709- try
710- {
711+ try {
712 String[] values = ratesSettings.getProperty("PlayerXPPercentLost", "0,39-7.0;40,75-4.0;76,76-2.5;77,77-2.0;78,78-1.5").split(";");
713
714- for (String s : values)
715- {
716+ for (String s : values) {
717 int min;
718 int max;
719 double val;
720@@ -2249,53 +2178,43 @@
721 max = Integer.parseInt(mM[1]);
722 val = Double.parseDouble(vals[1]);
723
724- for (int i = min; i <= max; i++)
725- { PLAYER_XP_PERCENT_LOST[i] = val; }
726- }
727- }
728- catch (Exception e)
729- {
730+ for (int i = min; i <= max; i++) {
731+ PLAYER_XP_PERCENT_LOST[i] = val;
732+ }
733+ }
734+ } catch (Exception e) {
735 _log.warning("Error while loading Player XP percent lost");
736 e.printStackTrace();
737 }
738
739 String[] propertySplit = ratesSettings.getProperty("RateDropItemsById", "").split(";");
740 RATE_DROP_ITEMS_ID = new TIntFloatHashMap(propertySplit.length);
741- if (!propertySplit[0].isEmpty())
742- {
743- for (String item : propertySplit)
744- {
745+ if (!propertySplit[0].isEmpty()) {
746+ for (String item : propertySplit) {
747 String[] itemSplit = item.split(",");
748- if (itemSplit.length != 2)
749- { _log.warning(StringUtil.concat("Config.load(): invalid config property -> RateDropItemsById \"", item, "\"")); }
750- else
751- {
752- try
753- {
754+ if (itemSplit.length != 2) {
755+ _log.warning(StringUtil.concat("Config.load(): invalid config property -> RateDropItemsById \"", item, "\""));
756+ } else {
757+ try {
758 RATE_DROP_ITEMS_ID.put(Integer.parseInt(itemSplit[0]), Float.parseFloat(itemSplit[1]));
759- }
760- catch (NumberFormatException nfe)
761- {
762- if (!item.isEmpty())
763- { _log.warning(StringUtil.concat("Config.load(): invalid config property -> RateDropItemsById \"", item, "\"")); }
764+ } catch (NumberFormatException nfe) {
765+ if (!item.isEmpty()) {
766+ _log.warning(StringUtil.concat("Config.load(): invalid config property -> RateDropItemsById \"", item, "\""));
767+ }
768 }
769 }
770 }
771 }
772- if (RATE_DROP_ITEMS_ID.get(57) == 0f)
773- {
774+ if (RATE_DROP_ITEMS_ID.get(57) == 0f) {
775 RATE_DROP_ITEMS_ID.put(57, RATE_DROP_ITEMS); //for Adena rate if not defined
776 }
777- }
778- catch (Exception e)
779- {
780+ } catch (Exception e) {
781 e.printStackTrace();
782 throw new Error("Failed to Load " + RATES_CONFIG_FILE + " File.");
783 }
784
785 // Load L2JMod L2Properties file (if exists)
786- try
787- {
788+ try {
789 L2Properties L2JModSettings = new L2Properties();
790 is = new FileInputStream(new File(L2JMOD_CONFIG_FILE));
791 L2JModSettings.load(is);
792@@ -2417,50 +2336,38 @@
793 //OFFLINE PETITION SYSTEM
794 OFFLINE_PETITION_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("EnableOfflinePetition", "False"));
795 String[] propertySplit2 = L2JModSettings.getProperty("GmNamesForOfflinePetition", "name").split(",");
796- for (String gmnames : propertySplit2)
797- {
798- try
799- {
800+ for (String gmnames : propertySplit2) {
801+ try {
802 GM_NAMES_OFFLINE_PETITION.add(Integer.parseInt(gmnames));
803- }
804- catch (NumberFormatException nfe)
805- {
806- if (propertySplit2.length > 0)
807- { _log.warning("Error in load config."); }
808+ } catch (NumberFormatException nfe) {
809+ if (propertySplit2.length > 0) {
810+ _log.warning("Error in load config.");
811+ }
812 }
813 }
814
815 String[] propertySplit1 = L2JModSettings.getProperty("KsProtectedMobs", "0").split(",");
816- for (String moobId : propertySplit1)
817- {
818- try
819- {
820+ for (String moobId : propertySplit1) {
821+ try {
822 KS_PROTECT_MOOBS.add(Integer.parseInt(moobId));
823- }
824- catch (NumberFormatException nfe)
825- {
826- if (propertySplit1.length > 0)
827- { _log.warning("Error in load config."); }
828+ } catch (NumberFormatException nfe) {
829+ if (propertySplit1.length > 0) {
830+ _log.warning("Error in load config.");
831+ }
832 }
833 }
834 L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingClan", "False"));
835 L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False"));
836
837- if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
838- {
839+ if (TVT_EVENT_PARTICIPATION_NPC_ID == 0) {
840 TVT_EVENT_ENABLED = false;
841 _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcId");
842- }
843- else
844- {
845+ } else {
846 String[] propertySplit = L2JModSettings.getProperty("TvTEventParticipationNpcCoordinates", "0,0,0").split(",");
847- if (propertySplit.length < 3)
848- {
849+ if (propertySplit.length < 3) {
850 TVT_EVENT_ENABLED = false;
851 _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcCoordinates");
852- }
853- else
854- {
855+ } else {
856 TVT_EVENT_REWARDS = new ArrayList<int[]>();
857 TVT_DOORS_IDS_TO_OPEN = new ArrayList<Integer>();
858 TVT_DOORS_IDS_TO_CLOSE = new ArrayList<Integer>();
859@@ -2470,8 +2377,9 @@
860 TVT_EVENT_PARTICIPATION_NPC_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
861 TVT_EVENT_PARTICIPATION_NPC_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
862 TVT_EVENT_PARTICIPATION_NPC_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
863- if (propertySplit.length == 4)
864- { TVT_EVENT_PARTICIPATION_NPC_COORDINATES[3] = Integer.parseInt(propertySplit[3]); }
865+ if (propertySplit.length == 4) {
866+ TVT_EVENT_PARTICIPATION_NPC_COORDINATES[3] = Integer.parseInt(propertySplit[3]);
867+ }
868 TVT_EVENT_MIN_PLAYERS_IN_TEAMS = Integer.parseInt(L2JModSettings.getProperty("TvTEventMinPlayersInTeams", "1"));
869 TVT_EVENT_MAX_PLAYERS_IN_TEAMS = Integer.parseInt(L2JModSettings.getProperty("TvTEventMaxPlayersInTeams", "20"));
870 TVT_EVENT_MIN_LVL = (byte) Integer.parseInt(L2JModSettings.getProperty("TvTEventMinPlayerLevel", "1"));
871@@ -2483,68 +2391,82 @@
872 TVT_ALLOW_VOICED_COMMAND = Boolean.parseBoolean(L2JModSettings.getProperty("TvTAllowVoicedInfoCommand", "false"));
873 TVT_EVENT_TEAM_1_NAME = L2JModSettings.getProperty("TvTEventTeam1Name", "Team1");
874 propertySplit = L2JModSettings.getProperty("TvTEventTeam1Coordinates", "0,0,0").split(",");
875- if (propertySplit.length < 3)
876- {
877+ if (propertySplit.length < 3) {
878 TVT_EVENT_ENABLED = false;
879 _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam1Coordinates");
880- }
881- else
882- {
883+ } else {
884 TVT_EVENT_TEAM_1_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
885 TVT_EVENT_TEAM_1_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
886 TVT_EVENT_TEAM_1_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
887-// propertySplit = L2JModSettings.getProperty("TvTEventTeam1DeathCoordinates", "0,0,0").split(",");
888-// if (propertySplit.length < 3)
889-// {
890-// TVT_EVENT_ENABLED = false;
891-// _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam1DeathCoordinates");
892-// }
893-// else
894-// {
895-// Config.TVT_EVENT_TEAM_1_BUFF_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
896-// Config.TVT_EVENT_TEAM_1_BUFF_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
897-// Config.TVT_EVENT_TEAM_1_BUFF_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
898-// }
899+ propertySplit = L2JModSettings.getProperty("TvTEventTeam1DeathCoordinates", "0,0,0").split(",");
900+ if (propertySplit.length < 3) {
901+ TVT_EVENT_ENABLED = false;
902+ _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam1DeathCoordinates");
903+ } else {
904+ Config.TVT_EVENT_TEAM_1_BUFF_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
905+ Config.TVT_EVENT_TEAM_1_BUFF_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
906+ Config.TVT_EVENT_TEAM_1_BUFF_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
907+ }
908+ int i = 1;
909+ String[] len = L2JModSettings.getProperty("TvTEventTeam1RespawnLoc", "0,0,0").split(";");
910+ for (int str2 = 0; str2 < len.length; str2++) {
911+ String st = len[str2];
912
913+ propertySplit = st.split(",");
914+ TVT_EVENT_TEAM_1_RESPAWN_LOC.put(Integer.valueOf(i), new int[]{Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2])});
915+ i++;
916+ }
917 TVT_EVENT_TEAM_2_NAME = L2JModSettings.getProperty("TvTEventTeam2Name", "Team2");
918 propertySplit = L2JModSettings.getProperty("TvTEventTeam2Coordinates", "0,0,0").split(",");
919- if (propertySplit.length < 3)
920- {
921+ if (propertySplit.length < 3) {
922 TVT_EVENT_ENABLED = false;
923 _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam2Coordinates");
924- }
925- else
926- {
927+ } else {
928 TVT_EVENT_TEAM_2_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
929 TVT_EVENT_TEAM_2_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
930 TVT_EVENT_TEAM_2_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
931+
932+ propertySplit = L2JModSettings.getProperty("TvTEventTeam2DeathCoordinates", "0,0,0").split(",");
933+ if (propertySplit.length < 3) {
934+ TVT_EVENT_ENABLED = false;
935+ _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam2DeathCoordinates");
936+ } else {
937+ Config.TVT_EVENT_TEAM_2_BUFF_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
938+ Config.TVT_EVENT_TEAM_2_BUFF_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
939+ Config.TVT_EVENT_TEAM_2_BUFF_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
940+ }
941+ i = 1;
942+ len = L2JModSettings.getProperty("TvTEventTeam2RespawnLoc", "0,0,0").split(";");
943+ for (int str2 = 0; str2 < len.length; str2++) {
944+ String st = len[str2];
945+
946+ propertySplit = st.split(",");
947+ TVT_EVENT_TEAM_2_RESPAWN_LOC.put(Integer.valueOf(i), new int[]{Integer.parseInt(propertySplit[0]), Integer.parseInt(propertySplit[1]), Integer.parseInt(propertySplit[2])});
948+ i++;
949+ }
950+
951+
952 propertySplit = L2JModSettings.getProperty("TvTEventParticipationFee", "0,0").split(",");
953- try
954- {
955+ try {
956 TVT_EVENT_PARTICIPATION_FEE[0] = Integer.parseInt(propertySplit[0]);
957 TVT_EVENT_PARTICIPATION_FEE[1] = Integer.parseInt(propertySplit[1]);
958- }
959- catch (NumberFormatException nfe)
960- {
961- if (propertySplit.length > 0)
962- { _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationFee"); }
963+ } catch (NumberFormatException nfe) {
964+ if (propertySplit.length > 0) {
965+ _log.warning("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationFee");
966+ }
967 }
968 propertySplit = L2JModSettings.getProperty("TvTEventReward", "57,100000").split(";");
969- for (String reward : propertySplit)
970- {
971+ for (String reward : propertySplit) {
972 String[] rewardSplit = reward.split(",");
973- if (rewardSplit.length != 2)
974- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"", reward, "\"")); }
975- else
976- {
977- try
978- {
979+ if (rewardSplit.length != 2) {
980+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"", reward, "\""));
981+ } else {
982+ try {
983 TVT_EVENT_REWARDS.add(new int[]{Integer.parseInt(rewardSplit[0]), Integer.parseInt(rewardSplit[1])});
984- }
985- catch (NumberFormatException nfe)
986- {
987- if (!reward.isEmpty())
988- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"", reward, "\"")); }
989+ } catch (NumberFormatException nfe) {
990+ if (!reward.isEmpty()) {
991+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"", reward, "\""));
992+ }
993 }
994 }
995 }
996@@ -2555,76 +2477,60 @@
997 TVT_EVENT_SUMMON_BY_ITEM_ALLOWED = Boolean.parseBoolean(L2JModSettings.getProperty("TvTEventSummonByItemAllowed", "false"));
998 TVT_REWARD_TEAM_TIE = Boolean.parseBoolean(L2JModSettings.getProperty("TvTRewardTeamTie", "false"));
999 propertySplit = L2JModSettings.getProperty("TvTDoorsToOpen", "").split(";");
1000- for (String door : propertySplit)
1001- {
1002- try
1003- {
1004+ for (String door : propertySplit) {
1005+ try {
1006 TVT_DOORS_IDS_TO_OPEN.add(Integer.parseInt(door));
1007- }
1008- catch (NumberFormatException nfe)
1009- {
1010- if (!door.isEmpty())
1011- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToOpen \"", door, "\"")); }
1012+ } catch (NumberFormatException nfe) {
1013+ if (!door.isEmpty()) {
1014+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToOpen \"", door, "\""));
1015+ }
1016 }
1017 }
1018
1019 propertySplit = L2JModSettings.getProperty("TvTDoorsToClose", "").split(";");
1020- for (String door : propertySplit)
1021- {
1022- try
1023- {
1024+ for (String door : propertySplit) {
1025+ try {
1026 TVT_DOORS_IDS_TO_CLOSE.add(Integer.parseInt(door));
1027- }
1028- catch (NumberFormatException nfe)
1029- {
1030- if (!door.isEmpty())
1031- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToClose \"", door, "\"")); }
1032+ } catch (NumberFormatException nfe) {
1033+ if (!door.isEmpty()) {
1034+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTDoorsToClose \"", door, "\""));
1035+ }
1036 }
1037 }
1038
1039 propertySplit = L2JModSettings.getProperty("TvTEventFighterBuffs", "").split(";");
1040- if (!propertySplit[0].isEmpty())
1041- {
1042+ if (!propertySplit[0].isEmpty()) {
1043 TVT_EVENT_FIGHTER_BUFFS = new TIntIntHashMap(propertySplit.length);
1044- for (String skill : propertySplit)
1045- {
1046+ for (String skill : propertySplit) {
1047 String[] skillSplit = skill.split(",");
1048- if (skillSplit.length != 2)
1049- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs \"", skill, "\"")); }
1050- else
1051- {
1052- try
1053- {
1054+ if (skillSplit.length != 2) {
1055+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs \"", skill, "\""));
1056+ } else {
1057+ try {
1058 TVT_EVENT_FIGHTER_BUFFS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
1059- }
1060- catch (NumberFormatException nfe)
1061- {
1062- if (!skill.isEmpty())
1063- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs \"", skill, "\"")); }
1064+ } catch (NumberFormatException nfe) {
1065+ if (!skill.isEmpty()) {
1066+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventFighterBuffs \"", skill, "\""));
1067+ }
1068 }
1069 }
1070 }
1071 }
1072
1073 propertySplit = L2JModSettings.getProperty("TvTEventMageBuffs", "").split(";");
1074- if (!propertySplit[0].isEmpty())
1075- {
1076+ if (!propertySplit[0].isEmpty()) {
1077 TVT_EVENT_MAGE_BUFFS = new TIntIntHashMap(propertySplit.length);
1078- for (String skill : propertySplit)
1079- {
1080+ for (String skill : propertySplit) {
1081 String[] skillSplit = skill.split(",");
1082- if (skillSplit.length != 2)
1083- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs \"", skill, "\"")); }
1084- else
1085- {
1086- try
1087- {
1088+ if (skillSplit.length != 2) {
1089+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs \"", skill, "\""));
1090+ } else {
1091+ try {
1092 TVT_EVENT_MAGE_BUFFS.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
1093- }
1094- catch (NumberFormatException nfe)
1095- {
1096- if (!skill.isEmpty())
1097- { _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs \"", skill, "\"")); }
1098+ } catch (NumberFormatException nfe) {
1099+ if (!skill.isEmpty()) {
1100+ _log.warning(StringUtil.concat("TvTEventEngine[Config.load()]: invalid config property -> TvTEventMageBuffs \"", skill, "\""));
1101+ }
1102 }
1103 }
1104 }
1105@@ -2669,20 +2575,22 @@
1106 L2JMOD_MULTILANG_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("MultiLangEnable", "false"));
1107 String[] allowed = L2JModSettings.getProperty("MultiLangAllowed", "en").split(";");
1108 L2JMOD_MULTILANG_ALLOWED = new ArrayList<String>(allowed.length);
1109- for (String lang : allowed)
1110- { L2JMOD_MULTILANG_ALLOWED.add(lang); }
1111+ for (String lang : allowed) {
1112+ L2JMOD_MULTILANG_ALLOWED.add(lang);
1113+ }
1114 L2JMOD_MULTILANG_DEFAULT = L2JModSettings.getProperty("MultiLangDefault", "en");
1115- if (!L2JMOD_MULTILANG_ALLOWED.contains(L2JMOD_MULTILANG_DEFAULT))
1116- { _log.warning("MultiLang[Config.load()]: default language: " + L2JMOD_MULTILANG_DEFAULT + " is not in allowed list !"); }
1117+ if (!L2JMOD_MULTILANG_ALLOWED.contains(L2JMOD_MULTILANG_DEFAULT)) {
1118+ _log.warning("MultiLang[Config.load()]: default language: " + L2JMOD_MULTILANG_DEFAULT + " is not in allowed list !");
1119+ }
1120 L2JMOD_MULTILANG_VOICED_ALLOW = Boolean.parseBoolean(L2JModSettings.getProperty("MultiLangVoiceCommand", "True"));
1121 USE_CUSTOM_CLANHALLS = Boolean.parseBoolean(L2JModSettings.getProperty("UseCustomClanHalls", "True"));
1122 L2JMOD_MULTILANG_SM_ENABLE = Boolean.parseBoolean(L2JModSettings.getProperty("MultiLangSystemMessageEnable", "false"));
1123 allowed = L2JModSettings.getProperty("MultiLangSystemMessageAllowed", "").split(";");
1124 L2JMOD_MULTILANG_SM_ALLOWED = new ArrayList<String>(allowed.length);
1125- for (String lang : allowed)
1126- {
1127- if (!lang.isEmpty())
1128- { L2JMOD_MULTILANG_SM_ALLOWED.add(lang); }
1129+ for (String lang : allowed) {
1130+ if (!lang.isEmpty()) {
1131+ L2JMOD_MULTILANG_SM_ALLOWED.add(lang);
1132+ }
1133 }
1134
1135 L2WALKER_PROTECTION = Boolean.parseBoolean(L2JModSettings.getProperty("L2WalkerProtection", "False"));
1136@@ -2694,25 +2602,18 @@
1137 L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP = Integer.parseInt(L2JModSettings.getProperty("DualboxCheckMaxOlympiadParticipantsPerIP", "0"));
1138 String[] propertySplit = L2JModSettings.getProperty("DualboxCheckWhitelist", "127.0.0.1,0").split(";");
1139 L2JMOD_DUALBOX_CHECK_WHITELIST = new TIntIntHashMap(propertySplit.length);
1140- for (String entry : propertySplit)
1141- {
1142+ for (String entry : propertySplit) {
1143 String[] entrySplit = entry.split(",");
1144- if (entrySplit.length != 2)
1145- { _log.warning(StringUtil.concat("DualboxCheck[Config.load()]: invalid config property -> DualboxCheckWhitelist \"", entry, "\"")); }
1146- else
1147- {
1148- try
1149- {
1150+ if (entrySplit.length != 2) {
1151+ _log.warning(StringUtil.concat("DualboxCheck[Config.load()]: invalid config property -> DualboxCheckWhitelist \"", entry, "\""));
1152+ } else {
1153+ try {
1154 int num = Integer.parseInt(entrySplit[1]);
1155 num = num == 0 ? -1 : num;
1156 L2JMOD_DUALBOX_CHECK_WHITELIST.put(InetAddress.getByName(entrySplit[0]).hashCode(), num);
1157- }
1158- catch (UnknownHostException e)
1159- {
1160+ } catch (UnknownHostException e) {
1161 _log.warning(StringUtil.concat("DualboxCheck[Config.load()]: invalid address -> DualboxCheckWhitelist \"", entrySplit[0], "\""));
1162- }
1163- catch (NumberFormatException e)
1164- {
1165+ } catch (NumberFormatException e) {
1166 _log.warning(StringUtil.concat("DualboxCheck[Config.load()]: invalid number -> DualboxCheckWhitelist \"", entrySplit[1], "\""));
1167 }
1168 }
1169@@ -2726,40 +2627,31 @@
1170 KINO_ITEM_AMMOUNT = Long.parseLong(L2JModSettings.getProperty("KinoItemAmmount", "1000000"));
1171 KINO_MAX_NUMBER = Integer.parseInt(L2JModSettings.getProperty("KinoMaxNumber", "80"));
1172 KINO_NUMBERS_AMMOUNT = Integer.parseInt(L2JModSettings.getProperty("KinoNumbersAmmount", "4"));
1173- if (KINO_ALLOWED)
1174- {
1175+ if (KINO_ALLOWED) {
1176 String[] kinoPriceSplit = L2JModSettings.getProperty("KinoPrice", "").split(";");
1177 KINO_PRICE = new LinkedList<Integer[]>();
1178- for (String number : kinoPriceSplit)
1179- {
1180+ for (String number : kinoPriceSplit) {
1181 String[] numbersSplit = number.split(",");
1182- try
1183- {
1184+ try {
1185 Integer[] numbersTable = new Integer[3];
1186 numbersTable[0] = Integer.parseInt(numbersSplit[0]);
1187 numbersTable[1] = Integer.parseInt(numbersSplit[1]);
1188 numbersTable[2] = Integer.parseInt(numbersSplit[2]);
1189 KINO_PRICE.add(numbersTable);
1190- }
1191- catch (NumberFormatException nfe)
1192- {
1193- if (!number.isEmpty())
1194- {
1195+ } catch (NumberFormatException nfe) {
1196+ if (!number.isEmpty()) {
1197 _log.warning(StringUtil.concat("[KinoPriceList]: invalid config property -> Price List \"", numbersSplit[0], "\"", numbersSplit[1], "\"", numbersSplit[3]));
1198 }
1199 }
1200 }
1201 }
1202- }
1203- catch (Exception e)
1204- {
1205+ } catch (Exception e) {
1206 e.printStackTrace();
1207 throw new Error("Failed to Load " + L2JMOD_CONFIG_FILE + " File.");
1208 }
1209
1210 // Load PvP L2Properties file (if exists)
1211- try
1212- {
1213+ try {
1214 L2Properties pvpSettings = new L2Properties();
1215 is = new FileInputStream(new File(PVP_CONFIG_FILE));
1216 pvpSettings.load(is);
1217@@ -2777,14 +2669,16 @@
1218 String[] array = KARMA_NONDROPPABLE_PET_ITEMS.split(",");
1219 KARMA_LIST_NONDROPPABLE_PET_ITEMS = new int[array.length];
1220
1221- for (int i = 0; i < array.length; i++)
1222- { KARMA_LIST_NONDROPPABLE_PET_ITEMS[i] = Integer.parseInt(array[i]); }
1223+ for (int i = 0; i < array.length; i++) {
1224+ KARMA_LIST_NONDROPPABLE_PET_ITEMS[i] = Integer.parseInt(array[i]);
1225+ }
1226
1227 array = KARMA_NONDROPPABLE_ITEMS.split(",");
1228 KARMA_LIST_NONDROPPABLE_ITEMS = new int[array.length];
1229
1230- for (int i = 0; i < array.length; i++)
1231- { KARMA_LIST_NONDROPPABLE_ITEMS[i] = Integer.parseInt(array[i]); }
1232+ for (int i = 0; i < array.length; i++) {
1233+ KARMA_LIST_NONDROPPABLE_ITEMS[i] = Integer.parseInt(array[i]);
1234+ }
1235
1236 // sorting so binarySearch can be used later
1237 Arrays.sort(KARMA_LIST_NONDROPPABLE_PET_ITEMS);
1238@@ -2792,15 +2686,12 @@
1239
1240 PVP_NORMAL_TIME = Integer.parseInt(pvpSettings.getProperty("PvPVsNormalTime", "120000"));
1241 PVP_PVP_TIME = Integer.parseInt(pvpSettings.getProperty("PvPVsPvPTime", "60000"));
1242- }
1243- catch (Exception e)
1244- {
1245+ } catch (Exception e) {
1246 e.printStackTrace();
1247 throw new Error("Failed to Load " + PVP_CONFIG_FILE + " File.");
1248 }
1249 // Load Olympiad L2Properties file (if exists)
1250- try
1251- {
1252+ try {
1253 L2Properties olympiad = new L2Properties();
1254 is = new FileInputStream(new File(OLYMPIAD_CONFIG_FILE));
1255 olympiad.load(is);
1256@@ -2835,148 +2726,158 @@
1257 ALT_OLY_ANNOUNCE_GAMES = Boolean.parseBoolean(olympiad.getProperty("AltOlyAnnounceGames", "true"));
1258 String[] split = olympiad.getProperty("AltOlyRestrictedItems", "6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,9388,9389,9390,17049,17050,17051,17052,17053,17054,17055,17056,17057,17058,17059,17060,17061,20759,20775,20776,20777,20778,14774").split(",");
1259 LIST_OLY_RESTRICTED_ITEMS = new TIntArrayList(split.length);
1260- for (String id : split)
1261- {
1262+ for (String id : split) {
1263 LIST_OLY_RESTRICTED_ITEMS.add(Integer.parseInt(id));
1264 }
1265 ALT_OLY_ENCHANT_LIMIT = Integer.parseInt(olympiad.getProperty("AltOlyEnchantLimit", "-1"));
1266 ALT_OLY_WAIT_TIME = Integer.parseInt(olympiad.getProperty("AltOlyWaitTime", "120"));
1267- }
1268- catch (Exception e)
1269- {
1270+ } catch (Exception e) {
1271 e.printStackTrace();
1272 throw new Error("Failed to Load " + OLYMPIAD_CONFIG_FILE + " File.");
1273 }
1274- try
1275- {
1276+ try {
1277 L2Properties Settings = new L2Properties();
1278 is = new FileInputStream(HEXID_FILE);
1279 Settings.load(is);
1280 SERVER_ID = Integer.parseInt(Settings.getProperty("ServerID"));
1281 HEX_ID = new BigInteger(Settings.getProperty("HexID"), 16).toByteArray();
1282- }
1283- catch (Exception e)
1284- {
1285+ } catch (Exception e) {
1286 _log.warning("Could not load HexID file (" + HEXID_FILE + "). Hopefully login will give us one.");
1287 }
1288
1289 // Grandboss
1290- try
1291- {
1292+ try {
1293 L2Properties grandbossSettings = new L2Properties();
1294 is = new FileInputStream(new File(GRANDBOSS_CONFIG_FILE));
1295 grandbossSettings.load(is);
1296
1297 Antharas_Wait_Time = Integer.parseInt(grandbossSettings.getProperty("AntharasWaitTime", "30"));
1298- if (Antharas_Wait_Time < 3 || Antharas_Wait_Time > 60)
1299- { Antharas_Wait_Time = 30; }
1300+ if (Antharas_Wait_Time < 3 || Antharas_Wait_Time > 60) {
1301+ Antharas_Wait_Time = 30;
1302+ }
1303 Antharas_Wait_Time = Antharas_Wait_Time * 60000;
1304
1305 Valakas_Wait_Time = Integer.parseInt(grandbossSettings.getProperty("ValakasWaitTime", "30"));
1306- if (Valakas_Wait_Time < 3 || Valakas_Wait_Time > 60)
1307- { Valakas_Wait_Time = 30; }
1308+ if (Valakas_Wait_Time < 3 || Valakas_Wait_Time > 60) {
1309+ Valakas_Wait_Time = 30;
1310+ }
1311 Valakas_Wait_Time = Valakas_Wait_Time * 60000;
1312
1313 Interval_Of_Antharas_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfAntharasSpawn", "264"));
1314- if (Interval_Of_Antharas_Spawn < 1 || Interval_Of_Antharas_Spawn > 480)
1315- { Interval_Of_Antharas_Spawn = 192; }
1316+ if (Interval_Of_Antharas_Spawn < 1 || Interval_Of_Antharas_Spawn > 480) {
1317+ Interval_Of_Antharas_Spawn = 192;
1318+ }
1319 Interval_Of_Antharas_Spawn = Interval_Of_Antharas_Spawn * 3600000;
1320
1321 Random_Of_Antharas_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfAntharasSpawn", "72"));
1322- if (Random_Of_Antharas_Spawn < 1 || Random_Of_Antharas_Spawn > 192)
1323- { Random_Of_Antharas_Spawn = 145; }
1324+ if (Random_Of_Antharas_Spawn < 1 || Random_Of_Antharas_Spawn > 192) {
1325+ Random_Of_Antharas_Spawn = 145;
1326+ }
1327 Random_Of_Antharas_Spawn = Random_Of_Antharas_Spawn * 3600000;
1328
1329 Interval_Of_Valakas_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfValakasSpawn", "264"));
1330- if (Interval_Of_Valakas_Spawn < 1 || Interval_Of_Valakas_Spawn > 480)
1331- { Interval_Of_Valakas_Spawn = 192; }
1332+ if (Interval_Of_Valakas_Spawn < 1 || Interval_Of_Valakas_Spawn > 480) {
1333+ Interval_Of_Valakas_Spawn = 192;
1334+ }
1335 Interval_Of_Valakas_Spawn = Interval_Of_Valakas_Spawn * 3600000;
1336
1337 Random_Of_Valakas_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfValakasSpawn", "72"));
1338- if (Random_Of_Valakas_Spawn < 1 || Random_Of_Valakas_Spawn > 192)
1339- { Random_Of_Valakas_Spawn = 145; }
1340+ if (Random_Of_Valakas_Spawn < 1 || Random_Of_Valakas_Spawn > 192) {
1341+ Random_Of_Valakas_Spawn = 145;
1342+ }
1343 Random_Of_Valakas_Spawn = Random_Of_Valakas_Spawn * 3600000;
1344
1345 Interval_Of_Baium_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfBaiumSpawn", "168"));
1346- if (Interval_Of_Baium_Spawn < 1 || Interval_Of_Baium_Spawn > 480)
1347- { Interval_Of_Baium_Spawn = 121; }
1348+ if (Interval_Of_Baium_Spawn < 1 || Interval_Of_Baium_Spawn > 480) {
1349+ Interval_Of_Baium_Spawn = 121;
1350+ }
1351 Interval_Of_Baium_Spawn = Interval_Of_Baium_Spawn * 3600000;
1352
1353 Random_Of_Baium_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfBaiumSpawn", "48"));
1354- if (Random_Of_Baium_Spawn < 1 || Random_Of_Baium_Spawn > 192)
1355- { Random_Of_Baium_Spawn = 8; }
1356+ if (Random_Of_Baium_Spawn < 1 || Random_Of_Baium_Spawn > 192) {
1357+ Random_Of_Baium_Spawn = 8;
1358+ }
1359 Random_Of_Baium_Spawn = Random_Of_Baium_Spawn * 3600000;
1360
1361 Interval_Of_Core_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfCoreSpawn", "60"));
1362- if (Interval_Of_Core_Spawn < 1 || Interval_Of_Core_Spawn > 480)
1363- { Interval_Of_Core_Spawn = 27; }
1364+ if (Interval_Of_Core_Spawn < 1 || Interval_Of_Core_Spawn > 480) {
1365+ Interval_Of_Core_Spawn = 27;
1366+ }
1367 Interval_Of_Core_Spawn = Interval_Of_Core_Spawn * 3600000;
1368
1369 Random_Of_Core_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfCoreSpawn", "24"));
1370- if (Random_Of_Core_Spawn < 1 || Random_Of_Core_Spawn > 192)
1371- { Random_Of_Core_Spawn = 47; }
1372+ if (Random_Of_Core_Spawn < 1 || Random_Of_Core_Spawn > 192) {
1373+ Random_Of_Core_Spawn = 47;
1374+ }
1375 Random_Of_Core_Spawn = Random_Of_Core_Spawn * 3600000;
1376
1377 Interval_Of_Orfen_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfOrfenSpawn", "48"));
1378- if (Interval_Of_Orfen_Spawn < 1 || Interval_Of_Orfen_Spawn > 480)
1379- { Interval_Of_Orfen_Spawn = 28; }
1380+ if (Interval_Of_Orfen_Spawn < 1 || Interval_Of_Orfen_Spawn > 480) {
1381+ Interval_Of_Orfen_Spawn = 28;
1382+ }
1383 Interval_Of_Orfen_Spawn = Interval_Of_Orfen_Spawn * 3600000;
1384
1385 Random_Of_Orfen_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfOrfenSpawn", "20"));
1386- if (Random_Of_Orfen_Spawn < 1 || Random_Of_Orfen_Spawn > 192)
1387- { Random_Of_Orfen_Spawn = 41; }
1388+ if (Random_Of_Orfen_Spawn < 1 || Random_Of_Orfen_Spawn > 192) {
1389+ Random_Of_Orfen_Spawn = 41;
1390+ }
1391 Random_Of_Orfen_Spawn = Random_Of_Orfen_Spawn * 3600000;
1392
1393 Interval_Of_QueenAnt_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfQueenAntSpawn", "36"));
1394- if (Interval_Of_QueenAnt_Spawn < 1 || Interval_Of_QueenAnt_Spawn > 480)
1395- { Interval_Of_QueenAnt_Spawn = 19; }
1396+ if (Interval_Of_QueenAnt_Spawn < 1 || Interval_Of_QueenAnt_Spawn > 480) {
1397+ Interval_Of_QueenAnt_Spawn = 19;
1398+ }
1399 Interval_Of_QueenAnt_Spawn = Interval_Of_QueenAnt_Spawn * 3600000;
1400
1401 Random_Of_QueenAnt_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfQueenAntSpawn", "17"));
1402- if (Random_Of_QueenAnt_Spawn < 1 || Random_Of_QueenAnt_Spawn > 192)
1403- { Random_Of_QueenAnt_Spawn = 35; }
1404+ if (Random_Of_QueenAnt_Spawn < 1 || Random_Of_QueenAnt_Spawn > 192) {
1405+ Random_Of_QueenAnt_Spawn = 35;
1406+ }
1407 Random_Of_QueenAnt_Spawn = Random_Of_QueenAnt_Spawn * 3600000;
1408
1409 Interval_Of_Zaken_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfZakenSpawn", "19"));
1410- if (Interval_Of_Zaken_Spawn < 1 || Interval_Of_Zaken_Spawn > 480)
1411- { Interval_Of_Zaken_Spawn = 19; }
1412+ if (Interval_Of_Zaken_Spawn < 1 || Interval_Of_Zaken_Spawn > 480) {
1413+ Interval_Of_Zaken_Spawn = 19;
1414+ }
1415 Interval_Of_Zaken_Spawn = Interval_Of_Zaken_Spawn * 3600000;
1416
1417 Random_Of_Zaken_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfZakenSpawn", "35"));
1418- if (Random_Of_Zaken_Spawn < 1 || Random_Of_Zaken_Spawn > 192)
1419- { Random_Of_Zaken_Spawn = 35; }
1420+ if (Random_Of_Zaken_Spawn < 1 || Random_Of_Zaken_Spawn > 192) {
1421+ Random_Of_Zaken_Spawn = 35;
1422+ }
1423 Random_Of_Zaken_Spawn = Random_Of_Zaken_Spawn * 3600000;
1424
1425 Interval_Of_Frintezza_Spawn = Integer.parseInt(grandbossSettings.getProperty("IntervalOfFrintezzaSpawn", "48"));
1426- if (Interval_Of_Frintezza_Spawn < 1 || Interval_Of_Frintezza_Spawn > 480)
1427- { Interval_Of_Frintezza_Spawn = 121; }
1428+ if (Interval_Of_Frintezza_Spawn < 1 || Interval_Of_Frintezza_Spawn > 480) {
1429+ Interval_Of_Frintezza_Spawn = 121;
1430+ }
1431 Interval_Of_Frintezza_Spawn = Interval_Of_Frintezza_Spawn * 3600000;
1432
1433 Random_Of_Frintezza_Spawn = Integer.parseInt(grandbossSettings.getProperty("RandomOfFrintezzaSpawn", "8"));
1434- if (Random_Of_Frintezza_Spawn < 1 || Random_Of_Frintezza_Spawn > 192)
1435- { Random_Of_Frintezza_Spawn = 8; }
1436+ if (Random_Of_Frintezza_Spawn < 1 || Random_Of_Frintezza_Spawn > 192) {
1437+ Random_Of_Frintezza_Spawn = 8;
1438+ }
1439 Random_Of_Frintezza_Spawn = Random_Of_Frintezza_Spawn * 3600000;
1440
1441 INTERVAL_OF_BELETH_SPAWN = Integer.parseInt(grandbossSettings.getProperty("IntervalOfBelethSpawn", "192"));
1442- if (INTERVAL_OF_BELETH_SPAWN < 1 || INTERVAL_OF_BELETH_SPAWN > 480)
1443- { INTERVAL_OF_BELETH_SPAWN = 192; }
1444+ if (INTERVAL_OF_BELETH_SPAWN < 1 || INTERVAL_OF_BELETH_SPAWN > 480) {
1445+ INTERVAL_OF_BELETH_SPAWN = 192;
1446+ }
1447 INTERVAL_OF_BELETH_SPAWN *= 0x36ee80;
1448 RANDOM_OF_BELETH_SPAWN = Integer.parseInt(grandbossSettings.getProperty("RandomOfBelethSpawn", "148"));
1449- if (RANDOM_OF_BELETH_SPAWN < 1 || RANDOM_OF_BELETH_SPAWN > 192)
1450- { RANDOM_OF_BELETH_SPAWN = 148; }
1451+ if (RANDOM_OF_BELETH_SPAWN < 1 || RANDOM_OF_BELETH_SPAWN > 192) {
1452+ RANDOM_OF_BELETH_SPAWN = 148;
1453+ }
1454 RANDOM_OF_BELETH_SPAWN *= 0x36ee80;
1455 BELETH_MIN_PLAYERS = Integer.parseInt(grandbossSettings.getProperty("BelethMinPlayers", "36"));
1456
1457- }
1458- catch (Exception e)
1459- {
1460+ } catch (Exception e) {
1461 e.printStackTrace();
1462 throw new Error("Failed to Load " + GRANDBOSS_CONFIG_FILE + " File.");
1463 }
1464
1465 // Gracia Seeds
1466- try
1467- {
1468+ try {
1469 L2Properties graciaseedsSettings = new L2Properties();
1470 is = new FileInputStream(new File(GRACIASEEDS_CONFIG_FILE));
1471 graciaseedsSettings.load(is);
1472@@ -2985,54 +2886,40 @@
1473 SOD_TIAT_KILL_COUNT = Integer.parseInt(graciaseedsSettings.getProperty("TiatKillCountForNextState", "10"));
1474 SOD_STAGE_2_LENGTH = Long.parseLong(graciaseedsSettings.getProperty("Stage2Length", "720")) * 60000;
1475
1476- }
1477- catch (Exception e)
1478- {
1479+ } catch (Exception e) {
1480 e.printStackTrace();
1481 throw new Error("Failed to Load " + GRACIASEEDS_CONFIG_FILE + " File.");
1482 }
1483
1484- try
1485- {
1486+ try {
1487 FILTER_LIST = new ArrayList<String>();
1488 LineNumberReader lnr = new LineNumberReader(new BufferedReader(new FileReader(new File(CHAT_FILTER_FILE))));
1489 String line = null;
1490- while ((line = lnr.readLine()) != null)
1491- {
1492- if (line.trim().isEmpty() || line.startsWith("#"))
1493- { continue; }
1494+ while ((line = lnr.readLine()) != null) {
1495+ if (line.trim().isEmpty() || line.startsWith("#")) {
1496+ continue;
1497+ }
1498
1499 FILTER_LIST.add(line.trim());
1500 }
1501 _log.info("Loaded " + FILTER_LIST.size() + " Filter Words.");
1502- }
1503- catch (Exception e)
1504- {
1505+ } catch (Exception e) {
1506 e.printStackTrace();
1507 throw new Error("Failed to Load " + CHAT_FILTER_FILE + " File.");
1508 }
1509- }
1510- finally
1511- {
1512- try
1513- {
1514+ } finally {
1515+ try {
1516 is.close();
1517- }
1518- catch (Exception e)
1519- {
1520+ } catch (Exception e) {
1521 }
1522 }
1523
1524 loadCustom();
1525- }
1526- else if (Server.serverMode == Server.MODE_LOGINSERVER)
1527- {
1528+ } else if (Server.serverMode == Server.MODE_LOGINSERVER) {
1529 _log.info("loading login config");
1530 InputStream is = null;
1531- try
1532- {
1533- try
1534- {
1535+ try {
1536+ try {
1537 L2Properties serverSettings = new L2Properties();
1538 is = new FileInputStream(new File(LOGIN_CONFIGURATION_FILE));
1539 serverSettings.load(is);
1540@@ -3068,15 +2955,12 @@
1541 NORMAL_CONNECTION_TIME = Integer.parseInt(serverSettings.getProperty("NormalConnectionTime", "700"));
1542 FAST_CONNECTION_TIME = Integer.parseInt(serverSettings.getProperty("FastConnectionTime", "350"));
1543 MAX_CONNECTION_PER_IP = Integer.parseInt(serverSettings.getProperty("MaxConnectionPerIP", "50"));
1544- }
1545- catch (Exception e)
1546- {
1547+ } catch (Exception e) {
1548 e.printStackTrace();
1549 throw new Error("Failed to Load " + LOGIN_CONFIGURATION_FILE + " File.");
1550 }
1551 // MMO
1552- try
1553- {
1554+ try {
1555 _log.info("Loading " + MMO_CONFIG_FILE.replaceAll("./config/", ""));
1556 L2Properties mmoSettings = new L2Properties();
1557 is = new FileInputStream(new File(MMO_CONFIG_FILE));
1558@@ -3085,41 +2969,29 @@
1559 MMO_MAX_SEND_PER_PASS = Integer.parseInt(mmoSettings.getProperty("MaxSendPerPass", "12"));
1560 MMO_MAX_READ_PER_PASS = Integer.parseInt(mmoSettings.getProperty("MaxReadPerPass", "12"));
1561 MMO_HELPER_BUFFER_COUNT = Integer.parseInt(mmoSettings.getProperty("HelperBufferCount", "20"));
1562- }
1563- catch (Exception e)
1564- {
1565+ } catch (Exception e) {
1566 e.printStackTrace();
1567 throw new Error("Failed to Load " + MMO_CONFIG_FILE + " File.");
1568 }
1569
1570 // Load Telnet L2Properties file (if exists)
1571- try
1572- {
1573+ try {
1574 L2Properties telnetSettings = new L2Properties();
1575 is = new FileInputStream(new File(TELNET_FILE));
1576 telnetSettings.load(is);
1577
1578 IS_TELNET_ENABLED = Boolean.parseBoolean(telnetSettings.getProperty("EnableTelnet", "false"));
1579- }
1580- catch (Exception e)
1581- {
1582+ } catch (Exception e) {
1583 e.printStackTrace();
1584 throw new Error("Failed to Load " + TELNET_FILE + " File.");
1585 }
1586- }
1587- finally
1588- {
1589- try
1590- {
1591+ } finally {
1592+ try {
1593 is.close();
1594+ } catch (Exception e) {
1595 }
1596- catch (Exception e)
1597- {
1598- }
1599 }
1600- }
1601- else
1602- {
1603+ } else {
1604 _log.severe("Could not Load Config: server mode was not set");
1605 }
1606 }
1607@@ -3132,663 +3004,601 @@
1608 * @return boolean : true if modification has been made
1609 * @link useAdminCommand
1610 */
1611- public static boolean setParameterValue(String pName, String pValue)
1612- {
1613+ public static boolean setParameterValue(String pName, String pValue) {
1614 // rates.properties
1615- if (pName.equalsIgnoreCase("RateXp"))
1616- { RATE_XP = Float.parseFloat(pValue); }
1617- else if (pName.equalsIgnoreCase("RateSp"))
1618- { RATE_SP = Float.parseFloat(pValue); }
1619- else if (pName.equalsIgnoreCase("RatePartyXp"))
1620- { RATE_PARTY_XP = Float.parseFloat(pValue); }
1621- else if (pName.equalsIgnoreCase("RatePartySp"))
1622- { RATE_PARTY_SP = Float.parseFloat(pValue); }
1623- else if (pName.equalsIgnoreCase("RateConsumableCost"))
1624- { RATE_CONSUMABLE_COST = Float.parseFloat(pValue); }
1625- else if (pName.equalsIgnoreCase("RateExtractFish"))
1626- { RATE_EXTR_FISH = Float.parseFloat(pValue); }
1627- else if (pName.equalsIgnoreCase("RateDropItems"))
1628- { RATE_DROP_ITEMS = Float.parseFloat(pValue); }
1629- else if (pName.equalsIgnoreCase("RateDropAdena"))
1630- { RATE_DROP_ITEMS_ID.put(57, Float.parseFloat(pValue)); }
1631- else if (pName.equalsIgnoreCase("RateRaidDropItems"))
1632- { RATE_DROP_ITEMS_BY_RAID = Float.parseFloat(pValue); }
1633- else if (pName.equalsIgnoreCase("RateDropSpoil"))
1634- { RATE_DROP_SPOIL = Float.parseFloat(pValue); }
1635- else if (pName.equalsIgnoreCase("RateDropManor"))
1636- { RATE_DROP_MANOR = Integer.parseInt(pValue); }
1637- else if (pName.equalsIgnoreCase("RateQuestDrop"))
1638- { RATE_QUEST_DROP = Float.parseFloat(pValue); }
1639- else if (pName.equalsIgnoreCase("RateQuestReward"))
1640- { RATE_QUEST_REWARD = Float.parseFloat(pValue); }
1641- else if (pName.equalsIgnoreCase("RateQuestRewardXP"))
1642- { RATE_QUEST_REWARD_XP = Float.parseFloat(pValue); }
1643- else if (pName.equalsIgnoreCase("RateQuestRewardSP"))
1644- { RATE_QUEST_REWARD_SP = Float.parseFloat(pValue); }
1645- else if (pName.equalsIgnoreCase("RateQuestRewardAdena"))
1646- { RATE_QUEST_REWARD_ADENA = Float.parseFloat(pValue); }
1647- else if (pName.equalsIgnoreCase("UseQuestRewardMultipliers"))
1648- { RATE_QUEST_REWARD_USE_MULTIPLIERS = Boolean.parseBoolean(pValue); }
1649- else if (pName.equalsIgnoreCase("RateQuestRewardPotion"))
1650- { RATE_QUEST_REWARD_POTION = Float.parseFloat(pValue); }
1651- else if (pName.equalsIgnoreCase("RateQuestRewardScroll"))
1652- { RATE_QUEST_REWARD_SCROLL = Float.parseFloat(pValue); }
1653- else if (pName.equalsIgnoreCase("RateQuestRewardRecipe"))
1654- { RATE_QUEST_REWARD_RECIPE = Float.parseFloat(pValue); }
1655- else if (pName.equalsIgnoreCase("RateQuestRewardMaterial"))
1656- { RATE_QUEST_REWARD_MATERIAL = Float.parseFloat(pValue); }
1657- else if (pName.equalsIgnoreCase("RateVitalityLevel1"))
1658- { RATE_VITALITY_LEVEL_1 = Float.parseFloat(pValue); }
1659- else if (pName.equalsIgnoreCase("RateVitalityLevel2"))
1660- { RATE_VITALITY_LEVEL_2 = Float.parseFloat(pValue); }
1661- else if (pName.equalsIgnoreCase("RateVitalityLevel3"))
1662- { RATE_VITALITY_LEVEL_3 = Float.parseFloat(pValue); }
1663- else if (pName.equalsIgnoreCase("RateVitalityLevel4"))
1664- { RATE_VITALITY_LEVEL_4 = Float.parseFloat(pValue); }
1665- else if (pName.equalsIgnoreCase("RateRecoveryPeaceZone"))
1666- { RATE_RECOVERY_VITALITY_PEACE_ZONE = Float.parseFloat(pValue); }
1667- else if (pName.equalsIgnoreCase("RateVitalityLost"))
1668- { RATE_VITALITY_LOST = Float.parseFloat(pValue); }
1669- else if (pName.equalsIgnoreCase("RateVitalityGain"))
1670- { RATE_VITALITY_GAIN = Float.parseFloat(pValue); }
1671- else if (pName.equalsIgnoreCase("RateRecoveryOnReconnect"))
1672- { RATE_RECOVERY_ON_RECONNECT = Float.parseFloat(pValue); }
1673- else if (pName.equalsIgnoreCase("RateKarmaExpLost"))
1674- { RATE_KARMA_EXP_LOST = Float.parseFloat(pValue); }
1675- else if (pName.equalsIgnoreCase("RateSiegeGuardsPrice"))
1676- { RATE_SIEGE_GUARDS_PRICE = Float.parseFloat(pValue); }
1677- else if (pName.equalsIgnoreCase("RateCommonHerbs"))
1678- { RATE_DROP_COMMON_HERBS = Float.parseFloat(pValue); }
1679- else if (pName.equalsIgnoreCase("RateHpHerbs"))
1680- { RATE_DROP_HP_HERBS = Float.parseFloat(pValue); }
1681- else if (pName.equalsIgnoreCase("RateMpHerbs"))
1682- { RATE_DROP_MP_HERBS = Float.parseFloat(pValue); }
1683- else if (pName.equalsIgnoreCase("RateSpecialHerbs"))
1684- { RATE_DROP_SPECIAL_HERBS = Float.parseFloat(pValue); }
1685- else if (pName.equalsIgnoreCase("RateVitalityHerbs"))
1686- { RATE_DROP_VITALITY_HERBS = Float.parseFloat(pValue); }
1687- else if (pName.equalsIgnoreCase("PlayerDropLimit"))
1688- { PLAYER_DROP_LIMIT = Integer.parseInt(pValue); }
1689- else if (pName.equalsIgnoreCase("PlayerRateDrop"))
1690- { PLAYER_RATE_DROP = Integer.parseInt(pValue); }
1691- else if (pName.equalsIgnoreCase("PlayerRateDropItem"))
1692- { PLAYER_RATE_DROP_ITEM = Integer.parseInt(pValue); }
1693- else if (pName.equalsIgnoreCase("PlayerRateDropEquip"))
1694- { PLAYER_RATE_DROP_EQUIP = Integer.parseInt(pValue); }
1695- else if (pName.equalsIgnoreCase("PlayerRateDropEquipWeapon"))
1696- { PLAYER_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue); }
1697- else if (pName.equalsIgnoreCase("PetXpRate"))
1698- { PET_XP_RATE = Float.parseFloat(pValue); }
1699- else if (pName.equalsIgnoreCase("PetFoodRate"))
1700- { PET_FOOD_RATE = Integer.parseInt(pValue); }
1701- else if (pName.equalsIgnoreCase("SinEaterXpRate"))
1702- { SINEATER_XP_RATE = Float.parseFloat(pValue); }
1703- else if (pName.equalsIgnoreCase("KarmaDropLimit"))
1704- { KARMA_DROP_LIMIT = Integer.parseInt(pValue); }
1705- else if (pName.equalsIgnoreCase("KarmaRateDrop"))
1706- { KARMA_RATE_DROP = Integer.parseInt(pValue); }
1707- else if (pName.equalsIgnoreCase("KarmaRateDropItem"))
1708- { KARMA_RATE_DROP_ITEM = Integer.parseInt(pValue); }
1709- else if (pName.equalsIgnoreCase("KarmaRateDropEquip"))
1710- { KARMA_RATE_DROP_EQUIP = Integer.parseInt(pValue); }
1711- else if (pName.equalsIgnoreCase("KarmaRateDropEquipWeapon"))
1712- { KARMA_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue); }
1713+ if (pName.equalsIgnoreCase("RateXp")) {
1714+ RATE_XP = Float.parseFloat(pValue);
1715+ } else if (pName.equalsIgnoreCase("RateSp")) {
1716+ RATE_SP = Float.parseFloat(pValue);
1717+ } else if (pName.equalsIgnoreCase("RatePartyXp")) {
1718+ RATE_PARTY_XP = Float.parseFloat(pValue);
1719+ } else if (pName.equalsIgnoreCase("RatePartySp")) {
1720+ RATE_PARTY_SP = Float.parseFloat(pValue);
1721+ } else if (pName.equalsIgnoreCase("RateConsumableCost")) {
1722+ RATE_CONSUMABLE_COST = Float.parseFloat(pValue);
1723+ } else if (pName.equalsIgnoreCase("RateExtractFish")) {
1724+ RATE_EXTR_FISH = Float.parseFloat(pValue);
1725+ } else if (pName.equalsIgnoreCase("RateDropItems")) {
1726+ RATE_DROP_ITEMS = Float.parseFloat(pValue);
1727+ } else if (pName.equalsIgnoreCase("RateDropAdena")) {
1728+ RATE_DROP_ITEMS_ID.put(57, Float.parseFloat(pValue));
1729+ } else if (pName.equalsIgnoreCase("RateRaidDropItems")) {
1730+ RATE_DROP_ITEMS_BY_RAID = Float.parseFloat(pValue);
1731+ } else if (pName.equalsIgnoreCase("RateDropSpoil")) {
1732+ RATE_DROP_SPOIL = Float.parseFloat(pValue);
1733+ } else if (pName.equalsIgnoreCase("RateDropManor")) {
1734+ RATE_DROP_MANOR = Integer.parseInt(pValue);
1735+ } else if (pName.equalsIgnoreCase("RateQuestDrop")) {
1736+ RATE_QUEST_DROP = Float.parseFloat(pValue);
1737+ } else if (pName.equalsIgnoreCase("RateQuestReward")) {
1738+ RATE_QUEST_REWARD = Float.parseFloat(pValue);
1739+ } else if (pName.equalsIgnoreCase("RateQuestRewardXP")) {
1740+ RATE_QUEST_REWARD_XP = Float.parseFloat(pValue);
1741+ } else if (pName.equalsIgnoreCase("RateQuestRewardSP")) {
1742+ RATE_QUEST_REWARD_SP = Float.parseFloat(pValue);
1743+ } else if (pName.equalsIgnoreCase("RateQuestRewardAdena")) {
1744+ RATE_QUEST_REWARD_ADENA = Float.parseFloat(pValue);
1745+ } else if (pName.equalsIgnoreCase("UseQuestRewardMultipliers")) {
1746+ RATE_QUEST_REWARD_USE_MULTIPLIERS = Boolean.parseBoolean(pValue);
1747+ } else if (pName.equalsIgnoreCase("RateQuestRewardPotion")) {
1748+ RATE_QUEST_REWARD_POTION = Float.parseFloat(pValue);
1749+ } else if (pName.equalsIgnoreCase("RateQuestRewardScroll")) {
1750+ RATE_QUEST_REWARD_SCROLL = Float.parseFloat(pValue);
1751+ } else if (pName.equalsIgnoreCase("RateQuestRewardRecipe")) {
1752+ RATE_QUEST_REWARD_RECIPE = Float.parseFloat(pValue);
1753+ } else if (pName.equalsIgnoreCase("RateQuestRewardMaterial")) {
1754+ RATE_QUEST_REWARD_MATERIAL = Float.parseFloat(pValue);
1755+ } else if (pName.equalsIgnoreCase("RateVitalityLevel1")) {
1756+ RATE_VITALITY_LEVEL_1 = Float.parseFloat(pValue);
1757+ } else if (pName.equalsIgnoreCase("RateVitalityLevel2")) {
1758+ RATE_VITALITY_LEVEL_2 = Float.parseFloat(pValue);
1759+ } else if (pName.equalsIgnoreCase("RateVitalityLevel3")) {
1760+ RATE_VITALITY_LEVEL_3 = Float.parseFloat(pValue);
1761+ } else if (pName.equalsIgnoreCase("RateVitalityLevel4")) {
1762+ RATE_VITALITY_LEVEL_4 = Float.parseFloat(pValue);
1763+ } else if (pName.equalsIgnoreCase("RateRecoveryPeaceZone")) {
1764+ RATE_RECOVERY_VITALITY_PEACE_ZONE = Float.parseFloat(pValue);
1765+ } else if (pName.equalsIgnoreCase("RateVitalityLost")) {
1766+ RATE_VITALITY_LOST = Float.parseFloat(pValue);
1767+ } else if (pName.equalsIgnoreCase("RateVitalityGain")) {
1768+ RATE_VITALITY_GAIN = Float.parseFloat(pValue);
1769+ } else if (pName.equalsIgnoreCase("RateRecoveryOnReconnect")) {
1770+ RATE_RECOVERY_ON_RECONNECT = Float.parseFloat(pValue);
1771+ } else if (pName.equalsIgnoreCase("RateKarmaExpLost")) {
1772+ RATE_KARMA_EXP_LOST = Float.parseFloat(pValue);
1773+ } else if (pName.equalsIgnoreCase("RateSiegeGuardsPrice")) {
1774+ RATE_SIEGE_GUARDS_PRICE = Float.parseFloat(pValue);
1775+ } else if (pName.equalsIgnoreCase("RateCommonHerbs")) {
1776+ RATE_DROP_COMMON_HERBS = Float.parseFloat(pValue);
1777+ } else if (pName.equalsIgnoreCase("RateHpHerbs")) {
1778+ RATE_DROP_HP_HERBS = Float.parseFloat(pValue);
1779+ } else if (pName.equalsIgnoreCase("RateMpHerbs")) {
1780+ RATE_DROP_MP_HERBS = Float.parseFloat(pValue);
1781+ } else if (pName.equalsIgnoreCase("RateSpecialHerbs")) {
1782+ RATE_DROP_SPECIAL_HERBS = Float.parseFloat(pValue);
1783+ } else if (pName.equalsIgnoreCase("RateVitalityHerbs")) {
1784+ RATE_DROP_VITALITY_HERBS = Float.parseFloat(pValue);
1785+ } else if (pName.equalsIgnoreCase("PlayerDropLimit")) {
1786+ PLAYER_DROP_LIMIT = Integer.parseInt(pValue);
1787+ } else if (pName.equalsIgnoreCase("PlayerRateDrop")) {
1788+ PLAYER_RATE_DROP = Integer.parseInt(pValue);
1789+ } else if (pName.equalsIgnoreCase("PlayerRateDropItem")) {
1790+ PLAYER_RATE_DROP_ITEM = Integer.parseInt(pValue);
1791+ } else if (pName.equalsIgnoreCase("PlayerRateDropEquip")) {
1792+ PLAYER_RATE_DROP_EQUIP = Integer.parseInt(pValue);
1793+ } else if (pName.equalsIgnoreCase("PlayerRateDropEquipWeapon")) {
1794+ PLAYER_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
1795+ } else if (pName.equalsIgnoreCase("PetXpRate")) {
1796+ PET_XP_RATE = Float.parseFloat(pValue);
1797+ } else if (pName.equalsIgnoreCase("PetFoodRate")) {
1798+ PET_FOOD_RATE = Integer.parseInt(pValue);
1799+ } else if (pName.equalsIgnoreCase("SinEaterXpRate")) {
1800+ SINEATER_XP_RATE = Float.parseFloat(pValue);
1801+ } else if (pName.equalsIgnoreCase("KarmaDropLimit")) {
1802+ KARMA_DROP_LIMIT = Integer.parseInt(pValue);
1803+ } else if (pName.equalsIgnoreCase("KarmaRateDrop")) {
1804+ KARMA_RATE_DROP = Integer.parseInt(pValue);
1805+ } else if (pName.equalsIgnoreCase("KarmaRateDropItem")) {
1806+ KARMA_RATE_DROP_ITEM = Integer.parseInt(pValue);
1807+ } else if (pName.equalsIgnoreCase("KarmaRateDropEquip")) {
1808+ KARMA_RATE_DROP_EQUIP = Integer.parseInt(pValue);
1809+ } else if (pName.equalsIgnoreCase("KarmaRateDropEquipWeapon")) {
1810+ KARMA_RATE_DROP_EQUIP_WEAPON = Integer.parseInt(pValue);
1811+ }
1812
1813 // general.properties
1814- else if (pName.equalsIgnoreCase("AutoDestroyDroppedItemAfter"))
1815- { AUTODESTROY_ITEM_AFTER = Integer.parseInt(pValue); }
1816- else if (pName.equalsIgnoreCase("DestroyPlayerDroppedItem"))
1817- { DESTROY_DROPPED_PLAYER_ITEM = Boolean.parseBoolean(pValue); }
1818- else if (pName.equalsIgnoreCase("DestroyEquipableItem"))
1819- { DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean.parseBoolean(pValue); }
1820- else if (pName.equalsIgnoreCase("SaveDroppedItem"))
1821- { SAVE_DROPPED_ITEM = Boolean.parseBoolean(pValue); }
1822- else if (pName.equalsIgnoreCase("EmptyDroppedItemTableAfterLoad"))
1823- { EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = Boolean.parseBoolean(pValue); }
1824- else if (pName.equalsIgnoreCase("SaveDroppedItemInterval"))
1825- { SAVE_DROPPED_ITEM_INTERVAL = Integer.parseInt(pValue); }
1826- else if (pName.equalsIgnoreCase("ClearDroppedItemTable"))
1827- { CLEAR_DROPPED_ITEM_TABLE = Boolean.parseBoolean(pValue); }
1828-
1829- else if (pName.equalsIgnoreCase("PreciseDropCalculation"))
1830- { PRECISE_DROP_CALCULATION = Boolean.parseBoolean(pValue); }
1831- else if (pName.equalsIgnoreCase("MultipleItemDrop"))
1832- { MULTIPLE_ITEM_DROP = Boolean.parseBoolean(pValue); }
1833- else if (pName.equalsIgnoreCase("LowWeight"))
1834- { LOW_WEIGHT = Float.parseFloat(pValue); }
1835- else if (pName.equalsIgnoreCase("MediumWeight"))
1836- { MEDIUM_WEIGHT = Float.parseFloat(pValue); }
1837- else if (pName.equalsIgnoreCase("HighWeight"))
1838- { HIGH_WEIGHT = Float.parseFloat(pValue); }
1839- else if (pName.equalsIgnoreCase("AdvancedDiagonalStrategy"))
1840- { ADVANCED_DIAGONAL_STRATEGY = Boolean.parseBoolean(pValue); }
1841- else if (pName.equalsIgnoreCase("DiagonalWeight"))
1842- { DIAGONAL_WEIGHT = Float.parseFloat(pValue); }
1843- else if (pName.equalsIgnoreCase("MaxPostfilterPasses"))
1844- { MAX_POSTFILTER_PASSES = Integer.parseInt(pValue); }
1845- else if (pName.equalsIgnoreCase("CoordSynchronize"))
1846- { COORD_SYNCHRONIZE = Integer.parseInt(pValue); }
1847- else if (pName.equalsIgnoreCase("DeleteCharAfterDays"))
1848- { DELETE_DAYS = Integer.parseInt(pValue); }
1849-
1850- else if (pName.equalsIgnoreCase("ClientPacketQueueSize"))
1851- {
1852+ else if (pName.equalsIgnoreCase("AutoDestroyDroppedItemAfter")) {
1853+ AUTODESTROY_ITEM_AFTER = Integer.parseInt(pValue);
1854+ } else if (pName.equalsIgnoreCase("DestroyPlayerDroppedItem")) {
1855+ DESTROY_DROPPED_PLAYER_ITEM = Boolean.parseBoolean(pValue);
1856+ } else if (pName.equalsIgnoreCase("DestroyEquipableItem")) {
1857+ DESTROY_EQUIPABLE_PLAYER_ITEM = Boolean.parseBoolean(pValue);
1858+ } else if (pName.equalsIgnoreCase("SaveDroppedItem")) {
1859+ SAVE_DROPPED_ITEM = Boolean.parseBoolean(pValue);
1860+ } else if (pName.equalsIgnoreCase("EmptyDroppedItemTableAfterLoad")) {
1861+ EMPTY_DROPPED_ITEM_TABLE_AFTER_LOAD = Boolean.parseBoolean(pValue);
1862+ } else if (pName.equalsIgnoreCase("SaveDroppedItemInterval")) {
1863+ SAVE_DROPPED_ITEM_INTERVAL = Integer.parseInt(pValue);
1864+ } else if (pName.equalsIgnoreCase("ClearDroppedItemTable")) {
1865+ CLEAR_DROPPED_ITEM_TABLE = Boolean.parseBoolean(pValue);
1866+ } else if (pName.equalsIgnoreCase("PreciseDropCalculation")) {
1867+ PRECISE_DROP_CALCULATION = Boolean.parseBoolean(pValue);
1868+ } else if (pName.equalsIgnoreCase("MultipleItemDrop")) {
1869+ MULTIPLE_ITEM_DROP = Boolean.parseBoolean(pValue);
1870+ } else if (pName.equalsIgnoreCase("LowWeight")) {
1871+ LOW_WEIGHT = Float.parseFloat(pValue);
1872+ } else if (pName.equalsIgnoreCase("MediumWeight")) {
1873+ MEDIUM_WEIGHT = Float.parseFloat(pValue);
1874+ } else if (pName.equalsIgnoreCase("HighWeight")) {
1875+ HIGH_WEIGHT = Float.parseFloat(pValue);
1876+ } else if (pName.equalsIgnoreCase("AdvancedDiagonalStrategy")) {
1877+ ADVANCED_DIAGONAL_STRATEGY = Boolean.parseBoolean(pValue);
1878+ } else if (pName.equalsIgnoreCase("DiagonalWeight")) {
1879+ DIAGONAL_WEIGHT = Float.parseFloat(pValue);
1880+ } else if (pName.equalsIgnoreCase("MaxPostfilterPasses")) {
1881+ MAX_POSTFILTER_PASSES = Integer.parseInt(pValue);
1882+ } else if (pName.equalsIgnoreCase("CoordSynchronize")) {
1883+ COORD_SYNCHRONIZE = Integer.parseInt(pValue);
1884+ } else if (pName.equalsIgnoreCase("DeleteCharAfterDays")) {
1885+ DELETE_DAYS = Integer.parseInt(pValue);
1886+ } else if (pName.equalsIgnoreCase("ClientPacketQueueSize")) {
1887 CLIENT_PACKET_QUEUE_SIZE = Integer.parseInt(pValue);
1888- if (CLIENT_PACKET_QUEUE_SIZE == 0)
1889- { CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 1; }
1890- }
1891- else if (pName.equalsIgnoreCase("ClientPacketQueueMaxBurstSize"))
1892- {
1893+ if (CLIENT_PACKET_QUEUE_SIZE == 0) {
1894+ CLIENT_PACKET_QUEUE_SIZE = MMO_MAX_READ_PER_PASS + 1;
1895+ }
1896+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMaxBurstSize")) {
1897 CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = Integer.parseInt(pValue);
1898- if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0)
1899- { CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS; }
1900- }
1901- else if (pName.equalsIgnoreCase("ClientPacketQueueMaxPacketsPerSecond"))
1902- { CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND = Integer.parseInt(pValue); }
1903- else if (pName.equalsIgnoreCase("ClientPacketQueueMeasureInterval"))
1904- { CLIENT_PACKET_QUEUE_MEASURE_INTERVAL = Integer.parseInt(pValue); }
1905- else if (pName.equalsIgnoreCase("ClientPacketQueueMaxAveragePacketsPerSecond"))
1906- { CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND = Integer.parseInt(pValue); }
1907- else if (pName.equalsIgnoreCase("ClientPacketQueueMaxFloodsPerMin"))
1908- { CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN = Integer.parseInt(pValue); }
1909- else if (pName.equalsIgnoreCase("ClientPacketQueueMaxOverflowsPerMin"))
1910- { CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN = Integer.parseInt(pValue); }
1911- else if (pName.equalsIgnoreCase("ClientPacketQueueMaxUnderflowsPerMin"))
1912- { CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = Integer.parseInt(pValue); }
1913- else if (pName.equalsIgnoreCase("ClientPacketQueueMaxUnknownPerMin"))
1914- { CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = Integer.parseInt(pValue); }
1915-
1916- else if (pName.equalsIgnoreCase("AllowDiscardItem"))
1917- { ALLOW_DISCARDITEM = Boolean.parseBoolean(pValue); }
1918- else if (pName.equalsIgnoreCase("AllowRefund"))
1919- { ALLOW_REFUND = Boolean.parseBoolean(pValue); }
1920- else if (pName.equalsIgnoreCase("AllowWarehouse"))
1921- { ALLOW_WAREHOUSE = Boolean.parseBoolean(pValue); }
1922- else if (pName.equalsIgnoreCase("AllowWear"))
1923- { ALLOW_WEAR = Boolean.parseBoolean(pValue); }
1924- else if (pName.equalsIgnoreCase("WearDelay"))
1925- { WEAR_DELAY = Integer.parseInt(pValue); }
1926- else if (pName.equalsIgnoreCase("WearPrice"))
1927- { WEAR_PRICE = Integer.parseInt(pValue); }
1928- else if (pName.equalsIgnoreCase("AllowWater"))
1929- { ALLOW_WATER = Boolean.parseBoolean(pValue); }
1930- else if (pName.equalsIgnoreCase("AllowRentPet"))
1931- { ALLOW_RENTPET = Boolean.parseBoolean(pValue); }
1932- else if (pName.equalsIgnoreCase("BoatBroadcastRadius"))
1933- { BOAT_BROADCAST_RADIUS = Integer.parseInt(pValue); }
1934- else if (pName.equalsIgnoreCase("AllowCursedWeapons"))
1935- { ALLOW_CURSED_WEAPONS = Boolean.parseBoolean(pValue); }
1936- else if (pName.equalsIgnoreCase("AllowManor"))
1937- { ALLOW_MANOR = Boolean.parseBoolean(pValue); }
1938- else if (pName.equalsIgnoreCase("AllowNpcWalkers"))
1939- { ALLOW_NPC_WALKERS = Boolean.parseBoolean(pValue); }
1940- else if (pName.equalsIgnoreCase("AllowPetWalkers"))
1941- { ALLOW_PET_WALKERS = Boolean.parseBoolean(pValue); }
1942- else if (pName.equalsIgnoreCase("BypassValidation"))
1943- { BYPASS_VALIDATION = Boolean.parseBoolean(pValue); }
1944-
1945- else if (pName.equalsIgnoreCase("CommunityType"))
1946- { COMMUNITY_TYPE = Integer.parseInt(pValue); }
1947- else if (pName.equalsIgnoreCase("BBSShowPlayerList"))
1948- { BBS_SHOW_PLAYERLIST = Boolean.parseBoolean(pValue); }
1949- else if (pName.equalsIgnoreCase("BBSDefault"))
1950- { BBS_DEFAULT = pValue; }
1951- else if (pName.equalsIgnoreCase("ShowLevelOnCommunityBoard"))
1952- { SHOW_LEVEL_COMMUNITYBOARD = Boolean.parseBoolean(pValue); }
1953- else if (pName.equalsIgnoreCase("ShowStatusOnCommunityBoard"))
1954- { SHOW_STATUS_COMMUNITYBOARD = Boolean.parseBoolean(pValue); }
1955- else if (pName.equalsIgnoreCase("NamePageSizeOnCommunityBoard"))
1956- { NAME_PAGE_SIZE_COMMUNITYBOARD = Integer.parseInt(pValue); }
1957- else if (pName.equalsIgnoreCase("NamePerRowOnCommunityBoard"))
1958- { NAME_PER_ROW_COMMUNITYBOARD = Integer.parseInt(pValue); }
1959-
1960- else if (pName.equalsIgnoreCase("ShowNewbiehtml"))
1961- { NEWBIE_HTML = Boolean.parseBoolean(pValue); }
1962- else if (pName.equalsIgnoreCase("ShowServerNews"))
1963- { SERVER_NEWS = Boolean.parseBoolean(pValue); }
1964- else if (pName.equalsIgnoreCase("ShowNpcLevel"))
1965- { SHOW_NPC_LVL = Boolean.parseBoolean(pValue); }
1966- else if (pName.equalsIgnoreCase("ShowCrestWithoutQuest"))
1967- { SHOW_CREST_WITHOUT_QUEST = Boolean.parseBoolean(pValue); }
1968-
1969- else if (pName.equalsIgnoreCase("ForceInventoryUpdate"))
1970- { FORCE_INVENTORY_UPDATE = Boolean.parseBoolean(pValue); }
1971-
1972- else if (pName.equalsIgnoreCase("AutoDeleteInvalidQuestData"))
1973- { AUTODELETE_INVALID_QUEST_DATA = Boolean.parseBoolean(pValue); }
1974-
1975- else if (pName.equalsIgnoreCase("MaximumOnlineUsers"))
1976- { MAXIMUM_ONLINE_USERS = Integer.parseInt(pValue); }
1977-
1978- else if (pName.equalsIgnoreCase("ZoneTown"))
1979- { ZONE_TOWN = Integer.parseInt(pValue); }
1980-
1981- else if (pName.equalsIgnoreCase("CheckKnownList"))
1982- { CHECK_KNOWN = Boolean.parseBoolean(pValue); }
1983-
1984- else if (pName.equalsIgnoreCase("MaxDriftRange"))
1985- { MAX_DRIFT_RANGE = Integer.parseInt(pValue); }
1986- else if (pName.equalsIgnoreCase("UseDeepBlueDropRules"))
1987- { DEEPBLUE_DROP_RULES = Boolean.parseBoolean(pValue); }
1988- else if (pName.equalsIgnoreCase("UseDeepBlueDropRulesRaid"))
1989- { DEEPBLUE_DROP_RULES_RAID = Boolean.parseBoolean(pValue); }
1990- else if (pName.equalsIgnoreCase("GuardAttackAggroMob"))
1991- { GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(pValue); }
1992- else if (pName.equalsIgnoreCase("CancelLesserEffect"))
1993- { EFFECT_CANCELING = Boolean.parseBoolean(pValue); }
1994-
1995- else if (pName.equalsIgnoreCase("MaximumSlotsForNoDwarf"))
1996- { INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(pValue); }
1997- else if (pName.equalsIgnoreCase("MaximumSlotsForDwarf"))
1998- { INVENTORY_MAXIMUM_DWARF = Integer.parseInt(pValue); }
1999- else if (pName.equalsIgnoreCase("MaximumSlotsForGMPlayer"))
2000- { INVENTORY_MAXIMUM_GM = Integer.parseInt(pValue); }
2001- else if (pName.equalsIgnoreCase("MaximumSlotsForQuestItems"))
2002- { INVENTORY_MAXIMUM_QUEST_ITEMS = Integer.parseInt(pValue); }
2003-
2004- else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForNoDwarf"))
2005- { WAREHOUSE_SLOTS_NO_DWARF = Integer.parseInt(pValue); }
2006- else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForDwarf"))
2007- { WAREHOUSE_SLOTS_DWARF = Integer.parseInt(pValue); }
2008- else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForClan"))
2009- { WAREHOUSE_SLOTS_CLAN = Integer.parseInt(pValue); }
2010-
2011- else if (pName.equalsIgnoreCase("EnchantChanceWeapon"))
2012- { ENCHANT_CHANCE_WEAPON = Integer.parseInt(pValue); }
2013- else if (pName.equalsIgnoreCase("EnchantChanceArmor"))
2014- { ENCHANT_CHANCE_ARMOR = Integer.parseInt(pValue); }
2015- else if (pName.equalsIgnoreCase("EnchantChanceJewelry"))
2016- { ENCHANT_CHANCE_JEWELRY = Integer.parseInt(pValue); }
2017- else if (pName.equalsIgnoreCase("EnchantChanceElementStone"))
2018- { ENCHANT_CHANCE_ELEMENT_STONE = Integer.parseInt(pValue); }
2019- else if (pName.equalsIgnoreCase("EnchantChanceElementCrystal"))
2020- { ENCHANT_CHANCE_ELEMENT_CRYSTAL = Integer.parseInt(pValue); }
2021- else if (pName.equalsIgnoreCase("EnchantChanceElementJewel"))
2022- { ENCHANT_CHANCE_ELEMENT_JEWEL = Integer.parseInt(pValue); }
2023- else if (pName.equalsIgnoreCase("EnchantChanceElementEnergy"))
2024- { ENCHANT_CHANCE_ELEMENT_ENERGY = Integer.parseInt(pValue); }
2025- else if (pName.equalsIgnoreCase("EnchantMaxWeapon"))
2026- { ENCHANT_MAX_WEAPON = Integer.parseInt(pValue); }
2027- else if (pName.equalsIgnoreCase("EnchantMaxArmor"))
2028- { ENCHANT_MAX_ARMOR = Integer.parseInt(pValue); }
2029- else if (pName.equalsIgnoreCase("EnchantMaxJewelry"))
2030- { ENCHANT_MAX_JEWELRY = Integer.parseInt(pValue); }
2031- else if (pName.equalsIgnoreCase("EnchantSafeMax"))
2032- { ENCHANT_SAFE_MAX = Integer.parseInt(pValue); }
2033- else if (pName.equalsIgnoreCase("EnchantSafeMaxFull"))
2034- { ENCHANT_SAFE_MAX_FULL = Integer.parseInt(pValue); }
2035-
2036- else if (pName.equalsIgnoreCase("AugmentationNGSkillChance"))
2037- { AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(pValue); }
2038- else if (pName.equalsIgnoreCase("AugmentationNGGlowChance"))
2039- { AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(pValue); }
2040- else if (pName.equalsIgnoreCase("AugmentationMidSkillChance"))
2041- { AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(pValue); }
2042- else if (pName.equalsIgnoreCase("AugmentationMidGlowChance"))
2043- { AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(pValue); }
2044- else if (pName.equalsIgnoreCase("AugmentationHighSkillChance"))
2045- { AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(pValue); }
2046- else if (pName.equalsIgnoreCase("AugmentationHighGlowChance"))
2047- { AUGMENTATION_HIGH_GLOW_CHANCE = Integer.parseInt(pValue); }
2048- else if (pName.equalsIgnoreCase("AugmentationTopSkillChance"))
2049- { AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(pValue); }
2050- else if (pName.equalsIgnoreCase("AugmentationTopGlowChance"))
2051- { AUGMENTATION_TOP_GLOW_CHANCE = Integer.parseInt(pValue); }
2052- else if (pName.equalsIgnoreCase("AugmentationBaseStatChance"))
2053- { AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(pValue); }
2054-
2055- else if (pName.equalsIgnoreCase("HpRegenMultiplier"))
2056- { HP_REGEN_MULTIPLIER = Double.parseDouble(pValue); }
2057- else if (pName.equalsIgnoreCase("MpRegenMultiplier"))
2058- { MP_REGEN_MULTIPLIER = Double.parseDouble(pValue); }
2059- else if (pName.equalsIgnoreCase("CpRegenMultiplier"))
2060- { CP_REGEN_MULTIPLIER = Double.parseDouble(pValue); }
2061-
2062- else if (pName.equalsIgnoreCase("RaidHpRegenMultiplier"))
2063- { RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(pValue); }
2064- else if (pName.equalsIgnoreCase("RaidMpRegenMultiplier"))
2065- { RAID_MP_REGEN_MULTIPLIER = Double.parseDouble(pValue); }
2066- else if (pName.equalsIgnoreCase("RaidPDefenceMultiplier"))
2067- { RAID_PDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100; }
2068- else if (pName.equalsIgnoreCase("RaidMDefenceMultiplier"))
2069- { RAID_MDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100; }
2070- else if (pName.equalsIgnoreCase("RaidPAttackMultiplier"))
2071- { RAID_PATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100; }
2072- else if (pName.equalsIgnoreCase("RaidMAttackMultiplier"))
2073- { RAID_MATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100; }
2074- else if (pName.equalsIgnoreCase("RaidMinionRespawnTime"))
2075- { RAID_MINION_RESPAWN_TIMER = Integer.parseInt(pValue); }
2076- else if (pName.equalsIgnoreCase("RaidChaosTime"))
2077- { RAID_CHAOS_TIME = Integer.parseInt(pValue); }
2078- else if (pName.equalsIgnoreCase("GrandChaosTime"))
2079- { GRAND_CHAOS_TIME = Integer.parseInt(pValue); }
2080- else if (pName.equalsIgnoreCase("MinionChaosTime"))
2081- { MINION_CHAOS_TIME = Integer.parseInt(pValue); }
2082-
2083- else if (pName.equalsIgnoreCase("StartingAdena"))
2084- { STARTING_ADENA = Long.parseLong(pValue); }
2085- else if (pName.equalsIgnoreCase("StartingLevel"))
2086- { STARTING_LEVEL = Byte.parseByte(pValue); }
2087- else if (pName.equalsIgnoreCase("StartingSP"))
2088- { STARTING_SP = Integer.parseInt(pValue); }
2089- else if (pName.equalsIgnoreCase("UnstuckInterval"))
2090- { UNSTUCK_INTERVAL = Integer.parseInt(pValue); }
2091- else if (pName.equalsIgnoreCase("TeleportWatchdogTimeout"))
2092- { TELEPORT_WATCHDOG_TIMEOUT = Integer.parseInt(pValue); }
2093-
2094- else if (pName.equalsIgnoreCase("PlayerSpawnProtection"))
2095- { PLAYER_SPAWN_PROTECTION = Integer.parseInt(pValue); }
2096- else if (pName.equalsIgnoreCase("PlayerFakeDeathUpProtection"))
2097- { PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(pValue); }
2098-
2099- else if (pName.equalsIgnoreCase("RestorePlayerInstance"))
2100- { RESTORE_PLAYER_INSTANCE = Boolean.parseBoolean(pValue); }
2101- else if (pName.equalsIgnoreCase("AllowSummonToInstance"))
2102- { ALLOW_SUMMON_TO_INSTANCE = Boolean.parseBoolean(pValue); }
2103-
2104- else if (pName.equalsIgnoreCase("PartyXpCutoffMethod"))
2105- { PARTY_XP_CUTOFF_METHOD = pValue; }
2106- else if (pName.equalsIgnoreCase("PartyXpCutoffPercent"))
2107- { PARTY_XP_CUTOFF_PERCENT = Double.parseDouble(pValue); }
2108- else if (pName.equalsIgnoreCase("PartyXpCutoffLevel"))
2109- { PARTY_XP_CUTOFF_LEVEL = Integer.parseInt(pValue); }
2110-
2111- else if (pName.equalsIgnoreCase("RespawnRestoreCP"))
2112- { RESPAWN_RESTORE_CP = Double.parseDouble(pValue) / 100; }
2113- else if (pName.equalsIgnoreCase("RespawnRestoreHP"))
2114- { RESPAWN_RESTORE_HP = Double.parseDouble(pValue) / 100; }
2115- else if (pName.equalsIgnoreCase("RespawnRestoreMP"))
2116- { RESPAWN_RESTORE_MP = Double.parseDouble(pValue) / 100; }
2117-
2118- else if (pName.equalsIgnoreCase("MaxPvtStoreSellSlotsDwarf"))
2119- { MAX_PVTSTORESELL_SLOTS_DWARF = Integer.parseInt(pValue); }
2120- else if (pName.equalsIgnoreCase("MaxPvtStoreSellSlotsOther"))
2121- { MAX_PVTSTORESELL_SLOTS_OTHER = Integer.parseInt(pValue); }
2122- else if (pName.equalsIgnoreCase("MaxPvtStoreBuySlotsDwarf"))
2123- { MAX_PVTSTOREBUY_SLOTS_DWARF = Integer.parseInt(pValue); }
2124- else if (pName.equalsIgnoreCase("MaxPvtStoreBuySlotsOther"))
2125- { MAX_PVTSTOREBUY_SLOTS_OTHER = Integer.parseInt(pValue); }
2126-
2127- else if (pName.equalsIgnoreCase("StoreSkillCooltime"))
2128- { STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue); }
2129- else if (pName.equalsIgnoreCase("SubclassStoreSkillCooltime"))
2130- { SUBCLASS_STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue); }
2131- else if (pName.equalsIgnoreCase("AnnounceMammonSpawn"))
2132- { ANNOUNCE_MAMMON_SPAWN = Boolean.parseBoolean(pValue); }
2133-
2134- else if (pName.equalsIgnoreCase("AltGameTiredness"))
2135- { ALT_GAME_TIREDNESS = Boolean.parseBoolean(pValue); }
2136- else if (pName.equalsIgnoreCase("EnableFallingDamage"))
2137- { ENABLE_FALLING_DAMAGE = Boolean.parseBoolean(pValue); }
2138- else if (pName.equalsIgnoreCase("AltGameCreation"))
2139- { ALT_GAME_CREATION = Boolean.parseBoolean(pValue); }
2140- else if (pName.equalsIgnoreCase("AltGameCreationSpeed"))
2141- { ALT_GAME_CREATION_SPEED = Double.parseDouble(pValue); }
2142- else if (pName.equalsIgnoreCase("AltGameCreationXpRate"))
2143- { ALT_GAME_CREATION_XP_RATE = Double.parseDouble(pValue); }
2144- else if (pName.equalsIgnoreCase("AltGameCreationRareXpSpRate"))
2145- { ALT_GAME_CREATION_RARE_XPSP_RATE = Double.parseDouble(pValue); }
2146- else if (pName.equalsIgnoreCase("AltGameCreationSpRate"))
2147- { ALT_GAME_CREATION_SP_RATE = Double.parseDouble(pValue); }
2148- else if (pName.equalsIgnoreCase("AltWeightLimit"))
2149- { ALT_WEIGHT_LIMIT = Double.parseDouble(pValue); }
2150- else if (pName.equalsIgnoreCase("AltBlacksmithUseRecipes"))
2151- { ALT_BLACKSMITH_USE_RECIPES = Boolean.parseBoolean(pValue); }
2152- else if (pName.equalsIgnoreCase("AltGameSkillLearn"))
2153- { ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(pValue); }
2154- else if (pName.equalsIgnoreCase("RemoveCastleCirclets"))
2155- { REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(pValue); }
2156- else if (pName.equalsIgnoreCase("ReputationScorePerKill"))
2157- { REPUTATION_SCORE_PER_KILL = Integer.parseInt(pValue); }
2158- else if (pName.equalsIgnoreCase("AltGameCancelByHit"))
2159- {
2160+ if (CLIENT_PACKET_QUEUE_MAX_BURST_SIZE == 0) {
2161+ CLIENT_PACKET_QUEUE_MAX_BURST_SIZE = MMO_MAX_READ_PER_PASS;
2162+ }
2163+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMaxPacketsPerSecond")) {
2164+ CLIENT_PACKET_QUEUE_MAX_PACKETS_PER_SECOND = Integer.parseInt(pValue);
2165+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMeasureInterval")) {
2166+ CLIENT_PACKET_QUEUE_MEASURE_INTERVAL = Integer.parseInt(pValue);
2167+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMaxAveragePacketsPerSecond")) {
2168+ CLIENT_PACKET_QUEUE_MAX_AVERAGE_PACKETS_PER_SECOND = Integer.parseInt(pValue);
2169+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMaxFloodsPerMin")) {
2170+ CLIENT_PACKET_QUEUE_MAX_FLOODS_PER_MIN = Integer.parseInt(pValue);
2171+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMaxOverflowsPerMin")) {
2172+ CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN = Integer.parseInt(pValue);
2173+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMaxUnderflowsPerMin")) {
2174+ CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = Integer.parseInt(pValue);
2175+ } else if (pName.equalsIgnoreCase("ClientPacketQueueMaxUnknownPerMin")) {
2176+ CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = Integer.parseInt(pValue);
2177+ } else if (pName.equalsIgnoreCase("AllowDiscardItem")) {
2178+ ALLOW_DISCARDITEM = Boolean.parseBoolean(pValue);
2179+ } else if (pName.equalsIgnoreCase("AllowRefund")) {
2180+ ALLOW_REFUND = Boolean.parseBoolean(pValue);
2181+ } else if (pName.equalsIgnoreCase("AllowWarehouse")) {
2182+ ALLOW_WAREHOUSE = Boolean.parseBoolean(pValue);
2183+ } else if (pName.equalsIgnoreCase("AllowWear")) {
2184+ ALLOW_WEAR = Boolean.parseBoolean(pValue);
2185+ } else if (pName.equalsIgnoreCase("WearDelay")) {
2186+ WEAR_DELAY = Integer.parseInt(pValue);
2187+ } else if (pName.equalsIgnoreCase("WearPrice")) {
2188+ WEAR_PRICE = Integer.parseInt(pValue);
2189+ } else if (pName.equalsIgnoreCase("AllowWater")) {
2190+ ALLOW_WATER = Boolean.parseBoolean(pValue);
2191+ } else if (pName.equalsIgnoreCase("AllowRentPet")) {
2192+ ALLOW_RENTPET = Boolean.parseBoolean(pValue);
2193+ } else if (pName.equalsIgnoreCase("BoatBroadcastRadius")) {
2194+ BOAT_BROADCAST_RADIUS = Integer.parseInt(pValue);
2195+ } else if (pName.equalsIgnoreCase("AllowCursedWeapons")) {
2196+ ALLOW_CURSED_WEAPONS = Boolean.parseBoolean(pValue);
2197+ } else if (pName.equalsIgnoreCase("AllowManor")) {
2198+ ALLOW_MANOR = Boolean.parseBoolean(pValue);
2199+ } else if (pName.equalsIgnoreCase("AllowNpcWalkers")) {
2200+ ALLOW_NPC_WALKERS = Boolean.parseBoolean(pValue);
2201+ } else if (pName.equalsIgnoreCase("AllowPetWalkers")) {
2202+ ALLOW_PET_WALKERS = Boolean.parseBoolean(pValue);
2203+ } else if (pName.equalsIgnoreCase("BypassValidation")) {
2204+ BYPASS_VALIDATION = Boolean.parseBoolean(pValue);
2205+ } else if (pName.equalsIgnoreCase("CommunityType")) {
2206+ COMMUNITY_TYPE = Integer.parseInt(pValue);
2207+ } else if (pName.equalsIgnoreCase("BBSShowPlayerList")) {
2208+ BBS_SHOW_PLAYERLIST = Boolean.parseBoolean(pValue);
2209+ } else if (pName.equalsIgnoreCase("BBSDefault")) {
2210+ BBS_DEFAULT = pValue;
2211+ } else if (pName.equalsIgnoreCase("ShowLevelOnCommunityBoard")) {
2212+ SHOW_LEVEL_COMMUNITYBOARD = Boolean.parseBoolean(pValue);
2213+ } else if (pName.equalsIgnoreCase("ShowStatusOnCommunityBoard")) {
2214+ SHOW_STATUS_COMMUNITYBOARD = Boolean.parseBoolean(pValue);
2215+ } else if (pName.equalsIgnoreCase("NamePageSizeOnCommunityBoard")) {
2216+ NAME_PAGE_SIZE_COMMUNITYBOARD = Integer.parseInt(pValue);
2217+ } else if (pName.equalsIgnoreCase("NamePerRowOnCommunityBoard")) {
2218+ NAME_PER_ROW_COMMUNITYBOARD = Integer.parseInt(pValue);
2219+ } else if (pName.equalsIgnoreCase("ShowNewbiehtml")) {
2220+ NEWBIE_HTML = Boolean.parseBoolean(pValue);
2221+ } else if (pName.equalsIgnoreCase("ShowServerNews")) {
2222+ SERVER_NEWS = Boolean.parseBoolean(pValue);
2223+ } else if (pName.equalsIgnoreCase("ShowNpcLevel")) {
2224+ SHOW_NPC_LVL = Boolean.parseBoolean(pValue);
2225+ } else if (pName.equalsIgnoreCase("ShowCrestWithoutQuest")) {
2226+ SHOW_CREST_WITHOUT_QUEST = Boolean.parseBoolean(pValue);
2227+ } else if (pName.equalsIgnoreCase("ForceInventoryUpdate")) {
2228+ FORCE_INVENTORY_UPDATE = Boolean.parseBoolean(pValue);
2229+ } else if (pName.equalsIgnoreCase("AutoDeleteInvalidQuestData")) {
2230+ AUTODELETE_INVALID_QUEST_DATA = Boolean.parseBoolean(pValue);
2231+ } else if (pName.equalsIgnoreCase("MaximumOnlineUsers")) {
2232+ MAXIMUM_ONLINE_USERS = Integer.parseInt(pValue);
2233+ } else if (pName.equalsIgnoreCase("ZoneTown")) {
2234+ ZONE_TOWN = Integer.parseInt(pValue);
2235+ } else if (pName.equalsIgnoreCase("CheckKnownList")) {
2236+ CHECK_KNOWN = Boolean.parseBoolean(pValue);
2237+ } else if (pName.equalsIgnoreCase("MaxDriftRange")) {
2238+ MAX_DRIFT_RANGE = Integer.parseInt(pValue);
2239+ } else if (pName.equalsIgnoreCase("UseDeepBlueDropRules")) {
2240+ DEEPBLUE_DROP_RULES = Boolean.parseBoolean(pValue);
2241+ } else if (pName.equalsIgnoreCase("UseDeepBlueDropRulesRaid")) {
2242+ DEEPBLUE_DROP_RULES_RAID = Boolean.parseBoolean(pValue);
2243+ } else if (pName.equalsIgnoreCase("GuardAttackAggroMob")) {
2244+ GUARD_ATTACK_AGGRO_MOB = Boolean.parseBoolean(pValue);
2245+ } else if (pName.equalsIgnoreCase("CancelLesserEffect")) {
2246+ EFFECT_CANCELING = Boolean.parseBoolean(pValue);
2247+ } else if (pName.equalsIgnoreCase("MaximumSlotsForNoDwarf")) {
2248+ INVENTORY_MAXIMUM_NO_DWARF = Integer.parseInt(pValue);
2249+ } else if (pName.equalsIgnoreCase("MaximumSlotsForDwarf")) {
2250+ INVENTORY_MAXIMUM_DWARF = Integer.parseInt(pValue);
2251+ } else if (pName.equalsIgnoreCase("MaximumSlotsForGMPlayer")) {
2252+ INVENTORY_MAXIMUM_GM = Integer.parseInt(pValue);
2253+ } else if (pName.equalsIgnoreCase("MaximumSlotsForQuestItems")) {
2254+ INVENTORY_MAXIMUM_QUEST_ITEMS = Integer.parseInt(pValue);
2255+ } else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForNoDwarf")) {
2256+ WAREHOUSE_SLOTS_NO_DWARF = Integer.parseInt(pValue);
2257+ } else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForDwarf")) {
2258+ WAREHOUSE_SLOTS_DWARF = Integer.parseInt(pValue);
2259+ } else if (pName.equalsIgnoreCase("MaximumWarehouseSlotsForClan")) {
2260+ WAREHOUSE_SLOTS_CLAN = Integer.parseInt(pValue);
2261+ } else if (pName.equalsIgnoreCase("EnchantChanceWeapon")) {
2262+ ENCHANT_CHANCE_WEAPON = Integer.parseInt(pValue);
2263+ } else if (pName.equalsIgnoreCase("EnchantChanceArmor")) {
2264+ ENCHANT_CHANCE_ARMOR = Integer.parseInt(pValue);
2265+ } else if (pName.equalsIgnoreCase("EnchantChanceJewelry")) {
2266+ ENCHANT_CHANCE_JEWELRY = Integer.parseInt(pValue);
2267+ } else if (pName.equalsIgnoreCase("EnchantChanceElementStone")) {
2268+ ENCHANT_CHANCE_ELEMENT_STONE = Integer.parseInt(pValue);
2269+ } else if (pName.equalsIgnoreCase("EnchantChanceElementCrystal")) {
2270+ ENCHANT_CHANCE_ELEMENT_CRYSTAL = Integer.parseInt(pValue);
2271+ } else if (pName.equalsIgnoreCase("EnchantChanceElementJewel")) {
2272+ ENCHANT_CHANCE_ELEMENT_JEWEL = Integer.parseInt(pValue);
2273+ } else if (pName.equalsIgnoreCase("EnchantChanceElementEnergy")) {
2274+ ENCHANT_CHANCE_ELEMENT_ENERGY = Integer.parseInt(pValue);
2275+ } else if (pName.equalsIgnoreCase("EnchantMaxWeapon")) {
2276+ ENCHANT_MAX_WEAPON = Integer.parseInt(pValue);
2277+ } else if (pName.equalsIgnoreCase("EnchantMaxArmor")) {
2278+ ENCHANT_MAX_ARMOR = Integer.parseInt(pValue);
2279+ } else if (pName.equalsIgnoreCase("EnchantMaxJewelry")) {
2280+ ENCHANT_MAX_JEWELRY = Integer.parseInt(pValue);
2281+ } else if (pName.equalsIgnoreCase("EnchantSafeMax")) {
2282+ ENCHANT_SAFE_MAX = Integer.parseInt(pValue);
2283+ } else if (pName.equalsIgnoreCase("EnchantSafeMaxFull")) {
2284+ ENCHANT_SAFE_MAX_FULL = Integer.parseInt(pValue);
2285+ } else if (pName.equalsIgnoreCase("AugmentationNGSkillChance")) {
2286+ AUGMENTATION_NG_SKILL_CHANCE = Integer.parseInt(pValue);
2287+ } else if (pName.equalsIgnoreCase("AugmentationNGGlowChance")) {
2288+ AUGMENTATION_NG_GLOW_CHANCE = Integer.parseInt(pValue);
2289+ } else if (pName.equalsIgnoreCase("AugmentationMidSkillChance")) {
2290+ AUGMENTATION_MID_SKILL_CHANCE = Integer.parseInt(pValue);
2291+ } else if (pName.equalsIgnoreCase("AugmentationMidGlowChance")) {
2292+ AUGMENTATION_MID_GLOW_CHANCE = Integer.parseInt(pValue);
2293+ } else if (pName.equalsIgnoreCase("AugmentationHighSkillChance")) {
2294+ AUGMENTATION_HIGH_SKILL_CHANCE = Integer.parseInt(pValue);
2295+ } else if (pName.equalsIgnoreCase("AugmentationHighGlowChance")) {
2296+ AUGMENTATION_HIGH_GLOW_CHANCE = Integer.parseInt(pValue);
2297+ } else if (pName.equalsIgnoreCase("AugmentationTopSkillChance")) {
2298+ AUGMENTATION_TOP_SKILL_CHANCE = Integer.parseInt(pValue);
2299+ } else if (pName.equalsIgnoreCase("AugmentationTopGlowChance")) {
2300+ AUGMENTATION_TOP_GLOW_CHANCE = Integer.parseInt(pValue);
2301+ } else if (pName.equalsIgnoreCase("AugmentationBaseStatChance")) {
2302+ AUGMENTATION_BASESTAT_CHANCE = Integer.parseInt(pValue);
2303+ } else if (pName.equalsIgnoreCase("HpRegenMultiplier")) {
2304+ HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
2305+ } else if (pName.equalsIgnoreCase("MpRegenMultiplier")) {
2306+ MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
2307+ } else if (pName.equalsIgnoreCase("CpRegenMultiplier")) {
2308+ CP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
2309+ } else if (pName.equalsIgnoreCase("RaidHpRegenMultiplier")) {
2310+ RAID_HP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
2311+ } else if (pName.equalsIgnoreCase("RaidMpRegenMultiplier")) {
2312+ RAID_MP_REGEN_MULTIPLIER = Double.parseDouble(pValue);
2313+ } else if (pName.equalsIgnoreCase("RaidPDefenceMultiplier")) {
2314+ RAID_PDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100;
2315+ } else if (pName.equalsIgnoreCase("RaidMDefenceMultiplier")) {
2316+ RAID_MDEFENCE_MULTIPLIER = Double.parseDouble(pValue) / 100;
2317+ } else if (pName.equalsIgnoreCase("RaidPAttackMultiplier")) {
2318+ RAID_PATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100;
2319+ } else if (pName.equalsIgnoreCase("RaidMAttackMultiplier")) {
2320+ RAID_MATTACK_MULTIPLIER = Double.parseDouble(pValue) / 100;
2321+ } else if (pName.equalsIgnoreCase("RaidMinionRespawnTime")) {
2322+ RAID_MINION_RESPAWN_TIMER = Integer.parseInt(pValue);
2323+ } else if (pName.equalsIgnoreCase("RaidChaosTime")) {
2324+ RAID_CHAOS_TIME = Integer.parseInt(pValue);
2325+ } else if (pName.equalsIgnoreCase("GrandChaosTime")) {
2326+ GRAND_CHAOS_TIME = Integer.parseInt(pValue);
2327+ } else if (pName.equalsIgnoreCase("MinionChaosTime")) {
2328+ MINION_CHAOS_TIME = Integer.parseInt(pValue);
2329+ } else if (pName.equalsIgnoreCase("StartingAdena")) {
2330+ STARTING_ADENA = Long.parseLong(pValue);
2331+ } else if (pName.equalsIgnoreCase("StartingLevel")) {
2332+ STARTING_LEVEL = Byte.parseByte(pValue);
2333+ } else if (pName.equalsIgnoreCase("StartingSP")) {
2334+ STARTING_SP = Integer.parseInt(pValue);
2335+ } else if (pName.equalsIgnoreCase("UnstuckInterval")) {
2336+ UNSTUCK_INTERVAL = Integer.parseInt(pValue);
2337+ } else if (pName.equalsIgnoreCase("TeleportWatchdogTimeout")) {
2338+ TELEPORT_WATCHDOG_TIMEOUT = Integer.parseInt(pValue);
2339+ } else if (pName.equalsIgnoreCase("PlayerSpawnProtection")) {
2340+ PLAYER_SPAWN_PROTECTION = Integer.parseInt(pValue);
2341+ } else if (pName.equalsIgnoreCase("PlayerFakeDeathUpProtection")) {
2342+ PLAYER_FAKEDEATH_UP_PROTECTION = Integer.parseInt(pValue);
2343+ } else if (pName.equalsIgnoreCase("RestorePlayerInstance")) {
2344+ RESTORE_PLAYER_INSTANCE = Boolean.parseBoolean(pValue);
2345+ } else if (pName.equalsIgnoreCase("AllowSummonToInstance")) {
2346+ ALLOW_SUMMON_TO_INSTANCE = Boolean.parseBoolean(pValue);
2347+ } else if (pName.equalsIgnoreCase("PartyXpCutoffMethod")) {
2348+ PARTY_XP_CUTOFF_METHOD = pValue;
2349+ } else if (pName.equalsIgnoreCase("PartyXpCutoffPercent")) {
2350+ PARTY_XP_CUTOFF_PERCENT = Double.parseDouble(pValue);
2351+ } else if (pName.equalsIgnoreCase("PartyXpCutoffLevel")) {
2352+ PARTY_XP_CUTOFF_LEVEL = Integer.parseInt(pValue);
2353+ } else if (pName.equalsIgnoreCase("RespawnRestoreCP")) {
2354+ RESPAWN_RESTORE_CP = Double.parseDouble(pValue) / 100;
2355+ } else if (pName.equalsIgnoreCase("RespawnRestoreHP")) {
2356+ RESPAWN_RESTORE_HP = Double.parseDouble(pValue) / 100;
2357+ } else if (pName.equalsIgnoreCase("RespawnRestoreMP")) {
2358+ RESPAWN_RESTORE_MP = Double.parseDouble(pValue) / 100;
2359+ } else if (pName.equalsIgnoreCase("MaxPvtStoreSellSlotsDwarf")) {
2360+ MAX_PVTSTORESELL_SLOTS_DWARF = Integer.parseInt(pValue);
2361+ } else if (pName.equalsIgnoreCase("MaxPvtStoreSellSlotsOther")) {
2362+ MAX_PVTSTORESELL_SLOTS_OTHER = Integer.parseInt(pValue);
2363+ } else if (pName.equalsIgnoreCase("MaxPvtStoreBuySlotsDwarf")) {
2364+ MAX_PVTSTOREBUY_SLOTS_DWARF = Integer.parseInt(pValue);
2365+ } else if (pName.equalsIgnoreCase("MaxPvtStoreBuySlotsOther")) {
2366+ MAX_PVTSTOREBUY_SLOTS_OTHER = Integer.parseInt(pValue);
2367+ } else if (pName.equalsIgnoreCase("StoreSkillCooltime")) {
2368+ STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue);
2369+ } else if (pName.equalsIgnoreCase("SubclassStoreSkillCooltime")) {
2370+ SUBCLASS_STORE_SKILL_COOLTIME = Boolean.parseBoolean(pValue);
2371+ } else if (pName.equalsIgnoreCase("AnnounceMammonSpawn")) {
2372+ ANNOUNCE_MAMMON_SPAWN = Boolean.parseBoolean(pValue);
2373+ } else if (pName.equalsIgnoreCase("AltGameTiredness")) {
2374+ ALT_GAME_TIREDNESS = Boolean.parseBoolean(pValue);
2375+ } else if (pName.equalsIgnoreCase("EnableFallingDamage")) {
2376+ ENABLE_FALLING_DAMAGE = Boolean.parseBoolean(pValue);
2377+ } else if (pName.equalsIgnoreCase("AltGameCreation")) {
2378+ ALT_GAME_CREATION = Boolean.parseBoolean(pValue);
2379+ } else if (pName.equalsIgnoreCase("AltGameCreationSpeed")) {
2380+ ALT_GAME_CREATION_SPEED = Double.parseDouble(pValue);
2381+ } else if (pName.equalsIgnoreCase("AltGameCreationXpRate")) {
2382+ ALT_GAME_CREATION_XP_RATE = Double.parseDouble(pValue);
2383+ } else if (pName.equalsIgnoreCase("AltGameCreationRareXpSpRate")) {
2384+ ALT_GAME_CREATION_RARE_XPSP_RATE = Double.parseDouble(pValue);
2385+ } else if (pName.equalsIgnoreCase("AltGameCreationSpRate")) {
2386+ ALT_GAME_CREATION_SP_RATE = Double.parseDouble(pValue);
2387+ } else if (pName.equalsIgnoreCase("AltWeightLimit")) {
2388+ ALT_WEIGHT_LIMIT = Double.parseDouble(pValue);
2389+ } else if (pName.equalsIgnoreCase("AltBlacksmithUseRecipes")) {
2390+ ALT_BLACKSMITH_USE_RECIPES = Boolean.parseBoolean(pValue);
2391+ } else if (pName.equalsIgnoreCase("AltGameSkillLearn")) {
2392+ ALT_GAME_SKILL_LEARN = Boolean.parseBoolean(pValue);
2393+ } else if (pName.equalsIgnoreCase("RemoveCastleCirclets")) {
2394+ REMOVE_CASTLE_CIRCLETS = Boolean.parseBoolean(pValue);
2395+ } else if (pName.equalsIgnoreCase("ReputationScorePerKill")) {
2396+ REPUTATION_SCORE_PER_KILL = Integer.parseInt(pValue);
2397+ } else if (pName.equalsIgnoreCase("AltGameCancelByHit")) {
2398 ALT_GAME_CANCEL_BOW = pValue.equalsIgnoreCase("bow") || pValue.equalsIgnoreCase("all");
2399 ALT_GAME_CANCEL_CAST = pValue.equalsIgnoreCase("cast") || pValue.equalsIgnoreCase("all");
2400- }
2401-
2402- else if (pName.equalsIgnoreCase("AltShieldBlocks"))
2403- { ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(pValue); }
2404- else if (pName.equalsIgnoreCase("AltPerfectShieldBlockRate"))
2405- { ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(pValue); }
2406- else if (pName.equalsIgnoreCase("Delevel"))
2407- { ALT_GAME_DELEVEL = Boolean.parseBoolean(pValue); }
2408- else if (pName.equalsIgnoreCase("MagicFailures"))
2409- { ALT_GAME_MAGICFAILURES = Boolean.parseBoolean(pValue); }
2410- else if (pName.equalsIgnoreCase("AltMobAgroInPeaceZone"))
2411- { ALT_MOB_AGRO_IN_PEACEZONE = Boolean.parseBoolean(pValue); }
2412-
2413- else if (pName.equalsIgnoreCase("AltGameExponentXp"))
2414- { ALT_GAME_EXPONENT_XP = Float.parseFloat(pValue); }
2415- else if (pName.equalsIgnoreCase("AltGameExponentSp"))
2416- { ALT_GAME_EXPONENT_SP = Float.parseFloat(pValue); }
2417-
2418- else if (pName.equalsIgnoreCase("AllowClassMasters"))
2419- { ALLOW_CLASS_MASTERS = Boolean.parseBoolean(pValue); }
2420- else if (pName.equalsIgnoreCase("AllowEntireTree"))
2421- { ALLOW_ENTIRE_TREE = Boolean.parseBoolean(pValue); }
2422- else if (pName.equalsIgnoreCase("AlternateClassMaster"))
2423- { ALTERNATE_CLASS_MASTER = Boolean.parseBoolean(pValue); }
2424- else if (pName.equalsIgnoreCase("AltPartyRange"))
2425- { ALT_PARTY_RANGE = Integer.parseInt(pValue); }
2426- else if (pName.equalsIgnoreCase("AltPartyRange2"))
2427- { ALT_PARTY_RANGE2 = Integer.parseInt(pValue); }
2428-
2429- else if (pName.equalsIgnoreCase("CraftingEnabled"))
2430- { IS_CRAFTING_ENABLED = Boolean.parseBoolean(pValue); }
2431- else if (pName.equalsIgnoreCase("CraftMasterwork"))
2432- { CRAFT_MASTERWORK = Boolean.parseBoolean(pValue); }
2433- else if (pName.equalsIgnoreCase("LifeCrystalNeeded"))
2434- { LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue); }
2435- else if (pName.equalsIgnoreCase("SpBookNeeded"))
2436- { SP_BOOK_NEEDED = Boolean.parseBoolean(pValue); }
2437- else if (pName.equalsIgnoreCase("AutoLoot"))
2438- { AUTO_LOOT = Boolean.parseBoolean(pValue); }
2439- else if (pName.equalsIgnoreCase("AutoLootRaids"))
2440- { AUTO_LOOT_RAIDS = Boolean.parseBoolean(pValue); }
2441- else if (pName.equalsIgnoreCase("AutoLootHerbs"))
2442- { AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue); }
2443-
2444- else if (pName.equalsIgnoreCase("AltKarmaPlayerCanBeKilledInPeaceZone"))
2445- { ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue); }
2446- else if (pName.equalsIgnoreCase("AltKarmaPlayerCanShop"))
2447- { ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(pValue); }
2448- else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseGK"))
2449- { ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue); }
2450- else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTeleport"))
2451- { ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(pValue); }
2452- else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTrade"))
2453- { ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(pValue); }
2454- else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseWareHouse"))
2455- { ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(pValue); }
2456- else if (pName.equalsIgnoreCase("MaxPersonalFamePoints"))
2457- { MAX_PERSONAL_FAME_POINTS = Integer.parseInt(pValue); }
2458- else if (pName.equalsIgnoreCase("FortressZoneFameTaskFrequency"))
2459- { FORTRESS_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue); }
2460- else if (pName.equalsIgnoreCase("FortressZoneFameAquirePoints"))
2461- { FORTRESS_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue); }
2462- else if (pName.equalsIgnoreCase("CastleZoneFameTaskFrequency"))
2463- { CASTLE_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue); }
2464- else if (pName.equalsIgnoreCase("CastleZoneFameAquirePoints"))
2465- { CASTLE_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue); }
2466- else if (pName.equalsIgnoreCase("AltCastleForDawn"))
2467- { ALT_GAME_CASTLE_DAWN = Boolean.parseBoolean(pValue); }
2468- else if (pName.equalsIgnoreCase("AltCastleForDusk"))
2469- { ALT_GAME_CASTLE_DUSK = Boolean.parseBoolean(pValue); }
2470- else if (pName.equalsIgnoreCase("AltRequireClanCastle"))
2471- { ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(pValue); }
2472- else if (pName.equalsIgnoreCase("AltFreeTeleporting"))
2473- { ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(pValue); }
2474- else if (pName.equalsIgnoreCase("AltSubClassWithoutQuests"))
2475- { ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(pValue); }
2476- else if (pName.equalsIgnoreCase("AltSubclassEverywhere"))
2477- { ALT_GAME_SUBCLASS_EVERYWHERE = Boolean.parseBoolean(pValue); }
2478- else if (pName.equalsIgnoreCase("AltMembersCanWithdrawFromClanWH"))
2479- { ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean.parseBoolean(pValue); }
2480- else if (pName.equalsIgnoreCase("DwarfRecipeLimit"))
2481- { DWARF_RECIPE_LIMIT = Integer.parseInt(pValue); }
2482- else if (pName.equalsIgnoreCase("CommonRecipeLimit"))
2483- { COMMON_RECIPE_LIMIT = Integer.parseInt(pValue); }
2484-
2485- else if (pName.equalsIgnoreCase("ChampionEnable"))
2486- { L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(pValue); }
2487- else if (pName.equalsIgnoreCase("ChampionFrequency"))
2488- { L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(pValue); }
2489- else if (pName.equalsIgnoreCase("ChampionMinLevel"))
2490- { L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(pValue); }
2491- else if (pName.equalsIgnoreCase("ChampionMaxLevel"))
2492- { L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(pValue); }
2493- else if (pName.equalsIgnoreCase("ChampionHp"))
2494- { L2JMOD_CHAMPION_HP = Integer.parseInt(pValue); }
2495- else if (pName.equalsIgnoreCase("ChampionHpRegen"))
2496- { L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue); }
2497- else if (pName.equalsIgnoreCase("ChampionRewards"))
2498- { L2JMOD_CHAMPION_REWARDS = Integer.parseInt(pValue); }
2499- else if (pName.equalsIgnoreCase("ChampionAdenasRewards"))
2500- { L2JMOD_CHAMPION_ADENAS_REWARDS = Float.parseFloat(pValue); }
2501- else if (pName.equalsIgnoreCase("ChampionAtk"))
2502- { L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue); }
2503- else if (pName.equalsIgnoreCase("ChampionSpdAtk"))
2504- { L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(pValue); }
2505- else if (pName.equalsIgnoreCase("ChampionRewardLowerLvlItemChance"))
2506- { L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(pValue); }
2507- else if (pName.equalsIgnoreCase("ChampionRewardHigherLvlItemChance"))
2508- { L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue); }
2509- else if (pName.equalsIgnoreCase("ChampionRewardItemID"))
2510- { L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue); }
2511- else if (pName.equalsIgnoreCase("ChampionRewardItemQty"))
2512- { L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue); }
2513- else if (pName.equalsIgnoreCase("ChampionEnableInInstances"))
2514- { L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = Boolean.parseBoolean(pValue); }
2515-
2516- else if (pName.equalsIgnoreCase("AllowWedding"))
2517- { L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue); }
2518- else if (pName.equalsIgnoreCase("WeddingPrice"))
2519- { L2JMOD_WEDDING_PRICE = Integer.parseInt(pValue); }
2520- else if (pName.equalsIgnoreCase("WeddingPunishInfidelity"))
2521- { L2JMOD_WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(pValue); }
2522- else if (pName.equalsIgnoreCase("WeddingTeleport"))
2523- { L2JMOD_WEDDING_TELEPORT = Boolean.parseBoolean(pValue); }
2524- else if (pName.equalsIgnoreCase("WeddingTeleportPrice"))
2525- { L2JMOD_WEDDING_TELEPORT_PRICE = Integer.parseInt(pValue); }
2526- else if (pName.equalsIgnoreCase("WeddingTeleportDuration"))
2527- { L2JMOD_WEDDING_TELEPORT_DURATION = Integer.parseInt(pValue); }
2528- else if (pName.equalsIgnoreCase("WeddingAllowSameSex"))
2529- { L2JMOD_WEDDING_SAMESEX = Boolean.parseBoolean(pValue); }
2530- else if (pName.equalsIgnoreCase("WeddingFormalWear"))
2531- { L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(pValue); }
2532- else if (pName.equalsIgnoreCase("WeddingDivorceCosts"))
2533- { L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(pValue); }
2534- else if (pName.equalsIgnoreCase("TvTEventEnabled"))
2535- { TVT_EVENT_ENABLED = Boolean.parseBoolean(pValue); }
2536- else if (pName.equalsIgnoreCase("TvTEventInterval"))
2537- { TVT_EVENT_INTERVAL = pValue.split(","); }
2538- else if (pName.equalsIgnoreCase("TvTEventParticipationTime"))
2539- { TVT_EVENT_PARTICIPATION_TIME = Integer.parseInt(pValue); }
2540- else if (pName.equalsIgnoreCase("TvTEventRunningTime"))
2541- { TVT_EVENT_RUNNING_TIME = Integer.parseInt(pValue); }
2542- else if (pName.equalsIgnoreCase("TvTEventParticipationNpcId"))
2543- { TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(pValue); }
2544-
2545- else if (pName.equalsIgnoreCase("EnableWarehouseSortingClan"))
2546- { L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.parseBoolean(pValue); }
2547- else if (pName.equalsIgnoreCase("EnableWarehouseSortingPrivate"))
2548- { L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(pValue); }
2549-
2550- else if (pName.equalsIgnoreCase("EnableManaPotionSupport"))
2551- { L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(pValue); }
2552-
2553- else if (pName.equalsIgnoreCase("DisplayServerTime"))
2554- { L2JMOD_DISPLAY_SERVER_TIME = Boolean.parseBoolean(pValue); }
2555-
2556- else if (pName.equalsIgnoreCase("AntiFeedEnable"))
2557- { L2JMOD_ANTIFEED_ENABLE = Boolean.parseBoolean(pValue); }
2558- else if (pName.equalsIgnoreCase("AntiFeedDualbox"))
2559- { L2JMOD_ANTIFEED_DUALBOX = Boolean.parseBoolean(pValue); }
2560- else if (pName.equalsIgnoreCase("AntiFeedDisconnectedAsDualbox"))
2561- { L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX = Boolean.parseBoolean(pValue); }
2562- else if (pName.equalsIgnoreCase("AntiFeedInterval"))
2563- { L2JMOD_ANTIFEED_INTERVAL = 1000 * Integer.parseInt(pValue); }
2564-
2565- else if (pName.equalsIgnoreCase("MinKarma"))
2566- { KARMA_MIN_KARMA = Integer.parseInt(pValue); }
2567- else if (pName.equalsIgnoreCase("MaxKarma"))
2568- { KARMA_MAX_KARMA = Integer.parseInt(pValue); }
2569- else if (pName.equalsIgnoreCase("XPDivider"))
2570- { KARMA_XP_DIVIDER = Integer.parseInt(pValue); }
2571- else if (pName.equalsIgnoreCase("BaseKarmaLost"))
2572- { KARMA_LOST_BASE = Integer.parseInt(pValue); }
2573-
2574- else if (pName.equalsIgnoreCase("CanGMDropEquipment"))
2575- { KARMA_DROP_GM = Boolean.parseBoolean(pValue); }
2576- else if (pName.equalsIgnoreCase("AwardPKKillPVPPoint"))
2577- { KARMA_AWARD_PK_KILL = Boolean.parseBoolean(pValue); }
2578- else if (pName.equalsIgnoreCase("MinimumPKRequiredToDrop"))
2579- { KARMA_PK_LIMIT = Integer.parseInt(pValue); }
2580-
2581- else if (pName.equalsIgnoreCase("PvPVsNormalTime"))
2582- { PVP_NORMAL_TIME = Integer.parseInt(pValue); }
2583- else if (pName.equalsIgnoreCase("PvPVsPvPTime"))
2584- { PVP_PVP_TIME = Integer.parseInt(pValue); }
2585- else if (pName.equalsIgnoreCase("GlobalChat"))
2586- { DEFAULT_GLOBAL_CHAT = pValue; }
2587- else if (pName.equalsIgnoreCase("TradeChat"))
2588- { DEFAULT_TRADE_CHAT = pValue; }
2589- else if (pName.equalsIgnoreCase("GMAdminMenuStyle"))
2590- { GM_ADMIN_MENU_STYLE = pValue; }
2591- else
2592- {
2593- try
2594- {
2595+ } else if (pName.equalsIgnoreCase("AltShieldBlocks")) {
2596+ ALT_GAME_SHIELD_BLOCKS = Boolean.parseBoolean(pValue);
2597+ } else if (pName.equalsIgnoreCase("AltPerfectShieldBlockRate")) {
2598+ ALT_PERFECT_SHLD_BLOCK = Integer.parseInt(pValue);
2599+ } else if (pName.equalsIgnoreCase("Delevel")) {
2600+ ALT_GAME_DELEVEL = Boolean.parseBoolean(pValue);
2601+ } else if (pName.equalsIgnoreCase("MagicFailures")) {
2602+ ALT_GAME_MAGICFAILURES = Boolean.parseBoolean(pValue);
2603+ } else if (pName.equalsIgnoreCase("AltMobAgroInPeaceZone")) {
2604+ ALT_MOB_AGRO_IN_PEACEZONE = Boolean.parseBoolean(pValue);
2605+ } else if (pName.equalsIgnoreCase("AltGameExponentXp")) {
2606+ ALT_GAME_EXPONENT_XP = Float.parseFloat(pValue);
2607+ } else if (pName.equalsIgnoreCase("AltGameExponentSp")) {
2608+ ALT_GAME_EXPONENT_SP = Float.parseFloat(pValue);
2609+ } else if (pName.equalsIgnoreCase("AllowClassMasters")) {
2610+ ALLOW_CLASS_MASTERS = Boolean.parseBoolean(pValue);
2611+ } else if (pName.equalsIgnoreCase("AllowEntireTree")) {
2612+ ALLOW_ENTIRE_TREE = Boolean.parseBoolean(pValue);
2613+ } else if (pName.equalsIgnoreCase("AlternateClassMaster")) {
2614+ ALTERNATE_CLASS_MASTER = Boolean.parseBoolean(pValue);
2615+ } else if (pName.equalsIgnoreCase("AltPartyRange")) {
2616+ ALT_PARTY_RANGE = Integer.parseInt(pValue);
2617+ } else if (pName.equalsIgnoreCase("AltPartyRange2")) {
2618+ ALT_PARTY_RANGE2 = Integer.parseInt(pValue);
2619+ } else if (pName.equalsIgnoreCase("CraftingEnabled")) {
2620+ IS_CRAFTING_ENABLED = Boolean.parseBoolean(pValue);
2621+ } else if (pName.equalsIgnoreCase("CraftMasterwork")) {
2622+ CRAFT_MASTERWORK = Boolean.parseBoolean(pValue);
2623+ } else if (pName.equalsIgnoreCase("LifeCrystalNeeded")) {
2624+ LIFE_CRYSTAL_NEEDED = Boolean.parseBoolean(pValue);
2625+ } else if (pName.equalsIgnoreCase("SpBookNeeded")) {
2626+ SP_BOOK_NEEDED = Boolean.parseBoolean(pValue);
2627+ } else if (pName.equalsIgnoreCase("AutoLoot")) {
2628+ AUTO_LOOT = Boolean.parseBoolean(pValue);
2629+ } else if (pName.equalsIgnoreCase("AutoLootRaids")) {
2630+ AUTO_LOOT_RAIDS = Boolean.parseBoolean(pValue);
2631+ } else if (pName.equalsIgnoreCase("AutoLootHerbs")) {
2632+ AUTO_LOOT_HERBS = Boolean.parseBoolean(pValue);
2633+ } else if (pName.equalsIgnoreCase("AltKarmaPlayerCanBeKilledInPeaceZone")) {
2634+ ALT_GAME_KARMA_PLAYER_CAN_BE_KILLED_IN_PEACEZONE = Boolean.parseBoolean(pValue);
2635+ } else if (pName.equalsIgnoreCase("AltKarmaPlayerCanShop")) {
2636+ ALT_GAME_KARMA_PLAYER_CAN_SHOP = Boolean.parseBoolean(pValue);
2637+ } else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseGK")) {
2638+ ALT_GAME_KARMA_PLAYER_CAN_USE_GK = Boolean.parseBoolean(pValue);
2639+ } else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTeleport")) {
2640+ ALT_GAME_KARMA_PLAYER_CAN_TELEPORT = Boolean.parseBoolean(pValue);
2641+ } else if (pName.equalsIgnoreCase("AltKarmaPlayerCanTrade")) {
2642+ ALT_GAME_KARMA_PLAYER_CAN_TRADE = Boolean.parseBoolean(pValue);
2643+ } else if (pName.equalsIgnoreCase("AltKarmaPlayerCanUseWareHouse")) {
2644+ ALT_GAME_KARMA_PLAYER_CAN_USE_WAREHOUSE = Boolean.parseBoolean(pValue);
2645+ } else if (pName.equalsIgnoreCase("MaxPersonalFamePoints")) {
2646+ MAX_PERSONAL_FAME_POINTS = Integer.parseInt(pValue);
2647+ } else if (pName.equalsIgnoreCase("FortressZoneFameTaskFrequency")) {
2648+ FORTRESS_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue);
2649+ } else if (pName.equalsIgnoreCase("FortressZoneFameAquirePoints")) {
2650+ FORTRESS_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue);
2651+ } else if (pName.equalsIgnoreCase("CastleZoneFameTaskFrequency")) {
2652+ CASTLE_ZONE_FAME_TASK_FREQUENCY = Integer.parseInt(pValue);
2653+ } else if (pName.equalsIgnoreCase("CastleZoneFameAquirePoints")) {
2654+ CASTLE_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue);
2655+ } else if (pName.equalsIgnoreCase("AltCastleForDawn")) {
2656+ ALT_GAME_CASTLE_DAWN = Boolean.parseBoolean(pValue);
2657+ } else if (pName.equalsIgnoreCase("AltCastleForDusk")) {
2658+ ALT_GAME_CASTLE_DUSK = Boolean.parseBoolean(pValue);
2659+ } else if (pName.equalsIgnoreCase("AltRequireClanCastle")) {
2660+ ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(pValue);
2661+ } else if (pName.equalsIgnoreCase("AltFreeTeleporting")) {
2662+ ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(pValue);
2663+ } else if (pName.equalsIgnoreCase("AltSubClassWithoutQuests")) {
2664+ ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(pValue);
2665+ } else if (pName.equalsIgnoreCase("AltSubclassEverywhere")) {
2666+ ALT_GAME_SUBCLASS_EVERYWHERE = Boolean.parseBoolean(pValue);
2667+ } else if (pName.equalsIgnoreCase("AltMembersCanWithdrawFromClanWH")) {
2668+ ALT_MEMBERS_CAN_WITHDRAW_FROM_CLANWH = Boolean.parseBoolean(pValue);
2669+ } else if (pName.equalsIgnoreCase("DwarfRecipeLimit")) {
2670+ DWARF_RECIPE_LIMIT = Integer.parseInt(pValue);
2671+ } else if (pName.equalsIgnoreCase("CommonRecipeLimit")) {
2672+ COMMON_RECIPE_LIMIT = Integer.parseInt(pValue);
2673+ } else if (pName.equalsIgnoreCase("ChampionEnable")) {
2674+ L2JMOD_CHAMPION_ENABLE = Boolean.parseBoolean(pValue);
2675+ } else if (pName.equalsIgnoreCase("ChampionFrequency")) {
2676+ L2JMOD_CHAMPION_FREQUENCY = Integer.parseInt(pValue);
2677+ } else if (pName.equalsIgnoreCase("ChampionMinLevel")) {
2678+ L2JMOD_CHAMP_MIN_LVL = Integer.parseInt(pValue);
2679+ } else if (pName.equalsIgnoreCase("ChampionMaxLevel")) {
2680+ L2JMOD_CHAMP_MAX_LVL = Integer.parseInt(pValue);
2681+ } else if (pName.equalsIgnoreCase("ChampionHp")) {
2682+ L2JMOD_CHAMPION_HP = Integer.parseInt(pValue);
2683+ } else if (pName.equalsIgnoreCase("ChampionHpRegen")) {
2684+ L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue);
2685+ } else if (pName.equalsIgnoreCase("ChampionRewards")) {
2686+ L2JMOD_CHAMPION_REWARDS = Integer.parseInt(pValue);
2687+ } else if (pName.equalsIgnoreCase("ChampionAdenasRewards")) {
2688+ L2JMOD_CHAMPION_ADENAS_REWARDS = Float.parseFloat(pValue);
2689+ } else if (pName.equalsIgnoreCase("ChampionAtk")) {
2690+ L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue);
2691+ } else if (pName.equalsIgnoreCase("ChampionSpdAtk")) {
2692+ L2JMOD_CHAMPION_SPD_ATK = Float.parseFloat(pValue);
2693+ } else if (pName.equalsIgnoreCase("ChampionRewardLowerLvlItemChance")) {
2694+ L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
2695+ } else if (pName.equalsIgnoreCase("ChampionRewardHigherLvlItemChance")) {
2696+ L2JMOD_CHAMPION_REWARD_HIGHER_LVL_ITEM_CHANCE = Integer.parseInt(pValue);
2697+ } else if (pName.equalsIgnoreCase("ChampionRewardItemID")) {
2698+ L2JMOD_CHAMPION_REWARD_ID = Integer.parseInt(pValue);
2699+ } else if (pName.equalsIgnoreCase("ChampionRewardItemQty")) {
2700+ L2JMOD_CHAMPION_REWARD_QTY = Integer.parseInt(pValue);
2701+ } else if (pName.equalsIgnoreCase("ChampionEnableInInstances")) {
2702+ L2JMOD_CHAMPION_ENABLE_IN_INSTANCES = Boolean.parseBoolean(pValue);
2703+ } else if (pName.equalsIgnoreCase("AllowWedding")) {
2704+ L2JMOD_ALLOW_WEDDING = Boolean.parseBoolean(pValue);
2705+ } else if (pName.equalsIgnoreCase("WeddingPrice")) {
2706+ L2JMOD_WEDDING_PRICE = Integer.parseInt(pValue);
2707+ } else if (pName.equalsIgnoreCase("WeddingPunishInfidelity")) {
2708+ L2JMOD_WEDDING_PUNISH_INFIDELITY = Boolean.parseBoolean(pValue);
2709+ } else if (pName.equalsIgnoreCase("WeddingTeleport")) {
2710+ L2JMOD_WEDDING_TELEPORT = Boolean.parseBoolean(pValue);
2711+ } else if (pName.equalsIgnoreCase("WeddingTeleportPrice")) {
2712+ L2JMOD_WEDDING_TELEPORT_PRICE = Integer.parseInt(pValue);
2713+ } else if (pName.equalsIgnoreCase("WeddingTeleportDuration")) {
2714+ L2JMOD_WEDDING_TELEPORT_DURATION = Integer.parseInt(pValue);
2715+ } else if (pName.equalsIgnoreCase("WeddingAllowSameSex")) {
2716+ L2JMOD_WEDDING_SAMESEX = Boolean.parseBoolean(pValue);
2717+ } else if (pName.equalsIgnoreCase("WeddingFormalWear")) {
2718+ L2JMOD_WEDDING_FORMALWEAR = Boolean.parseBoolean(pValue);
2719+ } else if (pName.equalsIgnoreCase("WeddingDivorceCosts")) {
2720+ L2JMOD_WEDDING_DIVORCE_COSTS = Integer.parseInt(pValue);
2721+ } else if (pName.equalsIgnoreCase("TvTEventEnabled")) {
2722+ TVT_EVENT_ENABLED = Boolean.parseBoolean(pValue);
2723+ } else if (pName.equalsIgnoreCase("TvTEventInterval")) {
2724+ TVT_EVENT_INTERVAL = pValue.split(",");
2725+ } else if (pName.equalsIgnoreCase("TvTEventParticipationTime")) {
2726+ TVT_EVENT_PARTICIPATION_TIME = Integer.parseInt(pValue);
2727+ } else if (pName.equalsIgnoreCase("TvTEventRunningTime")) {
2728+ TVT_EVENT_RUNNING_TIME = Integer.parseInt(pValue);
2729+ } else if (pName.equalsIgnoreCase("TvTEventParticipationNpcId")) {
2730+ TVT_EVENT_PARTICIPATION_NPC_ID = Integer.parseInt(pValue);
2731+ } else if (pName.equalsIgnoreCase("EnableWarehouseSortingClan")) {
2732+ L2JMOD_ENABLE_WAREHOUSESORTING_CLAN = Boolean.parseBoolean(pValue);
2733+ } else if (pName.equalsIgnoreCase("EnableWarehouseSortingPrivate")) {
2734+ L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.parseBoolean(pValue);
2735+ } else if (pName.equalsIgnoreCase("EnableManaPotionSupport")) {
2736+ L2JMOD_ENABLE_MANA_POTIONS_SUPPORT = Boolean.parseBoolean(pValue);
2737+ } else if (pName.equalsIgnoreCase("DisplayServerTime")) {
2738+ L2JMOD_DISPLAY_SERVER_TIME = Boolean.parseBoolean(pValue);
2739+ } else if (pName.equalsIgnoreCase("AntiFeedEnable")) {
2740+ L2JMOD_ANTIFEED_ENABLE = Boolean.parseBoolean(pValue);
2741+ } else if (pName.equalsIgnoreCase("AntiFeedDualbox")) {
2742+ L2JMOD_ANTIFEED_DUALBOX = Boolean.parseBoolean(pValue);
2743+ } else if (pName.equalsIgnoreCase("AntiFeedDisconnectedAsDualbox")) {
2744+ L2JMOD_ANTIFEED_DISCONNECTED_AS_DUALBOX = Boolean.parseBoolean(pValue);
2745+ } else if (pName.equalsIgnoreCase("AntiFeedInterval")) {
2746+ L2JMOD_ANTIFEED_INTERVAL = 1000 * Integer.parseInt(pValue);
2747+ } else if (pName.equalsIgnoreCase("MinKarma")) {
2748+ KARMA_MIN_KARMA = Integer.parseInt(pValue);
2749+ } else if (pName.equalsIgnoreCase("MaxKarma")) {
2750+ KARMA_MAX_KARMA = Integer.parseInt(pValue);
2751+ } else if (pName.equalsIgnoreCase("XPDivider")) {
2752+ KARMA_XP_DIVIDER = Integer.parseInt(pValue);
2753+ } else if (pName.equalsIgnoreCase("BaseKarmaLost")) {
2754+ KARMA_LOST_BASE = Integer.parseInt(pValue);
2755+ } else if (pName.equalsIgnoreCase("CanGMDropEquipment")) {
2756+ KARMA_DROP_GM = Boolean.parseBoolean(pValue);
2757+ } else if (pName.equalsIgnoreCase("AwardPKKillPVPPoint")) {
2758+ KARMA_AWARD_PK_KILL = Boolean.parseBoolean(pValue);
2759+ } else if (pName.equalsIgnoreCase("MinimumPKRequiredToDrop")) {
2760+ KARMA_PK_LIMIT = Integer.parseInt(pValue);
2761+ } else if (pName.equalsIgnoreCase("PvPVsNormalTime")) {
2762+ PVP_NORMAL_TIME = Integer.parseInt(pValue);
2763+ } else if (pName.equalsIgnoreCase("PvPVsPvPTime")) {
2764+ PVP_PVP_TIME = Integer.parseInt(pValue);
2765+ } else if (pName.equalsIgnoreCase("GlobalChat")) {
2766+ DEFAULT_GLOBAL_CHAT = pValue;
2767+ } else if (pName.equalsIgnoreCase("TradeChat")) {
2768+ DEFAULT_TRADE_CHAT = pValue;
2769+ } else if (pName.equalsIgnoreCase("GMAdminMenuStyle")) {
2770+ GM_ADMIN_MENU_STYLE = pValue;
2771+ } else {
2772+ try {
2773 //TODO: stupid GB configs...
2774- if (!pName.startsWith("Interval_") && !pName.startsWith("Random_"))
2775- { pName = pName.toUpperCase(); }
2776+ if (!pName.startsWith("Interval_") && !pName.startsWith("Random_")) {
2777+ pName = pName.toUpperCase();
2778+ }
2779 Field clazField = Config.class.getField(pName);
2780 int modifiers = clazField.getModifiers();
2781 // just in case :)
2782- if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers))
2783- { throw new SecurityException("Cannot modify non public or non static config!"); }
2784+ if (!Modifier.isStatic(modifiers) || !Modifier.isPublic(modifiers)) {
2785+ throw new SecurityException("Cannot modify non public or non static config!");
2786+ }
2787
2788- if (clazField.getType() == int.class)
2789- {
2790+ if (clazField.getType() == int.class) {
2791 clazField.setInt(clazField, Integer.parseInt(pValue));
2792- }
2793- else if (clazField.getType() == short.class)
2794- {
2795+ } else if (clazField.getType() == short.class) {
2796 clazField.setShort(clazField, Short.parseShort(pValue));
2797- }
2798- else if (clazField.getType() == byte.class)
2799- {
2800+ } else if (clazField.getType() == byte.class) {
2801 clazField.setByte(clazField, Byte.parseByte(pValue));
2802- }
2803- else if (clazField.getType() == long.class)
2804- {
2805+ } else if (clazField.getType() == long.class) {
2806 clazField.setLong(clazField, Long.parseLong(pValue));
2807- }
2808- else if (clazField.getType() == float.class)
2809- {
2810+ } else if (clazField.getType() == float.class) {
2811 clazField.setFloat(clazField, Float.parseFloat(pValue));
2812- }
2813- else if (clazField.getType() == double.class)
2814- {
2815+ } else if (clazField.getType() == double.class) {
2816 clazField.setDouble(clazField, Double.parseDouble(pValue));
2817- }
2818- else if (clazField.getType() == boolean.class)
2819- {
2820+ } else if (clazField.getType() == boolean.class) {
2821 clazField.setBoolean(clazField, Boolean.parseBoolean(pValue));
2822- }
2823- else if (clazField.getType() == String.class)
2824- {
2825+ } else if (clazField.getType() == String.class) {
2826 clazField.set(clazField, pValue);
2827- }
2828- else
2829- { return false; }
2830- }
2831- catch (NoSuchFieldException e)
2832- {
2833- return false;
2834- }
2835- catch (Exception e)
2836- {
2837+ } else {
2838+ return false;
2839+ }
2840+ } catch (NoSuchFieldException e) {
2841+ return false;
2842+ } catch (Exception e) {
2843 _log.log(Level.WARNING, "", e);
2844 return false;
2845 }
2846@@ -3804,8 +3614,7 @@
2847 * @see HEXID_FILE
2848 * @see saveHexid(String string, String fileName)
2849 */
2850- public static void saveHexid(int serverId, String string)
2851- {
2852+ public static void saveHexid(int serverId, String string) {
2853 Config.saveHexid(serverId, string, HEXID_FILE);
2854 }
2855
2856@@ -3815,10 +3624,8 @@
2857 * @param hexId (String) : hexadecimal ID of the server to store
2858 * @param fileName (String) : name of the L2Properties file
2859 */
2860- public static void saveHexid(int serverId, String hexId, String fileName)
2861- {
2862- try
2863- {
2864+ public static void saveHexid(int serverId, String hexId, String fileName) {
2865+ try {
2866 L2Properties hexSetting = new L2Properties();
2867 File file = new File(fileName);
2868 //Create a new empty file only if it doesn't exist
2869@@ -3828,9 +3635,7 @@
2870 hexSetting.setProperty("HexID", hexId);
2871 hexSetting.store(out, "the hexID to auth into login");
2872 out.close();
2873- }
2874- catch (Exception e)
2875- {
2876+ } catch (Exception e) {
2877 _log.warning(StringUtil.concat("Failed to save hex id to ", fileName, " File."));
2878 e.printStackTrace();
2879 }
2880@@ -3839,8 +3644,7 @@
2881 /**
2882 * Loads flood protector configurations.
2883 */
2884- private static void loadFloodProtectorConfigs(final L2Properties properties)
2885- {
2886+ private static void loadFloodProtectorConfigs(final L2Properties properties) {
2887 loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_USE_ITEM, "UseItem", "4");
2888 loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ROLL_DICE, "RollDice", "42");
2889 loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_FIREWORK, "Firework", "42");
2890@@ -3868,8 +3672,7 @@
2891 * configuration should be read
2892 * @param defaultInterval default flood protector interval
2893 */
2894- private static void loadFloodProtectorConfig(final L2Properties properties, final FloodProtectorConfig config, final String configString, final String defaultInterval)
2895- {
2896+ private static void loadFloodProtectorConfig(final L2Properties properties, final FloodProtectorConfig config, final String configString, final String defaultInterval) {
2897 config.FLOOD_PROTECTION_INTERVAL = Integer.parseInt(properties.getProperty(StringUtil.concat("FloodProtector", configString, "Interval"), defaultInterval));
2898 config.LOG_FLOODING = Boolean.parseBoolean(properties.getProperty(StringUtil.concat("FloodProtector", configString, "LogFlooding"), "False"));
2899 config.PUNISHMENT_LIMIT = Integer.parseInt(properties.getProperty(StringUtil.concat("FloodProtector", configString, "PunishmentLimit"), "0"));
2900@@ -3877,37 +3680,36 @@
2901 config.PUNISHMENT_TIME = Integer.parseInt(properties.getProperty(StringUtil.concat("FloodProtector", configString, "PunishmentTime"), "0"));
2902 }
2903
2904- public static int getServerTypeId(String[] serverTypes)
2905- {
2906+ public static int getServerTypeId(String[] serverTypes) {
2907 int tType = 0;
2908- for (String cType : serverTypes)
2909- {
2910+ for (String cType : serverTypes) {
2911 cType = cType.trim();
2912- if (cType.equalsIgnoreCase("Normal"))
2913- { tType |= 0x01; }
2914- else if (cType.equalsIgnoreCase("Relax"))
2915- { tType |= 0x02; }
2916- else if (cType.equalsIgnoreCase("Test"))
2917- { tType |= 0x04; }
2918- else if (cType.equalsIgnoreCase("NoLabel"))
2919- { tType |= 0x08; }
2920- else if (cType.equalsIgnoreCase("Restricted"))
2921- { tType |= 0x10; }
2922- else if (cType.equalsIgnoreCase("Event"))
2923- { tType |= 0x20; }
2924- else if (cType.equalsIgnoreCase("Free"))
2925- { tType |= 0x40; }
2926+ if (cType.equalsIgnoreCase("Normal")) {
2927+ tType |= 0x01;
2928+ } else if (cType.equalsIgnoreCase("Relax")) {
2929+ tType |= 0x02;
2930+ } else if (cType.equalsIgnoreCase("Test")) {
2931+ tType |= 0x04;
2932+ } else if (cType.equalsIgnoreCase("NoLabel")) {
2933+ tType |= 0x08;
2934+ } else if (cType.equalsIgnoreCase("Restricted")) {
2935+ tType |= 0x10;
2936+ } else if (cType.equalsIgnoreCase("Event")) {
2937+ tType |= 0x20;
2938+ } else if (cType.equalsIgnoreCase("Free")) {
2939+ tType |= 0x40;
2940+ }
2941 }
2942 return tType;
2943 }
2944
2945- private static TIntFloatHashMap parseConfigLine(String line)
2946- {
2947+ private static TIntFloatHashMap parseConfigLine(String line) {
2948 String[] propertySplit = line.split(",");
2949 TIntFloatHashMap ret = new TIntFloatHashMap(propertySplit.length);
2950 int i = 1;
2951- for (String value : propertySplit)
2952- { ret.put(i++, Float.parseFloat(value)); }
2953+ for (String value : propertySplit) {
2954+ ret.put(i++, Float.parseFloat(value));
2955+ }
2956 return ret;
2957 }
2958
2959@@ -3915,40 +3717,32 @@
2960 * itemId1,itemNumber1;itemId2,itemNumber2...
2961 * to the int[n][2] = [itemId1][itemNumber1],[itemId2][itemNumber2]...
2962 */
2963- private static int[][] parseItemsList(String line)
2964- {
2965+ private static int[][] parseItemsList(String line) {
2966 final String[] propertySplit = line.split(";");
2967- if (propertySplit.length == 0)
2968- { return null; }
2969+ if (propertySplit.length == 0) {
2970+ return null;
2971+ }
2972
2973 int i = 0;
2974 String[] valueSplit;
2975 final int[][] result = new int[propertySplit.length][];
2976- for (String value : propertySplit)
2977- {
2978+ for (String value : propertySplit) {
2979 valueSplit = value.split(",");
2980- if (valueSplit.length != 2)
2981- {
2982+ if (valueSplit.length != 2) {
2983 _log.warning(StringUtil.concat("parseItemsList[Config.load()]: invalid entry -> \"", valueSplit[0], "\", should be itemId,itemNumber"));
2984 return null;
2985 }
2986
2987 result[i] = new int[2];
2988- try
2989- {
2990+ try {
2991 result[i][0] = Integer.parseInt(valueSplit[0]);
2992- }
2993- catch (NumberFormatException e)
2994- {
2995+ } catch (NumberFormatException e) {
2996 _log.warning(StringUtil.concat("parseItemsList[Config.load()]: invalid itemId -> \"", valueSplit[0], "\""));
2997 return null;
2998 }
2999- try
3000- {
3001+ try {
3002 result[i][1] = Integer.parseInt(valueSplit[1]);
3003- }
3004- catch (NumberFormatException e)
3005- {
3006+ } catch (NumberFormatException e) {
3007 _log.warning(StringUtil.concat("parseItemsList[Config.load()]: invalid item number -> \"", valueSplit[1], "\""));
3008 return null;
3009 }
3010@@ -3957,10 +3751,8 @@
3011 return result;
3012 }
3013
3014- public static void loadCustom()
3015- {
3016- try
3017- {
3018+ public static void loadCustom() {
3019+ try {
3020 L2Properties customSettings = new L2Properties();
3021 InputStream is = new FileInputStream(new File("./config/custom/custom.properties"));
3022 customSettings.load(is);
3023@@ -3976,27 +3768,18 @@
3024 AIO_ITEMID = Integer.parseInt(customSettings.getProperty("ItemIdAio", "9945"));
3025 ALLOW_AIO_ITEM = Boolean.parseBoolean(customSettings.getProperty("AllowAIOItem", "false"));
3026 AIO_NO_ATTACK_IN_OTHERS_ZONE = Boolean.parseBoolean(customSettings.getProperty("AioNoAttackInOthersZones", "False"));
3027- if (ENABLE_AIO_SYSTEM)
3028- {
3029+ if (ENABLE_AIO_SYSTEM) {
3030 String[] AioSkillsSplit = customSettings.getProperty("AioSkills", "").split(";");
3031 AIO_SKILLS = new HashMap(AioSkillsSplit.length);
3032- for (String skill : AioSkillsSplit)
3033- {
3034+ for (String skill : AioSkillsSplit) {
3035 String[] skillSplit = skill.split(",");
3036- if (skillSplit.length != 2)
3037- {
3038+ if (skillSplit.length != 2) {
3039 System.out.println("[Aio System]: invalid config property in L2JHeartSettings.properties -> AioSkills \"" + skill + "\"");
3040- }
3041- else
3042- {
3043- try
3044- {
3045+ } else {
3046+ try {
3047 AIO_SKILLS.put(Integer.valueOf(Integer.parseInt(skillSplit[0])), Integer.valueOf(Integer.parseInt(skillSplit[1])));
3048- }
3049- catch (NumberFormatException nfe)
3050- {
3051- if (!skill.equals(""))
3052- {
3053+ } catch (NumberFormatException nfe) {
3054+ if (!skill.equals("")) {
3055 System.out.println("[Aio System]: invalid config property in L2JHeartSettings.properties -> AioSkills \"" + skillSplit[0] + "\"" + skillSplit[1]);
3056 }
3057 }
3058@@ -4004,30 +3787,21 @@
3059 }
3060 }
3061 ENABLE_CLAN_SYSTEM = Boolean.parseBoolean(customSettings.getProperty("EnableClanSystem", "True"));
3062- if (ENABLE_CLAN_SYSTEM)
3063- {
3064+ if (ENABLE_CLAN_SYSTEM) {
3065 String[] AioSkillsSplit = customSettings.getProperty("ClanSkills", "").split(";");
3066 CLAN_SKILLS = new HashMap(AioSkillsSplit.length);
3067 String[] arr = AioSkillsSplit;
3068 int len = arr.length;
3069- for (int i = 0; i < len; i++)
3070- {
3071+ for (int i = 0; i < len; i++) {
3072 String skill = arr[i];
3073 String[] skillSplit = skill.split(",");
3074- if (skillSplit.length != 2)
3075- {
3076+ if (skillSplit.length != 2) {
3077 System.out.println("[Clan System]: invalid config property in L2JHeart.properties -> ClanSkills \"" + skill + "\"");
3078- }
3079- else
3080- {
3081- try
3082- {
3083+ } else {
3084+ try {
3085 CLAN_SKILLS.put(Integer.valueOf(Integer.parseInt(skillSplit[0])), Integer.valueOf(Integer.parseInt(skillSplit[1])));
3086- }
3087- catch (NumberFormatException localNumberFormatException1)
3088- {
3089- if (!skill.equals(""))
3090- {
3091+ } catch (NumberFormatException localNumberFormatException1) {
3092+ if (!skill.equals("")) {
3093 System.out.println("[Clan System]: invalid config property in L2JHeart.properties -> ClanSkills \"" + skillSplit[0] + "\"" + skillSplit[1]);
3094 }
3095 }
3096@@ -4036,48 +3810,40 @@
3097 }
3098 CLAN_LEVEL = Byte.parseByte(customSettings.getProperty("ClanSetLevel", "8"));
3099 REPUTATION_QUANTITY = Integer.parseInt(customSettings.getProperty("ReputationScore", "10000"));
3100- }
3101- catch (Exception localException)
3102- {
3103+ } catch (Exception localException) {
3104 }
3105 }
3106
3107- public static enum IdFactoryType
3108- {
3109+ public static enum IdFactoryType {
3110 Compaction, BitSet, Stack
3111 }
3112
3113- public static enum ObjectMapType
3114- {
3115+ public static enum ObjectMapType {
3116 L2ObjectHashMap, WorldObjectMap
3117 }
3118
3119- public static enum ObjectSetType
3120- {
3121+ public static enum ObjectSetType {
3122 L2ObjectHashSet, WorldObjectSet
3123 }
3124
3125- public static class ClassMasterSettings
3126- {
3127+ public static class ClassMasterSettings {
3128 private TIntObjectHashMap<TIntIntHashMap> _claimItems;
3129 private TIntObjectHashMap<TIntIntHashMap> _rewardItems;
3130 private TIntObjectHashMap<Boolean> _allowedClassChange;
3131
3132- public ClassMasterSettings(String _configLine)
3133- {
3134+ public ClassMasterSettings(String _configLine) {
3135 _claimItems = new TIntObjectHashMap<TIntIntHashMap>(3);
3136 _rewardItems = new TIntObjectHashMap<TIntIntHashMap>(3);
3137 _allowedClassChange = new TIntObjectHashMap<Boolean>(3);
3138- if (_configLine != null)
3139- { parseConfigLine(_configLine.trim()); }
3140+ if (_configLine != null) {
3141+ parseConfigLine(_configLine.trim());
3142+ }
3143 }
3144
3145- private void parseConfigLine(String _configLine)
3146- {
3147+ private void parseConfigLine(String _configLine) {
3148 StringTokenizer st = new StringTokenizer(_configLine, ";");
3149
3150- while (st.hasMoreTokens())
3151- {
3152+ while (st.hasMoreTokens()) {
3153 // get allowed class change
3154 int job = Integer.parseInt(st.nextToken());
3155
3156@@ -4085,12 +3851,10 @@
3157
3158 TIntIntHashMap _items = new TIntIntHashMap();
3159 // parse items needed for class change
3160- if (st.hasMoreTokens())
3161- {
3162+ if (st.hasMoreTokens()) {
3163 StringTokenizer st2 = new StringTokenizer(st.nextToken(), "[],");
3164
3165- while (st2.hasMoreTokens())
3166- {
3167+ while (st2.hasMoreTokens()) {
3168 StringTokenizer st3 = new StringTokenizer(st2.nextToken(), "()");
3169 int _itemId = Integer.parseInt(st3.nextToken());
3170 int _quantity = Integer.parseInt(st3.nextToken());
3171@@ -4102,12 +3866,10 @@
3172
3173 _items = new TIntIntHashMap();
3174 // parse gifts after class change
3175- if (st.hasMoreTokens())
3176- {
3177+ if (st.hasMoreTokens()) {
3178 StringTokenizer st2 = new StringTokenizer(st.nextToken(), "[],");
3179
3180- while (st2.hasMoreTokens())
3181- {
3182+ while (st2.hasMoreTokens()) {
3183 StringTokenizer st3 = new StringTokenizer(st2.nextToken(), "()");
3184 int _itemId = Integer.parseInt(st3.nextToken());
3185 int _quantity = Integer.parseInt(st3.nextToken());
3186@@ -4119,28 +3881,29 @@
3187 }
3188 }
3189
3190- public boolean isAllowed(int job)
3191- {
3192- if (_allowedClassChange == null)
3193- { return false; }
3194- if (_allowedClassChange.containsKey(job))
3195- { return _allowedClassChange.get(job); }
3196-
3197- return false;
3198- }
3199+ public boolean isAllowed(int job) {
3200+ if (_allowedClassChange == null) {
3201+ return false;
3202+ }
3203+ if (_allowedClassChange.containsKey(job)) {
3204+ return _allowedClassChange.get(job);
3205+ }
3206
3207- public TIntIntHashMap getRewardItems(int job)
3208- {
3209- if (_rewardItems.containsKey(job))
3210- { return _rewardItems.get(job); }
3211+ return false;
3212+ }
3213+
3214+ public TIntIntHashMap getRewardItems(int job) {
3215+ if (_rewardItems.containsKey(job)) {
3216+ return _rewardItems.get(job);
3217+ }
3218
3219 return null;
3220 }
3221
3222- public TIntIntHashMap getRequireItems(int job)
3223- {
3224- if (_claimItems.containsKey(job))
3225- { return _claimItems.get(job); }
3226+ public TIntIntHashMap getRequireItems(int job) {
3227+ if (_claimItems.containsKey(job)) {
3228+ return _claimItems.get(job);
3229+ }
3230
3231 return null;
3232 }
3233Index: java/com/l2jserver/gameserver/model/L2World.java
3234IDEA additional info:
3235Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
3236<+>UTF-8
3237===================================================================
3238--- java/com/l2jserver/gameserver/model/L2World.java (revision 34)
3239+++ java/com/l2jserver/gameserver/model/L2World.java (revision )
3240@@ -45,18 +45,14 @@
3241 public static final int GRACIA_MAX_X = -166168;
3242 public static final int GRACIA_MAX_Z = 6105;
3243 public static final int GRACIA_MIN_Z = -895;
3244+ private static final int TILE_SIZE = 32768;
3245 /*
3246 * biteshift, defines number of regions
3247 * note, shifting by 15 will result in regions corresponding to map tiles
3248 * shifting by 12 divides one tile to 8x8 regions
3249 */
3250 public static final int SHIFT_BY = 12;
3251- /**
3252- * calculated offset used so top left region is 0,0
3253- */
3254- public static final int OFFSET_X = Math.abs(MAP_MIN_X >> SHIFT_BY);
3255- public static final int OFFSET_Y = Math.abs(MAP_MIN_Y >> SHIFT_BY);
3256- private static final int TILE_SIZE = 32768;
3257+
3258 /**
3259 * Map dimensions
3260 */
3261@@ -64,6 +60,13 @@
3262 public static final int MAP_MAX_X = (Config.WORLD_X_MAX - 19) * TILE_SIZE;
3263 public static final int MAP_MIN_Y = (Config.WORLD_Y_MIN - 18) * TILE_SIZE;
3264 public static final int MAP_MAX_Y = (Config.WORLD_Y_MAX - 17) * TILE_SIZE;
3265+
3266+ /**
3267+ * calculated offset used so top left region is 0,0
3268+ */
3269+ public static final int OFFSET_X = Math.abs(MAP_MIN_X >> SHIFT_BY);
3270+ public static final int OFFSET_Y = Math.abs(MAP_MIN_Y >> SHIFT_BY);
3271+
3272 /**
3273 * number of regions
3274 */
3275Index: java/com/l2jserver/gameserver/model/entity/TvTEventTeam.java
3276IDEA additional info:
3277Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
3278<+>UTF-8
3279===================================================================
3280--- java/com/l2jserver/gameserver/model/entity/TvTEventTeam.java (revision 34)
3281+++ java/com/l2jserver/gameserver/model/entity/TvTEventTeam.java (revision )
3282@@ -32,6 +32,7 @@
3283 * The team spot coordinated<br>
3284 */
3285 private int[] _coordinates = new int[3];
3286+ private int[] _TeamBuff = new int[3];
3287 /**
3288 * The points of the team<br>
3289 */
3290@@ -47,10 +48,11 @@
3291 * @param name as String<br>
3292 * @param coordinates as int[]<br>
3293 */
3294- public TvTEventTeam(String name, int[] coordinates)
3295+ public TvTEventTeam(String name, int[] coordinates, int[] teambuff)
3296 {
3297 _name = name;
3298 _coordinates = coordinates;
3299+ _TeamBuff = teambuff;
3300 _points = 0;
3301 }
3302
3303@@ -187,4 +189,14 @@
3304
3305 return participatedPlayerCount;
3306 }
3307+
3308+ public int[] getTeamBuff()
3309+ {
3310+ return _TeamBuff;
3311+ }
3312+
3313+ public void setTeamBuff(int[] TeamBuff)
3314+ {
3315+ _TeamBuff = _TeamBuff;
3316+ }
3317 }
3318Index: java/com/l2jserver/gameserver/network/serverpackets/RelationChanged.java
3319IDEA additional info:
3320Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
3321<+>UTF-8
3322===================================================================
3323--- java/com/l2jserver/gameserver/network/serverpackets/RelationChanged.java (revision 34)
3324+++ java/com/l2jserver/gameserver/network/serverpackets/RelationChanged.java (revision )
3325@@ -69,7 +69,6 @@
3326 Relation r = new Relation();
3327 r._objId = activeChar.getObjectId();
3328 r._relation = relation;
3329- System.out.println("Skata 2");
3330 r._autoAttackable = autoattackable ? 1 : 0;
3331 r._karma = activeChar.getKarma();
3332 r._pvpFlag = activeChar.getPvpFlag();
3333Index: java/com/l2jserver/gameserver/model/actor/instance/L2TvtTeleporterInstance.java
3334IDEA additional info:
3335Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
3336<+>UTF-8
3337===================================================================
3338--- java/com/l2jserver/gameserver/model/actor/instance/L2TvtTeleporterInstance.java (revision )
3339+++ java/com/l2jserver/gameserver/model/actor/instance/L2TvtTeleporterInstance.java (revision )
3340@@ -0,0 +1,46 @@
3341+package com.l2jserver.gameserver.model.actor.instance;
3342+
3343+import com.l2jserver.Config;
3344+import com.l2jserver.gameserver.cache.HtmCache;
3345+import com.l2jserver.gameserver.model.actor.L2Npc;
3346+import com.l2jserver.gameserver.model.entity.TvTEvent;
3347+import com.l2jserver.gameserver.model.entity.TvTEventTeleporter;
3348+import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
3349+import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
3350+
3351+public class L2TvtTeleporterInstance
3352+ extends L2Npc {
3353+ public L2TvtTeleporterInstance(int objectId, L2NpcTemplate template) {
3354+ super(objectId, template);
3355+ }
3356+
3357+ public void onBypassFeedback(L2PcInstance playerInstance, String command) {
3358+ if ((TvTEvent.isPlayerParticipant(playerInstance.getObjectId())) && (TvTEvent.isStarted())) {
3359+ int[] loc = new int[3];
3360+
3361+ int id = Integer.valueOf(command.substring(3)).intValue();
3362+ if (TvTEvent.getParticipantTeamId(playerInstance.getObjectId()) == 0) {
3363+ loc = (int[]) Config.TVT_EVENT_TEAM_1_RESPAWN_LOC.get(Integer.valueOf(id));
3364+ } else {
3365+ loc = (int[]) Config.TVT_EVENT_TEAM_2_RESPAWN_LOC.get(Integer.valueOf(id));
3366+ }
3367+ new TvTEventTeleporter(playerInstance, loc, true, false);
3368+ }
3369+ }
3370+
3371+ public void showChatWindow(L2PcInstance playerInstance, int val) {
3372+ if (playerInstance == null) {
3373+ return;
3374+ }
3375+ String htmContent = HtmCache.getInstance().getHtm(playerInstance.getHtmlPrefix(), "data/html/npcdefault.htm");
3376+ if ((TvTEvent.isPlayerParticipant(playerInstance.getObjectId())) && (TvTEvent.isStarted())) {
3377+ htmContent = HtmCache.getInstance().getHtm(playerInstance.getHtmlPrefix(), "data/html/mods/TvTEvent/teleBackToArena.htm");
3378+ }
3379+ NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
3380+
3381+ npcHtmlMessage.setHtml(htmContent);
3382+ npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
3383+
3384+ playerInstance.sendPacket(npcHtmlMessage);
3385+ }
3386+}
3387Index: java/com/l2jserver/gameserver/network/serverpackets/ExBasicActionList.java
3388IDEA additional info:
3389Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
3390<+>UTF-8
3391===================================================================
3392--- java/com/l2jserver/gameserver/network/serverpackets/ExBasicActionList.java (revision 34)
3393+++ java/com/l2jserver/gameserver/network/serverpackets/ExBasicActionList.java (revision )
3394@@ -23,9 +23,6 @@
3395 {
3396 public static final int[] _actionsOnTransform = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 15, 16, 17, 18, 19, 21, 22, 23, 32, 36, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 52, 53, 54, 55, 56, 57, 63, 64, 65, 70, 1000, 1001, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098};
3397 public static final int[] _defaultActionList;
3398- private static final String _S__FE_5E_EXBASICACTIONLIST = "[S] FE:5F ExBasicActionList";
3399- private final static ExBasicActionList STATIC_PACKET_TRANSFORMED = new ExBasicActionList(_actionsOnTransform);
3400- private final static ExBasicActionList STATIC_PACKET = new ExBasicActionList(_defaultActionList);
3401
3402 static
3403 {
3404@@ -44,6 +41,9 @@
3405 for (i = count3; i-- > 0; )
3406 { _defaultActionList[count1 + count2 + i] = 5000 + i; }
3407 }
3408+ private static final String _S__FE_5E_EXBASICACTIONLIST = "[S] FE:5F ExBasicActionList";
3409+ private final static ExBasicActionList STATIC_PACKET_TRANSFORMED = new ExBasicActionList(_actionsOnTransform);
3410+ private final static ExBasicActionList STATIC_PACKET = new ExBasicActionList(_defaultActionList);
3411
3412 private final int[] _actionIds;
3413
3414Index: java/com/l2jserver/gameserver/model/entity/TvTEvent.java
3415IDEA additional info:
3416Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
3417<+>UTF-8
3418===================================================================
3419--- java/com/l2jserver/gameserver/model/entity/TvTEvent.java (revision 34)
3420+++ java/com/l2jserver/gameserver/model/entity/TvTEvent.java (revision )
3421@@ -87,8 +87,8 @@
3422 public static void init()
3423 {
3424 AntiFeedManager.getInstance().registerEvent(AntiFeedManager.TVT_ID);
3425- _teams[0] = new TvTEventTeam(Config.TVT_EVENT_TEAM_1_NAME, Config.TVT_EVENT_TEAM_1_COORDINATES);
3426- _teams[1] = new TvTEventTeam(Config.TVT_EVENT_TEAM_2_NAME, Config.TVT_EVENT_TEAM_2_COORDINATES);
3427+ _teams[0] = new TvTEventTeam(Config.TVT_EVENT_TEAM_1_NAME, Config.TVT_EVENT_TEAM_1_COORDINATES, Config.TVT_EVENT_TEAM_1_BUFF_COORDINATES);
3428+ _teams[1] = new TvTEventTeam(Config.TVT_EVENT_TEAM_2_NAME, Config.TVT_EVENT_TEAM_2_COORDINATES, Config.TVT_EVENT_TEAM_2_BUFF_COORDINATES);
3429 }
3430
3431 /**
3432@@ -465,7 +465,7 @@
3433 * 1. Get team id of the player<br>
3434 * 2. Remove player from it's team<br><br>
3435 *
3436- * @param playerName as String<br>
3437+ * @param playerObjectId as int<br>
3438 * @return boolean: true if success, otherwise false<br>
3439 */
3440 public static boolean removeParticipant(int playerObjectId)
3441@@ -756,7 +756,7 @@
3442 /**
3443 * Called on every scroll use<br><br>
3444 *
3445- * @param playerName as String<br>
3446+ * @param playerObjectId as int<br>
3447 * @return boolean: true if player is allowed to use scroll, otherwise false<br>
3448 */
3449 public static boolean onScrollUse(int playerObjectId)
3450@@ -849,7 +849,7 @@
3451 return;
3452 }
3453
3454- new TvTEventTeleporter(killedPlayerInstance, _teams[killedTeamId].getCoordinates(), false, false);
3455+ new TvTEventTeleporter(killedPlayerInstance, _teams[killedTeamId].getTeamBuff(), false, false);
3456
3457 if (killerCharacter == null)
3458 {