mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 02:35:28 +00:00
feat: save play time as live did: time before the session, stime in it
Live kept the total before the running session in <char time> and the session's seconds in <char stime>; both changed at a login, together with llog (time 262486 and stime 7344 became time 269830 at the next login). The client reads both (LWOCharacterComponent::LoadFromSaveData 0x00ca4910) and shows their sum (SendMessage 0x00d34330, GetTimePlayed). The server wrote everything into time and no stime. Now time + stime is read (a missing stime is 0, so a save from before keeps its total) and time and stime are written as live had them. A session starts when the character is picked on the character list: charinfo.last_login is loaded with the character, a save whose llog is another login has its stime moved into time, and llog is written as the session's login. Without a known login the session goes on. GetTotalTimePlayed is still every second played. The dashboard's save check knows stime as a number. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -135,7 +135,7 @@ namespace CharacterXmlCheck {
|
||||
Numbers(c, where, eKind::INT, { "gm", "ft" });
|
||||
Numbers(c, where, eKind::UINT, { "lwid", "lnzid", "acct" });
|
||||
Numbers(c, where, eKind::UINT64, { "lzid", "co", "co1", "co2", "co3", "time" });
|
||||
Numbers(c, where, eKind::FLOAT, { "lzx", "lzy", "lzz", "lzrx", "lzry", "lzrz", "lzrw" });
|
||||
Numbers(c, where, eKind::FLOAT, { "lzx", "lzy", "lzz", "lzrx", "lzry", "lzrz", "lzrw", "stime" });
|
||||
|
||||
if (c.Attribute("acct") && Parses(c, "acct", eKind::UINT) && c.UnsignedAttribute("acct") != context.ownerAccountId) {
|
||||
Error(where + ": acct=\"" + c.Attribute("acct") + "\" is not the account of this character (" + std::to_string(context.ownerAccountId) + ")");
|
||||
|
||||
Reference in New Issue
Block a user