diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/util/Rnd.java b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/util/Rnd.java index 94cd128b42..d1ccd93409 100644 --- a/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/util/Rnd.java +++ b/L2J_Mobius_C1_HarbingersOfWar/java/org/l2jmobius/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /** diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/commons/util/Rnd.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/commons/util/Rnd.java index c1b4eaf12d..b186827400 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/commons/util/Rnd.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/commons/util/Rnd.java @@ -50,7 +50,7 @@ public class Rnd */ public static int get(int bound) { - return ThreadLocalRandom.current().nextInt(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextInt(bound); } /** @@ -77,7 +77,7 @@ public class Rnd */ public static long get(long bound) { - return ThreadLocalRandom.current().nextLong(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextLong(bound); } /** @@ -104,7 +104,7 @@ public class Rnd */ public static double get(double bound) { - return ThreadLocalRandom.current().nextDouble(bound); + return bound <= 0 ? 0 : ThreadLocalRandom.current().nextDouble(bound); } /**