Fixed triggered buffs stacking.
Contributed by Sahar.
This commit is contained in:
parent
2eca7d1f99
commit
88a3b5b381
@ -1218,49 +1218,52 @@ public class EffectList
|
|||||||
// Verify stacked skills.
|
// Verify stacked skills.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_stackedEffects.containsKey(skill.getAbnormalType()))
|
synchronized (this)
|
||||||
{
|
{
|
||||||
BuffInfo stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
if (_stackedEffects.containsKey(skill.getAbnormalType()))
|
||||||
// Skills are only replaced if the incoming buff has greater or equal abnormal level.
|
|
||||||
if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl()))
|
|
||||||
{
|
{
|
||||||
// If it is an herb, set as not in use the lesser buff.
|
BuffInfo stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
||||||
// Effect will be present in the effect list.
|
// Skills are only replaced if the incoming buff has greater or equal abnormal level.
|
||||||
// Effects stats are removed and onActionTime() is not called.
|
if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl()))
|
||||||
// But finish task continues to run, and ticks as well.
|
|
||||||
if (skill.isAbnormalInstant())
|
|
||||||
{
|
{
|
||||||
if (stackedInfo.getSkill().isAbnormalInstant())
|
// If it is an herb, set as not in use the lesser buff.
|
||||||
|
// Effect will be present in the effect list.
|
||||||
|
// Effects stats are removed and onActionTime() is not called.
|
||||||
|
// But finish task continues to run, and ticks as well.
|
||||||
|
if (skill.isAbnormalInstant())
|
||||||
{
|
{
|
||||||
stopSkillEffects(false, skill.getAbnormalType());
|
if (stackedInfo.getSkill().isAbnormalInstant())
|
||||||
stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
{
|
||||||
}
|
stopSkillEffects(false, skill.getAbnormalType());
|
||||||
|
stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
||||||
|
}
|
||||||
|
|
||||||
if (stackedInfo != null)
|
if (stackedInfo != null)
|
||||||
|
{
|
||||||
|
stackedInfo.setInUse(false);
|
||||||
|
// Remove stats
|
||||||
|
stackedInfo.removeStats();
|
||||||
|
_hiddenBuffs.incrementAndGet();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Remove buff that will stack with the abnormal type.
|
||||||
|
else
|
||||||
{
|
{
|
||||||
stackedInfo.setInUse(false);
|
if (stackedInfo.getSkill().isAbnormalInstant())
|
||||||
// Remove stats
|
{
|
||||||
stackedInfo.removeStats();
|
stopSkillEffects(false, skill.getAbnormalType());
|
||||||
_hiddenBuffs.incrementAndGet();
|
}
|
||||||
|
stopSkillEffects(false, skill.getAbnormalType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Remove buff that will stack with the abnormal type.
|
// If the new buff is a lesser buff, then don't add it.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (stackedInfo.getSkill().isAbnormalInstant())
|
return;
|
||||||
{
|
|
||||||
stopSkillEffects(false, skill.getAbnormalType());
|
|
||||||
}
|
|
||||||
stopSkillEffects(false, skill.getAbnormalType());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If the new buff is a lesser buff, then don't add it.
|
_stackedEffects.put(skill.getAbnormalType(), info);
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_stackedEffects.put(skill.getAbnormalType(), info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select the map that holds the effects related to this skill.
|
// Select the map that holds the effects related to this skill.
|
||||||
|
@ -1219,49 +1219,52 @@ public class EffectList
|
|||||||
// Verify stacked skills.
|
// Verify stacked skills.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_stackedEffects.containsKey(skill.getAbnormalType()))
|
synchronized (this)
|
||||||
{
|
{
|
||||||
BuffInfo stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
if (_stackedEffects.containsKey(skill.getAbnormalType()))
|
||||||
// Skills are only replaced if the incoming buff has greater or equal abnormal level.
|
|
||||||
if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl()))
|
|
||||||
{
|
{
|
||||||
// If it is an herb, set as not in use the lesser buff.
|
BuffInfo stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
||||||
// Effect will be present in the effect list.
|
// Skills are only replaced if the incoming buff has greater or equal abnormal level.
|
||||||
// Effects stats are removed and onActionTime() is not called.
|
if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl()))
|
||||||
// But finish task continues to run, and ticks as well.
|
|
||||||
if (skill.isAbnormalInstant())
|
|
||||||
{
|
{
|
||||||
if (stackedInfo.getSkill().isAbnormalInstant())
|
// If it is an herb, set as not in use the lesser buff.
|
||||||
|
// Effect will be present in the effect list.
|
||||||
|
// Effects stats are removed and onActionTime() is not called.
|
||||||
|
// But finish task continues to run, and ticks as well.
|
||||||
|
if (skill.isAbnormalInstant())
|
||||||
{
|
{
|
||||||
stopSkillEffects(false, skill.getAbnormalType());
|
if (stackedInfo.getSkill().isAbnormalInstant())
|
||||||
stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
{
|
||||||
}
|
stopSkillEffects(false, skill.getAbnormalType());
|
||||||
|
stackedInfo = _stackedEffects.get(skill.getAbnormalType());
|
||||||
|
}
|
||||||
|
|
||||||
if (stackedInfo != null)
|
if (stackedInfo != null)
|
||||||
|
{
|
||||||
|
stackedInfo.setInUse(false);
|
||||||
|
// Remove stats
|
||||||
|
stackedInfo.removeStats();
|
||||||
|
_hiddenBuffs.incrementAndGet();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Remove buff that will stack with the abnormal type.
|
||||||
|
else
|
||||||
{
|
{
|
||||||
stackedInfo.setInUse(false);
|
if (stackedInfo.getSkill().isAbnormalInstant())
|
||||||
// Remove stats
|
{
|
||||||
stackedInfo.removeStats();
|
stopSkillEffects(false, skill.getAbnormalType());
|
||||||
_hiddenBuffs.incrementAndGet();
|
}
|
||||||
|
stopSkillEffects(false, skill.getAbnormalType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Remove buff that will stack with the abnormal type.
|
// If the new buff is a lesser buff, then don't add it.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (stackedInfo.getSkill().isAbnormalInstant())
|
return;
|
||||||
{
|
|
||||||
stopSkillEffects(false, skill.getAbnormalType());
|
|
||||||
}
|
|
||||||
stopSkillEffects(false, skill.getAbnormalType());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If the new buff is a lesser buff, then don't add it.
|
_stackedEffects.put(skill.getAbnormalType(), info);
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_stackedEffects.put(skill.getAbnormalType(), info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select the map that holds the effects related to this skill.
|
// Select the map that holds the effects related to this skill.
|
||||||
|
Loading…
Reference in New Issue
Block a user