aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h1
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuras.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index 6a06d4d3a46..8aaef85c394 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<Unit*> & targetList) const;
void GetApplicationList(std::list<AuraApplication*> & 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 3f49fc2cf18..0f21cee9868 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;