From 23c43999ede72ce5cda8f716570c9a5ede4b30be Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 25 Aug 2019 21:10:48 +0000 Subject: [PATCH] Prevent needles calculations by checking first if NPC is champion. --- .../org/l2jmobius/gameserver/model/actor/Attackable.java | 8 ++++---- .../model/actor/instance/CustomNpcInstance.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java index 73704ff611..cdd7e69777 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -1479,9 +1479,9 @@ public class Attackable extends NpcInstance // Prepare for next iteration if dropChance > DropData.MAX_CHANCE dropChance -= DropData.MAX_CHANCE; } - if (Config.L2JMOD_CHAMPION_ENABLE) + if (Config.L2JMOD_CHAMPION_ENABLE && isChampion()) { - if (((drop.getItemId() == 57) || ((drop.getItemId() >= 6360) && (drop.getItemId() <= 6362))) && isChampion()) + if ((drop.getItemId() == 57) || ((drop.getItemId() >= 6360) && (drop.getItemId() <= 6362))) { itemCount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS; } @@ -1778,9 +1778,9 @@ public class Attackable extends NpcInstance // Prepare for next iteration if dropChance > DropData.MAX_CHANCE dropChance -= DropData.MAX_CHANCE; } - if (Config.L2JMOD_CHAMPION_ENABLE) + if (Config.L2JMOD_CHAMPION_ENABLE && isChampion()) { - if (((drop.getItemId() == 57) || ((drop.getItemId() >= 6360) && (drop.getItemId() <= 6362))) && isChampion()) + if ((drop.getItemId() == 57) || ((drop.getItemId() >= 6360) && (drop.getItemId() <= 6362))) { itemCount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS; } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/CustomNpcInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/CustomNpcInstance.java index 43dc805801..0099787d14 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/CustomNpcInstance.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/CustomNpcInstance.java @@ -115,7 +115,7 @@ public class CustomNpcInstance */ public String getTitle() { - return _title == null ? _NpcInstance.getTitle() : _NpcInstance.isChampion() ? "The Champion" + _title : _title; + return _title == null ? _NpcInstance.getTitle() : _NpcInstance.isChampion() ? "The Champion " + _title : _title; } /**