*Fix the bug that players cannot see anything in instance.
--HG-- branch : trunk
This commit is contained in:
+3
-4
@@ -2126,12 +2126,11 @@ inline void Map::setNGrid(NGridType *grid, uint32 x, uint32 y)
|
||||
i_grids[x][y] = grid;
|
||||
}
|
||||
|
||||
void Map::DoDelayedMovesAndRemoves()
|
||||
{
|
||||
//void Map::DoDelayedMovesAndRemoves()
|
||||
//{
|
||||
//MoveAllCreaturesInMoveList();
|
||||
//RemoveAllObjectsInRemoveList();
|
||||
RelocationNotify();
|
||||
}
|
||||
//}
|
||||
|
||||
void Map::AddObjectToRemoveList(WorldObject *obj)
|
||||
{
|
||||
|
||||
+2
-2
@@ -340,6 +340,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
||||
|
||||
virtual void MoveAllCreaturesInMoveList();
|
||||
virtual void RemoveAllObjectsInRemoveList();
|
||||
virtual void RelocationNotify();
|
||||
|
||||
bool CreatureRespawnRelocation(Creature *c); // used only in MoveAllCreaturesInMoveList and ObjectGridUnloader
|
||||
|
||||
@@ -373,7 +374,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
||||
|
||||
void AddObjectToRemoveList(WorldObject *obj);
|
||||
void AddObjectToSwitchList(WorldObject *obj, bool on);
|
||||
void DoDelayedMovesAndRemoves();
|
||||
//void DoDelayedMovesAndRemoves();
|
||||
|
||||
virtual bool RemoveBones(uint64 guid, float x, float y);
|
||||
|
||||
@@ -389,7 +390,6 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
||||
|
||||
void AddUnitToNotify(Unit* unit);
|
||||
void RemoveUnitFromNotify(int32 slot);
|
||||
void RelocationNotify();
|
||||
|
||||
void SendToPlayers(WorldPacket const* data) const;
|
||||
|
||||
|
||||
@@ -77,6 +77,12 @@ void MapInstanced::RemoveAllObjectsInRemoveList()
|
||||
Map::RemoveAllObjectsInRemoveList();
|
||||
}
|
||||
|
||||
void MapInstanced::RelocationNotify()
|
||||
{
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); ++i)
|
||||
i->second->RelocationNotify();
|
||||
}
|
||||
|
||||
bool MapInstanced::RemoveBones(uint64 guid, float x, float y)
|
||||
{
|
||||
bool remove_result = false;
|
||||
|
||||
@@ -37,6 +37,7 @@ class TRINITY_DLL_DECL MapInstanced : public Map
|
||||
void Update(const uint32&);
|
||||
void MoveAllCreaturesInMoveList();
|
||||
void RemoveAllObjectsInRemoveList();
|
||||
void RelocationNotify();
|
||||
bool RemoveBones(uint64 guid, float x, float y);
|
||||
void UnloadAll();
|
||||
bool CanEnter(Player* player);
|
||||
|
||||
@@ -270,7 +270,7 @@ MapManager::Update(uint32 diff)
|
||||
void MapManager::DoDelayedMovesAndRemoves()
|
||||
{
|
||||
for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)
|
||||
iter->second->DoDelayedMovesAndRemoves();
|
||||
iter->second->RelocationNotify();
|
||||
}
|
||||
|
||||
bool MapManager::ExistMapAndVMap(uint32 mapid, float x,float y)
|
||||
|
||||
Reference in New Issue
Block a user