aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-25 00:43:31 -0500
committermegamage <none@none>2009-08-25 00:43:31 -0500
commit01530fb148333b4296de83815df91c69062c0df3 (patch)
treec23b43089c7d710e2ea2df66f38864670111f1dc /src/game/SpellAuras.h
parent87270fefc235d45c2d9116b4a26f0dc32f1a5d7e (diff)
*Fix a crash.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.h')
-rw-r--r--src/game/SpellAuras.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index 6701939f622..4f714066f0b 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -60,10 +60,11 @@ class TRINITY_DLL_SPEC Aura
uint32 GetId() const{ return m_spellProto->Id; }
uint64 GetCastItemGUID() const { return m_castItemGuid; }
- uint64 const& GetCasterGUID() const { return m_caster_guid; }
+ uint64 const& GetCasterGUID() const { return m_casterGuid; }
Unit* GetCaster() const;
+ uint64 const& GetSourceGUID() const { return m_sourceGuid; }
+ Unit *GetUnitSource() const;
Unit* GetTarget() const { return m_target; }
- WorldObject *GetSource() const { return m_source; }
time_t GetAuraApplyTime() const { return m_applyTime; }
int32 GetAuraMaxDuration() const { return m_maxduration; }
@@ -136,8 +137,9 @@ class TRINITY_DLL_SPEC Aura
private:
const SpellEntry * const m_spellProto;
Unit * const m_target;
- WorldObject * const m_source;
- const uint64 m_caster_guid;
+ //WorldObject * const m_source;
+ const uint64 m_sourceGuid;
+ const uint64 m_casterGuid;
const uint64 m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted
const time_t m_applyTime;
@@ -407,7 +409,7 @@ class TRINITY_DLL_SPEC AreaAuraEffect : public AuraEffect
public:
friend AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints);
void Update(uint32 diff);
- Unit *GetSource() const;
+ Unit *GetSource() const { return GetParentAura()->GetUnitSource(); }
protected:
explicit AreaAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints = NULL);
float m_radius;