mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/Units): Modify health dependent aura states on update rather than immediately on death. (#9641)
This commit is contained in:
@@ -479,12 +479,9 @@ void Unit::Update(uint32 p_time)
|
|||||||
// update abilities available only for fraction of time
|
// update abilities available only for fraction of time
|
||||||
UpdateReactives(p_time);
|
UpdateReactives(p_time);
|
||||||
|
|
||||||
if (IsAlive())
|
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, IsAlive() ? HealthBelowPct(20) : false);
|
||||||
{
|
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, IsAlive() ? HealthBelowPct(35) : false);
|
||||||
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, HealthBelowPct(20));
|
ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, IsAlive() ? HealthBelowPct(75) : false);
|
||||||
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, HealthBelowPct(35));
|
|
||||||
ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, HealthAbovePct(75));
|
|
||||||
}
|
|
||||||
|
|
||||||
UpdateSplineMovement(p_time);
|
UpdateSplineMovement(p_time);
|
||||||
GetMotionMaster()->UpdateMotion(p_time);
|
GetMotionMaster()->UpdateMotion(p_time);
|
||||||
@@ -13807,10 +13804,6 @@ void Unit::setDeathState(DeathState s, bool despawn)
|
|||||||
|
|
||||||
if (s == JUST_DIED)
|
if (s == JUST_DIED)
|
||||||
{
|
{
|
||||||
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
|
|
||||||
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
|
||||||
ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, false);
|
|
||||||
|
|
||||||
// remove aurastates allowing special moves
|
// remove aurastates allowing special moves
|
||||||
ClearAllReactives();
|
ClearAllReactives();
|
||||||
ClearDiminishings();
|
ClearDiminishings();
|
||||||
|
|||||||
Reference in New Issue
Block a user