mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
[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
This commit is contained in:
@@ -1560,6 +1560,20 @@ void InstanceMap::Remove(Player *player, bool remove)
|
||||
Map::Remove(player, remove);
|
||||
}
|
||||
|
||||
Creature * Map::GetCreatureInMap(uint64 guid)
|
||||
{
|
||||
Creature * obj = HashMapHolder<Creature>::Find(guid);
|
||||
if(obj && obj->GetInstanceId() != GetInstanceId()) obj = NULL;
|
||||
return obj;
|
||||
}
|
||||
|
||||
GameObject * Map::GetGameObjectInMap(uint64 guid)
|
||||
{
|
||||
GameObject * obj = HashMapHolder<GameObject>::Find(guid);
|
||||
if(obj && obj->GetInstanceId() != GetInstanceId()) obj = NULL;
|
||||
return obj;
|
||||
}
|
||||
|
||||
void InstanceMap::CreateInstanceData(bool load)
|
||||
{
|
||||
if(i_data != NULL)
|
||||
|
||||
Reference in New Issue
Block a user