[7690] Move GetCreature/GetGameobject to class Map.

* This let get objects at map without reference to player or another object.
* Simplify future implementation for per-map storage for like objects
This commit is contained in:
VladimirMangos 2009-04-20 18:53:08 +04:00
parent ee9ea143d1
commit fc0e1ecdf1
20 changed files with 118 additions and 127 deletions

View file

@ -266,9 +266,9 @@ void BattleGround::Update(uint32 diff)
if (!plr)
continue;
if (!sh)
if (!sh && plr->IsInWorld())
{
sh = ObjectAccessor::GetCreature(*plr, itr->first);
sh = plr->GetMap()->GetCreature(itr->first);
// only for visual effect
if (sh)
sh->CastSpell(sh, SPELL_SPIRIT_HEAL, true); // Spirit Heal, effect 117