Simple arrays for NPC penalty configurations.

This commit is contained in:
MobiusDevelopment 2020-06-21 06:45:13 +00:00
parent 4379cad634
commit 6ee8feb8a8
34 changed files with 280 additions and 280 deletions

View File

@ -616,11 +616,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3712,16 +3712,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -623,11 +623,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3729,16 +3729,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -623,11 +623,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3751,16 +3751,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -610,11 +610,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3726,16 +3726,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -605,11 +605,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3726,16 +3726,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -605,11 +605,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3738,16 +3738,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -606,11 +606,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3781,16 +3781,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -610,11 +610,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3803,16 +3803,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -714,11 +714,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DECAY_TIME_TASK; public static int DECAY_TIME_TASK;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
@ -3578,16 +3578,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -578,13 +578,13 @@ public class Formulas
if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
@ -647,13 +647,13 @@ public class Formulas
if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
@ -786,35 +786,35 @@ public class Formulas
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (skill != null) if (skill != null)
{ {
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
else if (crit) else if (crit)
{ {
if (lvlDiff >= Config.NPC_CRIT_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_CRIT_DMG_PENALTY.length)
{ {
damage *= Config.NPC_CRIT_DMG_PENALTY.get(Config.NPC_CRIT_DMG_PENALTY.size() - 1); damage *= Config.NPC_CRIT_DMG_PENALTY[Config.NPC_CRIT_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_CRIT_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_CRIT_DMG_PENALTY[lvlDiff];
} }
} }
else else
{ {
if (lvlDiff >= Config.NPC_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_DMG_PENALTY.length)
{ {
damage *= Config.NPC_DMG_PENALTY.get(Config.NPC_DMG_PENALTY.size() - 1); damage *= Config.NPC_DMG_PENALTY[Config.NPC_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_DMG_PENALTY[lvlDiff];
} }
} }
} }
@ -918,13 +918,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
} }
@ -1008,13 +1008,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getOwner() != null) && ((target.getLevel() - attacker.getOwner().getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getOwner() != null) && ((target.getLevel() - attacker.getOwner().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getOwner().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getOwner().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
} }
@ -1438,13 +1438,13 @@ public class Formulas
if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
// general magic resist // general magic resist
@ -1488,13 +1488,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
} }

View File

@ -718,11 +718,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DECAY_TIME_TASK; public static int DECAY_TIME_TASK;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
@ -3585,16 +3585,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -578,13 +578,13 @@ public class Formulas
if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
@ -647,13 +647,13 @@ public class Formulas
if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
penaltyMod *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); penaltyMod *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
@ -786,35 +786,35 @@ public class Formulas
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (skill != null) if (skill != null)
{ {
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
else if (crit) else if (crit)
{ {
if (lvlDiff >= Config.NPC_CRIT_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_CRIT_DMG_PENALTY.length)
{ {
damage *= Config.NPC_CRIT_DMG_PENALTY.get(Config.NPC_CRIT_DMG_PENALTY.size() - 1); damage *= Config.NPC_CRIT_DMG_PENALTY[Config.NPC_CRIT_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_CRIT_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_CRIT_DMG_PENALTY[lvlDiff];
} }
} }
else else
{ {
if (lvlDiff >= Config.NPC_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_DMG_PENALTY.length)
{ {
damage *= Config.NPC_DMG_PENALTY.get(Config.NPC_DMG_PENALTY.size() - 1); damage *= Config.NPC_DMG_PENALTY[Config.NPC_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_DMG_PENALTY[lvlDiff];
} }
} }
} }
@ -918,13 +918,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
} }
@ -1008,13 +1008,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getOwner() != null) && ((target.getLevel() - attacker.getOwner().getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getOwner() != null) && ((target.getLevel() - attacker.getOwner().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getOwner().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getOwner().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
} }
@ -1438,13 +1438,13 @@ public class Formulas
if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if (target.isAttackable() && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
// general magic resist // general magic resist
@ -1488,13 +1488,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attacker.getActingPlayer() != null) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); damage *= Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }
} }

View File

@ -616,11 +616,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3600,16 +3600,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -616,11 +616,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3606,16 +3606,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -616,11 +616,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3606,16 +3606,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -616,11 +616,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3607,16 +3607,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -804,13 +804,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1622,13 +1622,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -616,11 +616,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3616,16 +3616,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -804,13 +804,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1622,13 +1622,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -620,11 +620,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3633,16 +3633,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -804,13 +804,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1622,13 +1622,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }

View File

@ -625,11 +625,11 @@ public class Config
public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean SHOW_CREST_WITHOUT_QUEST;
public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT;
public static int MIN_NPC_LVL_DMG_PENALTY; public static int MIN_NPC_LVL_DMG_PENALTY;
public static Map<Integer, Float> NPC_DMG_PENALTY; public static float[] NPC_DMG_PENALTY;
public static Map<Integer, Float> NPC_CRIT_DMG_PENALTY; public static float[] NPC_CRIT_DMG_PENALTY;
public static Map<Integer, Float> NPC_SKILL_DMG_PENALTY; public static float[] NPC_SKILL_DMG_PENALTY;
public static int MIN_NPC_LVL_MAGIC_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY;
public static Map<Integer, Float> NPC_SKILL_CHANCE_PENALTY; public static float[] NPC_SKILL_CHANCE_PENALTY;
public static int DEFAULT_CORPSE_TIME; public static int DEFAULT_CORPSE_TIME;
public static int SPOILED_CORPSE_EXTEND_TIME; public static int SPOILED_CORPSE_EXTEND_TIME;
public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY;
@ -3632,16 +3632,16 @@ public class Config
/** /**
* @param line the string line to parse * @param line the string line to parse
* @return a parsed float map * @return a parsed float array
*/ */
private static Map<Integer, Float> parseConfigLine(String line) private static float[] parseConfigLine(String line)
{ {
final String[] propertySplit = line.split(","); final String[] propertySplit = line.split(",");
final Map<Integer, Float> ret = new HashMap<>(propertySplit.length); final float[] ret = new float[propertySplit.length];
int i = 0; int i = 0;
for (String value : propertySplit) for (String value : propertySplit)
{ {
ret.put(i++, Float.parseFloat(value)); ret[i++] = Float.parseFloat(value);
} }
return ret; return ret;
} }

View File

@ -803,13 +803,13 @@ public class Formulas
if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3)) if ((attacker.getActingPlayer() != null) && !target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_MAGIC_PENALTY) && ((target.getLevel() - attacker.getActingPlayer().getLevel()) >= 3))
{ {
final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2; final int lvlDiff = target.getLevel() - attacker.getActingPlayer().getLevel() - 2;
if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_CHANCE_PENALTY.length)
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(Config.NPC_SKILL_CHANCE_PENALTY.size() - 1); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[Config.NPC_SKILL_CHANCE_PENALTY.length - 1];
} }
else else
{ {
targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff];
} }
} }
} }
@ -1621,13 +1621,13 @@ public class Formulas
if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2)) if (!target.isRaid() && !target.isRaidMinion() && (target.getLevel() >= Config.MIN_NPC_LVL_DMG_PENALTY) && (attackerPlayer != null) && ((target.getLevel() - attackerPlayer.getLevel()) >= 2))
{ {
final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1; final int lvlDiff = target.getLevel() - attackerPlayer.getLevel() - 1;
if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.size()) if (lvlDiff >= Config.NPC_SKILL_DMG_PENALTY.length)
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(Config.NPC_SKILL_DMG_PENALTY.size() - 1); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[Config.NPC_SKILL_DMG_PENALTY.length - 1];
} }
else else
{ {
pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff];
} }
} }