瀏覽代碼

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 年之前
父節點
當前提交
a19c621cc5
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      L2_GameServer/java/com/l2jserver/gameserver/model/L2Effect.java

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

@@ -495,11 +495,6 @@ public abstract class L2Effect
 			}
 			}
 			case FINISHING:
 			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 the time left is equal to zero, send the message
 				if (_count == 0 && _icon && getEffected() instanceof L2PcInstance)
 				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
 				// Stop the task of the L2Effect, remove it and update client magic icon
 				stopEffectTask();
 				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)
 				if (_skill.getAfterEffectId() > 0)
 				{
 				{
 					L2Skill skill = SkillTable.getInstance().getInfo(_skill.getAfterEffectId(), _skill.getAfterEffectLvl());
 					L2Skill skill = SkillTable.getInstance().getInfo(_skill.getAfterEffectId(), _skill.getAfterEffectLvl());