diff options
author | Shauren <shauren.trinity@gmail.com> | 2018-09-15 17:55:26 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-09-15 17:55:26 +0200 |
commit | 738f37d3cf45d4e10eda9d44a4cb17079b7bbc1b (patch) | |
tree | 9db45160ed8a0c68090dec2aebb9b73c9f2ea335 /src/server/game/Maps/Map.h | |
parent | 0f3156d324ff8134171bada01b40f5c23f5c43cc (diff) |
Core/Maps: Replaced spawnmask with difficulty list
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r-- | src/server/game/Maps/Map.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h index 8140d60c4a7..7d453f0406a 100644 --- a/src/server/game/Maps/Map.h +++ b/src/server/game/Maps/Map.h @@ -260,7 +260,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType> { friend class MapReference; public: - Map(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent = NULL); + Map(uint32 id, time_t, uint32 InstanceId, Difficulty SpawnMode, Map* _parent = NULL); virtual ~Map(); MapEntry const* GetEntry() const { return i_mapEntry; } @@ -370,7 +370,6 @@ class TC_GAME_API Map : public GridRefManager<NGridType> bool CheckGridIntegrity(Creature* c, bool moved) const; uint32 GetInstanceId() const { return i_InstanceId; } - uint8 GetSpawnMode() const { return (i_spawnMode); } enum EnterState { @@ -391,7 +390,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType> const char* GetMapName() const; // have meaning only for instanced map (that have set real difficulty) - Difficulty GetDifficultyID() const { return Difficulty(GetSpawnMode()); } + Difficulty GetDifficultyID() const { return Difficulty(i_spawnMode); } MapDifficultyEntry const* GetMapDifficulty() const; uint8 GetDifficultyLootItemContext() const; @@ -402,7 +401,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType> bool IsRaid() const; bool IsRaidOrHeroicDungeon() const; bool IsHeroic() const; - bool Is25ManRaid() const; // since 25man difficulties are 1 and 3, we can check them like that + bool Is25ManRaid() const; bool IsBattleground() const; bool IsBattleArena() const; bool IsBattlegroundOrArena() const; @@ -642,7 +641,7 @@ class TC_GAME_API Map : public GridRefManager<NGridType> std::mutex _gridLock; MapEntry const* i_mapEntry; - uint8 i_spawnMode; + Difficulty i_spawnMode; uint32 i_InstanceId; uint32 m_unloadTimer; float m_VisibleDistance; @@ -766,7 +765,7 @@ enum InstanceResetMethod class TC_GAME_API InstanceMap : public Map { public: - InstanceMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode, Map* _parent); + InstanceMap(uint32 id, time_t, uint32 InstanceId, Difficulty SpawnMode, Map* _parent); ~InstanceMap(); bool AddPlayerToMap(Player* player, bool initPlayer = true) override; void RemovePlayerFromMap(Player*, bool) override; @@ -804,7 +803,7 @@ class TC_GAME_API InstanceMap : public Map class TC_GAME_API BattlegroundMap : public Map { public: - BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, uint8 spawnMode); + BattlegroundMap(uint32 id, time_t, uint32 InstanceId, Map* _parent, Difficulty spawnMode); ~BattlegroundMap(); bool AddPlayerToMap(Player* player, bool initPlayer = true) override; |