2
0
Эх сурвалжийг харах

BETA: Fixed a minor typo causing stats stacking between herb and inactive buff from herb.
* Fixed a bug caused when picking up a herb while already having a herb of same abnormal type causing `BuffTimeTask` to keep running for that herb and removing it from buffs when time passes infinitely every second.
* Reported by: laxsur, Sdw, Karlson

Nos 11 жил өмнө
parent
commit
8fc1585978

+ 15 - 6
L2J_Server_BETA/java/com/l2jserver/gameserver/model/CharEffectList.java

@@ -629,7 +629,7 @@ public final class CharEffectList
 					// Sets the buff in use again.
 					buff.setInUse(true);
 					// Adds the stats.
-					info.addStats();
+					buff.addStats();
 					// Adds the buff to the stack.
 					if (_stackedEffects != null)
 					{
@@ -1413,7 +1413,7 @@ public final class CharEffectList
 			
 			if (_stackedEffects.containsKey(skill.getAbnormalType()))
 			{
-				final BuffInfo stackedInfo = _stackedEffects.get(skill.getAbnormalType());
+				BuffInfo stackedInfo = _stackedEffects.get(skill.getAbnormalType());
 				// Skills are only replaced if the incoming buff has greater or equal abnormal level.
 				if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl()))
 				{
@@ -1423,10 +1423,19 @@ public final class CharEffectList
 					// But finish task continues to run, and ticks as well.
 					if (skill.isAbnormalInstant())
 					{
-						stackedInfo.setInUse(false);
-						// Remove stats
-						stackedInfo.removeStats();
-						_hiddenBuffs.incrementAndGet();
+						if (stackedInfo.getSkill().isAbnormalInstant())
+						{
+							stopSkillEffects(false, skill.getAbnormalType());
+							stackedInfo = _stackedEffects.get(skill.getAbnormalType());
+						}
+						
+						if (stackedInfo != null)
+						{
+							stackedInfo.setInUse(false);
+							// Remove stats
+							stackedInfo.removeStats();
+							_hiddenBuffs.incrementAndGet();
+						}
 					}
 					// Remove buff that will stack with the abnormal type.
 					else