浏览代码

BETA: Fixing toggle skills icon not being displayed when the skill was activated.
* Minor improvement to stopAllEffects()

Zoey76 12 年之前
父节点
当前提交
a96c0646d0
共有 1 个文件被更改,包括 19 次插入4 次删除
  1. 19 4
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/CharEffectList.java

+ 19 - 4
L2J_Server_BETA/java/com/l2jserver/gameserver/model/CharEffectList.java

@@ -420,11 +420,24 @@ public final class CharEffectList
 	 */
 	public final void stopAllEffects()
 	{
-		for (L2Effect e : getAllEffects())
+		if (hasBuffs())
 		{
-			if (e != null)
+			for (L2Effect e : _buffs)
 			{
-				e.exit(true); // Exit them
+				if (e != null)
+				{
+					e.exit(true); // Exit them
+				}
+			}
+		}
+		if (hasDebuffs())
+		{
+			for (L2Effect e : _debuffs)
+			{
+				if (e != null)
+				{
+					e.exit(true); // Exit them
+				}
 			}
 		}
 	}
@@ -477,7 +490,6 @@ public final class CharEffectList
 				}
 			}
 		}
-		
 		if (hasDebuffs())
 		{
 			for (L2Effect e : _debuffs)
@@ -932,6 +944,9 @@ public final class CharEffectList
 			// Effects without abnormal shouldn't stack.
 			if (skill.getAbnormalType().isNone())
 			{
+				// Update effect flags and icons.
+				computeEffectFlags();
+				updateEffectIcons();
 				return;
 			}