From 1c40195111737ac4ee271819432f1c6c7d3b5f30 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 31 Dec 2021 22:31:29 +0000 Subject: [PATCH] Fixed Elixir use restrictions. Contributed by MacuK. --- .../data/scripts/handlers/itemhandlers/Elixir.java | 14 +++++++------- .../data/scripts/handlers/itemhandlers/Elixir.java | 14 +++++++------- .../data/scripts/handlers/itemhandlers/Elixir.java | 14 +++++++------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/itemhandlers/Elixir.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/itemhandlers/Elixir.java index c9c68b991d..6f5e98599f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/itemhandlers/Elixir.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/handlers/itemhandlers/Elixir.java @@ -36,13 +36,13 @@ public class Elixir extends ItemSkills final int elixirsAvailable = playable.getActingPlayer().getVariables().getInt(PlayerVariables.ELIXIRS_AVAILABLE, 0); final int elixirsUsed = playable.getActingPlayer().getVariables().getInt(PlayerVariables.ELIXIRS_USED, 0) + elixirsAvailable; if ((playable.getLevel() < 76) || // - ((playable.getLevel() >= 87) && (elixirsUsed == 5)) || // - ((playable.getLevel() >= 90) && (elixirsUsed == 10)) || // - ((playable.getLevel() >= 91) && (elixirsUsed == 11)) || // - ((playable.getLevel() >= 92) && (elixirsUsed == 12)) || // - ((playable.getLevel() >= 93) && (elixirsUsed == 13)) || // - ((playable.getLevel() >= 94) && (elixirsUsed == 14)) || // - ((playable.getLevel() >= 95) && (elixirsUsed == 15))) + ((playable.getLevel() < 88) && (elixirsUsed >= 5)) || // + ((playable.getLevel() < 91) && (elixirsUsed >= 10)) || // + ((playable.getLevel() < 92) && (elixirsUsed >= 11)) || // + ((playable.getLevel() < 93) && (elixirsUsed >= 12)) || // + ((playable.getLevel() < 94) && (elixirsUsed >= 13)) || // + ((playable.getLevel() < 95) && (elixirsUsed >= 14)) || // + ((playable.getLevel() < 96) && (elixirsUsed >= 15))) { playable.sendPacket(SystemMessageId.THE_ELIXIR_UNAVAILABLE); return false; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/itemhandlers/Elixir.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/itemhandlers/Elixir.java index c9c68b991d..6f5e98599f 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/itemhandlers/Elixir.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/handlers/itemhandlers/Elixir.java @@ -36,13 +36,13 @@ public class Elixir extends ItemSkills final int elixirsAvailable = playable.getActingPlayer().getVariables().getInt(PlayerVariables.ELIXIRS_AVAILABLE, 0); final int elixirsUsed = playable.getActingPlayer().getVariables().getInt(PlayerVariables.ELIXIRS_USED, 0) + elixirsAvailable; if ((playable.getLevel() < 76) || // - ((playable.getLevel() >= 87) && (elixirsUsed == 5)) || // - ((playable.getLevel() >= 90) && (elixirsUsed == 10)) || // - ((playable.getLevel() >= 91) && (elixirsUsed == 11)) || // - ((playable.getLevel() >= 92) && (elixirsUsed == 12)) || // - ((playable.getLevel() >= 93) && (elixirsUsed == 13)) || // - ((playable.getLevel() >= 94) && (elixirsUsed == 14)) || // - ((playable.getLevel() >= 95) && (elixirsUsed == 15))) + ((playable.getLevel() < 88) && (elixirsUsed >= 5)) || // + ((playable.getLevel() < 91) && (elixirsUsed >= 10)) || // + ((playable.getLevel() < 92) && (elixirsUsed >= 11)) || // + ((playable.getLevel() < 93) && (elixirsUsed >= 12)) || // + ((playable.getLevel() < 94) && (elixirsUsed >= 13)) || // + ((playable.getLevel() < 95) && (elixirsUsed >= 14)) || // + ((playable.getLevel() < 96) && (elixirsUsed >= 15))) { playable.sendPacket(SystemMessageId.THE_ELIXIR_UNAVAILABLE); return false; diff --git a/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/data/scripts/handlers/itemhandlers/Elixir.java b/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/data/scripts/handlers/itemhandlers/Elixir.java index c9c68b991d..6f5e98599f 100644 --- a/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/data/scripts/handlers/itemhandlers/Elixir.java +++ b/L2J_Mobius_Essence_6.0_BattleChronicle/dist/game/data/scripts/handlers/itemhandlers/Elixir.java @@ -36,13 +36,13 @@ public class Elixir extends ItemSkills final int elixirsAvailable = playable.getActingPlayer().getVariables().getInt(PlayerVariables.ELIXIRS_AVAILABLE, 0); final int elixirsUsed = playable.getActingPlayer().getVariables().getInt(PlayerVariables.ELIXIRS_USED, 0) + elixirsAvailable; if ((playable.getLevel() < 76) || // - ((playable.getLevel() >= 87) && (elixirsUsed == 5)) || // - ((playable.getLevel() >= 90) && (elixirsUsed == 10)) || // - ((playable.getLevel() >= 91) && (elixirsUsed == 11)) || // - ((playable.getLevel() >= 92) && (elixirsUsed == 12)) || // - ((playable.getLevel() >= 93) && (elixirsUsed == 13)) || // - ((playable.getLevel() >= 94) && (elixirsUsed == 14)) || // - ((playable.getLevel() >= 95) && (elixirsUsed == 15))) + ((playable.getLevel() < 88) && (elixirsUsed >= 5)) || // + ((playable.getLevel() < 91) && (elixirsUsed >= 10)) || // + ((playable.getLevel() < 92) && (elixirsUsed >= 11)) || // + ((playable.getLevel() < 93) && (elixirsUsed >= 12)) || // + ((playable.getLevel() < 94) && (elixirsUsed >= 13)) || // + ((playable.getLevel() < 95) && (elixirsUsed >= 14)) || // + ((playable.getLevel() < 96) && (elixirsUsed >= 15))) { playable.sendPacket(SystemMessageId.THE_ELIXIR_UNAVAILABLE); return false;