mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8746] Not add pets and other not normal creatures to per-map Creature guid map.
This commit is contained in:
parent
b44972ae0d
commit
012fac90c8
2 changed files with 3 additions and 3 deletions
|
|
@ -141,7 +141,7 @@ Creature::~Creature()
|
||||||
void Creature::AddToWorld()
|
void Creature::AddToWorld()
|
||||||
{
|
{
|
||||||
///- Register the creature for guid lookup
|
///- Register the creature for guid lookup
|
||||||
if(!IsInWorld())
|
if(!IsInWorld() && GetGUIDHigh()==HIGHGUID_UNIT)
|
||||||
GetMap()->GetObjectsStore().insert<Creature>(GetGUID(), (Creature*)this);
|
GetMap()->GetObjectsStore().insert<Creature>(GetGUID(), (Creature*)this);
|
||||||
|
|
||||||
Unit::AddToWorld();
|
Unit::AddToWorld();
|
||||||
|
|
@ -150,7 +150,7 @@ void Creature::AddToWorld()
|
||||||
void Creature::RemoveFromWorld()
|
void Creature::RemoveFromWorld()
|
||||||
{
|
{
|
||||||
///- Remove the creature from the accessor
|
///- Remove the creature from the accessor
|
||||||
if(IsInWorld())
|
if(IsInWorld() && GetGUIDHigh()==HIGHGUID_UNIT)
|
||||||
GetMap()->GetObjectsStore().erase<Creature>(GetGUID(), (Creature*)NULL);
|
GetMap()->GetObjectsStore().erase<Creature>(GetGUID(), (Creature*)NULL);
|
||||||
|
|
||||||
Unit::RemoveFromWorld();
|
Unit::RemoveFromWorld();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8745"
|
#define REVISION_NR "8746"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue