[11466] Use ObjectGuid in Map::m_objectsStore

This commit is contained in:
VladimirMangos 2011-05-10 21:58:20 +04:00
parent ef6a48fe03
commit b8bb108757
7 changed files with 16 additions and 15 deletions

View file

@ -58,7 +58,7 @@ void Pet::AddToWorld()
{
///- Register the pet for guid lookup
if(!IsInWorld())
GetMap()->GetObjectsStore().insert<Pet>(GetGUID(), (Pet*)this);
GetMap()->GetObjectsStore().insert<Pet>(GetObjectGuid(), (Pet*)this);
Unit::AddToWorld();
}
@ -67,7 +67,7 @@ void Pet::RemoveFromWorld()
{
///- Remove the pet from the accessor
if(IsInWorld())
GetMap()->GetObjectsStore().erase<Pet>(GetGUID(), (Pet*)NULL);
GetMap()->GetObjectsStore().erase<Pet>(GetObjectGuid(), (Pet*)NULL);
///- Don't call the function for Creature, normal mobs + totems go in a different storage
Unit::RemoveFromWorld();