diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2020-02-08 20:22:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-08 20:22:37 +0100 |
| commit | 9304e496cbf6ab6c028671fb8526c732ae5d799f (patch) | |
| tree | 997040bf14477bbd30b9b175aac93fa287de03e1 /src/server/game/Maps/MapManager.h | |
| parent | 726d5e91b55d4742dcbd6b0a82d84788dbb117b7 (diff) | |
Core/Misc: Some refactoring, #23603 prep: (#23676)
- Split SpawnMetadata off from SpawnData
- No longer allocate Creature/Gameobject objects in ObjectGridLoader just to check their typeid and delete them afterwards
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Diffstat (limited to 'src/server/game/Maps/MapManager.h')
| -rw-r--r-- | src/server/game/Maps/MapManager.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/game/Maps/MapManager.h b/src/server/game/Maps/MapManager.h index 04811de991e..9d3b1a1746b 100644 --- a/src/server/game/Maps/MapManager.h +++ b/src/server/game/Maps/MapManager.h @@ -101,9 +101,14 @@ class TC_GAME_API MapManager return IsValidMAP(mapid, false) && Trinity::IsValidMapCoord(x, y, z, o); } + static bool IsValidMapCoord(uint32 mapid, Position const& pos) + { + return IsValidMapCoord(mapid, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()); + } + static bool IsValidMapCoord(WorldLocation const& loc) { - return IsValidMapCoord(loc.GetMapId(), loc.GetPositionX(), loc.GetPositionY(), loc.GetPositionZ(), loc.GetOrientation()); + return IsValidMapCoord(loc.GetMapId(), loc); } void DoDelayedMovesAndRemoves(); |
