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.cpp | |
parent | d8290149206a5f8a0a7d5d742fa6f2da280ff695 (diff) |
*Use one dynobj to handle multiple aura effects.
--HG--
branch : trunk
Diffstat (limited to 'src/game/DynamicObject.cpp')
-rw-r--r-- | src/game/DynamicObject.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index 7316bb58884..34b009bc7d4 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -53,7 +53,7 @@ void DynamicObject::RemoveFromWorld() ///- Remove the dynamicObject from the accessor if(IsInWorld()) { - if(m_effIndex == 4) + if(m_isWorldObject) { if(Unit *caster = GetCaster()) { @@ -70,7 +70,7 @@ void DynamicObject::RemoveFromWorld() } } -bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32 effIndex, float x, float y, float z, int32 duration, float radius ) +bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, uint32 effMask, float x, float y, float z, int32 duration, float radius, bool active) { SetMap(caster->GetMap()); @@ -78,7 +78,7 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32 if(!IsPositionValid()) { - sLog.outError("DynamicObject (spell %u eff %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,effIndex,GetPositionX(),GetPositionY()); + sLog.outError("DynamicObject (spell %u eff %u) not created. Suggested coordinates isn't valid (X: %f Y: %f)",spellId,effMask,GetPositionX(),GetPositionY()); return false; } @@ -97,12 +97,11 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32 m_aliveDuration = duration; m_radius = radius; - m_effIndex = effIndex; + m_effMask = effMask; m_spellId = spellId; m_updateTimer = 0; - if(m_effIndex == 4) - m_isWorldObject = true; + m_isWorldObject = active; return true; } @@ -129,7 +128,7 @@ void DynamicObject::Update(uint32 p_time) else deleteThis = true; - if(m_effIndex < 4) + if(m_effMask) { if(m_updateTimer < p_time) { |