From 9affd414552d021e204064dbc7dc50fe1b33cdfa Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 8 Jan 2023 13:06:55 +0000 Subject: [PATCH] Removed stream usage from CriticalRate effect. --- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- .../handlers/effecthandlers/CriticalRate.java | 31 ++++++++++++------- 26 files changed, 520 insertions(+), 286 deletions(-) diff --git a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_01.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_02.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_03.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_04.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_05.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_05.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_06.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_10.2_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_10.3_MasterClass/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_1.0/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_2.5_Zaken/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_2.7_Antharas/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_2.9.5_Saviors/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } } diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java index c38e13e58c..906a31d4c4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/effecthandlers/CriticalRate.java @@ -18,11 +18,12 @@ package handlers.effecthandlers; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.actor.Creature; +import org.l2jmobius.gameserver.model.conditions.Condition; import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.model.stats.Stat; /** - * @author Sdw + * @author Sdw, Mobius */ public class CriticalRate extends AbstractConditionalHpEffect { @@ -34,21 +35,29 @@ public class CriticalRate extends AbstractConditionalHpEffect @Override public void pump(Creature effected, Skill skill) { - if (_conditions.isEmpty() || _conditions.stream().allMatch(cond -> cond.test(effected, effected, skill))) + if (!_conditions.isEmpty()) { - switch (_mode) + for (Condition cond : _conditions) { - case DIFF: + if (!cond.test(effected, effected, skill)) { - effected.getStat().mergeAdd(_addStat, _amount); - break; - } - case PER: - { - effected.getStat().mergeMul(_mulStat, (_amount / 100)); - break; + return; } } } + + switch (_mode) + { + case DIFF: + { + effected.getStat().mergeAdd(_addStat, _amount); + break; + } + case PER: + { + effected.getStat().mergeMul(_mulStat, (_amount / 100)); + break; + } + } } }