25 lines
542 B
Go
25 lines
542 B
Go
package rtask
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
func (this *apiComp) BattleFinishCheck(session comm.IUserSession, req *pb.RtaskBattleFinishReq) (code pb.ErrorCode) {
|
|
if req.Result == 0 {
|
|
code = pb.ErrorCode_ReqParameterError
|
|
}
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) BattleFinish(session comm.IUserSession, req *pb.RtaskBattleFinishReq) (code pb.ErrorCode, data proto.Message) {
|
|
if code = this.BattleFinishCheck(session, req); code != pb.ErrorCode_Success {
|
|
return
|
|
}
|
|
|
|
|
|
return
|
|
}
|