[8746] Not add pets and other not normal creatures to per-map Creature guid map.

This commit is contained in:
VladimirMangos 2009-10-28 06:44:29 +03:00
parent b44972ae0d
commit 012fac90c8
2 changed files with 3 additions and 3 deletions

View file

@ -141,7 +141,7 @@ Creature::~Creature()
void Creature::AddToWorld()
{
///- Register the creature for guid lookup
if(!IsInWorld())
if(!IsInWorld() && GetGUIDHigh()==HIGHGUID_UNIT)
GetMap()->GetObjectsStore().insert<Creature>(GetGUID(), (Creature*)this);
Unit::AddToWorld();
@ -150,7 +150,7 @@ void Creature::AddToWorld()
void Creature::RemoveFromWorld()
{
///- Remove the creature from the accessor
if(IsInWorld())
if(IsInWorld() && GetGUIDHigh()==HIGHGUID_UNIT)
GetMap()->GetObjectsStore().erase<Creature>(GetGUID(), (Creature*)NULL);
Unit::RemoveFromWorld();