```
refactor(common/rpc): 修改服务引用从blazing到config模块 将RPC服务中的blservice引用替换为config服务, 统一使用config.NewServerService()进行服务器信息获取。 feat(blazing): 实现新的会话生成机制 - 添加Gensession方法,基于accountID、UUID生成唯一会话标识 - 会话ID由accountID(4字节) + UUID(16字节)组成,编码为十六进制字符串 - 更新登录控制器使用新的会话生成方式 fix(pet_info): 添加宠物信息空值检查 在切换宠物背包仓库时,当宠物信息查询结果为空时, 返回系统错误避免空指针异常。
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
"blazing/logic/controller"
|
||||
|
||||
blservice "blazing/modules/blazing/service"
|
||||
config "blazing/modules/config/service"
|
||||
|
||||
"fmt"
|
||||
"log"
|
||||
@@ -56,7 +56,7 @@ func isPortAvailable(port uint32) bool {
|
||||
// 如果id是0,那就是login server
|
||||
func Start() {
|
||||
serverID := cool.Config.GameOnlineID
|
||||
cool.Config.ServerInfo = blservice.NewLoginServiceService().GetServerID(serverID).ServerList
|
||||
cool.Config.ServerInfo = config.NewServerService().GetServerID(serverID).ServerList
|
||||
|
||||
if cool.Config.ServerInfo.IsVip == 1 {
|
||||
g.DB().SetDebug(true)
|
||||
@@ -78,6 +78,7 @@ func Start() {
|
||||
controller.Maincontroller.Port = uint16(port) //赋值服务器ID
|
||||
controller.Init(true)
|
||||
xmlres.Initfile()
|
||||
blservice.NewLoginServiceService().SetServerID(serverID, gconv.Uint16(port))
|
||||
config.NewServerService().SetServerID(serverID, gconv.Uint16(port))
|
||||
|
||||
server.Boot()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user