From 2abbecfe3932a7e3a0f99908f1d01e3732148cc4 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 18 Apr 2022 13:48:56 +0000 Subject: [PATCH] Skip zero chance drops. --- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- .../gameserver/model/actor/templates/NpcTemplate.java | 8 +++++++- 25 files changed, 175 insertions(+), 25 deletions(-) diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ac2e781d20..b9492fa918 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index cc351df40b..e17db080cb 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index cc351df40b..e17db080cb 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index cc351df40b..e17db080cb 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index cc351df40b..e17db080cb 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index 8eabde087d..9125ef09a7 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -711,7 +711,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -784,6 +784,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index 8eabde087d..9125ef09a7 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -711,7 +711,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -784,6 +784,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ee7111e3d3..66af22e7aa 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -773,7 +773,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -846,6 +846,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ee7111e3d3..66af22e7aa 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -773,7 +773,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -846,6 +846,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index ee7111e3d3..66af22e7aa 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -773,7 +773,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -846,6 +846,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index c026014db0..5252226bbf 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -788,7 +788,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -861,6 +861,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index c026014db0..5252226bbf 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -788,7 +788,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -861,6 +861,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index c026014db0..5252226bbf 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -788,7 +788,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -861,6 +861,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index 997fe17402..0f5a582a78 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -772,7 +772,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -845,6 +845,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index 4a0fb60b2e..cf067f42b6 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -787,7 +787,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -860,6 +860,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index 4a0fb60b2e..cf067f42b6 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -787,7 +787,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -860,6 +860,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index 4a0fb60b2e..cf067f42b6 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -787,7 +787,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -860,6 +860,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer); diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java index 4a0fb60b2e..cf067f42b6 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/actor/templates/NpcTemplate.java @@ -787,7 +787,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable final Float itemChance = Config.RATE_DROP_CHANCE_BY_ID.get(itemId); if (itemChance != null) { - if (itemChance == 0) + if (itemChance <= 0) { continue; } @@ -860,6 +860,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable continue; } + // skip zero chance drops + if ((Config.RATE_DROP_CHANCE_BY_ID.getOrDefault(dropItem.getItemId(), 0f) <= 0)) + { + continue; + } + // create the drop final ItemHolder drop = calculateGroupDrop(dropItem, victim, killer);