mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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)
|
ObjectAccessor::GetCreature(WorldObject const &u, uint64 guid)
|
||||||
{
|
{
|
||||||
Creature * ret = GetObjectInWorld(guid, (Creature*)NULL);
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6834"
|
#define REVISION_NR "6835"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue