diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index 1e0c1519a..7520f64d7 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -86,7 +86,7 @@ void InstanceSave::SaveToDB() CharacterDatabase.PExecute("INSERT INTO instance VALUES ('%u', '%u', '"UI64FMTD"', '%u', '%s')", m_instanceid, GetMapId(), (uint64)GetResetTimeForDB(), GetDifficulty(), data.c_str()); } -time_t InstanceSave::GetResetTimeForDB() +time_t InstanceSave::GetResetTimeForDB() const { // only save the reset time for normal instances const MapEntry *entry = sMapStore.LookupEntry(GetMapId()); @@ -97,12 +97,12 @@ time_t InstanceSave::GetResetTimeForDB() } // to cache or not to cache, that is the question -InstanceTemplate const* InstanceSave::GetTemplate() +InstanceTemplate const* InstanceSave::GetTemplate() const { return ObjectMgr::GetInstanceTemplate(m_mapid); } -MapEntry const* InstanceSave::GetMapEntry() +MapEntry const* InstanceSave::GetMapEntry() const { return sMapStore.LookupEntry(m_mapid); } diff --git a/src/game/InstanceSaveMgr.h b/src/game/InstanceSaveMgr.h index 24373cb16..0c769a18d 100644 --- a/src/game/InstanceSaveMgr.h +++ b/src/game/InstanceSaveMgr.h @@ -54,14 +54,14 @@ class InstanceSave or when the instance is reset */ ~InstanceSave(); - uint8 GetPlayerCount() { return m_playerList.size(); } - uint8 GetGroupCount() { return m_groupList.size(); } + uint8 GetPlayerCount() const { return m_playerList.size(); } + uint8 GetGroupCount() const { return m_groupList.size(); } /* A map corresponding to the InstanceId/MapId does not always exist. InstanceSave objects may be created on player logon but the maps are created and loaded only when a player actually enters the instance. */ - uint32 GetInstanceId() { return m_instanceid; } - uint32 GetMapId() { return m_mapid; } + uint32 GetInstanceId() const { return m_instanceid; } + uint32 GetMapId() const { return m_mapid; } /* Saved when the instance is generated for the first time */ void SaveToDB(); @@ -70,12 +70,12 @@ class InstanceSave /* for normal instances this corresponds to max(creature respawn time) + X hours for raid/heroic instances this caches the global respawn time for the map */ - time_t GetResetTime() { return m_resetTime; } + time_t GetResetTime() const { return m_resetTime; } void SetResetTime(time_t resetTime) { m_resetTime = resetTime; } - time_t GetResetTimeForDB(); + time_t GetResetTimeForDB() const; - InstanceTemplate const* GetTemplate(); - MapEntry const* GetMapEntry(); + InstanceTemplate const* GetTemplate() const; + MapEntry const* GetMapEntry() const; /* online players bound to the instance (perm/solo) does not include the members of the group unless they have permanent saves */ @@ -88,12 +88,12 @@ class InstanceSave /* instances cannot be reset (except at the global reset time) if there are players permanently bound to it this is cached for the case when those players are offline */ - bool CanReset() { return m_canReset; } + bool CanReset() const { return m_canReset; } void SetCanReset(bool canReset) { m_canReset = canReset; } /* currently it is possible to omit this information from this structure but that would depend on a lot of things that can easily change in future */ - Difficulty GetDifficulty() { return m_difficulty; } + Difficulty GetDifficulty() const { return m_difficulty; } void SetUsedByMapState(bool state) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c6883116d..50c93d821 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10413" + #define REVISION_NR "10414" #endif // __REVISION_NR_H__