fix(fight): 登录直接断开,战斗复制错误

This commit is contained in:
1
2025-11-10 01:53:28 +00:00
parent 6da7f0b3f0
commit 9a434d55d7
2 changed files with 4 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ func (h *Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.
tt := data.CheakSession()
if !tt {
err = errorcode.ErrorCodes.ErrLoginServerError
defer c.Close()
return
}

View File

@@ -343,6 +343,9 @@ func IsNil(x interface{}) bool {
return rv.Kind() == reflect.Ptr && rv.IsNil()
}
func (f *FightC) copyskill(t *action.SelectSkillAction) *info.SkillEntity {
if t == nil {
return nil
}
if t.SkillEntity == nil {
return nil