diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java index ba48e24ee1..a8bd0debb4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/actor/templates/CubicTemplate.java @@ -112,7 +112,20 @@ public class CubicTemplate implements ICubicConditionHolder @Override public boolean validateConditions(Cubic cubic, Creature owner, WorldObject target) { - return _conditions.isEmpty() || _conditions.stream().allMatch(condition -> condition.test(cubic, owner, target)); + if (_conditions.isEmpty()) + { + return true; + } + + for (ICubicCondition condition : _conditions) + { + if (!condition.test(cubic, owner, target)) + { + return false; + } + } + + return true; } @Override