From 7b6548f2d1be1f5dbaa7ffd5848a03c89477a855 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 13 Apr 2009 18:21:48 -0500 Subject: *Make AuraEffect::Update virtual. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 11 ++--------- src/game/SpellAuras.h | 3 ++- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c1e2dba1973..3c427706d19 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -686,16 +686,9 @@ void Aura::Update(uint32 diff) } } - for (uint8 i = 0; iIsAreaAura()) - ((AreaAuraEffect *) m_partAuras[i])->Update(diff); - else if(m_partAuras[i]->IsPersistent()) - ((PersistentAreaAuraEffect *) m_partAuras[i])->Update(diff); - else - m_partAuras[i]->Update(diff); - } + m_partAuras[i]->Update(diff); } void AuraEffect::Update(uint32 diff) diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index eacd7f9e20b..fe9c18d19b5 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -161,6 +161,7 @@ class TRINITY_DLL_SPEC Aura bool m_updated:1; // Prevent remove aura by stack if set bool m_isSingleTargetAura:1; // true if it's a single target spell and registered at caster - can change at spell steal for example }; + class TRINITY_DLL_SPEC AuraEffect { public: @@ -335,7 +336,7 @@ class TRINITY_DLL_SPEC AuraEffect uint32 GetEffIndex() const { return m_effIndex; } int32 GetBasePoints() const { return m_currentBasePoints; } int32 GetAuraAmplitude(){return m_amplitude;} - void Update(uint32 diff); + virtual void Update(uint32 diff); bool IsAreaAura() const { return m_isAreaAura; } bool IsPeriodic() const { return m_isPeriodic; } -- cgit v1.2.3