[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

@ -191,7 +191,7 @@ void Creature::AddToWorld()
{
///- Register the creature for guid lookup
if (!IsInWorld() && GetObjectGuid().IsCreatureOrVehicle())
GetMap()->GetObjectsStore().insert<Creature>(GetGUID(), (Creature*)this);
GetMap()->GetObjectsStore().insert<Creature>(GetObjectGuid(), (Creature*)this);
Unit::AddToWorld();
}
@ -200,7 +200,7 @@ void Creature::RemoveFromWorld()
{
///- Remove the creature from the accessor
if (IsInWorld() && GetObjectGuid().IsCreatureOrVehicle())
GetMap()->GetObjectsStore().erase<Creature>(GetGUID(), (Creature*)NULL);
GetMap()->GetObjectsStore().erase<Creature>(GetObjectGuid(), (Creature*)NULL);
Unit::RemoveFromWorld();
}