aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-12 14:22:59 -0600
committermegamage <none@none>2009-03-12 14:22:59 -0600
commit16ee4a46c271bd7c234ffa7579f5f90cf2007772 (patch)
tree6d547d8228472fcc97ead5dfcdd8a9aaf8f70233 /src/game/SpellEffects.cpp
parent6e12d3f1b9f40f3f95390245f3fcbb30fbd8657f (diff)
parent1fbfc6da645058a6da3073dafde0e6bca621e31c (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index ef206ae4660..b9eb8af9e02 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2818,9 +2818,10 @@ void Spell::EffectPersistentAA(uint32 i)
if(Player* modOwner = m_originalCaster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius);
+ Unit *caster = m_caster->GetEntry() == WORLD_TRIGGER ? m_originalCaster : m_caster;
int32 duration = GetSpellDuration(m_spellInfo);
DynamicObject* dynObj = new DynamicObject;
- if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_originalCaster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius))
+ if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), caster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius))
{
delete dynObj;
return;
@@ -2828,8 +2829,8 @@ void Spell::EffectPersistentAA(uint32 i)
dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65);
dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003);
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee);
- m_originalCaster->AddDynObject(dynObj);
- MapManager::Instance().GetMap(dynObj->GetMapId(), dynObj)->Add(dynObj);
+ caster->AddDynObject(dynObj);
+ dynObj->GetMap()->Add(dynObj);
}
void Spell::EffectEnergize(uint32 i)