diff options
author | megamage <none@none> | 2008-11-06 12:24:56 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-06 12:24:56 -0600 |
commit | 0aada07187e373ef9763bfb2ae6e6f706f56dfd4 (patch) | |
tree | ba1ad78d1895fc7bd01a80833c1b9927ce403967 /src/game/SpellEffects.cpp | |
parent | 31be467b2e9698a05fde5525a6ce758ab2d940f5 (diff) |
[svn] Fix hunter's trap (let original caster summon dynamic object).
Fix black temple boss 1's hurl spine.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index eeafd0d024e..e1f80bdcc58 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2633,13 +2633,14 @@ 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(Player* modOwner = m_caster->GetSpellModOwner()) + if(Player* modOwner = caster->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), m_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), caster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius)) { delete dynObj; return; @@ -2647,7 +2648,7 @@ void Spell::EffectPersistentAA(uint32 i) dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65); dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003); dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee); - m_caster->AddDynObject(dynObj); + caster->AddDynObject(dynObj); MapManager::Instance().GetMap(dynObj->GetMapId(), dynObj)->Add(dynObj); } |