优化登录逻辑,移除Def方法并直接设置登录结果

This commit is contained in:
1
2025-08-11 07:12:15 +00:00
parent db38531425
commit b8166892dc
2 changed files with 3 additions and 14 deletions

View File

@@ -20,7 +20,9 @@ func (h *Controller) Login(data *login.InInfo, c *entity.Conn) (result *login.Pl
share.ShareManager.SetUserOnline(data.Head.UserID, h.Port) //设置用户登录服务器
t.CompleteLogin() //通知客户端登录成功
c.SendPack(data.Def())
result = login.NewPlayerLoginInfo() //设置登录消息
data.Head.UserID = 99942
data.Head.Result = 0
} else {
err = errorcode.ErrorCodes.ErrLoginServerError