From 20d41b87ddcc700d29e2a3a28c0436efd305f2a3 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 24 Dec 2022 08:19:23 +0000 Subject: [PATCH] Updated Elixir item handler usage limit by level. Contributed by petryxa. --- .../scripts/handlers/itemhandlers/Elixir.java | 18 +++++++++++------- .../scripts/handlers/itemhandlers/Elixir.java | 18 +++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/itemhandlers/Elixir.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/itemhandlers/Elixir.java index 6f5e98599f..f5b82a5c52 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/itemhandlers/Elixir.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/handlers/itemhandlers/Elixir.java @@ -36,13 +36,17 @@ 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() < 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.getLevel() < 85) && (elixirsUsed >= 5)) || // + ((playable.getLevel() < 87) && (elixirsUsed >= 7)) || // + ((playable.getLevel() < 88) && (elixirsUsed >= 9)) || // + ((playable.getLevel() < 89) && (elixirsUsed >= 11)) || // + ((playable.getLevel() < 90) && (elixirsUsed >= 13)) || // + ((playable.getLevel() < 91) && (elixirsUsed >= 15)) || // + ((playable.getLevel() < 92) && (elixirsUsed >= 17)) || // + ((playable.getLevel() < 93) && (elixirsUsed >= 19)) || // + ((playable.getLevel() < 94) && (elixirsUsed >= 21)) || // + ((playable.getLevel() < 95) && (elixirsUsed >= 23)) || // + ((playable.getLevel() < 96) && (elixirsUsed >= 25))) { playable.sendPacket(SystemMessageId.THE_ELIXIR_UNAVAILABLE); return false; diff --git a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/itemhandlers/Elixir.java b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/itemhandlers/Elixir.java index 6f5e98599f..f5b82a5c52 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/itemhandlers/Elixir.java +++ b/L2J_Mobius_Essence_6.3_Crusader/dist/game/data/scripts/handlers/itemhandlers/Elixir.java @@ -36,13 +36,17 @@ 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() < 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.getLevel() < 85) && (elixirsUsed >= 5)) || // + ((playable.getLevel() < 87) && (elixirsUsed >= 7)) || // + ((playable.getLevel() < 88) && (elixirsUsed >= 9)) || // + ((playable.getLevel() < 89) && (elixirsUsed >= 11)) || // + ((playable.getLevel() < 90) && (elixirsUsed >= 13)) || // + ((playable.getLevel() < 91) && (elixirsUsed >= 15)) || // + ((playable.getLevel() < 92) && (elixirsUsed >= 17)) || // + ((playable.getLevel() < 93) && (elixirsUsed >= 19)) || // + ((playable.getLevel() < 94) && (elixirsUsed >= 21)) || // + ((playable.getLevel() < 95) && (elixirsUsed >= 23)) || // + ((playable.getLevel() < 96) && (elixirsUsed >= 25))) { playable.sendPacket(SystemMessageId.THE_ELIXIR_UNAVAILABLE); return false;