Browse Source

BETA: Continuation of [6325].
* Fixed a bug caused when activating a buff while having a hidden buff of same abnormal type causing stats stacking between the new buff and the hidden buff.

Reported by: laxsur, maneco, Sdw
Reviewed by: Zoey76
Tested by: Zoey76

Nos 11 years ago
parent
commit
b2e3b95f86

+ 11 - 3
L2J_Server_BETA/java/com/l2jserver/gameserver/model/CharEffectList.java

@@ -608,17 +608,21 @@ public final class CharEffectList
 	{
 		// Stop the buff effects.
 		info.stopAllEffects(false);
+		
 		// If it's a hidden buff that ends, then decrease hidden buff count.
 		if (!info.isInUse())
 		{
 			_hiddenBuffs.decrementAndGet();
 		}
-		// Removes the buff from the given effect list and the stack.
-		effects.remove(info.getSkill().getId());
-		if (_stackedEffects != null)
+		// Removes the buff from the stack.
+		else if (_stackedEffects != null)
 		{
 			_stackedEffects.remove(info.getSkill().getAbnormalType());
 		}
+		
+		// Removes the buff from the given effect list.
+		effects.remove(info.getSkill().getId());
+		
 		// If it's an herb that ends, check if there are hidden buffs.
 		if (info.getSkill().isAbnormalInstant() && hasBuffs())
 		{
@@ -1440,6 +1444,10 @@ public final class CharEffectList
 					// Remove buff that will stack with the abnormal type.
 					else
 					{
+						if (stackedInfo.getSkill().isAbnormalInstant())
+						{
+							stopSkillEffects(false, skill.getAbnormalType());
+						}
 						stopSkillEffects(false, skill.getAbnormalType());
 					}
 				}