[7593] Map::EnsureGridLoaded related cleanups and fixes: Author: VladimirMangos
* Make generic EnsureGridLoaded function and move specialized code to LoadGrid and EnsureGridLoadedAtEnter
* Rename args to gx/gy for low-level grid numbering values.
* Remove redundent LoadMpa call after always case loading maps in EnsureGridCreated
--HG--
branch : trunk
This commit is contained in:
+8
-7
@@ -301,9 +301,8 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
|
||||
time_t GetGridExpiry(void) const { return i_gridExpiry; }
|
||||
uint32 GetId(void) const { return i_id; }
|
||||
|
||||
static bool ExistMap(uint32 mapid, int x, int y);
|
||||
static bool ExistVMap(uint32 mapid, int x, int y);
|
||||
void LoadMapAndVMap(uint32 mapid, uint32 instanceid, int x, int y);
|
||||
static bool ExistMap(uint32 mapid, int gx, int gy);
|
||||
static bool ExistVMap(uint32 mapid, int gx, int gy);
|
||||
|
||||
static void InitStateMachine();
|
||||
static void DeleteStateMachine();
|
||||
@@ -418,8 +417,9 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
|
||||
|
||||
TempSummon *SummonCreature(uint32 entry, float x, float y, float z, float angle, SummonPropertiesEntry const *properties = NULL, uint32 duration = 0, Unit *summoner = NULL);
|
||||
private:
|
||||
void LoadVMap(int pX, int pY);
|
||||
void LoadMap(uint32 mapid, uint32 instanceid, int x,int y);
|
||||
void LoadMapAndVMap(int gx, int gy);
|
||||
void LoadVMap(int gx, int gy);
|
||||
void LoadMap(int gx,int gy);
|
||||
GridMap *GetGrid(float x, float y);
|
||||
|
||||
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }
|
||||
@@ -436,8 +436,9 @@ class TRINITY_DLL_SPEC Map : public GridRefManager<NGridType>, public Trinity::O
|
||||
CreatureMoveList i_creaturesToMove;
|
||||
|
||||
bool loaded(const GridPair &) const;
|
||||
void EnsureGridLoaded(const Cell&, Player* player = NULL);
|
||||
void EnsureGridCreated(const GridPair &);
|
||||
void EnsureGridCreated(const GridPair &);
|
||||
bool EnsureGridLoaded(Cell const&);
|
||||
void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
|
||||
|
||||
void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user