Core/Spells: re-send aura effect values when a aura with SPELL_ATTR8_AURA_SEND_AMOUNT gets its amount changed

This commit is contained in:
Ovahlord
2020-04-11 10:26:34 +02:00
parent 3658cafca0
commit 04f05896e2
2 changed files with 10 additions and 1 deletions

View File

@@ -478,6 +478,15 @@ void AuraEffect::GetApplicationList(Container& applicationContainer) const
}
}
void AuraEffect::SetAmount(int32 amount)
{
m_amount = amount;
m_canBeRecalculated = false;
if (GetSpellInfo()->HasAttribute(SPELL_ATTR8_AURA_SEND_AMOUNT))
GetBase()->SetNeedClientUpdateForTargets();
}
int32 AuraEffect::CalculateAmount(Unit* caster)
{
// default amount calculation

View File

@@ -55,7 +55,7 @@ class TC_GAME_API AuraEffect
int32 GetMiscValue() const { return m_spellInfo->Effects[m_effIndex].MiscValue; }
AuraType GetAuraType() const { return (AuraType)m_spellInfo->Effects[m_effIndex].ApplyAuraName; }
int32 GetAmount() const { return m_amount; }
void SetAmount(int32 amount) { m_amount = amount; m_canBeRecalculated = false;}
void SetAmount(int32 amount);
int32 GetPeriodicTimer() const { return m_periodicTimer; }
void SetPeriodicTimer(int32 periodicTimer) { m_periodicTimer = periodicTimer; }