上传战斗代码

This commit is contained in:
liwei 2023-07-11 15:14:38 +08:00
parent 3d5ff61e1d
commit b651cd3406
4 changed files with 22 additions and 13 deletions

View File

@ -66,6 +66,7 @@ type IUserSession interface {
Push() (err error) //警告 api传递过来的会话禁用此接口
Close() (err error)
Reset()
Clone() (clone *UserSession) //克隆
ToString() string
}

View File

@ -159,7 +159,15 @@ func (this *UserSession) Push() (err error) {
// 克隆
func (this *UserSession) Clone() (clone *UserSession) {
clone = &UserSession{
msgqueue: make([]*pb.UserMessage, 0),
service: this.service,
IP: this.IP,
SessionId: this.SessionId,
GatewayServiceId: this.GatewayServiceId,
ServiceTag: this.ServiceTag,
UserId: this.UserId,
}
return
}

View File

@ -46,7 +46,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
errdata = &pb.ErrorData{
Code: pb.ErrorCode_BattleValidationFailed,
Title: pb.ErrorCode_BattleValidationFailed.ToString(),
Message: err.Error(),
Message: "battle iswin fail",
}
return
}