mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[9996] Remove grid state debugging code and move state machine to MapManager.
This commit is contained in:
parent
28c3de5093
commit
aa62225c68
6 changed files with 42 additions and 85 deletions
|
|
@ -43,6 +43,8 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
|
|||
Map const* CreateBaseMap(uint32 id) const { return const_cast<MapManager*>(this)->_createBaseMap(id); }
|
||||
Map* FindMap(uint32 mapid, uint32 instanceId = 0) const;
|
||||
|
||||
void UpdateGridState(grid_state_t state, Map& map, NGridType& ngrid, GridInfo& ginfo, const uint32 &x, const uint32 &y, const uint32 &t_diff);
|
||||
|
||||
// only const version for outer users
|
||||
void DeleteInstance(uint32 mapid, uint32 instanceId);
|
||||
|
||||
|
|
@ -130,17 +132,22 @@ class MANGOS_DLL_DECL MapManager : public MaNGOS::Singleton<MapManager, MaNGOS::
|
|||
uint32 GetNumPlayersInInstances();
|
||||
|
||||
private:
|
||||
|
||||
// debugging code, should be deleted some day
|
||||
void checkAndCorrectGridStatesArray(); // just for debugging to find some memory overwrites
|
||||
GridState* i_GridStates[MAX_GRID_STATE]; // shadow entries to the global array in Map.cpp
|
||||
GridState* si_GridStates[MAX_GRID_STATE];
|
||||
int i_GridStateErrorCount;
|
||||
|
||||
private:
|
||||
|
||||
MapManager();
|
||||
~MapManager();
|
||||
|
||||
MapManager(const MapManager &);
|
||||
MapManager& operator=(const MapManager &);
|
||||
|
||||
void InitStateMachine();
|
||||
void DeleteStateMachine();
|
||||
|
||||
Map* _createBaseMap(uint32 id);
|
||||
Map* _findMap(uint32 id) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue