From 77a00beecdf27a5e04c3d8b13612eb5edbaffe20 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Tue, 25 Jul 2023 14:36:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=96=E7=95=8C?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1gm=E5=91=BD=E4=BB=A4=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gm/module.go | 2 +- modules/wtask/module.go | 2 +- pb/mainline_db.pb.go | 247 ++++++++++++++ pb/mainline_msg.pb.go | 716 ++++++++++++++++++++++++++++++++++++++++ pb/mline_msg.pb.go | 32 +- 5 files changed, 986 insertions(+), 13 deletions(-) create mode 100644 pb/mainline_db.pb.go create mode 100644 pb/mainline_msg.pb.go diff --git a/modules/gm/module.go b/modules/gm/module.go index bd9aef7f9..7f5d75189 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -167,7 +167,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er log.Field{Key: "res", Value: res}, ) } else if len(datas) == 2 && (datas[0] == "worldtask") { - module, err := this.service.GetModule(comm.ModuleWorldtask) + module, err := this.service.GetModule(comm.ModuleWtask) if err != nil { return } diff --git a/modules/wtask/module.go b/modules/wtask/module.go index 679b00911..bbd8ace71 100644 --- a/modules/wtask/module.go +++ b/modules/wtask/module.go @@ -462,7 +462,7 @@ func (this *WTask) BingoJumpTask(session comm.IUserSession, taskId int32) (errda if ok { return } - + wtask.Activations = append(wtask.Activations, taskId) update["activations"] = wtask.Activations if err = this.modelwtask.Change(session.GetUserId(), update); err != nil { diff --git a/pb/mainline_db.pb.go b/pb/mainline_db.pb.go new file mode 100644 index 000000000..7d4cb0735 --- /dev/null +++ b/pb/mainline_db.pb.go @@ -0,0 +1,247 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: mainline/mainline_db.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DBMainline struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` + Lastlevel int32 `protobuf:"varint,3,opt,name=lastlevel,proto3" json:"lastlevel"` //最后一次通关管卡 + Level map[int32]int32 `protobuf:"bytes,4,rep,name=level,proto3" json:"level" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //已通关管卡的星级 + Chapteraward map[int32]int32 `protobuf:"bytes,5,rep,name=chapteraward,proto3" json:"chapteraward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //章节进度奖励 key:章节id value:0和没有表示没有完成 1表示已完成未领取 2表示已领取 + Exploreaward map[int32]int32 `protobuf:"bytes,6,rep,name=exploreaward,proto3" json:"exploreaward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //章节探索奖励 key:章节id value:0和没有表示没有完成 1表示已完成未领取 2表示已领取 + Groupaward map[int32]int32 `protobuf:"bytes,7,rep,name=groupaward,proto3" json:"groupaward" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //章节探索奖励 key:组id value:0和没有表示没有完成 1表示已完成未领取 2表示已领取 + Ps map[int32]int32 `protobuf:"bytes,8,rep,name=ps,proto3" json:"ps" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 预扣的体力 +} + +func (x *DBMainline) Reset() { + *x = DBMainline{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBMainline) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBMainline) ProtoMessage() {} + +func (x *DBMainline) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_db_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBMainline.ProtoReflect.Descriptor instead. +func (*DBMainline) Descriptor() ([]byte, []int) { + return file_mainline_mainline_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBMainline) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBMainline) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBMainline) GetLastlevel() int32 { + if x != nil { + return x.Lastlevel + } + return 0 +} + +func (x *DBMainline) GetLevel() map[int32]int32 { + if x != nil { + return x.Level + } + return nil +} + +func (x *DBMainline) GetChapteraward() map[int32]int32 { + if x != nil { + return x.Chapteraward + } + return nil +} + +func (x *DBMainline) GetExploreaward() map[int32]int32 { + if x != nil { + return x.Exploreaward + } + return nil +} + +func (x *DBMainline) GetGroupaward() map[int32]int32 { + if x != nil { + return x.Groupaward + } + return nil +} + +func (x *DBMainline) GetPs() map[int32]int32 { + if x != nil { + return x.Ps + } + return nil +} + +var File_mainline_mainline_db_proto protoreflect.FileDescriptor + +var file_mainline_mainline_db_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x05, 0x0a, + 0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x6c, 0x61, 0x73, 0x74, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2c, 0x0a, 0x05, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x44, 0x42, 0x4d, + 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x68, 0x61, + 0x70, 0x74, 0x65, 0x72, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1d, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x43, 0x68, 0x61, + 0x70, 0x74, 0x65, 0x72, 0x61, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, + 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x61, 0x77, 0x61, 0x72, 0x64, 0x12, 0x41, 0x0a, 0x0c, + 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2e, + 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x61, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x61, 0x77, 0x61, 0x72, 0x64, 0x12, + 0x3b, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x61, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x61, 0x77, 0x61, 0x72, 0x64, 0x12, 0x23, 0x0a, 0x02, + 0x70, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x50, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x02, 0x70, + 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x43, + 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x61, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, + 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x61, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3d, 0x0a, + 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x61, 0x77, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x35, 0x0a, 0x07, + 0x50, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_mainline_mainline_db_proto_rawDescOnce sync.Once + file_mainline_mainline_db_proto_rawDescData = file_mainline_mainline_db_proto_rawDesc +) + +func file_mainline_mainline_db_proto_rawDescGZIP() []byte { + file_mainline_mainline_db_proto_rawDescOnce.Do(func() { + file_mainline_mainline_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_mainline_mainline_db_proto_rawDescData) + }) + return file_mainline_mainline_db_proto_rawDescData +} + +var file_mainline_mainline_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_mainline_mainline_db_proto_goTypes = []interface{}{ + (*DBMainline)(nil), // 0: DBMainline + nil, // 1: DBMainline.LevelEntry + nil, // 2: DBMainline.ChapterawardEntry + nil, // 3: DBMainline.ExploreawardEntry + nil, // 4: DBMainline.GroupawardEntry + nil, // 5: DBMainline.PsEntry +} +var file_mainline_mainline_db_proto_depIdxs = []int32{ + 1, // 0: DBMainline.level:type_name -> DBMainline.LevelEntry + 2, // 1: DBMainline.chapteraward:type_name -> DBMainline.ChapterawardEntry + 3, // 2: DBMainline.exploreaward:type_name -> DBMainline.ExploreawardEntry + 4, // 3: DBMainline.groupaward:type_name -> DBMainline.GroupawardEntry + 5, // 4: DBMainline.ps:type_name -> DBMainline.PsEntry + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_mainline_mainline_db_proto_init() } +func file_mainline_mainline_db_proto_init() { + if File_mainline_mainline_db_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mainline_mainline_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DBMainline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mainline_mainline_db_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mainline_mainline_db_proto_goTypes, + DependencyIndexes: file_mainline_mainline_db_proto_depIdxs, + MessageInfos: file_mainline_mainline_db_proto_msgTypes, + }.Build() + File_mainline_mainline_db_proto = out.File + file_mainline_mainline_db_proto_rawDesc = nil + file_mainline_mainline_db_proto_goTypes = nil + file_mainline_mainline_db_proto_depIdxs = nil +} diff --git a/pb/mainline_msg.pb.go b/pb/mainline_msg.pb.go new file mode 100644 index 000000000..9f1b4da1b --- /dev/null +++ b/pb/mainline_msg.pb.go @@ -0,0 +1,716 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.20.0 +// source: mainline/mainline_msg.proto + +package pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +//主线关卡信息管理 +type MainlineInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MainlineInfoReq) Reset() { + *x = MainlineInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineInfoReq) ProtoMessage() {} + +func (x *MainlineInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineInfoReq.ProtoReflect.Descriptor instead. +func (*MainlineInfoReq) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{0} +} + +//主线关卡信息管理 回应 +type MainlineInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *DBMainline `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` +} + +func (x *MainlineInfoResp) Reset() { + *x = MainlineInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineInfoResp) ProtoMessage() {} + +func (x *MainlineInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineInfoResp.ProtoReflect.Descriptor instead. +func (*MainlineInfoResp) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *MainlineInfoResp) GetInfo() *DBMainline { + if x != nil { + return x.Info + } + return nil +} + +// 挑战关卡 +type MainlineChallengeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level"` // 小关ID + Battle *BattleFormation `protobuf:"bytes,2,opt,name=battle,proto3" json:"battle"` +} + +func (x *MainlineChallengeReq) Reset() { + *x = MainlineChallengeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineChallengeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineChallengeReq) ProtoMessage() {} + +func (x *MainlineChallengeReq) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineChallengeReq.ProtoReflect.Descriptor instead. +func (*MainlineChallengeReq) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *MainlineChallengeReq) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *MainlineChallengeReq) GetBattle() *BattleFormation { + if x != nil { + return x.Battle + } + return nil +} + +type MainlineChallengeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` + Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level"` // 小关ID +} + +func (x *MainlineChallengeResp) Reset() { + *x = MainlineChallengeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineChallengeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineChallengeResp) ProtoMessage() {} + +func (x *MainlineChallengeResp) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineChallengeResp.ProtoReflect.Descriptor instead. +func (*MainlineChallengeResp) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *MainlineChallengeResp) GetInfo() *BattleInfo { + if x != nil { + return x.Info + } + return nil +} + +func (x *MainlineChallengeResp) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +//关卡战斗结束请求 +type MainlineChallengeOverReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level"` // 小关ID + Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报 +} + +func (x *MainlineChallengeOverReq) Reset() { + *x = MainlineChallengeOverReq{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineChallengeOverReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineChallengeOverReq) ProtoMessage() {} + +func (x *MainlineChallengeOverReq) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineChallengeOverReq.ProtoReflect.Descriptor instead. +func (*MainlineChallengeOverReq) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *MainlineChallengeOverReq) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *MainlineChallengeOverReq) GetReport() *BattleReport { + if x != nil { + return x.Report + } + return nil +} + +type MainlineChallengeOverResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level"` //小关ID + Star int32 `protobuf:"varint,2,opt,name=star,proto3" json:"star"` //通关星级 + Reward []*UserAssets `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward"` //奖励 + UserExp int32 `protobuf:"varint,4,opt,name=userExp,proto3" json:"userExp"` + HeroExp int32 `protobuf:"varint,5,opt,name=heroExp,proto3" json:"heroExp"` +} + +func (x *MainlineChallengeOverResp) Reset() { + *x = MainlineChallengeOverResp{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineChallengeOverResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineChallengeOverResp) ProtoMessage() {} + +func (x *MainlineChallengeOverResp) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineChallengeOverResp.ProtoReflect.Descriptor instead. +func (*MainlineChallengeOverResp) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *MainlineChallengeOverResp) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *MainlineChallengeOverResp) GetStar() int32 { + if x != nil { + return x.Star + } + return 0 +} + +func (x *MainlineChallengeOverResp) GetReward() []*UserAssets { + if x != nil { + return x.Reward + } + return nil +} + +func (x *MainlineChallengeOverResp) GetUserExp() int32 { + if x != nil { + return x.UserExp + } + return 0 +} + +func (x *MainlineChallengeOverResp) GetHeroExp() int32 { + if x != nil { + return x.HeroExp + } + return 0 +} + +//通关关卡 处理剧情和一些 +type MainlineLevelPassReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level"` // 小关ID + Report *BattleReport `protobuf:"bytes,2,opt,name=report,proto3" json:"report"` //战报 +} + +func (x *MainlineLevelPassReq) Reset() { + *x = MainlineLevelPassReq{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineLevelPassReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineLevelPassReq) ProtoMessage() {} + +func (x *MainlineLevelPassReq) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineLevelPassReq.ProtoReflect.Descriptor instead. +func (*MainlineLevelPassReq) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{6} +} + +func (x *MainlineLevelPassReq) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *MainlineLevelPassReq) GetReport() *BattleReport { + if x != nil { + return x.Report + } + return nil +} + +type MainlineLevelPassResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level"` //小关ID + Star int32 `protobuf:"varint,2,opt,name=star,proto3" json:"star"` //通关星级 + Reward []*UserAssets `protobuf:"bytes,3,rep,name=reward,proto3" json:"reward"` //奖励 + UserExp int32 `protobuf:"varint,4,opt,name=userExp,proto3" json:"userExp"` + HeroExp int32 `protobuf:"varint,5,opt,name=heroExp,proto3" json:"heroExp"` +} + +func (x *MainlineLevelPassResp) Reset() { + *x = MainlineLevelPassResp{} + if protoimpl.UnsafeEnabled { + mi := &file_mainline_mainline_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MainlineLevelPassResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MainlineLevelPassResp) ProtoMessage() {} + +func (x *MainlineLevelPassResp) ProtoReflect() protoreflect.Message { + mi := &file_mainline_mainline_msg_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MainlineLevelPassResp.ProtoReflect.Descriptor instead. +func (*MainlineLevelPassResp) Descriptor() ([]byte, []int) { + return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *MainlineLevelPassResp) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *MainlineLevelPassResp) GetStar() int32 { + if x != nil { + return x.Star + } + return 0 +} + +func (x *MainlineLevelPassResp) GetReward() []*UserAssets { + if x != nil { + return x.Reward + } + return nil +} + +func (x *MainlineLevelPassResp) GetUserExp() int32 { + if x != nil { + return x.UserExp + } + return 0 +} + +func (x *MainlineLevelPassResp) GetHeroExp() int32 { + if x != nil { + return x.HeroExp + } + return 0 +} + +var File_mainline_mainline_msg_proto protoreflect.FileDescriptor + +var file_mainline_mainline_msg_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c, + 0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6d, + 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x5f, 0x64, 0x62, 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, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, + 0x0a, 0x0f, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x22, 0x33, 0x0a, 0x10, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, + 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x56, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x22, 0x4e, + 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, + 0x6e, 0x67, 0x65, 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, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x57, + 0x0a, 0x18, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, + 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 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, 0x9e, 0x01, 0x0a, 0x19, 0x4d, 0x61, 0x69, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, + 0x23, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x12, 0x18, + 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x22, 0x53, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, + 0x6c, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x50, 0x61, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x02, 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, 0x9a, 0x01, + 0x0a, 0x15, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x50, + 0x61, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, + 0x72, 0x12, 0x23, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, + 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, + 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mainline_mainline_msg_proto_rawDescOnce sync.Once + file_mainline_mainline_msg_proto_rawDescData = file_mainline_mainline_msg_proto_rawDesc +) + +func file_mainline_mainline_msg_proto_rawDescGZIP() []byte { + file_mainline_mainline_msg_proto_rawDescOnce.Do(func() { + file_mainline_mainline_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_mainline_mainline_msg_proto_rawDescData) + }) + return file_mainline_mainline_msg_proto_rawDescData +} + +var file_mainline_mainline_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_mainline_mainline_msg_proto_goTypes = []interface{}{ + (*MainlineInfoReq)(nil), // 0: MainlineInfoReq + (*MainlineInfoResp)(nil), // 1: MainlineInfoResp + (*MainlineChallengeReq)(nil), // 2: MainlineChallengeReq + (*MainlineChallengeResp)(nil), // 3: MainlineChallengeResp + (*MainlineChallengeOverReq)(nil), // 4: MainlineChallengeOverReq + (*MainlineChallengeOverResp)(nil), // 5: MainlineChallengeOverResp + (*MainlineLevelPassReq)(nil), // 6: MainlineLevelPassReq + (*MainlineLevelPassResp)(nil), // 7: MainlineLevelPassResp + (*DBMainline)(nil), // 8: DBMainline + (*BattleFormation)(nil), // 9: BattleFormation + (*BattleInfo)(nil), // 10: BattleInfo + (*BattleReport)(nil), // 11: BattleReport + (*UserAssets)(nil), // 12: UserAssets +} +var file_mainline_mainline_msg_proto_depIdxs = []int32{ + 8, // 0: MainlineInfoResp.info:type_name -> DBMainline + 9, // 1: MainlineChallengeReq.battle:type_name -> BattleFormation + 10, // 2: MainlineChallengeResp.info:type_name -> BattleInfo + 11, // 3: MainlineChallengeOverReq.report:type_name -> BattleReport + 12, // 4: MainlineChallengeOverResp.reward:type_name -> UserAssets + 11, // 5: MainlineLevelPassReq.report:type_name -> BattleReport + 12, // 6: MainlineLevelPassResp.reward:type_name -> UserAssets + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_mainline_mainline_msg_proto_init() } +func file_mainline_mainline_msg_proto_init() { + if File_mainline_mainline_msg_proto != nil { + return + } + file_mainline_mainline_db_proto_init() + file_battle_battle_msg_proto_init() + file_comm_proto_init() + if !protoimpl.UnsafeEnabled { + file_mainline_mainline_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineInfoReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mainline_mainline_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineInfoResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mainline_mainline_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineChallengeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mainline_mainline_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineChallengeResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mainline_mainline_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineChallengeOverReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mainline_mainline_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineChallengeOverResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mainline_mainline_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineLevelPassReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mainline_mainline_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MainlineLevelPassResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mainline_mainline_msg_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mainline_mainline_msg_proto_goTypes, + DependencyIndexes: file_mainline_mainline_msg_proto_depIdxs, + MessageInfos: file_mainline_mainline_msg_proto_msgTypes, + }.Build() + File_mainline_mainline_msg_proto = out.File + file_mainline_mainline_msg_proto_rawDesc = nil + file_mainline_mainline_msg_proto_goTypes = nil + file_mainline_mainline_msg_proto_depIdxs = nil +} diff --git a/pb/mline_msg.pb.go b/pb/mline_msg.pb.go index 1e6d67497..a9f08bfcd 100644 --- a/pb/mline_msg.pb.go +++ b/pb/mline_msg.pb.go @@ -403,6 +403,7 @@ type MlineChallengeOverResp struct { Reward []*UserAssets `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward"` // 奖励 UserExp int32 `protobuf:"varint,3,opt,name=userExp,proto3" json:"userExp"` HeroExp int32 `protobuf:"varint,4,opt,name=heroExp,proto3" json:"heroExp"` + StageId int32 `protobuf:"varint,5,opt,name=stageId,proto3" json:"stageId"` // 小关ID } func (x *MlineChallengeOverResp) Reset() { @@ -465,6 +466,13 @@ func (x *MlineChallengeOverResp) GetHeroExp() int32 { return 0 } +func (x *MlineChallengeOverResp) GetStageId() int32 { + if x != nil { + return x.StageId + } + return 0 +} + // 扫荡关卡 type MlineCleanStageReq struct { state protoimpl.MessageState @@ -607,7 +615,7 @@ var file_mline_mline_msg_proto_rawDesc = []byte{ 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 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, 0x8f, 0x01, 0x0a, 0x16, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0xa9, 0x01, 0x0a, 0x16, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, @@ -616,16 +624,18 @@ var file_mline_mline_msg_proto_rawDesc = []byte{ 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x45, 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x6c, 0x69, 0x6e, 0x65, - 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x13, 0x4d, 0x6c, 0x69, 0x6e, 0x65, - 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, + 0x64, 0x22, 0x2e, 0x0a, 0x12, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, 0x49, + 0x64, 0x22, 0x54, 0x0a, 0x13, 0x4d, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x61, 0x67, 0x65, + 0x49, 0x64, 0x12, 0x23, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, + 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 6b917ba72e761a85603f38f52311951da393759e Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Tue, 25 Jul 2023 15:07:54 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0gm=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/wtask/module.go | 54 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/modules/wtask/module.go b/modules/wtask/module.go index bbd8ace71..e2b7f1a35 100644 --- a/modules/wtask/module.go +++ b/modules/wtask/module.go @@ -430,12 +430,17 @@ func (this *WTask) ClearCaravanTask(session comm.IUserSession, task int32) { // 跳世界任务 func (this *WTask) BingoJumpTask(session comm.IUserSession, taskId int32) (errdata *pb.ErrorData) { var ( - wtask *pb.DBWTask - update map[string]interface{} = make(map[string]interface{}) - ok bool - err error + wtask *pb.DBWTask + accepts []int32 = make([]int32, 0) + acceptsMap map[int32]struct{} = make(map[int32]struct{}) + complete []int32 = make([]int32, 0) + completeMap map[int32]struct{} = make(map[int32]struct{}) + conf *cfg.GameWorldTaskData + update map[string]interface{} = make(map[string]interface{}) + ok bool + err error ) - if _, err = this.configure.gettaskconfconfigure(taskId); err != nil { + if conf, err = this.configure.gettaskconfconfigure(taskId); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, Title: pb.ErrorCode_ConfigNoFound.ToString(), @@ -452,6 +457,12 @@ func (this *WTask) BingoJumpTask(session comm.IUserSession, taskId int32) (errda } return } + for _, v := range wtask.Accepts { + acceptsMap[v] = struct{}{} + } + for _, v := range wtask.Completes { + completeMap[v] = struct{}{} + } ok = false for _, v := range wtask.Activations { if taskId == v { @@ -462,8 +473,41 @@ func (this *WTask) BingoJumpTask(session comm.IUserSession, taskId int32) (errda if ok { return } + + for { + if conf.Ontxe != 0 { + if _, ok = completeMap[conf.Ontxe]; !ok { + completeMap[conf.Ontxe] = struct{}{} + if _, ok = acceptsMap[conf.Ontxe]; ok { + delete(acceptsMap, conf.Ontxe) + } + + if conf, err = this.configure.gettaskconfconfigure(conf.Ontxe); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + } + } else { + break + } + } + for k, _ := range acceptsMap { + accepts = append(accepts, k) + } + for k, _ := range completeMap { + complete = append(complete, k) + } + wtask.Activations = append(wtask.Activations, taskId) + wtask.Accepts = accepts + wtask.Completes = complete update["activations"] = wtask.Activations + update["accepts"] = wtask.Accepts + update["completes"] = wtask.Completes if err = this.modelwtask.Change(session.GetUserId(), update); err != nil { errdata = &pb.ErrorData{ From 0bfb5ee096908c2e11448d00f11ec165e01bebbe Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Tue, 25 Jul 2023 15:20:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96gm=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/wtask/module.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/wtask/module.go b/modules/wtask/module.go index e2b7f1a35..b0f3cb80c 100644 --- a/modules/wtask/module.go +++ b/modules/wtask/module.go @@ -481,15 +481,14 @@ func (this *WTask) BingoJumpTask(session comm.IUserSession, taskId int32) (errda if _, ok = acceptsMap[conf.Ontxe]; ok { delete(acceptsMap, conf.Ontxe) } - - if conf, err = this.configure.gettaskconfconfigure(conf.Ontxe); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ConfigNoFound, - Title: pb.ErrorCode_ConfigNoFound.ToString(), - Message: err.Error(), - } - return + } + if conf, err = this.configure.gettaskconfconfigure(conf.Ontxe); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), } + return } } else { break