diff options
author | click <none@none> | 2010-05-16 04:03:53 +0200 |
---|---|---|
committer | click <none@none> | 2010-05-16 04:03:53 +0200 |
commit | 89887b9b6554656033079bd3c90e1495fb9edf74 (patch) | |
tree | ab52fd1065913f0997353b630faf8c36f76b16f4 /src/game/Map.h | |
parent | 6ee54548f34ab2247612f2d24e7412ce798dd3af (diff) |
Correct SMSG_INSTANCE_DIFFICULTY structure (fixes raid difficulty display).
Move GetDifficulty() in under Map-scope, so it's reachable for map-based functions
--HG--
branch : trunk
Diffstat (limited to 'src/game/Map.h')
-rw-r--r-- | src/game/Map.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/Map.h b/src/game/Map.h index 9e7fa49f066..a192390ba37 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -357,6 +357,11 @@ class Map : public GridRefManager<NGridType>, public Trinity::ObjectLevelLockabl virtual bool CanEnter(Player* /*player*/) { return true; } const char* GetMapName() const; + // have meaning only for instanced map (that have set real difficulty) + Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); } + bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DIFFICULTY; } + MapDifficulty const* GetMapDifficulty() const; + bool Instanceable() const { return i_mapEntry && i_mapEntry->Instanceable(); } // NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); } @@ -581,12 +586,8 @@ class InstanceMap : public Map void SendResetWarnings(uint32 timeLeft) const; void SetResetSchedule(bool on); - // have meaning only for instanced map (that have set real difficulty) - Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); } - bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DIFFICULTY; } uint32 GetMaxPlayers() const; uint32 GetMaxResetDelay() const; - MapDifficulty const* GetMapDifficulty() const; virtual void InitVisibilityDistance(); private: |