*Fix the bug that players cannot see anything in instance.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-09 23:52:45 -05:00
parent eb219b08e2
commit 427a81649b
5 changed files with 13 additions and 7 deletions
+3 -4
View File
@@ -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
View File
@@ -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;
+6
View File
@@ -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;
+1
View File
@@ -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);
+1 -1
View File
@@ -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)