From 0d5271fe34a7ed470ccfb43a52b36eaa351fcb32 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 29 Sep 2017 22:45:04 +0000 Subject: [PATCH] Proper instant extract for stackable items. --- .../data/scripts/handlers/itemhandlers/ExtractableItems.java | 5 +++-- .../data/scripts/handlers/itemhandlers/ExtractableItems.java | 5 +++-- .../data/scripts/handlers/itemhandlers/ExtractableItems.java | 5 +++-- .../data/scripts/handlers/itemhandlers/ExtractableItems.java | 3 ++- .../data/scripts/handlers/itemhandlers/ExtractableItems.java | 5 +++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java index 473414385b..16a703c486 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java @@ -23,6 +23,7 @@ import java.util.Map; import com.l2jmobius.Config; import com.l2jmobius.commons.util.Rnd; +import com.l2jmobius.gameserver.datatables.ItemTable; import com.l2jmobius.gameserver.handler.IItemHandler; import com.l2jmobius.gameserver.model.L2ExtractableProduct; import com.l2jmobius.gameserver.model.actor.L2Playable; @@ -108,7 +109,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0) @@ -156,7 +157,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0) diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java index 473414385b..16a703c486 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java @@ -23,6 +23,7 @@ import java.util.Map; import com.l2jmobius.Config; import com.l2jmobius.commons.util.Rnd; +import com.l2jmobius.gameserver.datatables.ItemTable; import com.l2jmobius.gameserver.handler.IItemHandler; import com.l2jmobius.gameserver.model.L2ExtractableProduct; import com.l2jmobius.gameserver.model.actor.L2Playable; @@ -108,7 +109,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0) @@ -156,7 +157,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0) diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java index 473414385b..16a703c486 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java @@ -23,6 +23,7 @@ import java.util.Map; import com.l2jmobius.Config; import com.l2jmobius.commons.util.Rnd; +import com.l2jmobius.gameserver.datatables.ItemTable; import com.l2jmobius.gameserver.handler.IItemHandler; import com.l2jmobius.gameserver.model.L2ExtractableProduct; import com.l2jmobius.gameserver.model.actor.L2Playable; @@ -108,7 +109,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0) @@ -156,7 +157,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0) diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java index d1010c8fd2..3dfeef161e 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java @@ -19,6 +19,7 @@ package handlers.itemhandlers; import java.util.List; import com.l2jmobius.Config; +import com.l2jmobius.gameserver.datatables.ItemTable; import com.l2jmobius.gameserver.handler.IItemHandler; import com.l2jmobius.gameserver.model.L2ExtractableProduct; import com.l2jmobius.gameserver.model.actor.L2Playable; @@ -72,7 +73,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, true); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java index 473414385b..16a703c486 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/itemhandlers/ExtractableItems.java @@ -23,6 +23,7 @@ import java.util.Map; import com.l2jmobius.Config; import com.l2jmobius.commons.util.Rnd; +import com.l2jmobius.gameserver.datatables.ItemTable; import com.l2jmobius.gameserver.handler.IItemHandler; import com.l2jmobius.gameserver.model.L2ExtractableProduct; import com.l2jmobius.gameserver.model.actor.L2Playable; @@ -108,7 +109,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0) @@ -156,7 +157,7 @@ public class ExtractableItems implements IItemHandler continue; } - if (item.isStackable() || (createItemAmount == 1)) + if (ItemTable.getInstance().getTemplate(expi.getId()).isStackable() || (createItemAmount == 1)) { final L2ItemInstance newItem = activeChar.addItem("Extract", expi.getId(), createItemAmount, activeChar, false); if (expi.getMaxEnchant() > 0)