Ver código fonte

Some commits from devsvn:
Ugly fix for concurrency problem: mask in effectlist updated only after effect removal, so AI "think" event called too early.
For example, stunned summon stop attack and stuck after stun removed because evtThink called before isStunned() become false.
Problem still persist if more than one effect simultaneously added to the remove queue.

_DS_ 14 anos atrás
pai
commit
a19c621cc5

+ 5 - 5
L2_GameServer/java/com/l2jserver/gameserver/model/L2Effect.java

@@ -495,11 +495,6 @@ public abstract class L2Effect
 			}
 			case FINISHING:
 			{
-				// Cancel the effect in the the abnormal effect map of the L2Character
-				if (getInUse() || !(_count > 1 || _period > 0))
-					if (_startConditionsCorrect)
-						onExit();
-				
 				//If the time left is equal to zero, send the message
 				if (_count == 0 && _icon && getEffected() instanceof L2PcInstance)
 				{
@@ -515,6 +510,11 @@ public abstract class L2Effect
 				// Stop the task of the L2Effect, remove it and update client magic icon
 				stopEffectTask();
 				
+				// Cancel the effect in the the abnormal effect map of the L2Character
+				if (getInUse() || !(_count > 1 || _period > 0))
+					if (_startConditionsCorrect)
+						onExit();
+				
 				if (_skill.getAfterEffectId() > 0)
 				{
 					L2Skill skill = SkillTable.getInstance().getInfo(_skill.getAfterEffectId(), _skill.getAfterEffectLvl());