diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 6a06d4d3a4..8aaef85c39 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -41,6 +41,7 @@ class AuraEffect Aura * GetBase() const { return m_base; } void GetTargetList(std::list & targetList) const; void GetApplicationList(std::list & applicationList) const; + SpellModifier* GetSpellModifier() const { return m_spellmod; } SpellEntry const* GetSpellProto() const { return m_spellProto; } uint32 GetId() const { return m_spellProto->Id; } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 3f49fc2cf1..0f21cee986 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -831,6 +831,12 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode) // reset charges SetCharges(CalcMaxCharges()); + // FIXME: not a best way to synchronize charges, but works + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + if (AuraEffect* aurEff = GetEffect(i)) + if (aurEff->GetAuraType() == SPELL_AURA_ADD_FLAT_MODIFIER || aurEff->GetAuraType() == SPELL_AURA_ADD_PCT_MODIFIER) + if (SpellModifier* mod = aurEff->GetSpellModifier()) + mod->charges = GetCharges(); } SetNeedClientUpdateForTargets(); return false;