diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java index 47555fe10f..1bfb3ad2cd 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java @@ -616,11 +616,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3712,16 +3712,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java index bca1783fed..62538987ef 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java index 54882d9054..05966ec89b 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java @@ -623,11 +623,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3729,16 +3729,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java index bca1783fed..62538987ef 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java index 1991a8eb69..3134828d42 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java @@ -623,11 +623,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3751,16 +3751,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java index bca1783fed..62538987ef 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java index cb0c00e9fe..cf86104404 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java @@ -610,11 +610,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3726,16 +3726,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java index bca1783fed..62538987ef 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java index 6f835d3d01..2bb8a0ff70 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java @@ -605,11 +605,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3726,16 +3726,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java index bca1783fed..62538987ef 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java index e1e0a540ad..2809546fe2 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java @@ -605,11 +605,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3738,16 +3738,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java index bca1783fed..62538987ef 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java index 05c2703c12..11ee99ec8f 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java @@ -606,11 +606,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3781,16 +3781,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java index bca1783fed..62538987ef 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java index b60de3c9a5..c8c2f47390 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java @@ -610,11 +610,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3803,16 +3803,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java index af5c96dd56..ec3b5ea704 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java index e4783034ff..1900134bdc 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/Config.java @@ -714,11 +714,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; @@ -3578,16 +3578,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/stats/Formulas.java index aec2839e45..6a23c3593d 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - 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; 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 { - damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } 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 { - damage *= Config.NPC_CRIT_DMG_PENALTY.get(lvlDiff); + damage *= Config.NPC_CRIT_DMG_PENALTY[lvlDiff]; } } 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 { - 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)) { 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 { - 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)) { 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 { - 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)) { 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 { - targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); + targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff]; } } // 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)) { 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 { - damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java index 68adb3565d..9d3f46943a 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/Config.java @@ -718,11 +718,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DECAY_TIME_TASK; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; @@ -3585,16 +3585,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/stats/Formulas.java index aec2839e45..6a23c3593d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - 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; 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 { - damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } 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 { - damage *= Config.NPC_CRIT_DMG_PENALTY.get(lvlDiff); + damage *= Config.NPC_CRIT_DMG_PENALTY[lvlDiff]; } } 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 { - 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)) { 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 { - 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)) { 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 { - 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)) { 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 { - targetModifier = Config.NPC_SKILL_CHANCE_PENALTY.get(lvlDiff); + targetModifier = Config.NPC_SKILL_CHANCE_PENALTY[lvlDiff]; } } // 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)) { 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 { - damage *= Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + damage *= Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java index e65c02b1e7..cd448c3d80 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java @@ -616,11 +616,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3600,16 +3600,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Formulas.java index af5c96dd56..ec3b5ea704 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java index 8c43bbc973..fea9018dfe 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java @@ -616,11 +616,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3606,16 +3606,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Formulas.java index af5c96dd56..ec3b5ea704 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java index 8c43bbc973..fea9018dfe 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java @@ -616,11 +616,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3606,16 +3606,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Formulas.java index af5c96dd56..ec3b5ea704 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java index 28de5fab34..4771477473 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java @@ -616,11 +616,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3607,16 +3607,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Formulas.java index db6b2dc12d..7c0c992c59 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java index 3e5e3f9735..53c7a56349 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java @@ -616,11 +616,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3616,16 +3616,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Formulas.java index db6b2dc12d..7c0c992c59 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java index 2d7dd4df93..e1b2501018 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java @@ -620,11 +620,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3633,16 +3633,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Formulas.java index db6b2dc12d..7c0c992c59 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } } diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java index a6d70ad8db..01b87505b7 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java @@ -625,11 +625,11 @@ public class Config public static boolean SHOW_CREST_WITHOUT_QUEST; public static boolean ENABLE_RANDOM_ENCHANT_EFFECT; public static int MIN_NPC_LVL_DMG_PENALTY; - public static Map NPC_DMG_PENALTY; - public static Map NPC_CRIT_DMG_PENALTY; - public static Map NPC_SKILL_DMG_PENALTY; + public static float[] NPC_DMG_PENALTY; + public static float[] NPC_CRIT_DMG_PENALTY; + public static float[] NPC_SKILL_DMG_PENALTY; public static int MIN_NPC_LVL_MAGIC_PENALTY; - public static Map NPC_SKILL_CHANCE_PENALTY; + public static float[] NPC_SKILL_CHANCE_PENALTY; public static int DEFAULT_CORPSE_TIME; public static int SPOILED_CORPSE_EXTEND_TIME; public static int CORPSE_CONSUME_SKILL_ALLOWED_TIME_BEFORE_DECAY; @@ -3632,16 +3632,16 @@ public class Config /** * @param line the string line to parse - * @return a parsed float map + * @return a parsed float array */ - private static Map parseConfigLine(String line) + private static float[] parseConfigLine(String line) { final String[] propertySplit = line.split(","); - final Map ret = new HashMap<>(propertySplit.length); + final float[] ret = new float[propertySplit.length]; int i = 0; for (String value : propertySplit) { - ret.put(i++, Float.parseFloat(value)); + ret[i++] = Float.parseFloat(value); } return ret; } diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Formulas.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Formulas.java index af5c96dd56..ec3b5ea704 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Formulas.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Formulas.java @@ -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)) { 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 { - 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)) { 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 { - pvePenalty = Config.NPC_SKILL_DMG_PENALTY.get(lvlDiff); + pvePenalty = Config.NPC_SKILL_DMG_PENALTY[lvlDiff]; } }