mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[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:
parent
ee9ea143d1
commit
fc0e1ecdf1
20 changed files with 118 additions and 127 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue