[10414] Constantify some functions in InstanceSave.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
VladimirMangos 2010-08-28 01:41:53 +04:00
parent 1ccf1ccd86
commit 6d5559544b
3 changed files with 14 additions and 14 deletions

View file

@ -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)
{