Core/Auras: Fix refresh of auras with spellmodifiers applied to currently cast spell.
This commit is contained in:
@@ -826,6 +826,7 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode)
|
||||
|
||||
if (refresh)
|
||||
{
|
||||
RefreshSpellMods();
|
||||
RefreshTimers();
|
||||
|
||||
// reset charges
|
||||
@@ -835,6 +836,13 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode)
|
||||
return false;
|
||||
}
|
||||
|
||||
void Aura::RefreshSpellMods()
|
||||
{
|
||||
for (Aura::ApplicationMap::const_iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
|
||||
if (Player * player = appIter->second->GetTarget()->ToPlayer())
|
||||
player->RestoreAllSpellMods(0, this);
|
||||
}
|
||||
|
||||
bool Aura::IsPassive() const
|
||||
{
|
||||
return IsPassiveSpell(GetSpellProto());
|
||||
|
||||
@@ -142,6 +142,8 @@ class Aura
|
||||
void SetStackAmount(uint8 num);
|
||||
bool ModStackAmount(int32 num, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT);
|
||||
|
||||
void RefreshSpellMods();
|
||||
|
||||
uint8 GetCasterLevel() const { return m_casterLevel; }
|
||||
|
||||
bool IsPassive() const;
|
||||
|
||||
Reference in New Issue
Block a user