aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-23 14:58:55 -0600
committermegamage <none@none>2008-12-23 14:58:55 -0600
commitc230fb2c28a51b9033e4494d8aade3e7eedf09cf (patch)
treeecb2dcd2133568c241577e58a04f50a5e0682f3e /src/game/SpellEffects.cpp
parent31e2c74adcd4e7d4fdf33b5ce5a68ab430700a2e (diff)
*Spell system update.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 8581a81d5ef..c18e265b9db 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2586,15 +2586,12 @@ void Spell::EffectCreateItem(uint32 i)
void Spell::EffectPersistentAA(uint32 i)
{
float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
- Unit *caster = m_originalCasterGUID ? m_originalCaster : m_caster;
- if(!caster) return;
-
- if(Player* modOwner = caster->GetSpellModOwner())
+ if(Player* modOwner = m_originalCaster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius);
int32 duration = GetSpellDuration(m_spellInfo);
DynamicObject* dynObj = new DynamicObject;
- 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))
+ 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))
{
delete dynObj;
return;
@@ -2602,7 +2599,7 @@ void Spell::EffectPersistentAA(uint32 i)
dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65);
dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003);
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee);
- caster->AddDynObject(dynObj);
+ m_originalCaster->AddDynObject(dynObj);
MapManager::Instance().GetMap(dynObj->GetMapId(), dynObj)->Add(dynObj);
}