fix(login): 修正用户登录时间字段命名及逻辑

将 `Onlinetime` 字段更名为 `Logintime`,以更准确反映其含义,并确保在登录时正确记录时间戳。

refactor(player): 移除冗余的 Save 方法及相关逻辑

删除 Player 结构体中的 Save、CanGetExp、CompleteLogin 和 IsNewPlayer 方法,
相关功能已迁移或不再使用。

feat(pprof): 更新 pprof 监听地址

修改 README 中的 pprof 示例命令,将监听地址从远程 IP 改为本地回环地址 `127.0.0.1
This commit is contained in:
2025-11-15 13:20:42 +08:00
parent 0e1860bdf4
commit f919047ff6
14 changed files with 120 additions and 112 deletions

View File

@@ -66,7 +66,7 @@ func (h *Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.
return
}
t.Info.UserID = data.Head.UserID
t.Onlinetime = uint32(time.Now().Unix()) //保存时间戳
t.Logintime = uint32(time.Now().Unix()) //保存时间戳
t.Changemap = true
cool.Loger.Info(context.Background(), "用户上次重置日期", t.Info.LastResetTime.String())
if !IsToday(t.Info.LastResetTime) { //判断是否是今天