Forráskód Böngészése

Cannot use items during fear. thx Gnacik.

JIV 15 éve
szülő
commit
809bc519ba

+ 8 - 0
L2_GameServer/java/com/l2jserver/gameserver/network/clientpackets/UseItem.java

@@ -99,6 +99,14 @@ public final class UseItem extends L2GameClientPacket
 		if (activeChar.getActiveTradeList() != null)
 		if (activeChar.getActiveTradeList() != null)
 			activeChar.cancelActiveTrade();
 			activeChar.cancelActiveTrade();
 
 
+		// cannot use items during Fear (possible more abnormal states?)
+		if (activeChar.isAfraid())
+		{
+			// no sysmsg
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
 		// NOTE: disabled due to deadlocks
 		// NOTE: disabled due to deadlocks
 		// synchronized (activeChar.getInventory())
 		// synchronized (activeChar.getInventory())
 		// 	{
 		// 	{