随机任务条件校验

This commit is contained in:
wh_zcy 2022-09-20 18:07:26 +08:00
parent 3d22b50dd9
commit ced3f6856d
6 changed files with 146 additions and 166 deletions

View File

@ -94,7 +94,6 @@ var (
ff(comm.ModuleRtask, "rtest"): &formview.RtaskTestView{},
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleStart): &formview.RtaskBattlestartView{},
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleFinish): &formview.RtaskBattleFinishView{},
ff(comm.ModuleRtask, rtask.RtaskSubTypeGetrecord): &formview.RtaskRecordView{},
// linestory
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDostart): &formview.LinestoryStartView{},
ff(comm.ModuleLinestory, linestory.LinestorySubTypeDotask): &formview.LinestoryTaskView{},
@ -189,7 +188,6 @@ var (
ff(comm.ModuleRtask, rtask.RtaskSubTypeReward),
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleStart),
ff(comm.ModuleRtask, rtask.RtaskSubTypeBattleFinish),
ff(comm.ModuleRtask, rtask.RtaskSubTypeGetrecord),
ff(comm.ModuleRtask, "rtest"),
},
"linestory": {
@ -677,13 +675,6 @@ var (
SubType: rtask.RtaskSubTypeBattleFinish,
Enabled: true,
},
ff(comm.ModuleRtask, rtask.RtaskSubTypeGetrecord): {
NavLabel: "任务数据",
Desc: "任务数据",
MainType: string(comm.ModuleRtask),
SubType: rtask.RtaskSubTypeGetrecord,
Enabled: true,
},
ff(comm.ModuleRtask, "rtest"): {
NavLabel: "测试条件",
Desc: "测试任务触发",

View File

@ -1,24 +0,0 @@
package formview
import (
"go_dreamfactory/cmd/v2/model"
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/pb"
"fyne.io/fyne/v2"
"github.com/sirupsen/logrus"
)
type RtaskRecordView struct {
BaseformView
}
func (this *RtaskRecordView) CreateView(t *model.TestCase) fyne.CanvasObject {
this.form.OnSubmit = func() {
if err := service.GetPttService().SendToClient(t.MainType, t.SubType, &pb.RtaskGetrecordReq{}); err != nil {
logrus.Error(err)
}
}
return this.form
}

View File

@ -12,7 +12,7 @@ const (
RtaskSubTypeReward = "getreward" //奖励
RtaskSubTypeBattleStart = "battlestart" //战斗开始
RtaskSubTypeBattleFinish = "battlefinish" //战斗完成
RtaskSubTypeGetrecord = "getrecord" //任务数据
RtaskSubTypeChkcondi = "chkcondi" //任务条件校验
)
type apiComp struct {

View File

@ -0,0 +1,34 @@
package rtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) ChkcondiCheck(session comm.IUserSession, req *pb.RtaskChkCondiReq) (code pb.ErrorCode) {
if req.CondiId <= 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
func (this *apiComp) Chkcondi(session comm.IUserSession, req *pb.RtaskChkCondiReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ChkcondiCheck(session, req); code != pb.ErrorCode_Success {
return
}
rsp := &pb.RtaskChkCondiResp{}
err, ok := this.moduleRtask.modelRtask.checkCondi(session.GetUserId(), req.CondiId)
if err != nil {
code = pb.ErrorCode_RtaskCondiNoReach
return
}
rsp.Result = ok
if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeChkcondi, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -1,26 +0,0 @@
package rtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) GetrecordCheck(session comm.IUserSession, req *pb.RtaskGetrecordReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Getrecord(session comm.IUserSession, req *pb.RtaskGetrecordReq) (code pb.ErrorCode, data proto.Message) {
rsp := &pb.RtaskGetrecordResp{}
record := this.moduleRtask.modelRtaskRecord.getRecord(session.GetUserId())
if record.Uid != "" && record.Vals != nil {
rsp.Record = record
}
if err := session.SendMsg(string(this.moduleRtask.GetType()), RtaskSubTypeGetrecord, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -727,14 +727,16 @@ func (x *RtaskBattleFinishResp) GetIsWin() bool {
}
//获取玩家任务记录
type RtaskGetrecordReq struct {
type RtaskChkCondiReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CondiId int32 `protobuf:"varint,1,opt,name=condiId,proto3" json:"condiId"` //条件ID
}
func (x *RtaskGetrecordReq) Reset() {
*x = RtaskGetrecordReq{}
func (x *RtaskChkCondiReq) Reset() {
*x = RtaskChkCondiReq{}
if protoimpl.UnsafeEnabled {
mi := &file_rtask_rtask_msg_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -742,13 +744,13 @@ func (x *RtaskGetrecordReq) Reset() {
}
}
func (x *RtaskGetrecordReq) String() string {
func (x *RtaskChkCondiReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RtaskGetrecordReq) ProtoMessage() {}
func (*RtaskChkCondiReq) ProtoMessage() {}
func (x *RtaskGetrecordReq) ProtoReflect() protoreflect.Message {
func (x *RtaskChkCondiReq) ProtoReflect() protoreflect.Message {
mi := &file_rtask_rtask_msg_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -760,21 +762,28 @@ func (x *RtaskGetrecordReq) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use RtaskGetrecordReq.ProtoReflect.Descriptor instead.
func (*RtaskGetrecordReq) Descriptor() ([]byte, []int) {
// Deprecated: Use RtaskChkCondiReq.ProtoReflect.Descriptor instead.
func (*RtaskChkCondiReq) Descriptor() ([]byte, []int) {
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{13}
}
type RtaskGetrecordResp struct {
func (x *RtaskChkCondiReq) GetCondiId() int32 {
if x != nil {
return x.CondiId
}
return 0
}
type RtaskChkCondiResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Record *DBRtaskRecord `protobuf:"bytes,1,opt,name=record,proto3" json:"record"`
Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result"`
}
func (x *RtaskGetrecordResp) Reset() {
*x = RtaskGetrecordResp{}
func (x *RtaskChkCondiResp) Reset() {
*x = RtaskChkCondiResp{}
if protoimpl.UnsafeEnabled {
mi := &file_rtask_rtask_msg_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -782,13 +791,13 @@ func (x *RtaskGetrecordResp) Reset() {
}
}
func (x *RtaskGetrecordResp) String() string {
func (x *RtaskChkCondiResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RtaskGetrecordResp) ProtoMessage() {}
func (*RtaskChkCondiResp) ProtoMessage() {}
func (x *RtaskGetrecordResp) ProtoReflect() protoreflect.Message {
func (x *RtaskChkCondiResp) ProtoReflect() protoreflect.Message {
mi := &file_rtask_rtask_msg_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -800,16 +809,16 @@ func (x *RtaskGetrecordResp) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use RtaskGetrecordResp.ProtoReflect.Descriptor instead.
func (*RtaskGetrecordResp) Descriptor() ([]byte, []int) {
// Deprecated: Use RtaskChkCondiResp.ProtoReflect.Descriptor instead.
func (*RtaskChkCondiResp) Descriptor() ([]byte, []int) {
return file_rtask_rtask_msg_proto_rawDescGZIP(), []int{14}
}
func (x *RtaskGetrecordResp) GetRecord() *DBRtaskRecord {
func (x *RtaskChkCondiResp) GetResult() bool {
if x != nil {
return x.Record
return x.Result
}
return nil
return false
}
// 测试使用
@ -929,82 +938,81 @@ var file_rtask_rtask_msg_proto_rawDesc = []byte{
0x0a, 0x15, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6d, 0x73,
0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f,
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x14, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x2f, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x64, 0x62,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x49, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x41,
0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49,
0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52,
0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x28, 0x0a,
0x0c, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a,
0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b,
0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x73, 0x22, 0x66, 0x0a, 0x0e, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x6f,
0x6f, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x0f,
0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x6f,
0x6f, 0x73, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68, 0x6f,
0x6f, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75,
0x62, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x0f, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69,
0x6e, 0x69, 0x73, 0x68, 0x50, 0x75, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x22, 0x4d, 0x0a, 0x11, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65,
0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49,
0x64, 0x22, 0x4e, 0x0a, 0x12, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77,
0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49,
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49,
0x64, 0x22, 0x6d, 0x0a, 0x13, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c,
0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c,
0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73,
0x22, 0x37, 0x0a, 0x14, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53,
0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49,
0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x57, 0x0a, 0x14, 0x52, 0x74, 0x61,
0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65,
0x22, 0x49, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65,
0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72,
0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f,
0x72, 0x74, 0x22, 0x47, 0x0a, 0x15, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72,
0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72,
0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x2a, 0x0a, 0x0e, 0x52,
0x74, 0x61, 0x73, 0x6b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a,
0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x28, 0x0a, 0x0c, 0x52, 0x74, 0x61, 0x73, 0x6b,
0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49,
0x64, 0x22, 0x2b, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x66,
0x0a, 0x0e, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x71,
0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68,
0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68,
0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53,
0x75, 0x62, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x0f, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43,
0x68, 0x6f, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x49, 0x64, 0x12,
0x1e, 0x0a, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22,
0x2b, 0x0a, 0x0f, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x50, 0x75,
0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x11,
0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65,
0x71, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72,
0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x12, 0x52,
0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73,
0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x72,
0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x53, 0x75, 0x62, 0x49, 0x64, 0x22, 0x6d, 0x0a, 0x13, 0x52,
0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52,
0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f,
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73,
0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x22, 0x37, 0x0a, 0x14, 0x52, 0x74,
0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65,
0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69,
0x6e, 0x66, 0x6f, 0x22, 0x57, 0x0a, 0x14, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x72,
0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x22, 0x13, 0x0a, 0x11, 0x52,
0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71,
0x22, 0x3c, 0x0a, 0x12, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x47, 0x65, 0x74, 0x72, 0x65, 0x63, 0x6f,
0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x52, 0x74, 0x61, 0x73, 0x6b,
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x5e,
0x0a, 0x0c, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c,
0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06,
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x22, 0x23,
0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66,
0x6c, 0x61, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65,
0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x47, 0x0a, 0x15,
0x52, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12,
0x14, 0x0a, 0x05, 0x69, 0x73, 0x57, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
0x69, 0x73, 0x57, 0x69, 0x6e, 0x22, 0x2c, 0x0a, 0x10, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68,
0x6b, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
0x64, 0x69, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64,
0x69, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x11, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x43, 0x68, 0x6b, 0x43,
0x6f, 0x6e, 0x64, 0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75,
0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x22, 0x5e, 0x0a, 0x0c, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71,
0x12, 0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16,
0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06,
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64,
0x22, 0x23, 0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73,
0x70, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
0x04, 0x66, 0x6c, 0x61, 0x67, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1034,23 +1042,21 @@ var file_rtask_rtask_msg_proto_goTypes = []interface{}{
(*RtaskBattleStartResp)(nil), // 10: RtaskBattleStartResp
(*RtaskBattleFinishReq)(nil), // 11: RtaskBattleFinishReq
(*RtaskBattleFinishResp)(nil), // 12: RtaskBattleFinishResp
(*RtaskGetrecordReq)(nil), // 13: RtaskGetrecordReq
(*RtaskGetrecordResp)(nil), // 14: RtaskGetrecordResp
(*RtaskChkCondiReq)(nil), // 13: RtaskChkCondiReq
(*RtaskChkCondiResp)(nil), // 14: RtaskChkCondiResp
(*RtaskTestReq)(nil), // 15: RtaskTestReq
(*RtaskTestResp)(nil), // 16: RtaskTestResp
(*BattleInfo)(nil), // 17: BattleInfo
(*BattleReport)(nil), // 18: BattleReport
(*DBRtaskRecord)(nil), // 19: DBRtaskRecord
}
var file_rtask_rtask_msg_proto_depIdxs = []int32{
17, // 0: RtaskBattleStartResp.info:type_name -> BattleInfo
18, // 1: RtaskBattleFinishReq.report:type_name -> BattleReport
19, // 2: RtaskGetrecordResp.record:type_name -> DBRtaskRecord
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_rtask_rtask_msg_proto_init() }
@ -1059,7 +1065,6 @@ func file_rtask_rtask_msg_proto_init() {
return
}
file_battle_battle_msg_proto_init()
file_rtask_rtask_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_rtask_rtask_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RtaskApplyReq); i {
@ -1218,7 +1223,7 @@ func file_rtask_rtask_msg_proto_init() {
}
}
file_rtask_rtask_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RtaskGetrecordReq); i {
switch v := v.(*RtaskChkCondiReq); i {
case 0:
return &v.state
case 1:
@ -1230,7 +1235,7 @@ func file_rtask_rtask_msg_proto_init() {
}
}
file_rtask_rtask_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RtaskGetrecordResp); i {
switch v := v.(*RtaskChkCondiResp); i {
case 0:
return &v.state
case 1: