Core/Account: Add total time played in account (#1003)

This saves the total time played on the account, even if your characters have been deleted.
This commit is contained in:
Kargatum
2018-09-18 00:58:42 +07:00
committed by Barbz
parent 82ca2bef99
commit 0d6eb11db9
6 changed files with 45 additions and 11 deletions

View File

@@ -185,7 +185,7 @@ class CharacterCreateInfo
class WorldSession
{
public:
WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter, bool skipQueue);
WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter, bool skipQueue, uint32 TotalTime);
~WorldSession();
bool PlayerLoading() const { return m_playerLoading; }
@@ -223,6 +223,9 @@ class WorldSession
void SetPlayer(Player* player);
uint8 Expansion() const { return m_expansion; }
void SetTotalTime(uint32 TotalTime) { m_total_time = TotalTime; }
uint32 GetTotalTime() const { return m_total_time; }
void InitWarden(BigNumber* k, std::string const& os);
/// Session in auth.queue currently
@@ -964,6 +967,7 @@ class WorldSession
bool _skipQueue;
uint32 _accountId;
uint8 m_expansion;
uint32 m_total_time;
typedef std::list<AddonInfo> AddonsList;