From bc05228d9f788d0ca67dfdaba30e8e4a4c6ee61f Mon Sep 17 00:00:00 2001 From: w12x Date: Sun, 19 Oct 2008 11:07:10 -0500 Subject: [svn] Finally really fixed compile. Also, removed Unit::GetObjectInWorld(), use Map::GetCreatureInMap() and Map::GetGameObjectInMap() instead. This is to prevent creature-creature interaction on different maps, which would make the later multithreading of maps impossible. --HG-- branch : trunk --- src/game/Map.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/game/Map.cpp') diff --git a/src/game/Map.cpp b/src/game/Map.cpp index c27053b60b1..b3d41ed254d 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1560,6 +1560,20 @@ void InstanceMap::Remove(Player *player, bool remove) Map::Remove(player, remove); } +Creature * Map::GetCreatureInMap(uint64 guid) +{ + Creature * obj = HashMapHolder::Find(guid); + if(obj && obj->GetInstanceId() != GetInstanceId()) obj = NULL; + return obj; +} + +GameObject * Map::GetGameObjectInMap(uint64 guid) +{ + GameObject * obj = HashMapHolder::Find(guid); + if(obj && obj->GetInstanceId() != GetInstanceId()) obj = NULL; + return obj; +} + void InstanceMap::CreateInstanceData(bool load) { if(i_data != NULL) -- cgit v1.2.3