From 93f9468612d58a8f713beee4c21373ab85a16190 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 21 Oct 2020 21:22:17 +0000 Subject: [PATCH] Check auto use potions by item isPotion method. --- .../autoplay/ExRequestActivateAutoShortcut.java | 6 +++--- .../autoplay/ExRequestActivateAutoShortcut.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java index b845c7d093..9411b3bf7b 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java @@ -74,7 +74,7 @@ public class ExRequestActivateAutoShortcut implements IClientIncomingPacket if (item != null) { // auto supply - if (_room > 263) + if (!item.isPotion()) { AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, item.getId()); } @@ -92,10 +92,10 @@ public class ExRequestActivateAutoShortcut implements IClientIncomingPacket } // start - if (_room > 263) + if ((item != null) && !item.isPotion()) { // auto supply - if (Config.ENABLE_AUTO_ITEM && (item != null)) + if (Config.ENABLE_AUTO_ITEM) { AutoUseTaskManager.getInstance().addAutoSupplyItem(player, item.getId()); } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java index b845c7d093..9411b3bf7b 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/network/clientpackets/autoplay/ExRequestActivateAutoShortcut.java @@ -74,7 +74,7 @@ public class ExRequestActivateAutoShortcut implements IClientIncomingPacket if (item != null) { // auto supply - if (_room > 263) + if (!item.isPotion()) { AutoUseTaskManager.getInstance().removeAutoSupplyItem(player, item.getId()); } @@ -92,10 +92,10 @@ public class ExRequestActivateAutoShortcut implements IClientIncomingPacket } // start - if (_room > 263) + if ((item != null) && !item.isPotion()) { // auto supply - if (Config.ENABLE_AUTO_ITEM && (item != null)) + if (Config.ENABLE_AUTO_ITEM) { AutoUseTaskManager.getInstance().addAutoSupplyItem(player, item.getId()); }