mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[6835] Check instanceid at search creature by guid.
This commit is contained in:
parent
5439dd0fd4
commit
2a3c3195b7
2 changed files with 10 additions and 2 deletions
|
|
@ -140,7 +140,15 @@ Creature*
|
|||
ObjectAccessor::GetCreature(WorldObject const &u, uint64 guid)
|
||||
{
|
||||
Creature * ret = GetObjectInWorld(guid, (Creature*)NULL);
|
||||
if(ret && ret->GetMapId() != u.GetMapId()) ret = NULL;
|
||||
if(!ret)
|
||||
return NULL;
|
||||
|
||||
if(ret->GetMapId() != u.GetMapId())
|
||||
return NULL;
|
||||
|
||||
if(ret->GetInstanceId() != u.GetInstanceId())
|
||||
return NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue