All pastes #40196 Raw Edit

Stuff

public java v1 · immutable
#40196 ·published 2006-02-05 21:02 UTC
rendered paste body
Index: C:/eclipse/workspace/L2_GameServer/java/net/sf/l2j/gameserver/clientpackets/SendWareHouseWithDrawList.java===================================================================--- C:/eclipse/workspace/L2_GameServer/java/net/sf/l2j/gameserver/clientpackets/SendWareHouseWithDrawList.java	(revision 2237)+++ C:/eclipse/workspace/L2_GameServer/java/net/sf/l2j/gameserver/clientpackets/SendWareHouseWithDrawList.java	(working copy)@@ -23,6 +23,7 @@  import net.sf.l2j.gameserver.ClientThread; import net.sf.l2j.gameserver.ItemTable;+import net.sf.l2j.gameserver.lib.Log; import net.sf.l2j.gameserver.model.L2Clan; import net.sf.l2j.gameserver.model.L2FolkInstance; import net.sf.l2j.gameserver.model.L2ItemInstance;@@ -87,9 +88,17 @@ 			int objectId = _items[i * 2 + 0]; 			int count  = _items[i * 2 + 1];             -            L2ItemInstance old = L2ItemInstance.restoreFromDb(objectId); +            L2ItemInstance old = L2ItemInstance.restoreFromDb(objectId);+            if(old.getCount() < count)+            {+                _log.warning("[SendWarehouseWithdrawList] player "+activeChar.getName()+" tried to retrive more items than he has, hack?!");+                activeChar.sendMessage("You are kicked for illegal action, GM informed."+" owner: "+activeChar.getName());+                activeChar.closeNetConnection();+                return;+            }+ 			L2ItemInstance inst = ItemTable.getInstance().createItem(old.getItemId());-			+                         if((!inst.isStackable() && count > 1) || (!old.isStackable() && count > 1))             {                 _log.warning("[SendWarehouseWithdrawList] count > 1 but item is not stackable! oid: "+objectId);@@ -145,6 +154,9 @@ 			for (int i = 0; i < items.length; i++) 			{                 L2ItemInstance old = warehouse2.destroyItem(items[i].getItemId(), items[i].getCount());+                +                Log.addEvent(activeChar,"[SendWarehouseWithdrawList] "+old.getItemId()+":"+items[i].getCount());+                                 if(old == null)                 {                     continue;