Server icon indicating copy to clipboard operation
Server copied to clipboard

Reimplement /played

Open mackal opened this issue 7 years ago • 3 comments

/played has been broken for ages.

mackal avatar Aug 09 '17 17:08 mackal

Will take a look and see what's up.

daerath avatar Jan 06 '18 16:01 daerath

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.

daerath avatar Jan 06 '18 16:01 daerath

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 ?

moguay avatar Oct 15 '19 16:10 moguay