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

Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
Ambal 2009-05-11 12:59:25 +04:00 committed by AlexDereka
parent 2aff48cc5d
commit a4eab7e9f2
3 changed files with 6 additions and 3 deletions

View file

@ -117,7 +117,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 )
{ {
@ -135,6 +135,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])
{ {

View file

@ -404,7 +404,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; }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "7810" #define REVISION_NR "7811"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__