Store and display played time on character Stats tab

Save totalTimePlayed/levelTimePlayed from SMSG_PLAYED_TIME. Request a
fresh update whenever the character screen is opened. Show total and
level-played time in a two-column layout below the stats panel.
This commit is contained in:
Kelsi 2026-03-12 03:09:52 -07:00
parent 46eb66b77f
commit 6ab9ba65f9
3 changed files with 34 additions and 0 deletions

View file

@ -349,6 +349,8 @@ public:
void queryServerTime();
void requestPlayedTime();
void queryWho(const std::string& playerName = "");
uint32_t getTotalTimePlayed() const { return totalTimePlayed_; }
uint32_t getLevelTimePlayed() const { return levelTimePlayed_; }
// Social commands
void addFriend(const std::string& playerName, const std::string& note = "");
@ -2224,6 +2226,8 @@ private:
uint64_t summonerGuid_ = 0;
std::string summonerName_;
float summonTimeoutSec_ = 0.0f;
uint32_t totalTimePlayed_ = 0;
uint32_t levelTimePlayed_ = 0;
// Trade state
TradeStatus tradeStatus_ = TradeStatus::None;