diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/EffectList.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/EffectList.java index a42851d4f1..9fcc5d0086 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/EffectList.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/EffectList.java @@ -603,8 +603,7 @@ public class EffectList { _hiddenBuffs.decrementAndGet(); } - // Removes the buff from the stack. - else + else // Removes the buff from the stack. { _stackedEffects.remove(info.getSkill().getAbnormalType()); } @@ -1425,8 +1424,7 @@ public class EffectList { stopSkillEffects(false, skill); } - // Verify stacked skills. - else + else // Verify stacked skills. { synchronized (this) { @@ -1436,34 +1434,25 @@ public class EffectList // Skills are only replaced if the incoming buff has greater or equal abnormal level. if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl())) { + stopSkillEffects(false, skill.getAbnormalType()); + // 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()) + if (stackedInfo.getSkill().isAbnormalInstant()) { - 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(); - } + stackedInfo = _stackedEffects.get(skill.getAbnormalType()); } - // Remove buff that will stack with the abnormal type. - else + + if (stackedInfo != null) { - stopSkillEffects(false, skill.getAbnormalType()); + stackedInfo.setInUse(false); + stackedInfo.removeStats(); + _hiddenBuffs.incrementAndGet(); } } - // If the new buff is a lesser buff, then don't add it. - else + else // If the new buff is a lesser buff, then don't add it. { return; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/EffectList.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/EffectList.java index 7af9bbcfe2..b548dcb75f 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/EffectList.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/EffectList.java @@ -604,8 +604,7 @@ public class EffectList { _hiddenBuffs.decrementAndGet(); } - // Removes the buff from the stack. - else + else // Removes the buff from the stack. { _stackedEffects.remove(info.getSkill().getAbnormalType()); } @@ -1426,8 +1425,7 @@ public class EffectList { stopSkillEffects(false, skill); } - // Verify stacked skills. - else + else // Verify stacked skills. { synchronized (this) { @@ -1437,34 +1435,25 @@ public class EffectList // Skills are only replaced if the incoming buff has greater or equal abnormal level. if ((stackedInfo != null) && (skill.getAbnormalLvl() >= stackedInfo.getSkill().getAbnormalLvl())) { + stopSkillEffects(false, skill.getAbnormalType()); + // 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()) + if (stackedInfo.getSkill().isAbnormalInstant()) { - 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(); - } + stackedInfo = _stackedEffects.get(skill.getAbnormalType()); } - // Remove buff that will stack with the abnormal type. - else + + if (stackedInfo != null) { - stopSkillEffects(false, skill.getAbnormalType()); + stackedInfo.setInUse(false); + stackedInfo.removeStats(); + _hiddenBuffs.incrementAndGet(); } } - // If the new buff is a lesser buff, then don't add it. - else + else // If the new buff is a lesser buff, then don't add it. { return; }