aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-09-04 13:38:24 +0200
committerShauren <shauren.trinity@gmail.com>2020-09-04 13:38:24 +0200
commitb23190393248455f04d3a06def030a1ec7efad1e (patch)
tree1ce3772314492dcdb985641269a3114813d4b4dc /src/server/game/Maps/Map.h
parentb20acfe701e6f5f995f2776f076d3c494c02e1aa (diff)
Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r--src/server/game/Maps/Map.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index d646a3bf023..4288037297e 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -248,7 +248,7 @@ public:
InvalidFile
};
- LoadResult loadData(const char* filename);
+ LoadResult loadData(char const* filename);
void unloadData();
uint16 getArea(float x, float y) const;
@@ -360,7 +360,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
void AreaTriggerRelocation(AreaTrigger* at, float x, float y, float z, float orientation);
template<class T, class CONTAINER>
- void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor);
+ void Visit(Cell const& cell, TypeContainerVisitor<T, CONTAINER>& visitor);
bool IsRemovalGrid(float x, float y) const
{
@@ -373,8 +373,8 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
bool IsGridLoaded(float x, float y) const { return IsGridLoaded(Trinity::ComputeGridCoord(x, y)); }
bool IsGridLoaded(Position const& pos) const { return IsGridLoaded(pos.GetPositionX(), pos.GetPositionY()); }
- bool GetUnloadLock(const GridCoord &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
- void SetUnloadLock(const GridCoord &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
+ bool GetUnloadLock(GridCoord const& p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
+ void SetUnloadLock(GridCoord const& p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
void LoadGrid(float x, float y);
void LoadAllCells();
bool UnloadGrid(NGridType& ngrid, bool pForce);
@@ -453,7 +453,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
CANNOT_ENTER_UNSPECIFIED_REASON
};
virtual EnterState CannotEnter(Player* /*player*/) { return CAN_ENTER; }
- const char* GetMapName() const;
+ char const* GetMapName() const;
// have meaning only for instanced map (that have set real difficulty)
Difficulty GetDifficultyID() const { return Difficulty(i_spawnMode); }
@@ -472,11 +472,11 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
bool IsBattleArena() const;
bool IsBattlegroundOrArena() const;
bool IsGarrison() const;
- bool GetEntrancePos(int32 &mapid, float &x, float &y);
+ bool GetEntrancePos(int32& mapid, float& x, float& y);
void AddObjectToRemoveList(WorldObject* obj);
void AddObjectToSwitchList(WorldObject* obj, bool on);
- virtual void DelayedUpdate(const uint32 diff);
+ virtual void DelayedUpdate(uint32 diff);
void resetMarkedCells() { marked_cells.reset(); }
bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); }
@@ -571,9 +571,9 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
float GetHeight(PhaseShift const& phaseShift, Position const& pos, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) { return GetHeight(phaseShift, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), vmap, maxSearchDist); }
bool isInLineOfSight(PhaseShift const& phaseShift, float x1, float y1, float z1, float x2, float y2, float z2, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const;
void Balance() { _dynamicTree.balance(); }
- void RemoveGameObjectModel(const GameObjectModel& model) { _dynamicTree.remove(model); }
- void InsertGameObjectModel(const GameObjectModel& model) { _dynamicTree.insert(model); }
- bool ContainsGameObjectModel(const GameObjectModel& model) const { return _dynamicTree.contains(model);}
+ void RemoveGameObjectModel(GameObjectModel const& model) { _dynamicTree.remove(model); }
+ void InsertGameObjectModel(GameObjectModel const& model) { _dynamicTree.insert(model); }
+ bool ContainsGameObjectModel(GameObjectModel const& model) const { return _dynamicTree.contains(model);}
float GetGameObjectFloor(PhaseShift const& phaseShift, float x, float y, float z, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const
{
return _dynamicTree.getHeight(x, y, z, maxSearchDist, phaseShift);
@@ -687,9 +687,9 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
bool _areaTriggersToMoveLock;
std::vector<AreaTrigger*> _areaTriggersToMove;
- bool IsGridLoaded(const GridCoord &) const;
- void EnsureGridCreated(const GridCoord &);
- void EnsureGridCreated_i(const GridCoord &);
+ bool IsGridLoaded(GridCoord const&) const;
+ void EnsureGridCreated(GridCoord const&);
+ void EnsureGridCreated_i(GridCoord const&);
bool EnsureGridLoaded(Cell const&);
void EnsureGridLoadedForActiveObject(Cell const&, WorldObject* object);
@@ -737,13 +737,13 @@ class TC_GAME_API Map : public GridRefManager<NGridType>
TransportsContainer::iterator _transportsUpdateIter;
private:
- Player* _GetScriptPlayerSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo) const;
- Creature* _GetScriptCreatureSourceOrTarget(Object* source, Object* target, const ScriptInfo* scriptInfo, bool bReverse = false) const;
- Unit* _GetScriptUnit(Object* obj, bool isSource, const ScriptInfo* scriptInfo) const;
- Player* _GetScriptPlayer(Object* obj, bool isSource, const ScriptInfo* scriptInfo) const;
- Creature* _GetScriptCreature(Object* obj, bool isSource, const ScriptInfo* scriptInfo) const;
- WorldObject* _GetScriptWorldObject(Object* obj, bool isSource, const ScriptInfo* scriptInfo) const;
- void _ScriptProcessDoor(Object* source, Object* target, const ScriptInfo* scriptInfo) const;
+ Player* _GetScriptPlayerSourceOrTarget(Object* source, Object* target, ScriptInfo const* scriptInfo) const;
+ Creature* _GetScriptCreatureSourceOrTarget(Object* source, Object* target, ScriptInfo const* scriptInfo, bool bReverse = false) const;
+ Unit* _GetScriptUnit(Object* obj, bool isSource, ScriptInfo const* scriptInfo) const;
+ Player* _GetScriptPlayer(Object* obj, bool isSource, ScriptInfo const* scriptInfo) const;
+ Creature* _GetScriptCreature(Object* obj, bool isSource, ScriptInfo const* scriptInfo) const;
+ WorldObject* _GetScriptWorldObject(Object* obj, bool isSource, ScriptInfo const* scriptInfo) const;
+ void _ScriptProcessDoor(Object* source, Object* target, ScriptInfo const* scriptInfo) const;
GameObject* _FindGameObject(WorldObject* pWorldObject, ObjectGuid::LowType guid) const;
time_t i_gridExpiry;