mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +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
|
||||
UpdateReactives(p_time);
|
||||
|
||||
if (IsAlive())
|
||||
{
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, HealthBelowPct(20));
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, HealthBelowPct(35));
|
||||
ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, HealthAbovePct(75));
|
||||
}
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, IsAlive() ? HealthBelowPct(20) : false);
|
||||
ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, IsAlive() ? HealthBelowPct(35) : false);
|
||||
ModifyAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT, IsAlive() ? HealthBelowPct(75) : false);
|
||||
|
||||
UpdateSplineMovement(p_time);
|
||||
GetMotionMaster()->UpdateMotion(p_time);
|
||||
@@ -13807,10 +13804,6 @@ void Unit::setDeathState(DeathState s, bool despawn)
|
||||
|
||||
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
|
||||
ClearAllReactives();
|
||||
ClearDiminishings();
|
||||
|
||||
Reference in New Issue
Block a user