diff options
Diffstat (limited to 'src/game/Player.h')
| -rw-r--r-- | src/game/Player.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/game/Player.h b/src/game/Player.h index d834ceaee15..d99d4966362 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -755,6 +755,14 @@ enum EnviromentalDamage DAMAGE_FALL_TO_VOID = 6 // custom case for fall without durability loss }; +enum PlayedTimeIndex +{ + PLAYED_TIME_TOTAL = 0, + PLAYED_TIME_LEVEL = 1 +}; + +#define MAX_PLAYED_TIME_INDEX 2 + // used at player loading query list preparing, and later result selection enum PlayerLoginQueryIndex { @@ -964,9 +972,9 @@ class TRINITY_DLL_SPEC Player : public Unit // Played Time Stuff time_t m_logintime; time_t m_Last_tick; - uint32 m_Played_time[2]; - uint32 GetTotalPlayedTime() { return m_Played_time[0]; }; - uint32 GetLevelPlayedTime() { return m_Played_time[1]; }; + uint32 m_Played_time[MAX_PLAYED_TIME_INDEX]; + uint32 GetTotalPlayedTime() { return m_Played_time[PLAYED_TIME_TOTAL]; }; + uint32 GetLevelPlayedTime() { return m_Played_time[PLAYED_TIME_LEVEL]; }; void setDeathState(DeathState s); // overwrite Unit::setDeathState |
