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

@@ -1633,6 +1633,7 @@ void Player::Update(uint32 p_time)
uint32 elapsed = uint32(now - m_Last_tick);
m_Played_time[PLAYED_TIME_TOTAL] += elapsed; // Total played time
m_Played_time[PLAYED_TIME_LEVEL] += elapsed; // Level played time
GetSession()->SetTotalTime(GetSession()->GetTotalTime() + elapsed);
m_Last_tick = now;
}