[7811] do not reload already loaded map coordinats at runtime. Author: Ambal
--HG-- branch : trunk
This commit is contained in:
+4
-1
@@ -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 )
|
if( i_InstanceId != 0 )
|
||||||
{
|
{
|
||||||
@@ -138,6 +138,9 @@ void Map::LoadMap(int gx,int gy)
|
|||||||
return;
|
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?)
|
//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])
|
if(GridMaps[gx][gy])
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -421,7 +421,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
|
|||||||
private:
|
private:
|
||||||
void LoadMapAndVMap(int gx, int gy);
|
void LoadMapAndVMap(int gx, int gy);
|
||||||
void LoadVMap(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);
|
GridMap *GetGrid(float x, float y);
|
||||||
|
|
||||||
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }
|
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }
|
||||||
|
|||||||
Reference in New Issue
Block a user