diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java index 3c91d718c3..bd91a4571d 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java @@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.item.type.EtcItemType; import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse; import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer; +import org.l2jmobius.gameserver.model.itemcontainer.PlayerWarehouse; import org.l2jmobius.gameserver.network.GameClient; import org.l2jmobius.gameserver.network.PacketLogger; import org.l2jmobius.gameserver.network.SystemMessageId; @@ -227,6 +228,11 @@ public class SendWareHouseDepositList implements IClientIncomingPacket continue; } + if (!oldItem.isAvailable(player, true, warehouse instanceof PlayerWarehouse)) + { + continue; + } + final int itemId = oldItem.getItemId(); if (((itemId >= 6611) && (itemId <= 6621)) || (itemId == 6842)) { diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java index 736804403b..e854fa8d79 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java @@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.network.serverpackets.EnchantResult; import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.ItemList; import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate; +import org.l2jmobius.gameserver.util.Util; public class SendWareHouseWithDrawList implements IClientIncomingPacket { @@ -138,10 +139,12 @@ public class SendWareHouseWithDrawList implements IClientIncomingPacket // Calculate needed slots final Item item = warehouse.getItemByObjectId(objectId); - if (item == null) + if ((item == null) || (item.getCount() < count)) { - continue; + Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to withdraw non-existent item from warehouse.", Config.DEFAULT_PUNISH); + return; } + weight += count * item.getItem().getWeight(); if (!item.isStackable()) { diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java index 93c5d159a6..f3fc60157c 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseDepositList.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.item.type.EtcItemType; import org.l2jmobius.gameserver.model.itemcontainer.ClanWarehouse; import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer; +import org.l2jmobius.gameserver.model.itemcontainer.PlayerWarehouse; import org.l2jmobius.gameserver.network.GameClient; import org.l2jmobius.gameserver.network.PacketLogger; import org.l2jmobius.gameserver.network.SystemMessageId; @@ -228,6 +229,11 @@ public class SendWareHouseDepositList implements IClientIncomingPacket continue; } + if (!oldItem.isAvailable(player, true, warehouse instanceof PlayerWarehouse)) + { + continue; + } + final int itemId = oldItem.getItemId(); if (((itemId >= 6611) && (itemId <= 6621)) || (itemId == 6842)) { diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java index 736804403b..e854fa8d79 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/SendWareHouseWithDrawList.java @@ -33,6 +33,7 @@ import org.l2jmobius.gameserver.network.serverpackets.EnchantResult; import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.ItemList; import org.l2jmobius.gameserver.network.serverpackets.StatusUpdate; +import org.l2jmobius.gameserver.util.Util; public class SendWareHouseWithDrawList implements IClientIncomingPacket { @@ -138,10 +139,12 @@ public class SendWareHouseWithDrawList implements IClientIncomingPacket // Calculate needed slots final Item item = warehouse.getItemByObjectId(objectId); - if (item == null) + if ((item == null) || (item.getCount() < count)) { - continue; + Util.handleIllegalPlayerAction(player, "Warning!! Character " + player.getName() + " of account " + player.getAccountName() + " tried to withdraw non-existent item from warehouse.", Config.DEFAULT_PUNISH); + return; } + weight += count * item.getItem().getWeight(); if (!item.isStackable()) {