diff options
author | megamage <none@none> | 2009-08-27 16:41:10 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-27 16:41:10 -0500 |
commit | ee3c766bc95f05018e7de30d9a0768fd1246be87 (patch) | |
tree | 8f44200c1871fb0c9ab5b0a87e89295b33bee3e5 /src/game/DynamicObject.h | |
parent | d8290149206a5f8a0a7d5d742fa6f2da280ff695 (diff) |
*Use one dynobj to handle multiple aura effects.
--HG--
branch : trunk
Diffstat (limited to 'src/game/DynamicObject.h')
-rw-r--r-- | src/game/DynamicObject.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/DynamicObject.h b/src/game/DynamicObject.h index 22009b92d14..94985f247d7 100644 --- a/src/game/DynamicObject.h +++ b/src/game/DynamicObject.h @@ -35,11 +35,13 @@ class DynamicObject : public WorldObject void AddToWorld(); void RemoveFromWorld(); - bool Create(uint32 guidlow, Unit *caster, uint32 spellId, uint32 effIndex, float x, float y, float z, int32 duration, float radius); + bool Create(uint32 guidlow, Unit *caster, uint32 spellId, uint32 effMask, float x, float y, float z, int32 duration, float radius, bool active); void Update(uint32 p_time); void Delete(); uint32 GetSpellId() const { return m_spellId; } - uint32 GetEffIndex() const { return m_effIndex; } + uint32 GetEffectMask() const { return m_effMask; } + void AddEffect(uint32 effIndex) { m_effMask |= (1<<effIndex); } + bool HasEffect(uint32 effIndex) const { return m_effMask & (1<<effIndex); } uint32 GetDuration() const { return m_aliveDuration; } uint64 GetCasterGUID() const { return GetUInt64Value(DYNAMICOBJECT_CASTER); } Unit* GetCaster() const; @@ -59,7 +61,7 @@ class DynamicObject : public WorldObject GridReference<DynamicObject> &GetGridRef() { return m_gridRef; } protected: uint32 m_spellId; - uint32 m_effIndex; + uint32 m_effMask; int32 m_aliveDuration; uint32 m_updateTimer; time_t m_nextThinkTime; |