Browse Source

Deadlock fix

Julian 17 năm trước cách đây
mục cha
commit
80de9e48d8

+ 2 - 1
L2_GameServer/java/net/sf/l2j/gameserver/model/actor/status/CharStatus.java

@@ -393,10 +393,11 @@ public class CharStatus
     public final void setCurrentHp(double newHp, boolean broadcastPacket)
     {
         // Get the Max HP of the L2Character
-        double maxHp = getActiveChar().getStat().getMaxHp();
+        double maxHp;
         
         synchronized (this)
         {
+        	maxHp = getActiveChar().getStat().getMaxHp();
             if (getActiveChar().isDead()) return;
         	if (newHp >= maxHp)
             {