refactor(common): 重构 common 模块

- 移除 global.go 文件
- 更新 player.go 中的玩家数据存储方式
- 删除 session.go 文件
- 调整 rpc.go 中的 RPC 客户端方法
- 更新 ServerEvent.go 中的会话管理
- 调整 controller 中的 Maincontroller 结构
- 更新 login.go 中的用户登录逻辑
- 调整 service 中的玩家数据获取方式
- 更新 admin/login.go 和 login.go 中的会话管理
This commit is contained in:
2025-07-15 12:14:17 +08:00
parent 43a726006c
commit 7a87bfa089
13 changed files with 208 additions and 80 deletions

View File

@@ -72,8 +72,8 @@ func Start(serverid uint32) {
}
// go func() {
t := rpc.StartClient(uint16(serverid), controller.Maincontroller)
t := rpc.StartClient(uint16(port), controller.Maincontroller)
//TODO 待实现掉线重新连接login
controller.Maincontroller.RPCClient = *t //将RPC赋值Start
controller.Maincontroller.Port = serverid //赋值服务器ID
//}()