[7811] do not reload already loaded map coordinats at runtime. Author: Ambal

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-13 18:24:35 -05:00
parent 25e5c99dec
commit 88107fa1d6
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -120,7 +120,7 @@ void Map::LoadVMap(int gx,int gy)
}
}
void Map::LoadMap(int gx,int gy)
void Map::LoadMap(int gx,int gy, bool reload)
{
if( i_InstanceId != 0 )
{
@@ -138,6 +138,9 @@ void Map::LoadMap(int gx,int gy)
return;
}
if(GridMaps[gx][gy] && !reload)
return;
//map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?)
if(GridMaps[gx][gy])
{
+1 -1
View File
@@ -421,7 +421,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
private:
void LoadMapAndVMap(int gx, int gy);
void LoadVMap(int gx, int gy);
void LoadMap(int gx,int gy);
void LoadMap(int gx,int gy, bool reload = false);
GridMap *GetGrid(float x, float y);
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }