diff options
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 576c15643c0..a312e627090 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -152,7 +152,7 @@ void SpellCastTargets::setCorpseTarget(Corpse* corpse) void SpellCastTargets::Update(Unit* caster) { - m_GOTarget = m_GOTargetGUID ? ObjectAccessor::GetGameObject(*caster,m_GOTargetGUID) : NULL; + m_GOTarget = m_GOTargetGUID ? caster->GetMap()->GetGameObject(m_GOTargetGUID) : NULL; m_unitTarget = m_unitTargetGUID ? ( m_unitTargetGUID==caster->GetGUID() ? caster : ObjectAccessor::GetUnit(*caster, m_unitTargetGUID) ) : NULL; @@ -848,7 +848,7 @@ void Spell::AddGOTarget(GameObject* pVictim, uint32 effIndex) void Spell::AddGOTarget(uint64 goGUID, uint32 effIndex) { - GameObject* go = ObjectAccessor::GetGameObject(*m_caster, goGUID); + GameObject* go = m_caster->GetMap()->GetGameObject(goGUID); if (go) AddGOTarget(go, effIndex); } @@ -1244,7 +1244,7 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target) if(!effectMask) return; - GameObject* go = ObjectAccessor::GetGameObject(*m_caster, target->targetGUID); + GameObject* go = m_caster->GetMap()->GetGameObject(target->targetGUID); if(!go) return; @@ -2663,7 +2663,7 @@ void Spell::update(uint32 difftime) { GOTargetInfo* target = &*ihit; - GameObject* go = ObjectAccessor::GetGameObject(*m_caster, target->targetGUID); + GameObject* go = m_caster->GetMap()->GetGameObject(target->targetGUID); if(!go) continue; @@ -3204,7 +3204,7 @@ void Spell::SendChannelStart(uint32 duration) { if(itr->effectMask & (1<<0) ) { - target = ObjectAccessor::GetGameObject(*m_caster, itr->targetGUID); + target = m_caster->GetMap()->GetGameObject(itr->targetGUID); break; } } @@ -5433,7 +5433,7 @@ bool Spell::CheckTarget( Unit* target, uint32 eff ) // Get GO cast coordinates if original caster -> GO WorldObject *caster = NULL; if (IS_GAMEOBJECT_GUID(m_originalCasterGUID)) - caster = ObjectAccessor::GetGameObject(*m_caster, m_originalCasterGUID); + caster = m_caster->GetMap()->GetGameObject(m_originalCasterGUID); if (!caster) caster = m_caster; if(target!=m_caster && !target->IsWithinLOSInMap(caster)) |