diff options
| author | megamage <none@none> | 2009-04-20 20:28:19 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-20 20:28:19 -0500 |
| commit | fc7e1db9fba443d523f0af7e0e32a37bad0163d3 (patch) | |
| tree | 1ca0cb3689dc076782b8f84589dfd1fbe78fe9ac /src/game/SpellEffects.cpp | |
| parent | b4046ddf884871ec6d99df27c9f62370aa54036c (diff) | |
[7690] Move GetCreature/GetGameobject to class Map. Author: VladimirMangos
* This let get objects at map without reference to player or another object.
* Simplify future implementation for per-map storage for like objects
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
| -rw-r--r-- | src/game/SpellEffects.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index fe7a3b3a68c..30b53e9618c 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -5470,7 +5470,7 @@ void Spell::EffectSummonObject(uint32 i) { GameObject* obj = NULL; if( m_caster ) - obj = ObjectAccessor::GetGameObject(*m_caster, guid); + obj = m_caster->GetMap()->GetGameObject(guid); if(obj) obj->Delete(); m_caster->m_ObjectSlot[slot] = 0; @@ -5951,7 +5951,7 @@ void Spell::EffectDestroyAllTotems(uint32 /*i*/) if(!m_caster->m_SummonSlot[slot]) continue; - Creature* totem = ObjectAccessor::GetCreature(*m_caster,m_caster->m_SummonSlot[slot]); + Creature* totem = m_caster->GetMap()->GetCreature(m_caster->m_SummonSlot[slot]); if(totem && totem->isTotem()) { uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL); @@ -6395,7 +6395,7 @@ void Spell::SummonTotem(uint32 entry, SummonPropertiesEntry const *properties) uint64 guid = m_caster->m_SummonSlot[slot]; if(guid != 0) { - Creature *OldTotem = ObjectAccessor::GetCreature(*m_caster, guid); + Creature *OldTotem = m_caster->GetMap()->GetCreature(guid); if(OldTotem && OldTotem->isTotem()) ((Totem*)OldTotem)->UnSummon(); } |
