From da8eefca45a168dc15fc8b59d66d9a81d4b9a0a4 Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:30:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/admin.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/server/game/admin.go b/src/server/game/admin.go index 48d9f43f..9790d1c1 100644 --- a/src/server/game/admin.go +++ b/src/server/game/admin.go @@ -101,11 +101,13 @@ func AdminPlayerInfo(args []interface{}) error { req := &msg.ReqAdminInfo{} proto.Unmarshal(buf, req) player := G_GameLogicPtr.GetPlayer(req.Uid) + online := true if player == nil { player = new(Player) player.M_DwUin = req.Uid player.InitPlayerOnly() player.ZeroUpdate(nil) + online = false } res := make(map[string]interface{}) res["Name"] = player.PlayMod.getBaseMod().NickName @@ -121,6 +123,10 @@ func AdminPlayerInfo(args []interface{}) error { res["Login"] = player.GetPlayerBaseMod().Data.LoginTime res["Cumulative"] = player.PlayMod.getBaseMod().Cumulative res["TodayCumulative"] = player.PlayMod.getBaseMod().TodayCumulative + if online { + res["Cumulative"] = int64(player.PlayMod.getBaseMod().Cumulative) + GoUtil.Now() - int64(player.GetPlayerBaseMod().Data.LoginTime) + res["TodayCumulative"] = int64(player.PlayMod.getBaseMod().TodayCumulative) + GoUtil.Now() - int64(player.GetPlayerBaseMod().Data.LoginTime) + } res["Bonus"] = player.PlayMod.getLimitedTimeEventMod().Progress res["Code"] = player.PlayMod.getBaseMod().AddCode OrderMap := make(map[int]interface{})