mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[11466] Use ObjectGuid in Map::m_objectsStore
This commit is contained in:
parent
ef6a48fe03
commit
b8bb108757
7 changed files with 16 additions and 15 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue