diff options
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r-- | src/game/SpellAuras.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 2a420a3c7f2..4cb094f06c5 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3316,7 +3316,7 @@ void AuraEffect::HandleAuraMounted(bool apply, bool Real, bool /*changeAmount*/) //some mounts like Headless Horseman's Mount or broom stick are skill based spell // need to remove ALL arura related to mounts, this will stop client crash with broom stick // and never endless flying after using Headless Horseman's Mount - m_target->RemoveAurasByType(SPELL_AURA_MOUNTED); + m_target->RemoveAurasByType(SPELL_AURA_MOUNTED); } } @@ -5109,7 +5109,11 @@ void AuraEffect::HandleAuraModIncreaseEnergyPercent(bool apply, bool /*Real*/, b void AuraEffect::HandleAuraModIncreaseHealthPercent(bool apply, bool /*Real*/, bool /*changeAmount*/) { + // Unit will keep hp% after MaxHealth being modified if unit is alive. + float percent = ((float)m_target->GetHealth()) / m_target->GetMaxHealth(); m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(m_amount), apply); + if (m_target->isAlive()) + m_target->SetHealth(uint32(m_target->GetMaxHealth()*percent)); } void AuraEffect::HandleAuraIncreaseBaseHealthPercent(bool apply, bool /*Real*/, bool /*changeAmount*/) |