Permalink
Browse files

[6835] Check instanceid at search creature by guid.

  • Loading branch information...
1 parent e8101bf commit b21069890dcbcf7e9675a1d9ebf4ba631e54ed1d VladimirMangos committed Nov 17, 2008
Showing with 10 additions and 2 deletions.
  1. +9 −1 src/game/ObjectAccessor.cpp
  2. +1 −1 src/shared/revision_nr.h
@@ -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;
}
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "6834"
+ #define REVISION_NR "6835"
#endif // __REVISION_NR_H__

0 comments on commit b210698

Please sign in to comment.