From 420b8409e5de25dcc6b47a44aa82c5c91c45ef63 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 8 Jan 2023 14:31:01 +0000 Subject: [PATCH] Removed stream usage from ArmorSet. --- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- .../java/org/l2jmobius/gameserver/model/ArmorSet.java | 9 ++++++++- 26 files changed, 208 insertions(+), 26 deletions(-) diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ArmorSet.java index b413b5e89a..cf49c26262 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -244,7 +244,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ArmorSet.java index b413b5e89a..cf49c26262 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -244,7 +244,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ArmorSet.java index b413b5e89a..cf49c26262 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -244,7 +244,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/ArmorSet.java index 2a4fda3065..73ac8cb246 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -246,7 +246,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/ArmorSet.java index 2a4fda3065..73ac8cb246 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -246,7 +246,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java index 2a4fda3065..73ac8cb246 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -246,7 +246,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java index 2a4fda3065..73ac8cb246 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -246,7 +246,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/ArmorSet.java index b413b5e89a..cf49c26262 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -244,7 +244,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java index b413b5e89a..cf49c26262 100644 --- a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -244,7 +244,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/ArmorSet.java index b413b5e89a..cf49c26262 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -244,7 +244,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/ArmorSet.java index b413b5e89a..cf49c26262 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -244,7 +244,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/ArmorSet.java index fbfe633ecc..155baa34ca 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -159,7 +159,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Player player, Function idProvider) { - return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : player.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/ArmorSet.java index 36fd25aacf..1e507f32a4 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -243,7 +243,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Playable playable, Function idProvider) { - return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : playable.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/ArmorSet.java index 36fd25aacf..1e507f32a4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -243,7 +243,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Playable playable, Function idProvider) { - return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : playable.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/ArmorSet.java index 36fd25aacf..1e507f32a4 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -243,7 +243,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Playable playable, Function idProvider) { - return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : playable.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /** diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/ArmorSet.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/ArmorSet.java index 36fd25aacf..1e507f32a4 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/ArmorSet.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/model/ArmorSet.java @@ -243,7 +243,14 @@ public class ArmorSet public boolean hasOptionalEquipped(Playable playable, Function idProvider) { - return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item))); + for (Item item : playable.getInventory().getPaperdollItems()) + { + if (CommonUtil.contains(_optionalItems, idProvider.apply(item))) + { + return true; + } + } + return false; } /**