Index: C:/Documents and Settings/rolar/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/clientpackets/UseItem.java
===================================================================
--- C:/Documents and Settings/rolar/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/clientpackets/UseItem.java (revision 53)
+++ C:/Documents and Settings/rolar/My Documents/Workspace/L2_GameServer_c5/java/net/sf/l2j/gameserver/clientpackets/UseItem.java (working copy)
@@ -55,7 +55,7 @@
* @param decrypt
*/
public UseItem(ByteBuffer buf, ClientThread client)
- {
+ {
super(buf, client);
_objectId = readD();
}
@@ -64,7 +64,7 @@
{
L2PcInstance activeChar = getClient().getActiveChar();
-
+
if (activeChar == null)
return;
@@ -78,6 +78,15 @@
// NOTE: disabled due to deadlocks
// synchronized (activeChar.getInventory())
// {
+
+// Instead of snyc we will use a wait, cause there is an exploit if a player uses an item 5 times within a rally, really, really short amount of time
+
+ try {
+ wait(5);
+ } catch (Exception e) {
+ // do nothing, go forward
+ }
+
L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId);
if (item == null)