[8202] Replace raw array index values by enums. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
+11
-3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user