mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +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)
|
||||
|
||||
@@ -234,6 +234,8 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
|
||||
void resetMarkedCells() { marked_cells.reset(); }
|
||||
bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); }
|
||||
void markCell(uint32 pCellId) { marked_cells.set(pCellId); }
|
||||
Creature* GetCreatureInMap(uint64 guid);
|
||||
GameObject* GetGameObjectInMap(uint64 guid);
|
||||
private:
|
||||
void LoadVMap(int pX, int pY);
|
||||
void LoadMap(uint32 mapid, uint32 instanceid, int x,int y);
|
||||
|
||||
@@ -9396,12 +9396,6 @@ Unit* Unit::GetUnit(WorldObject& object, uint64 guid)
|
||||
return ObjectAccessor::GetUnit(object,guid);
|
||||
}
|
||||
|
||||
template<class T> T*
|
||||
Unit::GetObjectInWorld(uint64 guid, T* /*fake*/)
|
||||
{
|
||||
return ObjectAccessor::GetObjectInWorld(uint64 guid, T* /*fake*/);
|
||||
}
|
||||
|
||||
bool Unit::isVisibleForInState( Player const* u, bool inVisibleList ) const
|
||||
{
|
||||
return isVisibleForOrDetect(u,false,inVisibleList);
|
||||
|
||||
@@ -1218,7 +1218,6 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
void addFollower(FollowerReference* pRef) { m_FollowingRefManager.insertFirst(pRef); }
|
||||
void removeFollower(FollowerReference* /*pRef*/ ) { /* nothing to do yet */ }
|
||||
static Unit* GetUnit(WorldObject& object, uint64 guid);
|
||||
template<class T> static T* GetObjectInWorld(uint64 guid, T* /*fake*/);
|
||||
|
||||
MotionMaster* GetMotionMaster() { return &i_motionMaster; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user