Server
Server copied to clipboard
Reimplement /played
/played has been broken for ages.
Will take a look and see what's up.
Part of the issue appears to be that there are multiple calls to Client::Save(uint8 iCommitNow), each of which will increase the total time played.
Also, the first time through when TotalSecondsPlayed is calculated, it uses the last time you logged in (not the current login, but the one prior to that) because it hasn't updated the database yet. So like, if you played yesterday, and then played today, the first pass through uses yesterday's lastlogin time.
I tried to understand, it seems to me that it lacks a good initialization of m_pp.lastlogin I have add it in Client::Handle_Connect_OP_ZoneEntry()
/* Set Total Seconds Played */ TotalSecondsPlayed = m_pp.timePlayedMin * 60; m_pp.lastlogin = time(nullptr);
Is more good, I do not have much more time added to each zoning, now just 1min lose.
Can you get a better overview of this problem ?