From b0f39590d1359063e69f7c19eb9b90420a2e3e5e Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 13 Feb 2023 14:16:25 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E4=B8=8A=E4=BC=A0pvp=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pvp/core.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/pvp/core.go b/modules/pvp/core.go index 6ecb013fc..f0682b548 100644 --- a/modules/pvp/core.go +++ b/modules/pvp/core.go @@ -7,6 +7,7 @@ import ( "sync" ) +///Pvp 战斗对象 type BattleItem struct { Id string //战斗id Ptype pb.PvpType //pvp类型 @@ -14,9 +15,13 @@ type BattleItem struct { Red *pb.PvpUserInfo //红方id RedSession comm.IUserSession //红方连接对象 Redformation *pb.BattleFormation //红方阵型列表 + RedOffline bool //红方离线 Blue *pb.PvpUserInfo //蓝方id BlueSession comm.IUserSession //蓝方连接对象 Blueformation *pb.BattleFormation //蓝方阵型列表 + BlueOffline bool //蓝方离线 readytimer *timewheel.Task //准备倒计时定时器 + operatetimer *timewheel.Task //操作倒计时定时器 + curroperate int32 //当前操作玩家 1 红方 2 蓝方 lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象 } From b2325023992314624c47dbcb8d6746ab6d59fc13 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 13 Feb 2023 14:16:39 +0800 Subject: [PATCH 02/21] update --- modules/friend/api_cross_accept.go | 2 + modules/friend/api_cross_stop.go | 31 ++++++ pb/friend_msg.pb.go | 158 ++++++++++++++++++++++++++--- 3 files changed, 175 insertions(+), 16 deletions(-) create mode 100644 modules/friend/api_cross_stop.go diff --git a/modules/friend/api_cross_accept.go b/modules/friend/api_cross_accept.go index 5628a0393..4a30b59aa 100644 --- a/modules/friend/api_cross_accept.go +++ b/modules/friend/api_cross_accept.go @@ -28,6 +28,7 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.FriendAcceptReq) now := configure.Now().Unix() if now-qr.Timestamp > 10 { //大于10s 切磋超时 code = pb.ErrorCode_FriendQiecuoTimeout + this.moduleFriend.Debug("切磋接受超时", log.Field{Key: "uid", Value: session.GetUserId()}) return } } else { @@ -56,6 +57,7 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.FriendAcceptReq) pb.PvpType_friends, ) if c != pb.ErrorCode_Success { + this.moduleFriend.Debug("createPvp code:", log.Field{Key: "code", Value: c}) return } diff --git a/modules/friend/api_cross_stop.go b/modules/friend/api_cross_stop.go new file mode 100644 index 000000000..6a5190074 --- /dev/null +++ b/modules/friend/api_cross_stop.go @@ -0,0 +1,31 @@ +package friend + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +// 切磋终止 +func (this *apiComp) StopCheck(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode) { + return +} + +func (this *apiComp) Stop(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode) { + if code = this.StopCheck(session, req); code != pb.ErrorCode_Success { + return + } + + //清楚切磋请求记录 + this.moduleFriend.ModelFriendQiecuo.DelByUId(req.Uid) + + resp := &pb.FriendStopResp{ + IsSucc: true, + } + if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeQiecuo, resp); err != nil { + code = pb.ErrorCode_SystemError + return + } + this.moduleFriend.SendMsgToUser(string(this.moduleFriend.GetType()), "qiecuonotify", + &pb.FriendQiecuonotifyPush{Uid: session.GetUserId(), NotifyType: 3}, req.Uid) + return +} diff --git a/pb/friend_msg.pb.go b/pb/friend_msg.pb.go index db189faee..739190080 100644 --- a/pb/friend_msg.pb.go +++ b/pb/friend_msg.pb.go @@ -2309,19 +2309,114 @@ func (x *FriendAcceptResp) GetIsSucc() bool { return false } +//拒绝切磋 +type FriendStopReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //切磋发起者 +} + +func (x *FriendStopReq) Reset() { + *x = FriendStopReq{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_friend_msg_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendStopReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendStopReq) ProtoMessage() {} + +func (x *FriendStopReq) ProtoReflect() protoreflect.Message { + mi := &file_friend_friend_msg_proto_msgTypes[46] + 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 FriendStopReq.ProtoReflect.Descriptor instead. +func (*FriendStopReq) Descriptor() ([]byte, []int) { + return file_friend_friend_msg_proto_rawDescGZIP(), []int{46} +} + +func (x *FriendStopReq) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +type FriendStopResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsSucc bool `protobuf:"varint,1,opt,name=isSucc,proto3" json:"isSucc"` +} + +func (x *FriendStopResp) Reset() { + *x = FriendStopResp{} + if protoimpl.UnsafeEnabled { + mi := &file_friend_friend_msg_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FriendStopResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FriendStopResp) ProtoMessage() {} + +func (x *FriendStopResp) ProtoReflect() protoreflect.Message { + mi := &file_friend_friend_msg_proto_msgTypes[47] + 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 FriendStopResp.ProtoReflect.Descriptor instead. +func (*FriendStopResp) Descriptor() ([]byte, []int) { + return file_friend_friend_msg_proto_rawDescGZIP(), []int{47} +} + +func (x *FriendStopResp) GetIsSucc() bool { + if x != nil { + return x.IsSucc + } + return false +} + type FriendQiecuonotifyPush struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //发起者(切磋) - NotifyType int32 `protobuf:"varint,2,opt,name=notifyType,proto3" json:"notifyType"` //1发起通知 2接受通知 + NotifyType int32 `protobuf:"varint,2,opt,name=notifyType,proto3" json:"notifyType"` //1发起通知 2接受通知 3拒绝通知 } func (x *FriendQiecuonotifyPush) Reset() { *x = FriendQiecuonotifyPush{} if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_msg_proto_msgTypes[46] + mi := &file_friend_friend_msg_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2334,7 +2429,7 @@ func (x *FriendQiecuonotifyPush) String() string { func (*FriendQiecuonotifyPush) ProtoMessage() {} func (x *FriendQiecuonotifyPush) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_msg_proto_msgTypes[46] + mi := &file_friend_friend_msg_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2347,7 +2442,7 @@ func (x *FriendQiecuonotifyPush) ProtoReflect() protoreflect.Message { // Deprecated: Use FriendQiecuonotifyPush.ProtoReflect.Descriptor instead. func (*FriendQiecuonotifyPush) Descriptor() ([]byte, []int) { - return file_friend_friend_msg_proto_rawDescGZIP(), []int{46} + return file_friend_friend_msg_proto_rawDescGZIP(), []int{48} } func (x *FriendQiecuonotifyPush) GetUid() string { @@ -2535,13 +2630,18 @@ var file_friend_friend_msg_proto_rawDesc = []byte{ 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x10, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x22, 0x4a, - 0x0a, 0x16, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x6e, 0x6f, - 0x74, 0x69, 0x66, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, - 0x74, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x22, 0x21, + 0x0a, 0x0d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x22, 0x28, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x53, 0x74, 0x6f, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x22, 0x4a, 0x0a, 0x16, 0x46, + 0x72, 0x69, 0x65, 0x6e, 0x64, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x6e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x6f, 0x74, + 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2556,7 +2656,7 @@ func file_friend_friend_msg_proto_rawDescGZIP() []byte { return file_friend_friend_msg_proto_rawDescData } -var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 47) +var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 49) var file_friend_friend_msg_proto_goTypes = []interface{}{ (*FriendBase)(nil), // 0: FriendBase (*FriendListReq)(nil), // 1: FriendListReq @@ -2604,8 +2704,10 @@ var file_friend_friend_msg_proto_goTypes = []interface{}{ (*FriendQiecuoResp)(nil), // 43: FriendQiecuoResp (*FriendAcceptReq)(nil), // 44: FriendAcceptReq (*FriendAcceptResp)(nil), // 45: FriendAcceptResp - (*FriendQiecuonotifyPush)(nil), // 46: FriendQiecuonotifyPush - (*AssistRecord)(nil), // 47: AssistRecord + (*FriendStopReq)(nil), // 46: FriendStopReq + (*FriendStopResp)(nil), // 47: FriendStopResp + (*FriendQiecuonotifyPush)(nil), // 48: FriendQiecuonotifyPush + (*AssistRecord)(nil), // 49: AssistRecord } var file_friend_friend_msg_proto_depIdxs = []int32{ 0, // 0: FriendListResp.list:type_name -> FriendBase @@ -2615,7 +2717,7 @@ var file_friend_friend_msg_proto_depIdxs = []int32{ 0, // 4: FriendBlackListResp.friends:type_name -> FriendBase 0, // 5: FriendZanlistResp.list:type_name -> FriendBase 0, // 6: FriendAssistlistResp.list:type_name -> FriendBase - 47, // 7: FriendAssistlistResp.record:type_name -> AssistRecord + 49, // 7: FriendAssistlistResp.record:type_name -> AssistRecord 0, // 8: FriendAssistHeroUpdatePush.friend:type_name -> FriendBase 0, // 9: FriendAssistHeroListResp.friends:type_name -> FriendBase 10, // [10:10] is the sub-list for method output_type @@ -3185,6 +3287,30 @@ func file_friend_friend_msg_proto_init() { } } file_friend_friend_msg_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendStopReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_friend_msg_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FriendStopResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_friend_friend_msg_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FriendQiecuonotifyPush); i { case 0: return &v.state @@ -3203,7 +3329,7 @@ func file_friend_friend_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_friend_friend_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 47, + NumMessages: 49, NumExtensions: 0, NumServices: 0, }, From 6a968e9c4d578a1da62be05fd74c67de8ff7423e Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 13 Feb 2023 15:18:18 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E4=B8=8A=E4=BC=A0api=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/build_windows.bat | 9 +++++---- modules/friend/api_cross_stop.go | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/bin/build_windows.bat b/bin/build_windows.bat index 5b08cc40a..21bda5746 100644 --- a/bin/build_windows.bat +++ b/bin/build_windows.bat @@ -2,7 +2,8 @@ SET CGO_ENABLED=0 SET GOOS=windows SET GOARCH=amd64 cd ../ -go build -o build/gateway.exe services/gateway/main.go -go build -o build/worker.exe services/worker/main.go -go build -o build/web.exe services/web/main.go -go build -o build/dbservice.exe services/dbservice/main.go \ No newline at end of file + +go build -o ./bin/cmd.exe ./services/cmd/main.go +go build -o ./bin/mainte.exe ./services/mainte/main.go +go build -o ./bin/gateway.exe ./services/gateway/main.go +go build -o ./bin/worker.exe ./services/worker/main.go diff --git a/modules/friend/api_cross_stop.go b/modules/friend/api_cross_stop.go index 6a5190074..f61e3d0d4 100644 --- a/modules/friend/api_cross_stop.go +++ b/modules/friend/api_cross_stop.go @@ -3,6 +3,8 @@ package friend import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" ) // 切磋终止 @@ -10,14 +12,14 @@ func (this *apiComp) StopCheck(session comm.IUserSession, req *pb.FriendStopReq) return } -func (this *apiComp) Stop(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode) { +func (this *apiComp) Stop(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode, data proto.Message) { if code = this.StopCheck(session, req); code != pb.ErrorCode_Success { return } //清楚切磋请求记录 this.moduleFriend.ModelFriendQiecuo.DelByUId(req.Uid) - + resp := &pb.FriendStopResp{ IsSucc: true, } From 00559a0781c61df7c2b49cd5f7f31c23555f7bd1 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 13 Feb 2023 15:50:09 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E9=93=81=E5=8C=A0=E9=93=BA=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pb/smithy_db.pb.go | 278 +++++++++---- pb/smithy_msg.pb.go | 954 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 1035 insertions(+), 197 deletions(-) diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index 5e83925ae..1f55f3846 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -20,6 +20,102 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// 炉子信息 +type DBStove 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" bson:"uid"` //用户ID + Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv"` // 炉子等级 + Data map[int32]int32 `protobuf:"bytes,4,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 熟练度 + Skill map[int32]int32 `protobuf:"bytes,5,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 台子技能 + Temperature int32 `protobuf:"varint,6,opt,name=temperature,proto3" json:"temperature"` // 炉子温度 + RecoveTime int64 `protobuf:"varint,7,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间 +} + +func (x *DBStove) Reset() { + *x = DBStove{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_db_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBStove) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBStove) ProtoMessage() {} + +func (x *DBStove) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_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 DBStove.ProtoReflect.Descriptor instead. +func (*DBStove) Descriptor() ([]byte, []int) { + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{0} +} + +func (x *DBStove) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBStove) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBStove) GetLv() int32 { + if x != nil { + return x.Lv + } + return 0 +} + +func (x *DBStove) GetData() map[int32]int32 { + if x != nil { + return x.Data + } + return nil +} + +func (x *DBStove) GetSkill() map[int32]int32 { + if x != nil { + return x.Skill + } + return nil +} + +func (x *DBStove) GetTemperature() int32 { + if x != nil { + return x.Temperature + } + return 0 +} + +func (x *DBStove) GetRecoveTime() int64 { + if x != nil { + return x.RecoveTime + } + return 0 +} + type Clang struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -33,7 +129,7 @@ type Clang struct { func (x *Clang) Reset() { *x = Clang{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[0] + mi := &file_smithy_smithy_db_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +142,7 @@ func (x *Clang) String() string { func (*Clang) ProtoMessage() {} func (x *Clang) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[0] + mi := &file_smithy_smithy_db_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +155,7 @@ func (x *Clang) ProtoReflect() protoreflect.Message { // Deprecated: Use Clang.ProtoReflect.Descriptor instead. func (*Clang) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{0} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{1} } func (x *Clang) GetDeskType() int32 { @@ -83,7 +179,6 @@ func (x *Clang) GetSTime() int64 { return 0 } -// 队列里的烹饪食品 type OrderClang struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -97,7 +192,7 @@ type OrderClang struct { func (x *OrderClang) Reset() { *x = OrderClang{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[1] + mi := &file_smithy_smithy_db_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -110,7 +205,7 @@ func (x *OrderClang) String() string { func (*OrderClang) ProtoMessage() {} func (x *OrderClang) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[1] + mi := &file_smithy_smithy_db_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -123,7 +218,7 @@ func (x *OrderClang) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderClang.ProtoReflect.Descriptor instead. func (*OrderClang) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{1} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{2} } func (x *OrderClang) GetDeskType() int32 { @@ -169,7 +264,7 @@ type DBSmithy struct { func (x *DBSmithy) Reset() { *x = DBSmithy{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[2] + mi := &file_smithy_smithy_db_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -182,7 +277,7 @@ func (x *DBSmithy) String() string { func (*DBSmithy) ProtoMessage() {} func (x *DBSmithy) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[2] + mi := &file_smithy_smithy_db_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -195,7 +290,7 @@ func (x *DBSmithy) ProtoReflect() protoreflect.Message { // Deprecated: Use DBSmithy.ProtoReflect.Descriptor instead. func (*DBSmithy) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{2} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{3} } func (x *DBSmithy) GetId() string { @@ -287,51 +382,71 @@ var File_smithy_smithy_db_proto protoreflect.FileDescriptor var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, - 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x02, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 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, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x6c, 0x76, 0x12, 0x26, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x6b, + 0x69, 0x6c, 0x6c, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x53, 0x74, + 0x6f, 0x76, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, + 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, + 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, - 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, - 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, - 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, - 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, - 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, - 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, - 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, - 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, - 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, - 0x46, 0x6c, 0x6f, 0x6f, 0x72, 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, + 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, + 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, + 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, + 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, + 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, + 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, + 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, + 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, + 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, + 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, + 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, + 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, + 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, + 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 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 ( @@ -346,26 +461,31 @@ func file_smithy_smithy_db_proto_rawDescGZIP() []byte { return file_smithy_smithy_db_proto_rawDescData } -var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_smithy_smithy_db_proto_goTypes = []interface{}{ - (*Clang)(nil), // 0: Clang - (*OrderClang)(nil), // 1: OrderClang - (*DBSmithy)(nil), // 2: DBSmithy - nil, // 3: DBSmithy.SkillEntry - nil, // 4: DBSmithy.DeskFloorEntry - (*UserAssets)(nil), // 5: UserAssets + (*DBStove)(nil), // 0: DBStove + (*Clang)(nil), // 1: Clang + (*OrderClang)(nil), // 2: OrderClang + (*DBSmithy)(nil), // 3: DBSmithy + nil, // 4: DBStove.DataEntry + nil, // 5: DBStove.SkillEntry + nil, // 6: DBSmithy.SkillEntry + nil, // 7: DBSmithy.DeskFloorEntry + (*UserAssets)(nil), // 8: UserAssets } var file_smithy_smithy_db_proto_depIdxs = []int32{ - 0, // 0: DBSmithy.clang:type_name -> Clang - 1, // 1: DBSmithy.orders:type_name -> OrderClang - 5, // 2: DBSmithy.items:type_name -> UserAssets - 3, // 3: DBSmithy.skill:type_name -> DBSmithy.SkillEntry - 4, // 4: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry - 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 + 4, // 0: DBStove.data:type_name -> DBStove.DataEntry + 5, // 1: DBStove.skill:type_name -> DBStove.SkillEntry + 1, // 2: DBSmithy.clang:type_name -> Clang + 2, // 3: DBSmithy.orders:type_name -> OrderClang + 8, // 4: DBSmithy.items:type_name -> UserAssets + 6, // 5: DBSmithy.skill:type_name -> DBSmithy.SkillEntry + 7, // 6: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry + 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_smithy_smithy_db_proto_init() } @@ -376,7 +496,7 @@ func file_smithy_smithy_db_proto_init() { file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_smithy_smithy_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Clang); i { + switch v := v.(*DBStove); i { case 0: return &v.state case 1: @@ -388,7 +508,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderClang); i { + switch v := v.(*Clang); i { case 0: return &v.state case 1: @@ -400,6 +520,18 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderClang); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBSmithy); i { case 0: return &v.state @@ -418,7 +550,7 @@ func file_smithy_smithy_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_db_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 8, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go index eea3ee1fa..d8c11a1f2 100644 --- a/pb/smithy_msg.pb.go +++ b/pb/smithy_msg.pb.go @@ -20,15 +20,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// 查询塔进度 -type SmithyGetListReq struct { +// 铁匠铺 获取炉子信息 +type SmithyGetStoveInfoReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *SmithyGetListReq) Reset() { - *x = SmithyGetListReq{} +func (x *SmithyGetStoveInfoReq) Reset() { + *x = SmithyGetStoveInfoReq{} if protoimpl.UnsafeEnabled { mi := &file_smithy_smithy_msg_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -36,13 +36,13 @@ func (x *SmithyGetListReq) Reset() { } } -func (x *SmithyGetListReq) String() string { +func (x *SmithyGetStoveInfoReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SmithyGetListReq) ProtoMessage() {} +func (*SmithyGetStoveInfoReq) ProtoMessage() {} -func (x *SmithyGetListReq) ProtoReflect() protoreflect.Message { +func (x *SmithyGetStoveInfoReq) ProtoReflect() protoreflect.Message { mi := &file_smithy_smithy_msg_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -54,22 +54,21 @@ func (x *SmithyGetListReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SmithyGetListReq.ProtoReflect.Descriptor instead. -func (*SmithyGetListReq) Descriptor() ([]byte, []int) { +// Deprecated: Use SmithyGetStoveInfoReq.ProtoReflect.Descriptor instead. +func (*SmithyGetStoveInfoReq) Descriptor() ([]byte, []int) { return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{0} } -// 返回进度信息 -type SmithyGetListResp struct { +type SmithyGetStoveInfoResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *DBSmithy `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Data *DBStove `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` } -func (x *SmithyGetListResp) Reset() { - *x = SmithyGetListResp{} +func (x *SmithyGetStoveInfoResp) Reset() { + *x = SmithyGetStoveInfoResp{} if protoimpl.UnsafeEnabled { mi := &file_smithy_smithy_msg_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -77,13 +76,13 @@ func (x *SmithyGetListResp) Reset() { } } -func (x *SmithyGetListResp) String() string { +func (x *SmithyGetStoveInfoResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SmithyGetListResp) ProtoMessage() {} +func (*SmithyGetStoveInfoResp) ProtoMessage() {} -func (x *SmithyGetListResp) ProtoReflect() protoreflect.Message { +func (x *SmithyGetStoveInfoResp) ProtoReflect() protoreflect.Message { mi := &file_smithy_smithy_msg_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -95,12 +94,542 @@ func (x *SmithyGetListResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SmithyGetListResp.ProtoReflect.Descriptor instead. -func (*SmithyGetListResp) Descriptor() ([]byte, []int) { +// Deprecated: Use SmithyGetStoveInfoResp.ProtoReflect.Descriptor instead. +func (*SmithyGetStoveInfoResp) Descriptor() ([]byte, []int) { return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{1} } -func (x *SmithyGetListResp) GetData() *DBSmithy { +func (x *SmithyGetStoveInfoResp) GetData() *DBStove { + if x != nil { + return x.Data + } + return nil +} + +// 打造装备 +type SmithyForgeEquipReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EquipType int32 `protobuf:"varint,1,opt,name=equipType,proto3" json:"equipType"` // 装备类型 + Lava int32 `protobuf:"varint,2,opt,name=lava,proto3" json:"lava"` // 添加熔岩 + Quality int32 `protobuf:"varint,3,opt,name=quality,proto3" json:"quality"` // 精益制造 +} + +func (x *SmithyForgeEquipReq) Reset() { + *x = SmithyForgeEquipReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyForgeEquipReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyForgeEquipReq) ProtoMessage() {} + +func (x *SmithyForgeEquipReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_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 SmithyForgeEquipReq.ProtoReflect.Descriptor instead. +func (*SmithyForgeEquipReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *SmithyForgeEquipReq) GetEquipType() int32 { + if x != nil { + return x.EquipType + } + return 0 +} + +func (x *SmithyForgeEquipReq) GetLava() int32 { + if x != nil { + return x.Lava + } + return 0 +} + +func (x *SmithyForgeEquipReq) GetQuality() int32 { + if x != nil { + return x.Quality + } + return 0 +} + +type SmithyForgeEquipResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Equip int32 `protobuf:"varint,1,opt,name=equip,proto3" json:"equip"` // 装备ID + Data *DBStove `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyForgeEquipResp) Reset() { + *x = SmithyForgeEquipResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyForgeEquipResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyForgeEquipResp) ProtoMessage() {} + +func (x *SmithyForgeEquipResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_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 SmithyForgeEquipResp.ProtoReflect.Descriptor instead. +func (*SmithyForgeEquipResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *SmithyForgeEquipResp) GetEquip() int32 { + if x != nil { + return x.Equip + } + return 0 +} + +func (x *SmithyForgeEquipResp) GetData() *DBStove { + if x != nil { + return x.Data + } + return nil +} + +// 定制装备 +type SmithyOrderEquipReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SuiteId int32 `protobuf:"varint,1,opt,name=suiteId,proto3" json:"suiteId"` // 套装ID + Position int32 `protobuf:"varint,2,opt,name=position,proto3" json:"position"` // 装备位置 + Lava int32 `protobuf:"varint,3,opt,name=lava,proto3" json:"lava"` // 添加熔岩 + Quality int32 `protobuf:"varint,4,opt,name=quality,proto3" json:"quality"` // 精益制造 +} + +func (x *SmithyOrderEquipReq) Reset() { + *x = SmithyOrderEquipReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyOrderEquipReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyOrderEquipReq) ProtoMessage() {} + +func (x *SmithyOrderEquipReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_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 SmithyOrderEquipReq.ProtoReflect.Descriptor instead. +func (*SmithyOrderEquipReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *SmithyOrderEquipReq) GetSuiteId() int32 { + if x != nil { + return x.SuiteId + } + return 0 +} + +func (x *SmithyOrderEquipReq) GetPosition() int32 { + if x != nil { + return x.Position + } + return 0 +} + +func (x *SmithyOrderEquipReq) GetLava() int32 { + if x != nil { + return x.Lava + } + return 0 +} + +func (x *SmithyOrderEquipReq) GetQuality() int32 { + if x != nil { + return x.Quality + } + return 0 +} + +type SmithyOrderEquipResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Equip int32 `protobuf:"varint,1,opt,name=equip,proto3" json:"equip"` // 装备ID + Data *DBStove `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyOrderEquipResp) Reset() { + *x = SmithyOrderEquipResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyOrderEquipResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyOrderEquipResp) ProtoMessage() {} + +func (x *SmithyOrderEquipResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_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 SmithyOrderEquipResp.ProtoReflect.Descriptor instead. +func (*SmithyOrderEquipResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{5} +} + +func (x *SmithyOrderEquipResp) GetEquip() int32 { + if x != nil { + return x.Equip + } + return 0 +} + +func (x *SmithyOrderEquipResp) GetData() *DBStove { + if x != nil { + return x.Data + } + return nil +} + +// 炉子升级 +type SmithyStoveUpReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SmithyStoveUpReq) Reset() { + *x = SmithyStoveUpReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyStoveUpReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyStoveUpReq) ProtoMessage() {} + +func (x *SmithyStoveUpReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_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 SmithyStoveUpReq.ProtoReflect.Descriptor instead. +func (*SmithyStoveUpReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{6} +} + +type SmithyStoveUpResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBStove `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyStoveUpResp) Reset() { + *x = SmithyStoveUpResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyStoveUpResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyStoveUpResp) ProtoMessage() {} + +func (x *SmithyStoveUpResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_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 SmithyStoveUpResp.ProtoReflect.Descriptor instead. +func (*SmithyStoveUpResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{7} +} + +func (x *SmithyStoveUpResp) GetData() *DBStove { + if x != nil { + return x.Data + } + return nil +} + +// 炉子升温 +type SmithyRiseReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ItemId string `protobuf:"bytes,1,opt,name=itemId,proto3" json:"itemId"` // 材料ID + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count"` // 材料数量 +} + +func (x *SmithyRiseReq) Reset() { + *x = SmithyRiseReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyRiseReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyRiseReq) ProtoMessage() {} + +func (x *SmithyRiseReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[8] + 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 SmithyRiseReq.ProtoReflect.Descriptor instead. +func (*SmithyRiseReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{8} +} + +func (x *SmithyRiseReq) GetItemId() string { + if x != nil { + return x.ItemId + } + return "" +} + +func (x *SmithyRiseReq) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +type SmithyRiseResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBStove `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyRiseResp) Reset() { + *x = SmithyRiseResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyRiseResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyRiseResp) ProtoMessage() {} + +func (x *SmithyRiseResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[9] + 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 SmithyRiseResp.ProtoReflect.Descriptor instead. +func (*SmithyRiseResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{9} +} + +func (x *SmithyRiseResp) GetData() *DBStove { + if x != nil { + return x.Data + } + return nil +} + +// 工具学习 升级 共用 +type SmithyToolsUpReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 工具配置ID +} + +func (x *SmithyToolsUpReq) Reset() { + *x = SmithyToolsUpReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyToolsUpReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyToolsUpReq) ProtoMessage() {} + +func (x *SmithyToolsUpReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[10] + 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 SmithyToolsUpReq.ProtoReflect.Descriptor instead. +func (*SmithyToolsUpReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{10} +} + +func (x *SmithyToolsUpReq) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +type SmithyToolsUpResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBStove `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyToolsUpResp) Reset() { + *x = SmithyToolsUpResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyToolsUpResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyToolsUpResp) ProtoMessage() {} + +func (x *SmithyToolsUpResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[11] + 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 SmithyToolsUpResp.ProtoReflect.Descriptor instead. +func (*SmithyToolsUpResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{11} +} + +func (x *SmithyToolsUpResp) GetData() *DBStove { if x != nil { return x.Data } @@ -119,7 +648,7 @@ type SmithyCreateOrderReq struct { func (x *SmithyCreateOrderReq) Reset() { *x = SmithyCreateOrderReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[2] + mi := &file_smithy_smithy_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -132,7 +661,7 @@ func (x *SmithyCreateOrderReq) String() string { func (*SmithyCreateOrderReq) ProtoMessage() {} func (x *SmithyCreateOrderReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[2] + mi := &file_smithy_smithy_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -145,7 +674,7 @@ func (x *SmithyCreateOrderReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyCreateOrderReq.ProtoReflect.Descriptor instead. func (*SmithyCreateOrderReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{2} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{12} } func (x *SmithyCreateOrderReq) GetOrder() []*OrderClang { @@ -166,7 +695,7 @@ type SmithyCreateOrderResp struct { func (x *SmithyCreateOrderResp) Reset() { *x = SmithyCreateOrderResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[3] + mi := &file_smithy_smithy_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -179,7 +708,7 @@ func (x *SmithyCreateOrderResp) String() string { func (*SmithyCreateOrderResp) ProtoMessage() {} func (x *SmithyCreateOrderResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[3] + mi := &file_smithy_smithy_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -192,7 +721,7 @@ func (x *SmithyCreateOrderResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyCreateOrderResp.ProtoReflect.Descriptor instead. func (*SmithyCreateOrderResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{3} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{13} } func (x *SmithyCreateOrderResp) GetData() *DBSmithy { @@ -212,7 +741,7 @@ type SmithyGetRewardReq struct { func (x *SmithyGetRewardReq) Reset() { *x = SmithyGetRewardReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[4] + mi := &file_smithy_smithy_msg_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -225,7 +754,7 @@ func (x *SmithyGetRewardReq) String() string { func (*SmithyGetRewardReq) ProtoMessage() {} func (x *SmithyGetRewardReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[4] + mi := &file_smithy_smithy_msg_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -238,7 +767,7 @@ func (x *SmithyGetRewardReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRewardReq.ProtoReflect.Descriptor instead. func (*SmithyGetRewardReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{4} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{14} } type SmithyGetRewardResp struct { @@ -252,7 +781,7 @@ type SmithyGetRewardResp struct { func (x *SmithyGetRewardResp) Reset() { *x = SmithyGetRewardResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[5] + mi := &file_smithy_smithy_msg_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -265,7 +794,7 @@ func (x *SmithyGetRewardResp) String() string { func (*SmithyGetRewardResp) ProtoMessage() {} func (x *SmithyGetRewardResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[5] + mi := &file_smithy_smithy_msg_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -278,7 +807,7 @@ func (x *SmithyGetRewardResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRewardResp.ProtoReflect.Descriptor instead. func (*SmithyGetRewardResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{5} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{15} } func (x *SmithyGetRewardResp) GetData() *DBSmithy { @@ -300,7 +829,7 @@ type SmithyDeskSkillLvReq struct { func (x *SmithyDeskSkillLvReq) Reset() { *x = SmithyDeskSkillLvReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[6] + mi := &file_smithy_smithy_msg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -313,7 +842,7 @@ func (x *SmithyDeskSkillLvReq) String() string { func (*SmithyDeskSkillLvReq) ProtoMessage() {} func (x *SmithyDeskSkillLvReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[6] + mi := &file_smithy_smithy_msg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -326,7 +855,7 @@ func (x *SmithyDeskSkillLvReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyDeskSkillLvReq.ProtoReflect.Descriptor instead. func (*SmithyDeskSkillLvReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{6} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{16} } func (x *SmithyDeskSkillLvReq) GetDeskType() int32 { @@ -347,7 +876,7 @@ type SmithyDeskSkillLvResp struct { func (x *SmithyDeskSkillLvResp) Reset() { *x = SmithyDeskSkillLvResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[7] + mi := &file_smithy_smithy_msg_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -360,7 +889,7 @@ func (x *SmithyDeskSkillLvResp) String() string { func (*SmithyDeskSkillLvResp) ProtoMessage() {} func (x *SmithyDeskSkillLvResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[7] + mi := &file_smithy_smithy_msg_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -373,7 +902,7 @@ func (x *SmithyDeskSkillLvResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyDeskSkillLvResp.ProtoReflect.Descriptor instead. func (*SmithyDeskSkillLvResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{7} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{17} } func (x *SmithyDeskSkillLvResp) GetData() *DBSmithy { @@ -393,7 +922,7 @@ type SmithyStoveSkillLvReq struct { func (x *SmithyStoveSkillLvReq) Reset() { *x = SmithyStoveSkillLvReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[8] + mi := &file_smithy_smithy_msg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -406,7 +935,7 @@ func (x *SmithyStoveSkillLvReq) String() string { func (*SmithyStoveSkillLvReq) ProtoMessage() {} func (x *SmithyStoveSkillLvReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[8] + mi := &file_smithy_smithy_msg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -419,7 +948,7 @@ func (x *SmithyStoveSkillLvReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyStoveSkillLvReq.ProtoReflect.Descriptor instead. func (*SmithyStoveSkillLvReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{8} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{18} } type SmithyStoveSkillLvResp struct { @@ -433,7 +962,7 @@ type SmithyStoveSkillLvResp struct { func (x *SmithyStoveSkillLvResp) Reset() { *x = SmithyStoveSkillLvResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[9] + mi := &file_smithy_smithy_msg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -446,7 +975,7 @@ func (x *SmithyStoveSkillLvResp) String() string { func (*SmithyStoveSkillLvResp) ProtoMessage() {} func (x *SmithyStoveSkillLvResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[9] + mi := &file_smithy_smithy_msg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -459,7 +988,7 @@ func (x *SmithyStoveSkillLvResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyStoveSkillLvResp.ProtoReflect.Descriptor instead. func (*SmithyStoveSkillLvResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{9} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{19} } func (x *SmithyStoveSkillLvResp) GetData() *DBSmithy { @@ -480,7 +1009,7 @@ type SmithyGetRandUserReq struct { func (x *SmithyGetRandUserReq) Reset() { *x = SmithyGetRandUserReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[10] + mi := &file_smithy_smithy_msg_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -493,7 +1022,7 @@ func (x *SmithyGetRandUserReq) String() string { func (*SmithyGetRandUserReq) ProtoMessage() {} func (x *SmithyGetRandUserReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[10] + mi := &file_smithy_smithy_msg_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -506,7 +1035,7 @@ func (x *SmithyGetRandUserReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRandUserReq.ProtoReflect.Descriptor instead. func (*SmithyGetRandUserReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{10} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{20} } func (x *SmithyGetRandUserReq) GetPeople() int32 { @@ -527,7 +1056,7 @@ type SmithyGetRandUserResp struct { func (x *SmithyGetRandUserResp) Reset() { *x = SmithyGetRandUserResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[11] + mi := &file_smithy_smithy_msg_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -540,7 +1069,7 @@ func (x *SmithyGetRandUserResp) String() string { func (*SmithyGetRandUserResp) ProtoMessage() {} func (x *SmithyGetRandUserResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[11] + mi := &file_smithy_smithy_msg_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -553,7 +1082,7 @@ func (x *SmithyGetRandUserResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRandUserResp.ProtoReflect.Descriptor instead. func (*SmithyGetRandUserResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{11} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{21} } func (x *SmithyGetRandUserResp) GetUser() []*DBUser { @@ -570,42 +1099,83 @@ var file_smithy_smithy_msg_proto_rawDesc = []byte{ 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x64, 0x62, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, - 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, 0x69, - 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, - 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, - 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, - 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x14, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x22, 0x36, + 0x0a, 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x76, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x61, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, + 0x09, 0x65, 0x71, 0x75, 0x69, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x65, 0x71, 0x75, 0x69, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, + 0x61, 0x76, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x12, + 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x6d, 0x69, + 0x74, 0x68, 0x79, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x79, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x45, 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, + 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x6c, 0x61, 0x76, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x22, 0x4a, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x45, + 0x71, 0x75, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x12, 0x1c, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, + 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x12, 0x0a, 0x10, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x55, 0x70, 0x52, 0x65, 0x71, + 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x55, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x3d, 0x0a, 0x0d, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x69, 0x73, + 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x2e, 0x0a, 0x0e, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x69, 0x73, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x22, 0x22, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x54, 0x6f, 0x6f, 0x6c, + 0x73, 0x55, 0x70, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, + 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x14, 0x53, 0x6d, 0x69, + 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, - 0x76, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, - 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, - 0x71, 0x22, 0x37, 0x0a, 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, - 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, - 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x6d, - 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x22, 0x34, 0x0a, 0x15, 0x53, 0x6d, - 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, + 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x15, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, + 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, + 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, + 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, + 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x22, 0x34, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x1b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -620,37 +1190,53 @@ func file_smithy_smithy_msg_proto_rawDescGZIP() []byte { return file_smithy_smithy_msg_proto_rawDescData } -var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_smithy_smithy_msg_proto_goTypes = []interface{}{ - (*SmithyGetListReq)(nil), // 0: SmithyGetListReq - (*SmithyGetListResp)(nil), // 1: SmithyGetListResp - (*SmithyCreateOrderReq)(nil), // 2: SmithyCreateOrderReq - (*SmithyCreateOrderResp)(nil), // 3: SmithyCreateOrderResp - (*SmithyGetRewardReq)(nil), // 4: SmithyGetRewardReq - (*SmithyGetRewardResp)(nil), // 5: SmithyGetRewardResp - (*SmithyDeskSkillLvReq)(nil), // 6: SmithyDeskSkillLvReq - (*SmithyDeskSkillLvResp)(nil), // 7: SmithyDeskSkillLvResp - (*SmithyStoveSkillLvReq)(nil), // 8: SmithyStoveSkillLvReq - (*SmithyStoveSkillLvResp)(nil), // 9: SmithyStoveSkillLvResp - (*SmithyGetRandUserReq)(nil), // 10: SmithyGetRandUserReq - (*SmithyGetRandUserResp)(nil), // 11: SmithyGetRandUserResp - (*DBSmithy)(nil), // 12: DBSmithy - (*OrderClang)(nil), // 13: OrderClang - (*DBUser)(nil), // 14: DBUser + (*SmithyGetStoveInfoReq)(nil), // 0: SmithyGetStoveInfoReq + (*SmithyGetStoveInfoResp)(nil), // 1: SmithyGetStoveInfoResp + (*SmithyForgeEquipReq)(nil), // 2: SmithyForgeEquipReq + (*SmithyForgeEquipResp)(nil), // 3: SmithyForgeEquipResp + (*SmithyOrderEquipReq)(nil), // 4: SmithyOrderEquipReq + (*SmithyOrderEquipResp)(nil), // 5: SmithyOrderEquipResp + (*SmithyStoveUpReq)(nil), // 6: SmithyStoveUpReq + (*SmithyStoveUpResp)(nil), // 7: SmithyStoveUpResp + (*SmithyRiseReq)(nil), // 8: SmithyRiseReq + (*SmithyRiseResp)(nil), // 9: SmithyRiseResp + (*SmithyToolsUpReq)(nil), // 10: SmithyToolsUpReq + (*SmithyToolsUpResp)(nil), // 11: SmithyToolsUpResp + (*SmithyCreateOrderReq)(nil), // 12: SmithyCreateOrderReq + (*SmithyCreateOrderResp)(nil), // 13: SmithyCreateOrderResp + (*SmithyGetRewardReq)(nil), // 14: SmithyGetRewardReq + (*SmithyGetRewardResp)(nil), // 15: SmithyGetRewardResp + (*SmithyDeskSkillLvReq)(nil), // 16: SmithyDeskSkillLvReq + (*SmithyDeskSkillLvResp)(nil), // 17: SmithyDeskSkillLvResp + (*SmithyStoveSkillLvReq)(nil), // 18: SmithyStoveSkillLvReq + (*SmithyStoveSkillLvResp)(nil), // 19: SmithyStoveSkillLvResp + (*SmithyGetRandUserReq)(nil), // 20: SmithyGetRandUserReq + (*SmithyGetRandUserResp)(nil), // 21: SmithyGetRandUserResp + (*DBStove)(nil), // 22: DBStove + (*OrderClang)(nil), // 23: OrderClang + (*DBSmithy)(nil), // 24: DBSmithy + (*DBUser)(nil), // 25: DBUser } var file_smithy_smithy_msg_proto_depIdxs = []int32{ - 12, // 0: SmithyGetListResp.data:type_name -> DBSmithy - 13, // 1: SmithyCreateOrderReq.order:type_name -> OrderClang - 12, // 2: SmithyCreateOrderResp.data:type_name -> DBSmithy - 12, // 3: SmithyGetRewardResp.data:type_name -> DBSmithy - 12, // 4: SmithyDeskSkillLvResp.data:type_name -> DBSmithy - 12, // 5: SmithyStoveSkillLvResp.data:type_name -> DBSmithy - 14, // 6: SmithyGetRandUserResp.user:type_name -> DBUser - 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 + 22, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove + 22, // 1: SmithyForgeEquipResp.data:type_name -> DBStove + 22, // 2: SmithyOrderEquipResp.data:type_name -> DBStove + 22, // 3: SmithyStoveUpResp.data:type_name -> DBStove + 22, // 4: SmithyRiseResp.data:type_name -> DBStove + 22, // 5: SmithyToolsUpResp.data:type_name -> DBStove + 23, // 6: SmithyCreateOrderReq.order:type_name -> OrderClang + 24, // 7: SmithyCreateOrderResp.data:type_name -> DBSmithy + 24, // 8: SmithyGetRewardResp.data:type_name -> DBSmithy + 24, // 9: SmithyDeskSkillLvResp.data:type_name -> DBSmithy + 24, // 10: SmithyStoveSkillLvResp.data:type_name -> DBSmithy + 25, // 11: SmithyGetRandUserResp.user:type_name -> DBUser + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_smithy_smithy_msg_proto_init() } @@ -662,7 +1248,7 @@ func file_smithy_smithy_msg_proto_init() { file_user_user_db_proto_init() if !protoimpl.UnsafeEnabled { file_smithy_smithy_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetListReq); i { + switch v := v.(*SmithyGetStoveInfoReq); i { case 0: return &v.state case 1: @@ -674,7 +1260,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetListResp); i { + switch v := v.(*SmithyGetStoveInfoResp); i { case 0: return &v.state case 1: @@ -686,7 +1272,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyCreateOrderReq); i { + switch v := v.(*SmithyForgeEquipReq); i { case 0: return &v.state case 1: @@ -698,7 +1284,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyCreateOrderResp); i { + switch v := v.(*SmithyForgeEquipResp); i { case 0: return &v.state case 1: @@ -710,7 +1296,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetRewardReq); i { + switch v := v.(*SmithyOrderEquipReq); i { case 0: return &v.state case 1: @@ -722,7 +1308,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetRewardResp); i { + switch v := v.(*SmithyOrderEquipResp); i { case 0: return &v.state case 1: @@ -734,7 +1320,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyDeskSkillLvReq); i { + switch v := v.(*SmithyStoveUpReq); i { case 0: return &v.state case 1: @@ -746,7 +1332,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyDeskSkillLvResp); i { + switch v := v.(*SmithyStoveUpResp); i { case 0: return &v.state case 1: @@ -758,7 +1344,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyStoveSkillLvReq); i { + switch v := v.(*SmithyRiseReq); i { case 0: return &v.state case 1: @@ -770,7 +1356,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyStoveSkillLvResp); i { + switch v := v.(*SmithyRiseResp); i { case 0: return &v.state case 1: @@ -782,7 +1368,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetRandUserReq); i { + switch v := v.(*SmithyToolsUpReq); i { case 0: return &v.state case 1: @@ -794,6 +1380,126 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyToolsUpResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyCreateOrderReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyCreateOrderResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyGetRewardReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyGetRewardResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyDeskSkillLvReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyDeskSkillLvResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyStoveSkillLvReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyStoveSkillLvResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyGetRandUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SmithyGetRandUserResp); i { case 0: return &v.state @@ -812,7 +1518,7 @@ func file_smithy_smithy_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 22, NumExtensions: 0, NumServices: 0, }, From 3a13fb79be9c40f8c7251ba9611b823f5d43d9a5 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 13 Feb 2023 16:06:43 +0800 Subject: [PATCH 05/21] =?UTF-8?q?=E4=B8=8A=E4=BC=A0pvp=20=E5=80=92?= =?UTF-8?q?=E8=AE=A1=E6=97=B6=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/battle/module.go | 12 +++- modules/pvp/api_formation.go | 2 + modules/pvp/api_incmd.go | 3 + modules/pvp/core.go | 30 +++++----- modules/pvp/module.go | 112 +++++++++++++++++++++++++++++++---- 5 files changed, 128 insertions(+), 31 deletions(-) diff --git a/modules/battle/module.go b/modules/battle/module.go index b48a7924d..fe6d35579 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -225,9 +225,11 @@ func (this *Battle) CreateBattleServer(req *pb.BattleInfo) (code pb.ErrorCode) { this.Debug("CreateBattleServer", log.Field{Key: "req", Value: req}) var ( resp *pb.BattleCreateServerResp + ctx context.Context err error ) - if resp, err = this.clientmgr.CreateBattle(context.Background(), &pb.BattleCreateServerReq{Info: req}); err != nil { + ctx, _ = context.WithTimeout(context.Background(), time.Second*5) + if resp, err = this.clientmgr.CreateBattle(ctx, &pb.BattleCreateServerReq{Info: req}); err != nil { this.Errorln(err) code = pb.ErrorCode_RpcFuncExecutionError } @@ -240,9 +242,11 @@ func (this *Battle) CreateBattleServer(req *pb.BattleInfo) (code pb.ErrorCode) { func (this *Battle) InCmdBattle(req *pb.BattleInCmdReq) (code pb.ErrorCode) { var ( resp *pb.BattleInCmdResp + ctx context.Context err error ) - if resp, err = this.clientmgr.InCmdBattle(context.Background(), req); err != nil { + ctx, _ = context.WithTimeout(context.Background(), time.Second*5) + if resp, err = this.clientmgr.InCmdBattle(ctx, req); err != nil { this.Errorln(err) code = pb.ErrorCode_RpcFuncExecutionError } @@ -272,6 +276,7 @@ func (this *Battle) ConcedeBattle(req *pb.BattleConcedeReq) (code pb.ErrorCode) func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.BattleReport) (code pb.ErrorCode, iswin bool) { var ( reply *pb.BattleCheckResults + ctx context.Context err error ) if report == nil { @@ -281,7 +286,8 @@ func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.Batt if this.options.OpenCheck { stime := time.Now() - if reply, err = this.clientmgr.CheckBattle(context.Background(), report); err != nil || !reply.Ischeck { + ctx, _ = context.WithTimeout(context.Background(), time.Second*5) + if reply, err = this.clientmgr.CheckBattle(ctx, report); err != nil || !reply.Ischeck { code = pb.ErrorCode_BattleValidationFailed this.Error("[Battle Check]", log.Field{Key: "t", Value: time.Since(stime).Milliseconds()}, diff --git a/modules/pvp/api_formation.go b/modules/pvp/api_formation.go index 9faf325a0..dfff7601a 100644 --- a/modules/pvp/api_formation.go +++ b/modules/pvp/api_formation.go @@ -2,6 +2,7 @@ package pvp import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/timewheel" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -33,6 +34,7 @@ func (this *apiComp) Formation(session comm.IUserSession, req *pb.PvpFormationRe } if battle.Redformation != nil && battle.Blueformation != nil { //都设置了战斗阵型 battle.State = pb.PvpState_battle + timewheel.Remove(battle.readytimer) go this.module.startBattle(battle) } battle.lock.Unlock() diff --git a/modules/pvp/api_incmd.go b/modules/pvp/api_incmd.go index a2d3e9927..cf97c1558 100644 --- a/modules/pvp/api_incmd.go +++ b/modules/pvp/api_incmd.go @@ -2,6 +2,7 @@ package pvp import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/timewheel" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -37,6 +38,8 @@ func (this *apiComp) InCmd(session comm.IUserSession, req *pb.PvpInCmdReq) (code In: req.Cmd, }); code != pb.ErrorCode_Success { return + } else { + timewheel.Remove(battle.operatetimer) } } else { code = pb.ErrorCode_BattleInCmdFailed diff --git a/modules/pvp/core.go b/modules/pvp/core.go index f0682b548..9aef45f4c 100644 --- a/modules/pvp/core.go +++ b/modules/pvp/core.go @@ -9,19 +9,19 @@ import ( ///Pvp 战斗对象 type BattleItem struct { - Id string //战斗id - Ptype pb.PvpType //pvp类型 - State pb.PvpState //战斗状态 - Red *pb.PvpUserInfo //红方id - RedSession comm.IUserSession //红方连接对象 - Redformation *pb.BattleFormation //红方阵型列表 - RedOffline bool //红方离线 - Blue *pb.PvpUserInfo //蓝方id - BlueSession comm.IUserSession //蓝方连接对象 - Blueformation *pb.BattleFormation //蓝方阵型列表 - BlueOffline bool //蓝方离线 - readytimer *timewheel.Task //准备倒计时定时器 - operatetimer *timewheel.Task //操作倒计时定时器 - curroperate int32 //当前操作玩家 1 红方 2 蓝方 - lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象 + Id string //战斗id + Ptype pb.PvpType //pvp类型 + State pb.PvpState //战斗状态 + Red *pb.PvpUserInfo //红方id + RedSession comm.IUserSession //红方连接对象 + Redformation *pb.BattleFormation //红方阵型列表 + RedOffline bool //红方离线 + Blue *pb.PvpUserInfo //蓝方id + BlueSession comm.IUserSession //蓝方连接对象 + Blueformation *pb.BattleFormation //蓝方阵型列表 + BlueOffline bool //蓝方离线 + readytimer *timewheel.Task //准备倒计时定时器 + operatetimer *timewheel.Task //操作倒计时定时器 + curroperate *pb.ComWaitInputSkill //当前操作玩家 1 红方 2 蓝方 + lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象 } diff --git a/modules/pvp/module.go b/modules/pvp/module.go index 99242c7df..55cd75756 100644 --- a/modules/pvp/module.go +++ b/modules/pvp/module.go @@ -14,6 +14,7 @@ import ( "time" "go.mongodb.org/mongo-driver/bson/primitive" + "google.golang.org/protobuf/proto" ) /* @@ -82,12 +83,13 @@ func (this *Pvp) CreatePvp(red, blue *pb.PvpUserInfo, ptype pb.PvpType) (battleI ) battleId = primitive.NewObjectID().Hex() battle = &BattleItem{ - Id: battleId, - Ptype: ptype, - State: pb.PvpState_ready, - Red: red, - Blue: blue, - readytimer: timewheel.Add(time.Second*60, this.readyTimeOut, battleId), + Id: battleId, + Ptype: ptype, + State: pb.PvpState_ready, + Red: red, + Blue: blue, + readytimer: timewheel.Add(time.Second*60, this.readyTimeOut, battleId), + curroperate: &pb.ComWaitInputSkill{}, } if battle.RedSession, ok = this.GetUserSession(red.Uid); !ok { @@ -120,6 +122,8 @@ func (this *Pvp) PvpOutCmdPush(out *pb.PvpOutCmdPush) { var ( battle *BattleItem ok bool + data []byte + code pb.ErrorCode err error ) this.lock.RLock() @@ -132,6 +136,45 @@ func (this *Pvp) PvpOutCmdPush(out *pb.PvpOutCmdPush) { }, battle.RedSession, battle.BlueSession); err != nil { this.Errorln(err) } + for _, v := range out.Cmd { + if v.Cmdtype == "ComWaitInputSkill" { + if err = proto.Unmarshal(v.Value, battle.curroperate); err != nil { + this.Errorln(err) + } + if battle.curroperate.Side == 1 && battle.RedOffline { //已经离线 + battle.curroperate.Auto = true + data, _ = proto.Marshal(battle.curroperate) + if code = this.battle.InCmdBattle(&pb.BattleInCmdReq{ + Battleid: battle.Id, + Side: battle.curroperate.Side, + In: &pb.BattleCmd{ + Cmdtype: "ComWaitInputSkill", + Value: data, + }, + }); code != pb.ErrorCode_Success { + return + } + return + } + if battle.curroperate.Side == 2 && battle.BlueOffline { //已经离线 + battle.curroperate.Auto = true + data, _ = proto.Marshal(battle.curroperate) + if code = this.battle.InCmdBattle(&pb.BattleInCmdReq{ + Battleid: battle.Id, + Side: battle.curroperate.Side, + In: &pb.BattleCmd{ + Cmdtype: "ComWaitInputSkill", + Value: data, + }, + }); code != pb.ErrorCode_Success { + return + } + return + } + battle.operatetimer = timewheel.Add(time.Second*60, this.operateTimeOut, battle.Id) + } + } + } } @@ -158,7 +201,7 @@ func (this *Pvp) PvpFinishPush(battleId string) { //准备超时 取消战斗 func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) { - this.Debug("PVPTimeOut", log.Field{Key: "args", Value: args}) + this.Debug("readyTimeOut", log.Field{Key: "args", Value: args}) var ( id string battle *BattleItem @@ -186,6 +229,37 @@ func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) { } } +//操作倒计时 +func (this *Pvp) operateTimeOut(task *timewheel.Task, args ...interface{}) { + this.Debug("operateTimeOut", log.Field{Key: "args", Value: args}) + var ( + id string + battle *BattleItem + ok bool + code pb.ErrorCode + data []byte + ) + id = args[0].(string) + this.lock.RLock() + battle, ok = this.battles[id] + this.lock.RUnlock() + if ok && battle.State == pb.PvpState_battle { + battle.curroperate.Auto = true + data, _ = proto.Marshal(battle.curroperate) + if code = this.battle.InCmdBattle(&pb.BattleInCmdReq{ + Battleid: battle.Id, + Side: battle.curroperate.Side, + In: &pb.BattleCmd{ + Cmdtype: "ComWaitInputSkill", + Value: data, + }, + }); code != pb.ErrorCode_Success { + return + } + + } +} + //开始战斗 func (this *Pvp) startBattle(battle *BattleItem) { this.Debug("PVPStart", log.Field{Key: "battleId", Value: battle.Id}) @@ -248,23 +322,35 @@ func (this *Pvp) startBattle(battle *BattleItem) { func (this *Pvp) useroffline(session comm.IUserSession) { var ( side int32 + data []byte + code pb.ErrorCode ) this.lock.RLock() for _, v := range this.battles { if v.Red.Uid == session.GetUserId() || v.Blue.Uid == session.GetUserId() { if session.GetUserId() == v.Red.Uid { side = 1 + v.RedOffline = true } else { side = 2 + v.BlueOffline = true } - v.lock.Lock() - if v.State == pb.PvpState_battle { - go this.battle.ConcedeBattle(&pb.BattleConcedeReq{ + + if v.curroperate.Side == side { + timewheel.Remove(v.operatetimer) + v.curroperate.Auto = true + data, _ = proto.Marshal(v.curroperate) + if code = this.battle.InCmdBattle(&pb.BattleInCmdReq{ Battleid: v.Id, - Side: side, - }) + Side: v.curroperate.Side, + In: &pb.BattleCmd{ + Cmdtype: "ComWaitInputSkill", + Value: data, + }, + }); code != pb.ErrorCode_Success { + return + } } - v.lock.Unlock() } } this.lock.RUnlock() From eac0c690f11d163161ebd04d57490a6c9e81ca71 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 13 Feb 2023 18:41:05 +0800 Subject: [PATCH 06/21] =?UTF-8?q?=E9=93=81=E5=8C=A0=E9=93=BA=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pb/smithy_db.pb.go | 449 +++++++++++++++++++++++++++------- pb/smithy_msg.pb.go | 578 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 841 insertions(+), 186 deletions(-) diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index 1f55f3846..89b31f5c8 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -33,6 +33,7 @@ type DBStove struct { Skill map[int32]int32 `protobuf:"bytes,5,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 台子技能 Temperature int32 `protobuf:"varint,6,opt,name=temperature,proto3" json:"temperature"` // 炉子温度 RecoveTime int64 `protobuf:"varint,7,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间 + Business int32 `protobuf:"varint,8,opt,name=business,proto3" json:"business"` // } func (x *DBStove) Reset() { @@ -116,6 +117,212 @@ func (x *DBStove) GetRecoveTime() int64 { return 0 } +func (x *DBStove) GetBusiness() int32 { + if x != nil { + return x.Business + } + return 0 +} + +// 商人信息 +type DBBusiness struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count"` // 刷新次数 + Shop map[int32]int32 `protobuf:"bytes,2,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + RefreshTime int64 `protobuf:"varint,3,opt,name=refreshTime,proto3" json:"refreshTime" bson:"refreshTime"` //刷新开始时间 +} + +func (x *DBBusiness) Reset() { + *x = DBBusiness{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_db_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBBusiness) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBBusiness) ProtoMessage() {} + +func (x *DBBusiness) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_db_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 DBBusiness.ProtoReflect.Descriptor instead. +func (*DBBusiness) Descriptor() ([]byte, []int) { + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{1} +} + +func (x *DBBusiness) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *DBBusiness) GetShop() map[int32]int32 { + if x != nil { + return x.Shop + } + return nil +} + +func (x *DBBusiness) GetRefreshTime() int64 { + if x != nil { + return x.RefreshTime + } + return 0 +} + +// 装备图鉴 +type DBTujian 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" bson:"uid"` //用户ID + Tujian map[int32]*EquipData `protobuf:"bytes,3,rep,name=tujian,proto3" json:"tujian" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 图鉴信息 + Slider int32 `protobuf:"varint,4,opt,name=slider,proto3" json:"slider"` // 进度 +} + +func (x *DBTujian) Reset() { + *x = DBTujian{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBTujian) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBTujian) ProtoMessage() {} + +func (x *DBTujian) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_db_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 DBTujian.ProtoReflect.Descriptor instead. +func (*DBTujian) Descriptor() ([]byte, []int) { + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{2} +} + +func (x *DBTujian) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBTujian) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBTujian) GetTujian() map[int32]*EquipData { + if x != nil { + return x.Tujian + } + return nil +} + +func (x *DBTujian) GetSlider() int32 { + if x != nil { + return x.Slider + } + return 0 +} + +type EquipData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ForgeCount int32 `protobuf:"varint,1,opt,name=forgeCount,proto3" json:"forgeCount"` // 打造次数 + Lv int32 `protobuf:"varint,2,opt,name=lv,proto3" json:"lv"` + Quality int32 `protobuf:"varint,3,opt,name=quality,proto3" json:"quality"` +} + +func (x *EquipData) Reset() { + *x = EquipData{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_db_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EquipData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EquipData) ProtoMessage() {} + +func (x *EquipData) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_db_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 EquipData.ProtoReflect.Descriptor instead. +func (*EquipData) Descriptor() ([]byte, []int) { + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{3} +} + +func (x *EquipData) GetForgeCount() int32 { + if x != nil { + return x.ForgeCount + } + return 0 +} + +func (x *EquipData) GetLv() int32 { + if x != nil { + return x.Lv + } + return 0 +} + +func (x *EquipData) GetQuality() int32 { + if x != nil { + return x.Quality + } + return 0 +} + type Clang struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -129,7 +336,7 @@ type Clang struct { func (x *Clang) Reset() { *x = Clang{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[1] + mi := &file_smithy_smithy_db_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +349,7 @@ func (x *Clang) String() string { func (*Clang) ProtoMessage() {} func (x *Clang) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[1] + mi := &file_smithy_smithy_db_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +362,7 @@ func (x *Clang) ProtoReflect() protoreflect.Message { // Deprecated: Use Clang.ProtoReflect.Descriptor instead. func (*Clang) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{1} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{4} } func (x *Clang) GetDeskType() int32 { @@ -192,7 +399,7 @@ type OrderClang struct { func (x *OrderClang) Reset() { *x = OrderClang{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[2] + mi := &file_smithy_smithy_db_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -205,7 +412,7 @@ func (x *OrderClang) String() string { func (*OrderClang) ProtoMessage() {} func (x *OrderClang) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[2] + mi := &file_smithy_smithy_db_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -218,7 +425,7 @@ func (x *OrderClang) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderClang.ProtoReflect.Descriptor instead. func (*OrderClang) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{2} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{5} } func (x *OrderClang) GetDeskType() int32 { @@ -264,7 +471,7 @@ type DBSmithy struct { func (x *DBSmithy) Reset() { *x = DBSmithy{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[3] + mi := &file_smithy_smithy_db_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -277,7 +484,7 @@ func (x *DBSmithy) String() string { func (*DBSmithy) ProtoMessage() {} func (x *DBSmithy) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[3] + mi := &file_smithy_smithy_db_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -290,7 +497,7 @@ func (x *DBSmithy) ProtoReflect() protoreflect.Message { // Deprecated: Use DBSmithy.ProtoReflect.Descriptor instead. func (*DBSmithy) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{3} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{6} } func (x *DBSmithy) GetId() string { @@ -382,7 +589,7 @@ var File_smithy_smithy_db_proto protoreflect.FileDescriptor var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x02, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x02, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 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, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, @@ -395,58 +602,88 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, - 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, - 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, - 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, - 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, - 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, - 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, - 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, - 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, - 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, - 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, - 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, - 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, - 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, - 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, - 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, - 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, + 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, + 0x65, 0x73, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, + 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, + 0x53, 0x6b, 0x69, 0x6c, 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, 0x22, 0xa8, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x42, 0x75, 0x73, + 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x73, + 0x68, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x42, 0x75, + 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, + 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, 0x22, 0xba, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 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, 0x2d, 0x0a, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x2e, 0x54, 0x75, 0x6a, 0x69, + 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, + 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, + 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, + 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, + 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, + 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, + 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, + 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, + 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, + 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, + 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, + 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, + 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, + 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, + 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, + 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, + 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, + 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, + 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 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 ( @@ -461,31 +698,39 @@ func file_smithy_smithy_db_proto_rawDescGZIP() []byte { return file_smithy_smithy_db_proto_rawDescData } -var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_smithy_smithy_db_proto_goTypes = []interface{}{ (*DBStove)(nil), // 0: DBStove - (*Clang)(nil), // 1: Clang - (*OrderClang)(nil), // 2: OrderClang - (*DBSmithy)(nil), // 3: DBSmithy - nil, // 4: DBStove.DataEntry - nil, // 5: DBStove.SkillEntry - nil, // 6: DBSmithy.SkillEntry - nil, // 7: DBSmithy.DeskFloorEntry - (*UserAssets)(nil), // 8: UserAssets + (*DBBusiness)(nil), // 1: DBBusiness + (*DBTujian)(nil), // 2: DBTujian + (*EquipData)(nil), // 3: EquipData + (*Clang)(nil), // 4: Clang + (*OrderClang)(nil), // 5: OrderClang + (*DBSmithy)(nil), // 6: DBSmithy + nil, // 7: DBStove.DataEntry + nil, // 8: DBStove.SkillEntry + nil, // 9: DBBusiness.ShopEntry + nil, // 10: DBTujian.TujianEntry + nil, // 11: DBSmithy.SkillEntry + nil, // 12: DBSmithy.DeskFloorEntry + (*UserAssets)(nil), // 13: UserAssets } var file_smithy_smithy_db_proto_depIdxs = []int32{ - 4, // 0: DBStove.data:type_name -> DBStove.DataEntry - 5, // 1: DBStove.skill:type_name -> DBStove.SkillEntry - 1, // 2: DBSmithy.clang:type_name -> Clang - 2, // 3: DBSmithy.orders:type_name -> OrderClang - 8, // 4: DBSmithy.items:type_name -> UserAssets - 6, // 5: DBSmithy.skill:type_name -> DBSmithy.SkillEntry - 7, // 6: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry - 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 + 7, // 0: DBStove.data:type_name -> DBStove.DataEntry + 8, // 1: DBStove.skill:type_name -> DBStove.SkillEntry + 9, // 2: DBBusiness.shop:type_name -> DBBusiness.ShopEntry + 10, // 3: DBTujian.tujian:type_name -> DBTujian.TujianEntry + 4, // 4: DBSmithy.clang:type_name -> Clang + 5, // 5: DBSmithy.orders:type_name -> OrderClang + 13, // 6: DBSmithy.items:type_name -> UserAssets + 11, // 7: DBSmithy.skill:type_name -> DBSmithy.SkillEntry + 12, // 8: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry + 3, // 9: DBTujian.TujianEntry.value:type_name -> EquipData + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_smithy_smithy_db_proto_init() } @@ -508,7 +753,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Clang); i { + switch v := v.(*DBBusiness); i { case 0: return &v.state case 1: @@ -520,7 +765,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderClang); i { + switch v := v.(*DBTujian); i { case 0: return &v.state case 1: @@ -532,6 +777,42 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EquipData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Clang); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_db_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderClang); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_db_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBSmithy); i { case 0: return &v.state @@ -550,7 +831,7 @@ func file_smithy_smithy_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_db_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go index d8c11a1f2..8aa10ac93 100644 --- a/pb/smithy_msg.pb.go +++ b/pb/smithy_msg.pb.go @@ -636,6 +636,195 @@ func (x *SmithyToolsUpResp) GetData() *DBStove { return nil } +// 刷新商人 +type SmithyRefreshShopReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SmithyRefreshShopReq) Reset() { + *x = SmithyRefreshShopReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyRefreshShopReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyRefreshShopReq) ProtoMessage() {} + +func (x *SmithyRefreshShopReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[12] + 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 SmithyRefreshShopReq.ProtoReflect.Descriptor instead. +func (*SmithyRefreshShopReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{12} +} + +type SmithyRefreshShopResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBBusiness `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyRefreshShopResp) Reset() { + *x = SmithyRefreshShopResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyRefreshShopResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyRefreshShopResp) ProtoMessage() {} + +func (x *SmithyRefreshShopResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[13] + 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 SmithyRefreshShopResp.ProtoReflect.Descriptor instead. +func (*SmithyRefreshShopResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{13} +} + +func (x *SmithyRefreshShopResp) GetData() *DBBusiness { + if x != nil { + return x.Data + } + return nil +} + +// 出售装备 +type SmithySellItemReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 装备ID + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count"` // 数量 +} + +func (x *SmithySellItemReq) Reset() { + *x = SmithySellItemReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithySellItemReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithySellItemReq) ProtoMessage() {} + +func (x *SmithySellItemReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[14] + 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 SmithySellItemReq.ProtoReflect.Descriptor instead. +func (*SmithySellItemReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{14} +} + +func (x *SmithySellItemReq) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *SmithySellItemReq) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +type SmithySellItemResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBBusiness `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *SmithySellItemResp) Reset() { + *x = SmithySellItemResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithySellItemResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithySellItemResp) ProtoMessage() {} + +func (x *SmithySellItemResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[15] + 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 SmithySellItemResp.ProtoReflect.Descriptor instead. +func (*SmithySellItemResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{15} +} + +func (x *SmithySellItemResp) GetData() *DBBusiness { + if x != nil { + return x.Data + } + return nil +} + // 创建订单 type SmithyCreateOrderReq struct { state protoimpl.MessageState @@ -648,7 +837,7 @@ type SmithyCreateOrderReq struct { func (x *SmithyCreateOrderReq) Reset() { *x = SmithyCreateOrderReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[12] + mi := &file_smithy_smithy_msg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -661,7 +850,7 @@ func (x *SmithyCreateOrderReq) String() string { func (*SmithyCreateOrderReq) ProtoMessage() {} func (x *SmithyCreateOrderReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[12] + mi := &file_smithy_smithy_msg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -674,7 +863,7 @@ func (x *SmithyCreateOrderReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyCreateOrderReq.ProtoReflect.Descriptor instead. func (*SmithyCreateOrderReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{12} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{16} } func (x *SmithyCreateOrderReq) GetOrder() []*OrderClang { @@ -695,7 +884,7 @@ type SmithyCreateOrderResp struct { func (x *SmithyCreateOrderResp) Reset() { *x = SmithyCreateOrderResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[13] + mi := &file_smithy_smithy_msg_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -708,7 +897,7 @@ func (x *SmithyCreateOrderResp) String() string { func (*SmithyCreateOrderResp) ProtoMessage() {} func (x *SmithyCreateOrderResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[13] + mi := &file_smithy_smithy_msg_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -721,7 +910,7 @@ func (x *SmithyCreateOrderResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyCreateOrderResp.ProtoReflect.Descriptor instead. func (*SmithyCreateOrderResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{13} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{17} } func (x *SmithyCreateOrderResp) GetData() *DBSmithy { @@ -741,7 +930,7 @@ type SmithyGetRewardReq struct { func (x *SmithyGetRewardReq) Reset() { *x = SmithyGetRewardReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[14] + mi := &file_smithy_smithy_msg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -754,7 +943,7 @@ func (x *SmithyGetRewardReq) String() string { func (*SmithyGetRewardReq) ProtoMessage() {} func (x *SmithyGetRewardReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[14] + mi := &file_smithy_smithy_msg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -767,7 +956,7 @@ func (x *SmithyGetRewardReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRewardReq.ProtoReflect.Descriptor instead. func (*SmithyGetRewardReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{14} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{18} } type SmithyGetRewardResp struct { @@ -781,7 +970,7 @@ type SmithyGetRewardResp struct { func (x *SmithyGetRewardResp) Reset() { *x = SmithyGetRewardResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[15] + mi := &file_smithy_smithy_msg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -794,7 +983,7 @@ func (x *SmithyGetRewardResp) String() string { func (*SmithyGetRewardResp) ProtoMessage() {} func (x *SmithyGetRewardResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[15] + mi := &file_smithy_smithy_msg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -807,7 +996,7 @@ func (x *SmithyGetRewardResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRewardResp.ProtoReflect.Descriptor instead. func (*SmithyGetRewardResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{15} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{19} } func (x *SmithyGetRewardResp) GetData() *DBSmithy { @@ -829,7 +1018,7 @@ type SmithyDeskSkillLvReq struct { func (x *SmithyDeskSkillLvReq) Reset() { *x = SmithyDeskSkillLvReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[16] + mi := &file_smithy_smithy_msg_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -842,7 +1031,7 @@ func (x *SmithyDeskSkillLvReq) String() string { func (*SmithyDeskSkillLvReq) ProtoMessage() {} func (x *SmithyDeskSkillLvReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[16] + mi := &file_smithy_smithy_msg_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -855,7 +1044,7 @@ func (x *SmithyDeskSkillLvReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyDeskSkillLvReq.ProtoReflect.Descriptor instead. func (*SmithyDeskSkillLvReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{16} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{20} } func (x *SmithyDeskSkillLvReq) GetDeskType() int32 { @@ -876,7 +1065,7 @@ type SmithyDeskSkillLvResp struct { func (x *SmithyDeskSkillLvResp) Reset() { *x = SmithyDeskSkillLvResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[17] + mi := &file_smithy_smithy_msg_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -889,7 +1078,7 @@ func (x *SmithyDeskSkillLvResp) String() string { func (*SmithyDeskSkillLvResp) ProtoMessage() {} func (x *SmithyDeskSkillLvResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[17] + mi := &file_smithy_smithy_msg_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -902,7 +1091,7 @@ func (x *SmithyDeskSkillLvResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyDeskSkillLvResp.ProtoReflect.Descriptor instead. func (*SmithyDeskSkillLvResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{17} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{21} } func (x *SmithyDeskSkillLvResp) GetData() *DBSmithy { @@ -922,7 +1111,7 @@ type SmithyStoveSkillLvReq struct { func (x *SmithyStoveSkillLvReq) Reset() { *x = SmithyStoveSkillLvReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[18] + mi := &file_smithy_smithy_msg_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -935,7 +1124,7 @@ func (x *SmithyStoveSkillLvReq) String() string { func (*SmithyStoveSkillLvReq) ProtoMessage() {} func (x *SmithyStoveSkillLvReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[18] + mi := &file_smithy_smithy_msg_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -948,7 +1137,7 @@ func (x *SmithyStoveSkillLvReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyStoveSkillLvReq.ProtoReflect.Descriptor instead. func (*SmithyStoveSkillLvReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{18} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{22} } type SmithyStoveSkillLvResp struct { @@ -962,7 +1151,7 @@ type SmithyStoveSkillLvResp struct { func (x *SmithyStoveSkillLvResp) Reset() { *x = SmithyStoveSkillLvResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[19] + mi := &file_smithy_smithy_msg_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -975,7 +1164,7 @@ func (x *SmithyStoveSkillLvResp) String() string { func (*SmithyStoveSkillLvResp) ProtoMessage() {} func (x *SmithyStoveSkillLvResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[19] + mi := &file_smithy_smithy_msg_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -988,7 +1177,7 @@ func (x *SmithyStoveSkillLvResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyStoveSkillLvResp.ProtoReflect.Descriptor instead. func (*SmithyStoveSkillLvResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{19} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{23} } func (x *SmithyStoveSkillLvResp) GetData() *DBSmithy { @@ -1009,7 +1198,7 @@ type SmithyGetRandUserReq struct { func (x *SmithyGetRandUserReq) Reset() { *x = SmithyGetRandUserReq{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[20] + mi := &file_smithy_smithy_msg_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1022,7 +1211,7 @@ func (x *SmithyGetRandUserReq) String() string { func (*SmithyGetRandUserReq) ProtoMessage() {} func (x *SmithyGetRandUserReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[20] + mi := &file_smithy_smithy_msg_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1035,7 +1224,7 @@ func (x *SmithyGetRandUserReq) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRandUserReq.ProtoReflect.Descriptor instead. func (*SmithyGetRandUserReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{20} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{24} } func (x *SmithyGetRandUserReq) GetPeople() int32 { @@ -1056,7 +1245,7 @@ type SmithyGetRandUserResp struct { func (x *SmithyGetRandUserResp) Reset() { *x = SmithyGetRandUserResp{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[21] + mi := &file_smithy_smithy_msg_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1069,7 +1258,7 @@ func (x *SmithyGetRandUserResp) String() string { func (*SmithyGetRandUserResp) ProtoMessage() {} func (x *SmithyGetRandUserResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[21] + mi := &file_smithy_smithy_msg_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1082,7 +1271,7 @@ func (x *SmithyGetRandUserResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SmithyGetRandUserResp.ProtoReflect.Descriptor instead. func (*SmithyGetRandUserResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{21} + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{25} } func (x *SmithyGetRandUserResp) GetUser() []*DBUser { @@ -1092,6 +1281,92 @@ func (x *SmithyGetRandUserResp) GetUser() []*DBUser { return nil } +type SmithyGetListReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SmithyGetListReq) Reset() { + *x = SmithyGetListReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyGetListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyGetListReq) ProtoMessage() {} + +func (x *SmithyGetListReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[26] + 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 SmithyGetListReq.ProtoReflect.Descriptor instead. +func (*SmithyGetListReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{26} +} + +// 返回进度信息 +type SmithyGetListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data *DBSmithy `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` +} + +func (x *SmithyGetListResp) Reset() { + *x = SmithyGetListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyGetListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyGetListResp) ProtoMessage() {} + +func (x *SmithyGetListResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[27] + 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 SmithyGetListResp.ProtoReflect.Descriptor instead. +func (*SmithyGetListResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{27} +} + +func (x *SmithyGetListResp) GetData() *DBSmithy { + if x != nil { + return x.Data + } + return nil +} + var File_smithy_smithy_msg_proto protoreflect.FileDescriptor var file_smithy_smithy_msg_proto_rawDesc = []byte{ @@ -1144,38 +1419,55 @@ var file_smithy_smithy_msg_proto_rawDesc = []byte{ 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x55, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x44, 0x42, 0x53, 0x74, - 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x14, 0x53, 0x6d, 0x69, - 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x6f, - 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, + 0x6f, 0x76, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x6d, 0x69, + 0x74, 0x68, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, + 0x71, 0x22, 0x38, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x53, 0x68, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, + 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, 0x11, 0x53, + 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x71, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x35, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x53, 0x65, 0x6c, 0x6c, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42, + 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x39, 0x0a, + 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x21, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, + 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x14, 0x0a, 0x12, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x14, 0x0a, 0x12, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x22, 0x34, 0x0a, 0x13, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x15, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x32, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, - 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, - 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x71, 0x22, 0x37, 0x0a, - 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, - 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, - 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x22, 0x34, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, - 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x1b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, - 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, - 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x36, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x44, 0x65, 0x73, 0x6b, 0x53, 0x6b, + 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, + 0x71, 0x22, 0x37, 0x0a, 0x16, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x74, 0x6f, 0x76, 0x65, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x76, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x14, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x70, 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x22, 0x34, 0x0a, 0x15, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x22, 0x12, 0x0a, 0x10, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1190,7 +1482,7 @@ func file_smithy_smithy_msg_proto_rawDescGZIP() []byte { return file_smithy_smithy_msg_proto_rawDescData } -var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_smithy_smithy_msg_proto_goTypes = []interface{}{ (*SmithyGetStoveInfoReq)(nil), // 0: SmithyGetStoveInfoReq (*SmithyGetStoveInfoResp)(nil), // 1: SmithyGetStoveInfoResp @@ -1204,39 +1496,49 @@ var file_smithy_smithy_msg_proto_goTypes = []interface{}{ (*SmithyRiseResp)(nil), // 9: SmithyRiseResp (*SmithyToolsUpReq)(nil), // 10: SmithyToolsUpReq (*SmithyToolsUpResp)(nil), // 11: SmithyToolsUpResp - (*SmithyCreateOrderReq)(nil), // 12: SmithyCreateOrderReq - (*SmithyCreateOrderResp)(nil), // 13: SmithyCreateOrderResp - (*SmithyGetRewardReq)(nil), // 14: SmithyGetRewardReq - (*SmithyGetRewardResp)(nil), // 15: SmithyGetRewardResp - (*SmithyDeskSkillLvReq)(nil), // 16: SmithyDeskSkillLvReq - (*SmithyDeskSkillLvResp)(nil), // 17: SmithyDeskSkillLvResp - (*SmithyStoveSkillLvReq)(nil), // 18: SmithyStoveSkillLvReq - (*SmithyStoveSkillLvResp)(nil), // 19: SmithyStoveSkillLvResp - (*SmithyGetRandUserReq)(nil), // 20: SmithyGetRandUserReq - (*SmithyGetRandUserResp)(nil), // 21: SmithyGetRandUserResp - (*DBStove)(nil), // 22: DBStove - (*OrderClang)(nil), // 23: OrderClang - (*DBSmithy)(nil), // 24: DBSmithy - (*DBUser)(nil), // 25: DBUser + (*SmithyRefreshShopReq)(nil), // 12: SmithyRefreshShopReq + (*SmithyRefreshShopResp)(nil), // 13: SmithyRefreshShopResp + (*SmithySellItemReq)(nil), // 14: SmithySellItemReq + (*SmithySellItemResp)(nil), // 15: SmithySellItemResp + (*SmithyCreateOrderReq)(nil), // 16: SmithyCreateOrderReq + (*SmithyCreateOrderResp)(nil), // 17: SmithyCreateOrderResp + (*SmithyGetRewardReq)(nil), // 18: SmithyGetRewardReq + (*SmithyGetRewardResp)(nil), // 19: SmithyGetRewardResp + (*SmithyDeskSkillLvReq)(nil), // 20: SmithyDeskSkillLvReq + (*SmithyDeskSkillLvResp)(nil), // 21: SmithyDeskSkillLvResp + (*SmithyStoveSkillLvReq)(nil), // 22: SmithyStoveSkillLvReq + (*SmithyStoveSkillLvResp)(nil), // 23: SmithyStoveSkillLvResp + (*SmithyGetRandUserReq)(nil), // 24: SmithyGetRandUserReq + (*SmithyGetRandUserResp)(nil), // 25: SmithyGetRandUserResp + (*SmithyGetListReq)(nil), // 26: SmithyGetListReq + (*SmithyGetListResp)(nil), // 27: SmithyGetListResp + (*DBStove)(nil), // 28: DBStove + (*DBBusiness)(nil), // 29: DBBusiness + (*OrderClang)(nil), // 30: OrderClang + (*DBSmithy)(nil), // 31: DBSmithy + (*DBUser)(nil), // 32: DBUser } var file_smithy_smithy_msg_proto_depIdxs = []int32{ - 22, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove - 22, // 1: SmithyForgeEquipResp.data:type_name -> DBStove - 22, // 2: SmithyOrderEquipResp.data:type_name -> DBStove - 22, // 3: SmithyStoveUpResp.data:type_name -> DBStove - 22, // 4: SmithyRiseResp.data:type_name -> DBStove - 22, // 5: SmithyToolsUpResp.data:type_name -> DBStove - 23, // 6: SmithyCreateOrderReq.order:type_name -> OrderClang - 24, // 7: SmithyCreateOrderResp.data:type_name -> DBSmithy - 24, // 8: SmithyGetRewardResp.data:type_name -> DBSmithy - 24, // 9: SmithyDeskSkillLvResp.data:type_name -> DBSmithy - 24, // 10: SmithyStoveSkillLvResp.data:type_name -> DBSmithy - 25, // 11: SmithyGetRandUserResp.user:type_name -> DBUser - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 28, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove + 28, // 1: SmithyForgeEquipResp.data:type_name -> DBStove + 28, // 2: SmithyOrderEquipResp.data:type_name -> DBStove + 28, // 3: SmithyStoveUpResp.data:type_name -> DBStove + 28, // 4: SmithyRiseResp.data:type_name -> DBStove + 28, // 5: SmithyToolsUpResp.data:type_name -> DBStove + 29, // 6: SmithyRefreshShopResp.data:type_name -> DBBusiness + 29, // 7: SmithySellItemResp.data:type_name -> DBBusiness + 30, // 8: SmithyCreateOrderReq.order:type_name -> OrderClang + 31, // 9: SmithyCreateOrderResp.data:type_name -> DBSmithy + 31, // 10: SmithyGetRewardResp.data:type_name -> DBSmithy + 31, // 11: SmithyDeskSkillLvResp.data:type_name -> DBSmithy + 31, // 12: SmithyStoveSkillLvResp.data:type_name -> DBSmithy + 32, // 13: SmithyGetRandUserResp.user:type_name -> DBUser + 31, // 14: SmithyGetListResp.data:type_name -> DBSmithy + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_smithy_smithy_msg_proto_init() } @@ -1392,7 +1694,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyCreateOrderReq); i { + switch v := v.(*SmithyRefreshShopReq); i { case 0: return &v.state case 1: @@ -1404,7 +1706,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyCreateOrderResp); i { + switch v := v.(*SmithyRefreshShopResp); i { case 0: return &v.state case 1: @@ -1416,7 +1718,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetRewardReq); i { + switch v := v.(*SmithySellItemReq); i { case 0: return &v.state case 1: @@ -1428,7 +1730,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetRewardResp); i { + switch v := v.(*SmithySellItemResp); i { case 0: return &v.state case 1: @@ -1440,7 +1742,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyDeskSkillLvReq); i { + switch v := v.(*SmithyCreateOrderReq); i { case 0: return &v.state case 1: @@ -1452,7 +1754,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyDeskSkillLvResp); i { + switch v := v.(*SmithyCreateOrderResp); i { case 0: return &v.state case 1: @@ -1464,7 +1766,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyStoveSkillLvReq); i { + switch v := v.(*SmithyGetRewardReq); i { case 0: return &v.state case 1: @@ -1476,7 +1778,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyStoveSkillLvResp); i { + switch v := v.(*SmithyGetRewardResp); i { case 0: return &v.state case 1: @@ -1488,7 +1790,7 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyGetRandUserReq); i { + switch v := v.(*SmithyDeskSkillLvReq); i { case 0: return &v.state case 1: @@ -1500,6 +1802,54 @@ func file_smithy_smithy_msg_proto_init() { } } file_smithy_smithy_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyDeskSkillLvResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyStoveSkillLvReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyStoveSkillLvResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyGetRandUserReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SmithyGetRandUserResp); i { case 0: return &v.state @@ -1511,6 +1861,30 @@ func file_smithy_smithy_msg_proto_init() { return nil } } + file_smithy_smithy_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyGetListReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyGetListResp); 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{ @@ -1518,7 +1892,7 @@ func file_smithy_smithy_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 22, + NumMessages: 28, NumExtensions: 0, NumServices: 0, }, From 1783ca780b34c8bf5222a9f7eca1d571f87862d2 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 14 Feb 2023 10:22:18 +0800 Subject: [PATCH 07/21] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=93=81=E5=8C=A0?= =?UTF-8?q?=E9=93=BA=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_stop.go | 6 +- modules/smithyv2/api.go | 35 +++++ modules/smithyv2/api_createorder.go | 117 +++++++++++++++++ modules/smithyv2/api_deskskilllv.go | 85 ++++++++++++ modules/smithyv2/api_getReward.go | 49 +++++++ modules/smithyv2/api_getlist.go | 34 +++++ modules/smithyv2/api_getranduser.go | 96 ++++++++++++++ modules/smithyv2/api_stoveskilllv.go | 63 +++++++++ modules/smithyv2/comp_configure.go | 93 +++++++++++++ modules/smithyv2/model_smithy.go | 188 +++++++++++++++++++++++++++ modules/smithyv2/module.go | 63 +++++++++ 11 files changed, 827 insertions(+), 2 deletions(-) create mode 100644 modules/smithyv2/api.go create mode 100644 modules/smithyv2/api_createorder.go create mode 100644 modules/smithyv2/api_deskskilllv.go create mode 100644 modules/smithyv2/api_getReward.go create mode 100644 modules/smithyv2/api_getlist.go create mode 100644 modules/smithyv2/api_getranduser.go create mode 100644 modules/smithyv2/api_stoveskilllv.go create mode 100644 modules/smithyv2/comp_configure.go create mode 100644 modules/smithyv2/model_smithy.go create mode 100644 modules/smithyv2/module.go diff --git a/modules/friend/api_cross_stop.go b/modules/friend/api_cross_stop.go index 6a5190074..f61e3d0d4 100644 --- a/modules/friend/api_cross_stop.go +++ b/modules/friend/api_cross_stop.go @@ -3,6 +3,8 @@ package friend import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" ) // 切磋终止 @@ -10,14 +12,14 @@ func (this *apiComp) StopCheck(session comm.IUserSession, req *pb.FriendStopReq) return } -func (this *apiComp) Stop(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode) { +func (this *apiComp) Stop(session comm.IUserSession, req *pb.FriendStopReq) (code pb.ErrorCode, data proto.Message) { if code = this.StopCheck(session, req); code != pb.ErrorCode_Success { return } //清楚切磋请求记录 this.moduleFriend.ModelFriendQiecuo.DelByUId(req.Uid) - + resp := &pb.FriendStopResp{ IsSucc: true, } diff --git a/modules/smithyv2/api.go b/modules/smithyv2/api.go new file mode 100644 index 000000000..ac92b2ac9 --- /dev/null +++ b/modules/smithyv2/api.go @@ -0,0 +1,35 @@ +package smithy + +import ( + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" +) + +const ( + SmithyGetListResp = "getlist" + SmithyCreateOrderResp = "createorder" + SmithyDeskSkillLvResp = "deskskilllv" + SmithyStoveSkillLvResp = "stoveskilllv" + SmithyGetRewardResp = "getreward" + SmithyGetRandUserResp = "getranduser" +) + +type apiComp struct { + modules.MCompGate + service core.IService + module *Smithy +} + +//组件初始化接口 +func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompGate.Init(service, module, comp, options) + this.module = module.(*Smithy) + this.service = service + return +} + +func (this *apiComp) Start() (err error) { + err = this.MCompGate.Start() + + return +} diff --git a/modules/smithyv2/api_createorder.go b/modules/smithyv2/api_createorder.go new file mode 100644 index 000000000..c315ba6b8 --- /dev/null +++ b/modules/smithyv2/api_createorder.go @@ -0,0 +1,117 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + cfg "go_dreamfactory/sys/configure/structs" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) CreateOrderCheck(session comm.IUserSession, req *pb.SmithyCreateOrderReq) (code pb.ErrorCode) { + if len(req.Order) == 0 { + code = pb.ErrorCode_ReqParameterError + return + } + return +} + +func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreateOrderReq) (code pb.ErrorCode, data proto.Message) { + var ( + res []*cfg.Gameatn + costTime int32 + privilegeAddItme int32 // 特权额外增加的时间 + ) + + code = this.CreateOrderCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + _skillCfg := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv) + needTime := _skillCfg.Time // 订单需要的时间 + for _, order := range req.Order { + if order.Count == 0 { + continue + } + costTime += needTime * order.Count + } + if _smithy.Ctime == 0 { + _smithy.Ctime = configure.Now().Unix() + } + // if !utils.IsToday(_smithy.Ctime) { + // _smithy.Ctime = configure.Now().Unix() + // _smithy.OrderCostTime = 0 + // } + _smithy.Orders = append(_smithy.Orders, req.Order...) // 直接追加订单数据 + if _smithy.Clang == nil || (_smithy.Clang != nil && _smithy.Clang.ETime == 0) { + for _, v := range _smithy.Orders { + if v.Count > 0 { + v.Count-- + // 获取生产时间 + _smithy.Clang = &pb.Clang{ + DeskType: v.DeskType, + ETime: configure.Now().Unix() + int64(needTime), + STime: configure.Now().Unix(), + } + break + } + } + } + // 計算耗時 + for _, v := range _smithy.Orders { + if v.Count > 0 { + v.NeedTime = needTime * v.Count + } + if skillLv, ok := _smithy.Skill[v.DeskType]; ok { + conf := this.module.configure.GetSmithyConfigData(v.DeskType, skillLv) + res = append(res, conf.Orderneed...) // 订单消耗 + } + } + if _smithy.Clang != nil && _smithy.Clang.ETime == 0 { + _smithy.Clang = nil + } + // 获取总的下单时长 + cfgCom := this.module.configure.GetGlobalConf() + if cfgCom == nil { + return + } + _smithy.OrderCostTime += costTime + privilegeAddItme = this.module.ModulePrivilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType10) + if cfgCom.SmithyMaxtime+privilegeAddItme < _smithy.OrderCostTime { // 大于总时长是不允许的 + code = pb.ErrorCode_GourmetMoreOrderTime + return + } + if code = this.module.ConsumeRes(session, res, true); code != pb.ErrorCode_Success { // 消耗校验 + return + } + + // 校验通过 写数据 + mapData := make(map[string]interface{}, 0) + sz := make([]*pb.OrderClang, 0) + for _, v := range _smithy.Orders { + if v.Count != 0 { + sz = append(sz, v) + } + } + _smithy.Orders = sz + mapData["orders"] = _smithy.Orders + mapData["orderCostTime"] = _smithy.OrderCostTime + mapData["clang"] = _smithy.Clang // 正在做的 + mapData["ctime"] = _smithy.Ctime + code = this.module.ModifySmithyData(session.GetUserId(), mapData) + iTotal := 0 + for _, v := range req.Order { + iTotal += int(v.Count) + } + this.module.ModuleRtask.SendToRtask(session, comm.Rtype148, int32(iTotal)) + + session.SendMsg(string(this.module.GetType()), SmithyCreateOrderResp, &pb.SmithyCreateOrderResp{Data: _smithy}) + return +} diff --git a/modules/smithyv2/api_deskskilllv.go b/modules/smithyv2/api_deskskilllv.go new file mode 100644 index 000000000..4e185f2ba --- /dev/null +++ b/modules/smithyv2/api_deskskilllv.go @@ -0,0 +1,85 @@ +package smithy + +import ( + "crypto/rand" + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "math/big" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) DeskSkillLvCheck(session comm.IUserSession, req *pb.SmithyDeskSkillLvReq) (code pb.ErrorCode) { + if req.DeskType == 0 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +func (this *apiComp) DeskSkillLv(session comm.IUserSession, req *pb.SmithyDeskSkillLvReq) (code pb.ErrorCode, dat proto.Message) { + var ( + bFindSkill bool + curSkillCfg *cfg.GameSmithyData + ) + code = this.DeskSkillLvCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + for k, v := range _smithy.Skill { + if k == req.DeskType { + bFindSkill = true + // 查询配置文件 + curSkillCfg = this.module.configure.GetSmithyConfigData(k, v) + if curSkillCfg != nil && curSkillCfg.Starupneed != nil { + //获取下一级 + NextSkillCfg := this.module.configure.GetSmithyConfigData(k, v+1) + if NextSkillCfg == nil { + code = pb.ErrorCode_GourmetSkillMaxLv + return + } + // 升级 + code = this.module.ConsumeRes(session, curSkillCfg.Starupneed, true) // 消耗检测 + if code != pb.ErrorCode_Success { + return + } + // 概率升级 + n, _ := rand.Int(rand.Reader, big.NewInt(100)) + + if n.Int64() < int64(curSkillCfg.Probability) { // 可以升级 + // 技能升级成功 + _smithy.Skill[req.DeskType] += 1 + _smithy.DeskFloor[req.DeskType] = 0 + this.module.modelSmithy.CalculationDeskSkillLv(session.GetUserId(), _smithy) + + } else { + _smithy.DeskFloor[req.DeskType] += 1 + if _smithy.DeskFloor[req.DeskType] >= curSkillCfg.Floors { // 触发保底 + _smithy.Skill[req.DeskType] += 1 + _smithy.DeskFloor[req.DeskType] = 0 + this.module.modelSmithy.CalculationDeskSkillLv(session.GetUserId(), _smithy) + + } + } + } else { + code = pb.ErrorCode_GourmetSkillMaxLv + return + } + break + } + } + if !bFindSkill { + code = pb.ErrorCode_ReqParameterError + return + } + + session.SendMsg(string(this.module.GetType()), SmithyDeskSkillLvResp, &pb.SmithyDeskSkillLvResp{Data: _smithy}) + return +} diff --git a/modules/smithyv2/api_getReward.go b/modules/smithyv2/api_getReward.go new file mode 100644 index 000000000..474ce7f9a --- /dev/null +++ b/modules/smithyv2/api_getReward.go @@ -0,0 +1,49 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.SmithyGetRewardReq) (code pb.ErrorCode) { + + return +} + +///美食城领取奖励 +func (this *apiComp) GetReward(session comm.IUserSession, req *pb.SmithyGetRewardReq) (code pb.ErrorCode, data proto.Message) { + code = this.GetRewardCheck(session, req) + _gourmet, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + if len(_gourmet.Items) > 0 { + res := make([]*cfg.Gameatn, 0) + for _, v := range _gourmet.Items { + res = append(res, &cfg.Gameatn{ + A: v.A, + T: v.T, + N: v.N, + }) + } + code = this.module.DispenseRes(session, res, true) + if code != pb.ErrorCode_Success { + return + } + // 随机任务 + this.module.SendRdTask(session, _gourmet.Items) + + _gourmet.Items = nil + mapData := make(map[string]interface{}, 0) + mapData["items"] = nil + code = this.module.ModifySmithyData(session.GetUserId(), mapData) + } + session.SendMsg(string(this.module.GetType()), SmithyGetRewardResp, &pb.SmithyGetRewardResp{Data: _gourmet}) + + return +} diff --git a/modules/smithyv2/api_getlist.go b/modules/smithyv2/api_getlist.go new file mode 100644 index 000000000..f95832ef1 --- /dev/null +++ b/modules/smithyv2/api_getlist.go @@ -0,0 +1,34 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.SmithyGetListReq) (code pb.ErrorCode) { + + return +} + +///获取美食城基本信息 +func (this *apiComp) GetList(session comm.IUserSession, req *pb.SmithyGetListReq) (code pb.ErrorCode, data proto.Message) { + + code = this.GetListCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + // 计算订单信息 + this.module.modelSmithy.CalculationSmithy(session.GetUserId(), _smithy) + session.SendMsg(string(this.module.GetType()), SmithyGetListResp, &pb.SmithyGetListResp{Data: _smithy}) + + this.module.ModuleRtask.SendToRtask(session, comm.Rtype137, _smithy.TotalTime) + return +} diff --git a/modules/smithyv2/api_getranduser.go b/modules/smithyv2/api_getranduser.go new file mode 100644 index 000000000..8389d55d7 --- /dev/null +++ b/modules/smithyv2/api_getranduser.go @@ -0,0 +1,96 @@ +package smithy + +import ( + "context" + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/pb" + "go_dreamfactory/sys/db" + "go_dreamfactory/utils" + "time" + + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo/options" + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) GetRandUserCheck(session comm.IUserSession, req *pb.SmithyGetRandUserReq) (code pb.ErrorCode) { + if req.People <= 0 { + code = pb.ErrorCode_ReqParameterError + return + } + return +} + +/// 获取一些玩家数据 +func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.SmithyGetRandUserReq) (code pb.ErrorCode, data proto.Message) { + var ( + szDbUser []*pb.DBUser + mapUser map[string]struct{} + ) + mapUser = make(map[string]struct{}, 0) + code = this.GetRandUserCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + + // 获取在线玩家信息 + onlineList, err := this.module.ModuleUser.UserOnlineList() + if err != nil { + code = pb.ErrorCode_DBError + return + } + + var szUid []string + for _, v := range onlineList { + if v.Uid == session.GetUserId() || v.Uid == "" { // 过滤自己信息 + continue + } + szUid = append(szUid, v.Uid) + } + // 随机在线玩家信息 + if len(szUid) > int(req.People) { + randArr := utils.RandomNumbers(0, len(szUid), int(req.People)) + for _, v := range randArr { + if szUid[v] != "" { + mapUser[szUid[v]] = struct{}{} + } + } + } else { // 数量不足 则有多少给多少 + for _, v := range szUid { + mapUser[v] = struct{}{} + } + left := int(req.People) - len(mapUser) + if left > 0 { // 一个人也没有 那就从db 中随机取 + tag, _, b := utils.UIdSplit(session.GetUserId()) + if b { + if conn, err := db.ServerDBConn(tag); err == nil { + dbModel := db.NewDBModel(comm.TableHero, time.Hour, conn) + if _data, err1 := dbModel.DB.Find(core.SqlTable(comm.TableUser), bson.M{}, options.Find().SetSort(bson.M{"lv": -1}).SetLimit(int64(req.People))); err1 == nil { + for _data.Next(context.TODO()) { + temp := &pb.DBUser{} + if err = _data.Decode(temp); err == nil { + if len(mapUser)+len(szDbUser) >= int(req.People) { + break + } + if _, ok := mapUser[temp.Uid]; !ok { + szDbUser = append(szDbUser, temp) + } + } + } + } + } + } + } + } + for k := range mapUser { + if user := this.module.ModuleUser.GetUser(k); user != nil { + szDbUser = append(szDbUser, user) // 转成user对象 + } else { + this.module.Errorf("%v", err) + } + } + session.SendMsg(string(this.module.GetType()), SmithyGetRandUserResp, &pb.SmithyGetRandUserResp{User: szDbUser}) + return +} diff --git a/modules/smithyv2/api_stoveskilllv.go b/modules/smithyv2/api_stoveskilllv.go new file mode 100644 index 000000000..90254df9f --- /dev/null +++ b/modules/smithyv2/api_stoveskilllv.go @@ -0,0 +1,63 @@ +package smithy + +import ( + "crypto/rand" + "go_dreamfactory/comm" + "go_dreamfactory/pb" + "math/big" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) StoveSkillLvCheck(session comm.IUserSession, req *pb.SmithyStoveSkillLvReq) (code pb.ErrorCode) { + + return +} + +func (this *apiComp) StoveSkillLv(session comm.IUserSession, req *pb.SmithyStoveSkillLvReq) (code pb.ErrorCode, dat proto.Message) { + var bLevelUp bool + code = this.StoveSkillLvCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + curLvData := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv) + if curLvData == nil { + code = pb.ErrorCode_GourmetSkillMaxLv + return + } + nextLvData := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv + 1) + if nextLvData == nil { + code = pb.ErrorCode_GourmetSkillMaxLv + return + } + // 升级 + code = this.module.ConsumeRes(session, curLvData.Starupneed, true) // 消耗检测 + if code != pb.ErrorCode_Success { + return + } + + // 概率升级 + n, _ := rand.Int(rand.Reader, big.NewInt(100)) + + if n.Int64() < int64(curLvData.Probability) { // 可以升级 + bLevelUp = true + } else { // 升级失败了 记录 + _smithy.StoveFloor += 1 + if curLvData.Floors >= _smithy.StoveFloor { // 触发保底 + bLevelUp = true + } + } + if bLevelUp { + _smithy.StoveFloor = 0 // 清理保底数据 + _smithy.StoveLv += 1 + this.module.modelSmithy.CalculationStoveSkillLv(session.GetUserId(), _smithy, _smithy.StoveLv) + } + session.SendMsg(string(this.module.GetType()), SmithyStoveSkillLvResp, &pb.SmithyStoveSkillLvResp{Data: _smithy}) + return +} diff --git a/modules/smithyv2/comp_configure.go b/modules/smithyv2/comp_configure.go new file mode 100644 index 000000000..3487bcfb7 --- /dev/null +++ b/modules/smithyv2/comp_configure.go @@ -0,0 +1,93 @@ +package smithy + +import ( + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/log" + "go_dreamfactory/modules" + "go_dreamfactory/sys/configure" + cfg "go_dreamfactory/sys/configure/structs" + "sync" +) + +const ( + game_smithy = "game_smithy.json" + game_smithystove = "game_smithystove.json" +) + +///配置管理基础组件 +type configureComp struct { + modules.MCompConfigure + module *Smithy + hlock sync.RWMutex + _smithyMap map[int64]*cfg.GameSmithyData +} + +//组件初始化接口 +func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + err = this.MCompConfigure.Init(service, module, comp, options) + this._smithyMap = make(map[int64]*cfg.GameSmithyData, 0) + this.module = module.(*Smithy) + configure.RegisterConfigure(game_smithy, cfg.NewGameSmithy, func() { + if v, err := this.GetConfigure(game_smithy); err == nil { + if configure, ok := v.(*cfg.GameSmithy); ok { + this.hlock.Lock() + defer this.hlock.Unlock() + for _, value := range configure.GetDataList() { + this._smithyMap[int64(value.Type<<16)+int64(value.Star)] = value + } + return + } + } + log.Errorf("get game_pagoda conf err:%v", err) + return + }) + err = this.LoadConfigure(game_smithystove, cfg.NewGameSmithyStove) + return +} + +func (this *configureComp) GetSmithyConfigData(smithyType int32, level int32) (data *cfg.GameSmithyData) { + + return this._smithyMap[int64(smithyType<<16)+int64(level)] +} +func (this *configureComp) GetSmithyTypeConfigData() (mapType map[int32]struct{}) { + mapType = make(map[int32]struct{}, 0) + if v, err := this.GetConfigure(game_smithy); err == nil { + if configure, ok := v.(*cfg.GameSmithy); ok { + for _, v1 := range configure.GetDataList() { + if _, ok := mapType[v1.Type]; !ok { + mapType[v1.Type] = struct{}{} + } + } + return + } + } + return +} + +// 获取炉子配置数据 +func (this *configureComp) GetSmithyStoveConfigData(level int32) (data *cfg.GameSmithyStoveData) { + if v, err := this.GetConfigure(game_smithystove); err == nil { + if configure, ok := v.(*cfg.GameSmithyStove); ok { + data = configure.Get(int32(level)) + return + } + } + return +} + +//加载多个配置文件 +func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) { + for k, v := range confs { + err = configure.RegisterConfigure(k, v, nil) + if err != nil { + log.Errorf("配置文件:%s解析失败!", k) + break + } + } + return +} + +//读取配置数据 +func (this *configureComp) GetConfigure(name string) (v interface{}, err error) { + return configure.GetConfigure(name) +} diff --git a/modules/smithyv2/model_smithy.go b/modules/smithyv2/model_smithy.go new file mode 100644 index 000000000..728863f21 --- /dev/null +++ b/modules/smithyv2/model_smithy.go @@ -0,0 +1,188 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/redis" + "go_dreamfactory/modules" + "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + "go_dreamfactory/utils" + + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +type modelSmithy struct { + modules.MCompModel + module *Smithy +} + +func (this *modelSmithy) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + this.TableName = string(comm.TableSmithy) + err = this.MCompModel.Init(service, module, comp, options) + this.module = module.(*Smithy) + // uid 创建索引 + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} + +// 获取铁匠铺信息 +func (this *modelSmithy) getSmithyList(uid string) (result *pb.DBSmithy, err error) { + result = &pb.DBSmithy{} + if err = this.Get(uid, result); err != nil { + if redis.RedisNil != err { // 没有数据直接创建新的数据 + + result.Id = primitive.NewObjectID().Hex() + result.Uid = uid + result.Skill = make(map[int32]int32, 0) + result.StoveLv = 1 // storv 等级默认1级 + result.DeskFloor = make(map[int32]int32, 0) + mapType := this.module.configure.GetSmithyTypeConfigData() // 找类型 + for key := range mapType { + result.Skill[key] = 1 + result.DeskFloor[key] = 0 + } + + if err = this.Add(uid, result); err != nil { + this.module.Errorf("err:%v", err) + err = nil + return + } + } + return + } + err = nil + return result, err +} +func (this *modelSmithy) modifySmithyDataByObjId(uid string, data map[string]interface{}) error { + return this.Change(uid, data) +} +func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) { + var ( + szTime map[int32]int32 + zeroTime int64 // 当前时间对应的0点时间戳,用来判断是否跨天了 + ) + mapData := make(map[string]interface{}, 0) + szTime = make(map[int32]int32, 0) + + // 记录每个食材耗时 + for k, v := range smithy.Skill { + // 计算出需要的时间 + _skillCfg := this.module.configure.GetSmithyStoveConfigData(v) + szTime[k] += _skillCfg.Time + } + + // 有订单在做 + zeroTime = utils.GetTodayZeroTime(configure.Now().Unix()) + + if (smithy.Clang != nil && smithy.Clang.ETime >= configure.Now().Unix()) || smithy.Clang == nil { + for _, order := range smithy.Orders { + _gourmetcfg := this.module.configure.GetSmithyConfigData(order.DeskType, smithy.Skill[order.DeskType]) // 美食家配置表 + + if order.Count > 0 { + if smithy.Clang != nil && smithy.Clang.ETime > configure.Now().Unix() { + break + } + order.Count-- + if order.Count == 0 { + order.NeedTime = 0 + } + order.NeedTime = order.Count * szTime[order.DeskType] + if smithy.Clang == nil { + smithy.Clang = &pb.Clang{} + smithy.Clang.STime = configure.Now().Unix() + smithy.Clang.ETime = configure.Now().Unix() + int64(szTime[order.DeskType]) + if smithy.Clang.STime < zeroTime && zeroTime <= smithy.Clang.ETime { // 跨天清空订单耗时 + smithy.OrderCostTime = 0 + for _, order := range smithy.Orders { // 重新计算订单时常 + smithy.OrderCostTime += order.Count * szTime[order.DeskType] + } + } + } else { + smithy.Clang.STime += int64(szTime[order.DeskType]) + oldTime := smithy.Clang.ETime + smithy.Clang.ETime += int64(szTime[order.DeskType]) + // 如果此时跨天了 清除订单时常 + if oldTime < zeroTime && zeroTime <= smithy.Clang.ETime { // 跨天清空订单耗时 + smithy.OrderCostTime = 0 + for _, order := range smithy.Orders { // 重新计算订单时常 + smithy.OrderCostTime += order.Count * szTime[order.DeskType] + } + } + } + smithy.Clang.DeskType = order.DeskType + // 设置掉落组 + smithy.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Drop, smithy.Items) // 获取掉落奖励 + // 记录下订单时间 + smithy.Ctime = smithy.Clang.ETime + smithy.TotalTime += szTime[order.DeskType] + } + } + + if smithy.Clang != nil && smithy.Clang.ETime <= configure.Now().Unix() { + _gourmetcfg := this.module.configure.GetSmithyConfigData(smithy.Clang.DeskType, smithy.Skill[smithy.Clang.DeskType]) + smithy.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Drop, smithy.Items) + smithy.Clang = nil + } + } + + // 清除数量为0 的订单 + pos := 0 + for _, order := range smithy.Orders { + if order.Count == 0 { + pos++ + } + } + smithy.Orders = append(smithy.Orders[:0], smithy.Orders[pos:]...) + // 保存信息 + mapData["items"] = smithy.Items + mapData["orders"] = smithy.Orders + mapData["orderCostTime"] = smithy.OrderCostTime + mapData["clang"] = smithy.Clang // 正在做的 + mapData["ctime"] = smithy.Ctime + mapData["totalTime"] = smithy.TotalTime + this.module.ModifySmithyData(uid, mapData) // 同步数据 +} + +func (this *modelSmithy) CalculationDeskSkillLv(uid string, Smithy *pb.DBSmithy) { + mapData := make(map[string]interface{}, 0) + + mapData["skill"] = Smithy.Skill + mapData["deskFloor"] = Smithy.DeskFloor + this.module.ModifySmithyData(uid, mapData) +} + +func (this *modelSmithy) CalculationStoveSkillLv(uid string, Smithy *pb.DBSmithy, stoveSkillLv int32) { + mapData := make(map[string]interface{}, 0) + + var totalTime int32 + for _, v := range Smithy.Orders { + if v.Count > 0 { + preScaleTime := 0 + preSkillConf := this.module.configure.GetSmithyStoveConfigData(stoveSkillLv - 1) + if preSkillConf != nil { + preScaleTime += int(preSkillConf.Time) + } + _skillCfg := this.module.configure.GetSmithyStoveConfigData(stoveSkillLv) + if _skillCfg != nil { + scaleTime := (_skillCfg.Time - int32(preScaleTime)) * v.Count + v.NeedTime += scaleTime + totalTime += scaleTime + if v.NeedTime < 0 { // 担心配置错误 为负数情况 所以这里做下判断 + v.NeedTime = 0 + } + + } + } + } + mapData["orders"] = Smithy.Orders + mapData["stoveLv"] = Smithy.StoveLv + mapData["deskFloor"] = Smithy.DeskFloor + Smithy.OrderCostTime += totalTime + mapData["orderCostTime"] = Smithy.OrderCostTime + this.module.ModifySmithyData(uid, mapData) +} diff --git a/modules/smithyv2/module.go b/modules/smithyv2/module.go new file mode 100644 index 000000000..1bcebeaaf --- /dev/null +++ b/modules/smithyv2/module.go @@ -0,0 +1,63 @@ +/* +模块名:Smithy +描述:美食家模块 +开发:梅雄风 +*/ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + "go_dreamfactory/pb" +) + +type Smithy struct { + modules.ModuleBase + modelSmithy *modelSmithy + api *apiComp + configure *configureComp +} + +func NewModule() core.IModule { + return &Smithy{} +} + +func (this *Smithy) GetType() core.M_Modules { + return comm.ModuleSmithy +} + +func (this *Smithy) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { + err = this.ModuleBase.Init(service, module, options) + + return +} + +func (this *Smithy) OnInstallComp() { + this.ModuleBase.OnInstallComp() + this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.modelSmithy = this.RegisterComp(new(modelSmithy)).(*modelSmithy) + this.configure = this.RegisterComp(new(configureComp)).(*configureComp) +} + +// 接口信息 +func (this *Smithy) ModifySmithyData(uid string, data map[string]interface{}) (code pb.ErrorCode) { + err := this.modelSmithy.modifySmithyDataByObjId(uid, data) + if err != nil { + code = pb.ErrorCode_DBError + } + return +} + +func (this *Smithy) SendRdTask(session comm.IUserSession, Items []*pb.UserAssets) { + var equip map[int32]int32 // key xingji value 数量 + equip = make(map[int32]int32, 0) + for _, v := range Items { + if cfg := this.configure.GetEquipmentConfigureById(v.T); cfg == nil { + equip[cfg.Star]++ + } + } + for k, v := range equip { + this.ModuleRtask.SendToRtask(session, comm.Rtype51, v, k) + } +} From 3c343fb999dc4fb0f0ca7444cf6c92158297372f Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 14 Feb 2023 10:43:43 +0800 Subject: [PATCH 08/21] =?UTF-8?q?=E9=93=81=E5=8C=A0=E9=93=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithyv2/api_createorder.go | 7 ++----- modules/smithyv2/api_deskskilllv.go | 6 +----- modules/smithyv2/api_getReward.go | 9 ++++----- modules/smithyv2/api_getlist.go | 14 +++++--------- modules/smithyv2/api_stoveskilllv.go | 11 +++++------ modules/smithyv2/model_smithy.go | 16 +++++++--------- modules/smithyv2/module.go | 2 +- 7 files changed, 25 insertions(+), 40 deletions(-) diff --git a/modules/smithyv2/api_createorder.go b/modules/smithyv2/api_createorder.go index c315ba6b8..652e9ba70 100644 --- a/modules/smithyv2/api_createorder.go +++ b/modules/smithyv2/api_createorder.go @@ -23,17 +23,14 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreate res []*cfg.Gameatn costTime int32 privilegeAddItme int32 // 特权额外增加的时间 + _smithy *pb.DBSmithy ) code = this.CreateOrderCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) - if err != nil { - code = pb.ErrorCode_DBError - return - } + _skillCfg := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv) needTime := _skillCfg.Time // 订单需要的时间 for _, order := range req.Order { diff --git a/modules/smithyv2/api_deskskilllv.go b/modules/smithyv2/api_deskskilllv.go index 4e185f2ba..2942405f3 100644 --- a/modules/smithyv2/api_deskskilllv.go +++ b/modules/smithyv2/api_deskskilllv.go @@ -22,16 +22,12 @@ func (this *apiComp) DeskSkillLv(session comm.IUserSession, req *pb.SmithyDeskSk var ( bFindSkill bool curSkillCfg *cfg.GameSmithyData + _smithy *pb.DBSmithy ) code = this.DeskSkillLvCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) - if err != nil { - code = pb.ErrorCode_DBError - return - } for k, v := range _smithy.Skill { if k == req.DeskType { diff --git a/modules/smithyv2/api_getReward.go b/modules/smithyv2/api_getReward.go index 474ce7f9a..8981ae4ed 100644 --- a/modules/smithyv2/api_getReward.go +++ b/modules/smithyv2/api_getReward.go @@ -16,12 +16,11 @@ func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.SmithyGet ///美食城领取奖励 func (this *apiComp) GetReward(session comm.IUserSession, req *pb.SmithyGetRewardReq) (code pb.ErrorCode, data proto.Message) { + var ( + _gourmet *pb.DBSmithy + ) code = this.GetRewardCheck(session, req) - _gourmet, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) - if err != nil { - code = pb.ErrorCode_DBError - return - } + if len(_gourmet.Items) > 0 { res := make([]*cfg.Gameatn, 0) for _, v := range _gourmet.Items { diff --git a/modules/smithyv2/api_getlist.go b/modules/smithyv2/api_getlist.go index f95832ef1..177223f8f 100644 --- a/modules/smithyv2/api_getlist.go +++ b/modules/smithyv2/api_getlist.go @@ -8,27 +8,23 @@ import ( ) //参数校验 -func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.SmithyGetListReq) (code pb.ErrorCode) { +func (this *apiComp) GetStoveInfoCheck(session comm.IUserSession, req *pb.SmithyGetStoveInfoReq) (code pb.ErrorCode) { return } ///获取美食城基本信息 -func (this *apiComp) GetList(session comm.IUserSession, req *pb.SmithyGetListReq) (code pb.ErrorCode, data proto.Message) { +func (this *apiComp) GetStoveInfo(session comm.IUserSession, req *pb.SmithyGetStoveInfoReq) (code pb.ErrorCode, data proto.Message) { - code = this.GetListCheck(session, req) + code = this.GetStoveInfoCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) + _smithy, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId()) if err != nil { code = pb.ErrorCode_DBError return } - // 计算订单信息 - this.module.modelSmithy.CalculationSmithy(session.GetUserId(), _smithy) - session.SendMsg(string(this.module.GetType()), SmithyGetListResp, &pb.SmithyGetListResp{Data: _smithy}) - - this.module.ModuleRtask.SendToRtask(session, comm.Rtype137, _smithy.TotalTime) + session.SendMsg(string(this.module.GetType()), "getstoveinfo", &pb.SmithyGetStoveInfoResp{Data: _smithy}) return } diff --git a/modules/smithyv2/api_stoveskilllv.go b/modules/smithyv2/api_stoveskilllv.go index 90254df9f..285b3693d 100644 --- a/modules/smithyv2/api_stoveskilllv.go +++ b/modules/smithyv2/api_stoveskilllv.go @@ -16,16 +16,15 @@ func (this *apiComp) StoveSkillLvCheck(session comm.IUserSession, req *pb.Smithy } func (this *apiComp) StoveSkillLv(session comm.IUserSession, req *pb.SmithyStoveSkillLvReq) (code pb.ErrorCode, dat proto.Message) { - var bLevelUp bool + var ( + bLevelUp bool + _smithy *pb.DBSmithy + ) code = this.StoveSkillLvCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 } - _smithy, err := this.module.modelSmithy.getSmithyList(session.GetUserId()) - if err != nil { - code = pb.ErrorCode_DBError - return - } + curLvData := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv) if curLvData == nil { code = pb.ErrorCode_GourmetSkillMaxLv diff --git a/modules/smithyv2/model_smithy.go b/modules/smithyv2/model_smithy.go index 728863f21..4328c3be4 100644 --- a/modules/smithyv2/model_smithy.go +++ b/modules/smithyv2/model_smithy.go @@ -31,21 +31,19 @@ func (this *modelSmithy) Init(service core.IService, module core.IModule, comp c } // 获取铁匠铺信息 -func (this *modelSmithy) getSmithyList(uid string) (result *pb.DBSmithy, err error) { - result = &pb.DBSmithy{} +func (this *modelSmithy) getSmithyStoveList(uid string) (result *pb.DBStove, err error) { + result = &pb.DBStove{} if err = this.Get(uid, result); err != nil { if redis.RedisNil != err { // 没有数据直接创建新的数据 result.Id = primitive.NewObjectID().Hex() result.Uid = uid + result.Data = make(map[int32]int32, 0) result.Skill = make(map[int32]int32, 0) - result.StoveLv = 1 // storv 等级默认1级 - result.DeskFloor = make(map[int32]int32, 0) - mapType := this.module.configure.GetSmithyTypeConfigData() // 找类型 - for key := range mapType { - result.Skill[key] = 1 - result.DeskFloor[key] = 0 - } + result.Lv = 1 + result.Temperature = 20000 // 配置 + result.Business = 0 + result.RecoveTime = 0 if err = this.Add(uid, result); err != nil { this.module.Errorf("err:%v", err) diff --git a/modules/smithyv2/module.go b/modules/smithyv2/module.go index 1bcebeaaf..c6cc7c76b 100644 --- a/modules/smithyv2/module.go +++ b/modules/smithyv2/module.go @@ -1,6 +1,6 @@ /* 模块名:Smithy -描述:美食家模块 +描述:铁匠铺模块 开发:梅雄风 */ package smithy From d25cd3bd92e184d611d772949cae442473456b33 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 14 Feb 2023 10:55:10 +0800 Subject: [PATCH 09/21] =?UTF-8?q?pb=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pb/smithy_db.pb.go | 351 +++++++++++++++++++++++++++----------------- pb/smithy_msg.pb.go | 1 + 2 files changed, 218 insertions(+), 134 deletions(-) diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index 89b31f5c8..6d5fb3c46 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -130,9 +130,7 @@ type DBBusiness struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count"` // 刷新次数 - Shop map[int32]int32 `protobuf:"bytes,2,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - RefreshTime int64 `protobuf:"varint,3,opt,name=refreshTime,proto3" json:"refreshTime" bson:"refreshTime"` //刷新开始时间 + Shop map[int32]int32 `protobuf:"bytes,1,rep,name=shop,proto3" json:"shop" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } func (x *DBBusiness) Reset() { @@ -167,13 +165,6 @@ func (*DBBusiness) Descriptor() ([]byte, []int) { return file_smithy_smithy_db_proto_rawDescGZIP(), []int{1} } -func (x *DBBusiness) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - func (x *DBBusiness) GetShop() map[int32]int32 { if x != nil { return x.Shop @@ -181,7 +172,79 @@ func (x *DBBusiness) GetShop() map[int32]int32 { return nil } -func (x *DBBusiness) GetRefreshTime() int64 { +type DBBusinessData 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" bson:"uid"` //用户ID + Data []*DBBusiness `protobuf:"bytes,3,rep,name=data,proto3" json:"data"` + Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count"` // 刷新次数 + RefreshTime int64 `protobuf:"varint,5,opt,name=refreshTime,proto3" json:"refreshTime" bson:"refreshTime"` //刷新开始时间 +} + +func (x *DBBusinessData) Reset() { + *x = DBBusinessData{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_db_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBBusinessData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBBusinessData) ProtoMessage() {} + +func (x *DBBusinessData) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_db_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 DBBusinessData.ProtoReflect.Descriptor instead. +func (*DBBusinessData) Descriptor() ([]byte, []int) { + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{2} +} + +func (x *DBBusinessData) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DBBusinessData) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *DBBusinessData) GetData() []*DBBusiness { + if x != nil { + return x.Data + } + return nil +} + +func (x *DBBusinessData) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *DBBusinessData) GetRefreshTime() int64 { if x != nil { return x.RefreshTime } @@ -203,7 +266,7 @@ type DBTujian struct { func (x *DBTujian) Reset() { *x = DBTujian{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[2] + mi := &file_smithy_smithy_db_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -216,7 +279,7 @@ func (x *DBTujian) String() string { func (*DBTujian) ProtoMessage() {} func (x *DBTujian) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[2] + mi := &file_smithy_smithy_db_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -229,7 +292,7 @@ func (x *DBTujian) ProtoReflect() protoreflect.Message { // Deprecated: Use DBTujian.ProtoReflect.Descriptor instead. func (*DBTujian) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{2} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{3} } func (x *DBTujian) GetId() string { @@ -273,7 +336,7 @@ type EquipData struct { func (x *EquipData) Reset() { *x = EquipData{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[3] + mi := &file_smithy_smithy_db_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +349,7 @@ func (x *EquipData) String() string { func (*EquipData) ProtoMessage() {} func (x *EquipData) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[3] + mi := &file_smithy_smithy_db_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,7 +362,7 @@ func (x *EquipData) ProtoReflect() protoreflect.Message { // Deprecated: Use EquipData.ProtoReflect.Descriptor instead. func (*EquipData) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{3} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{4} } func (x *EquipData) GetForgeCount() int32 { @@ -323,6 +386,7 @@ func (x *EquipData) GetQuality() int32 { return 0 } +//////// type Clang struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -336,7 +400,7 @@ type Clang struct { func (x *Clang) Reset() { *x = Clang{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[4] + mi := &file_smithy_smithy_db_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -349,7 +413,7 @@ func (x *Clang) String() string { func (*Clang) ProtoMessage() {} func (x *Clang) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[4] + mi := &file_smithy_smithy_db_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -362,7 +426,7 @@ func (x *Clang) ProtoReflect() protoreflect.Message { // Deprecated: Use Clang.ProtoReflect.Descriptor instead. func (*Clang) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{4} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{5} } func (x *Clang) GetDeskType() int32 { @@ -399,7 +463,7 @@ type OrderClang struct { func (x *OrderClang) Reset() { *x = OrderClang{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[5] + mi := &file_smithy_smithy_db_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -412,7 +476,7 @@ func (x *OrderClang) String() string { func (*OrderClang) ProtoMessage() {} func (x *OrderClang) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[5] + mi := &file_smithy_smithy_db_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -425,7 +489,7 @@ func (x *OrderClang) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderClang.ProtoReflect.Descriptor instead. func (*OrderClang) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{5} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{6} } func (x *OrderClang) GetDeskType() int32 { @@ -471,7 +535,7 @@ type DBSmithy struct { func (x *DBSmithy) Reset() { *x = DBSmithy{} if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_db_proto_msgTypes[6] + mi := &file_smithy_smithy_db_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -484,7 +548,7 @@ func (x *DBSmithy) String() string { func (*DBSmithy) ProtoMessage() {} func (x *DBSmithy) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_db_proto_msgTypes[6] + mi := &file_smithy_smithy_db_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -497,7 +561,7 @@ func (x *DBSmithy) ProtoReflect() protoreflect.Message { // Deprecated: Use DBSmithy.ProtoReflect.Descriptor instead. func (*DBSmithy) Descriptor() ([]byte, []int) { - return file_smithy_smithy_db_proto_rawDescGZIP(), []int{6} + return file_smithy_smithy_db_proto_rawDescGZIP(), []int{7} } func (x *DBSmithy) GetId() string { @@ -611,79 +675,84 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x53, 0x6b, 0x69, 0x6c, 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, 0x22, 0xa8, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x42, 0x75, 0x73, - 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x04, 0x73, - 0x68, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x42, 0x75, - 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, - 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, 0x22, 0xba, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 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, 0x2d, 0x0a, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x2e, 0x54, 0x75, 0x6a, 0x69, - 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, - 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, - 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, - 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, - 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, - 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, - 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, - 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, - 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, - 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, - 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, - 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, - 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, - 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, - 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, - 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, - 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, - 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, - 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 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, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x70, 0x0a, 0x0a, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, + 0x6e, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, + 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x1a, + 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 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, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x42, + 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x44, 0x61, 0x74, 0x61, 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, 0x1f, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, + 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x54, 0x75, 0x6a, + 0x69, 0x61, 0x6e, 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, 0x2d, 0x0a, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, + 0x2e, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x75, + 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, + 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x45, + 0x71, 0x75, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, + 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, + 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, + 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, + 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, + 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, + 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, + 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, + 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, + 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, + 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, + 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, + 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, + 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, + 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, + 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, + 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, + 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, + 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 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 ( @@ -698,39 +767,41 @@ func file_smithy_smithy_db_proto_rawDescGZIP() []byte { return file_smithy_smithy_db_proto_rawDescData } -var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_smithy_smithy_db_proto_goTypes = []interface{}{ - (*DBStove)(nil), // 0: DBStove - (*DBBusiness)(nil), // 1: DBBusiness - (*DBTujian)(nil), // 2: DBTujian - (*EquipData)(nil), // 3: EquipData - (*Clang)(nil), // 4: Clang - (*OrderClang)(nil), // 5: OrderClang - (*DBSmithy)(nil), // 6: DBSmithy - nil, // 7: DBStove.DataEntry - nil, // 8: DBStove.SkillEntry - nil, // 9: DBBusiness.ShopEntry - nil, // 10: DBTujian.TujianEntry - nil, // 11: DBSmithy.SkillEntry - nil, // 12: DBSmithy.DeskFloorEntry - (*UserAssets)(nil), // 13: UserAssets + (*DBStove)(nil), // 0: DBStove + (*DBBusiness)(nil), // 1: DBBusiness + (*DBBusinessData)(nil), // 2: DBBusinessData + (*DBTujian)(nil), // 3: DBTujian + (*EquipData)(nil), // 4: EquipData + (*Clang)(nil), // 5: Clang + (*OrderClang)(nil), // 6: OrderClang + (*DBSmithy)(nil), // 7: DBSmithy + nil, // 8: DBStove.DataEntry + nil, // 9: DBStove.SkillEntry + nil, // 10: DBBusiness.ShopEntry + nil, // 11: DBTujian.TujianEntry + nil, // 12: DBSmithy.SkillEntry + nil, // 13: DBSmithy.DeskFloorEntry + (*UserAssets)(nil), // 14: UserAssets } var file_smithy_smithy_db_proto_depIdxs = []int32{ - 7, // 0: DBStove.data:type_name -> DBStove.DataEntry - 8, // 1: DBStove.skill:type_name -> DBStove.SkillEntry - 9, // 2: DBBusiness.shop:type_name -> DBBusiness.ShopEntry - 10, // 3: DBTujian.tujian:type_name -> DBTujian.TujianEntry - 4, // 4: DBSmithy.clang:type_name -> Clang - 5, // 5: DBSmithy.orders:type_name -> OrderClang - 13, // 6: DBSmithy.items:type_name -> UserAssets - 11, // 7: DBSmithy.skill:type_name -> DBSmithy.SkillEntry - 12, // 8: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry - 3, // 9: DBTujian.TujianEntry.value:type_name -> EquipData - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 8, // 0: DBStove.data:type_name -> DBStove.DataEntry + 9, // 1: DBStove.skill:type_name -> DBStove.SkillEntry + 10, // 2: DBBusiness.shop:type_name -> DBBusiness.ShopEntry + 1, // 3: DBBusinessData.data:type_name -> DBBusiness + 11, // 4: DBTujian.tujian:type_name -> DBTujian.TujianEntry + 5, // 5: DBSmithy.clang:type_name -> Clang + 6, // 6: DBSmithy.orders:type_name -> OrderClang + 14, // 7: DBSmithy.items:type_name -> UserAssets + 12, // 8: DBSmithy.skill:type_name -> DBSmithy.SkillEntry + 13, // 9: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry + 4, // 10: DBTujian.TujianEntry.value:type_name -> EquipData + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_smithy_smithy_db_proto_init() } @@ -765,7 +836,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DBTujian); i { + switch v := v.(*DBBusinessData); i { case 0: return &v.state case 1: @@ -777,7 +848,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquipData); i { + switch v := v.(*DBTujian); i { case 0: return &v.state case 1: @@ -789,7 +860,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Clang); i { + switch v := v.(*EquipData); i { case 0: return &v.state case 1: @@ -801,7 +872,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OrderClang); i { + switch v := v.(*Clang); i { case 0: return &v.state case 1: @@ -813,6 +884,18 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OrderClang); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_db_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBSmithy); i { case 0: return &v.state @@ -831,7 +914,7 @@ func file_smithy_smithy_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_db_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go index 8aa10ac93..0fbe0ff3e 100644 --- a/pb/smithy_msg.pb.go +++ b/pb/smithy_msg.pb.go @@ -825,6 +825,7 @@ func (x *SmithySellItemResp) GetData() *DBBusiness { return nil } +////////////////////////////////////////// // 创建订单 type SmithyCreateOrderReq struct { state protoimpl.MessageState From 7e0f6ea21a5b3e3ad3f4208c1333d0b4f8835bf8 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 14 Feb 2023 11:29:01 +0800 Subject: [PATCH 10/21] =?UTF-8?q?=E4=B8=8A=E4=BC=A0pvp=E9=87=8D=E8=BF=9E?= =?UTF-8?q?=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 5 +- comm/imodule.go | 2 + modules/battle/battleclientmgr.go | 11 + modules/battle/module.go | 15 ++ modules/comp_model.go | 4 +- modules/gateway/agent.go | 10 +- modules/pvp/api_into.go | 45 ++++ modules/pvp/modelPvp.go | 43 +++ modules/pvp/module.go | 62 ++++- pb/battle_msg.pb.go | 430 +++++++++++++++++++++++------- pb/pvp_db.pb.go | 116 ++++---- pb/pvp_msg.pb.go | 429 +++++++++++++++++++++-------- services/comp_gateroute.go | 3 + 13 files changed, 885 insertions(+), 290 deletions(-) create mode 100644 modules/pvp/api_into.go diff --git a/comm/const.go b/comm/const.go index 34108cc63..55ea51491 100644 --- a/comm/const.go +++ b/comm/const.go @@ -216,8 +216,11 @@ const ( // 自动战斗 TableAuto = "autoBattle" - ///新主线数据表 + // 新主线数据表 TableMline = "mline" + + // pvp + TablePvp = "pvp" ) // RPC服务接口定义处 diff --git a/comm/imodule.go b/comm/imodule.go index 454396160..adbefbab6 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -236,6 +236,8 @@ type ( CreatePvpBattle(session IUserSession, req *pb.BattlePVPReq) (code pb.ErrorCode, record *pb.DBBattleRecord) ///同步pvp战斗 CreateRtPvpBattle(req *pb.BattleRTPVPReq) (code pb.ErrorCode, record *pb.DBBattleRecord) + ///获取战斗详情 + GetBattleInfo(req *pb.BattleGetInfoReq) (code pb.ErrorCode, resp *pb.BattleGetInfoResp) ///创建战斗服务 CreateBattleServer(req *pb.BattleInfo) (code pb.ErrorCode) ///战斗指令输入 diff --git a/modules/battle/battleclientmgr.go b/modules/battle/battleclientmgr.go index 5091cfa36..43f2d2fec 100644 --- a/modules/battle/battleclientmgr.go +++ b/modules/battle/battleclientmgr.go @@ -70,6 +70,17 @@ func (this *battleClientMgrComp) CheckBattle(ctx context.Context, req *pb.Battle return } +//实时pvp战斗创建 +func (this *battleClientMgrComp) GetInfo(ctx context.Context, req *pb.BattleGetInfoReq) (reply *pb.BattleGetInfoReq, err error) { + this.module.Debug("CreateBattle", log.Field{Key: "req", Value: req}) + + reply = &pb.BattleGetInfoReq{} + if err = this.clinet.callBattle(ctx, "GetInfo", req, reply); err != nil { + this.module.Errorln(err) + } + return +} + //实时pvp战斗创建 func (this *battleClientMgrComp) CreateBattle(ctx context.Context, req *pb.BattleCreateServerReq) (reply *pb.BattleCreateServerResp, err error) { this.module.Debug("CreateBattle", log.Field{Key: "req", Value: req}) diff --git a/modules/battle/module.go b/modules/battle/module.go index fe6d35579..f65948e22 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -220,6 +220,21 @@ func (this *Battle) CreateRtPvpBattle(req *pb.BattleRTPVPReq) (code pb.ErrorCode return } +///获取战斗详情 +func (this *Battle) GetBattleInfo(req *pb.BattleGetInfoReq) (code pb.ErrorCode, resp *pb.BattleGetInfoReq) { + this.Debug("GetBattleInfo", log.Field{Key: "req", Value: req}) + var ( + ctx context.Context + err error + ) + ctx, _ = context.WithTimeout(context.Background(), time.Second*5) + if resp, err = this.clientmgr.GetInfo(ctx, req); err != nil { + this.Errorln(err) + code = pb.ErrorCode_RpcFuncExecutionError + } + return +} + //创建战斗服务 func (this *Battle) CreateBattleServer(req *pb.BattleInfo) (code pb.ErrorCode) { this.Debug("CreateBattleServer", log.Field{Key: "req", Value: req}) diff --git a/modules/comp_model.go b/modules/comp_model.go index 4f0c36f2e..cadaeb6ea 100644 --- a/modules/comp_model.go +++ b/modules/comp_model.go @@ -139,8 +139,8 @@ func (this *MCompModel) GetListObjs(uid string, ids []string, data interface{}) } //删除目标数据 -func (this *MCompModel) Del(uid string, opt ...db.DBOption) (err error) { - return this.DBModel.Del(uid, opt...) +func (this *MCompModel) Del(id string, opt ...db.DBOption) (err error) { + return this.DBModel.Del(id, opt...) } //删除用户数据 diff --git a/modules/gateway/agent.go b/modules/gateway/agent.go index 741075115..ff7d3ff49 100644 --- a/modules/gateway/agent.go +++ b/modules/gateway/agent.go @@ -77,7 +77,7 @@ locp: go this.Close() break locp } else { - this.gateway.Debugf("----------1 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) + // this.gateway.Debugf("----------1 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) var code pb.ErrorCode code, err = this.secAuth(msg) if err == nil { @@ -93,7 +93,7 @@ locp: //this.wsConn.SetReadDeadline(time.Now().Add(time.Second * 30)) continue } - this.gateway.Debugf("----------2 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) + // this.gateway.Debugf("----------2 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) if err := this.messageDistribution(msg); err != nil { this.gateway.Errorf("messageDistribution err:%v", err) go this.Close() @@ -303,10 +303,10 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { } } stime := time.Now() - this.gateway.Debugf("----------3 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) + // this.gateway.Debugf("----------3 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) ctx, _ := context.WithTimeout(context.Background(), time.Second*5) if len(serviceTag) == 0 { - this.gateway.Debugf("----------4 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) + // this.gateway.Debugf("----------4 agent:%s uId:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.MainType, msg.SubType) if err = this.gateway.Service().RpcCall(ctx, servicePath, string(comm.Rpc_GatewayRoute), req, reply); err != nil { this.gateway.Error("[UserResponse]", log.Field{Key: "uid", Value: this.uId}, @@ -319,7 +319,7 @@ func (this *Agent) messageDistribution(msg *pb.UserMessage) (err error) { return } } else { //跨集群调用 - this.gateway.Debugf("----------5 agent:%s uId:%s servicePath:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.ServicePath, msg.MainType, msg.SubType) + // this.gateway.Debugf("----------5 agent:%s uId:%s servicePath:%s MainType:%s SubType:%s ", this.sessionId, this.uId, msg.ServicePath, msg.MainType, msg.SubType) if msg.ServicePath != "" { //客户端是否制定目标服务器 /wroker/woker0 servicePath = msg.ServicePath } diff --git a/modules/pvp/api_into.go b/modules/pvp/api_into.go new file mode 100644 index 000000000..9dd1e0eec --- /dev/null +++ b/modules/pvp/api_into.go @@ -0,0 +1,45 @@ +package pvp + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) IntoCheck(session comm.IUserSession, req *pb.PvpIntoReq) (code pb.ErrorCode) { + return +} + +///设置战斗阵型 +func (this *apiComp) Into(session comm.IUserSession, req *pb.PvpIntoReq) (code pb.ErrorCode, data proto.Message) { + var ( + battle *BattleItem + resp *pb.BattleGetInfoResp = &pb.BattleGetInfoResp{} + cd pb.ErrorCode + ok bool + ) + if code = this.IntoCheck(session, req); code != pb.ErrorCode_Success { + return + } + this.module.lock.RLock() + battle, ok = this.module.battles[req.Battleid] + this.module.lock.RUnlock() + if ok { + if cd, resp = this.module.battle.GetBattleInfo(&pb.BattleGetInfoReq{ + Battleid: req.Battleid, + }); cd == pb.ErrorCode_Success { + if session.GetUserId() == battle.Red.Uid { + battle.RedOffline = false + } else { + battle.BlueOffline = false + } + } + } else { + cd = pb.ErrorCode_BattleInCmdFailed + return + } + session.SendMsg(string(this.module.GetType()), "into", &pb.PvpIntoResp{Code: cd, Battleid: req.Battleid, Info: resp.Info}) + return +} diff --git a/modules/pvp/modelPvp.go b/modules/pvp/modelPvp.go index 00f326378..8e35b9388 100644 --- a/modules/pvp/modelPvp.go +++ b/modules/pvp/modelPvp.go @@ -1,7 +1,12 @@ package pvp import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" + "go_dreamfactory/pb" + "go_dreamfactory/sys/db" ) ///Pvp 数据组件 @@ -10,4 +15,42 @@ type modelPvpComp struct { module *Pvp } +//组件初始化接口 此表不写入到数据库中 +func (this *modelPvpComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, opt core.IModuleOptions) (err error) { + this.MCompModel.Init(service, module, comp, opt) + this.module = module.(*Pvp) + this.TableName = comm.TablePvp + //创建uid索引 + // this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + // Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + // }) + return +} +//查询用户重置数据 +func (this *modelPvpComp) querypvps() (result []*pb.DBPvpBattle, err error) { + result = make([]*pb.DBPvpBattle, 0) + if err = this.GetList("", result); err != nil && err != mgo.MongodbNil { + this.module.Errorf("err:%v", err) + } + if err == mgo.MongodbNil { + err = nil + } + return +} + +//记录战斗信息 +func (this *modelPvpComp) addpvp(battle *pb.DBPvpBattle) (err error) { + if err = this.AddList("", battle.Id, battle, db.SetDBMgoLog(false)); err != nil { + this.module.Errorln(err) + } + return +} + +//删除pvp记录 +func (this *modelPvpComp) delpvp(battleid string) (err error) { + if err = this.Del(battleid, db.SetDBMgoLog(false)); err != nil { + this.module.Errorln(err) + } + return +} diff --git a/modules/pvp/module.go b/modules/pvp/module.go index 55cd75756..424a3b5a9 100644 --- a/modules/pvp/module.go +++ b/modules/pvp/module.go @@ -29,12 +29,13 @@ func NewModule() core.IModule { type Pvp struct { modules.ModuleBase - service base.IRPCXService - battle comm.IBattle - friend comm.IFriend - api_comp *apiComp - lock sync.RWMutex - battles map[string]*BattleItem + service base.IRPCXService + battle comm.IBattle + friend comm.IFriend + apicomp *apiComp + modelPvpComp *modelPvpComp + lock sync.RWMutex + battles map[string]*BattleItem } //模块名 @@ -62,7 +63,7 @@ func (this *Pvp) Start() (err error) { return } this.friend = module.(comm.IFriend) - + event.RegisterGO(comm.EventUserLogin, this.userlogin) event.RegisterGO(comm.EventUserOffline, this.useroffline) return } @@ -70,7 +71,8 @@ func (this *Pvp) Start() (err error) { //装备组件 func (this *Pvp) OnInstallComp() { this.ModuleBase.OnInstallComp() - this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp) + this.apicomp = this.RegisterComp(new(apiComp)).(*apiComp) + this.modelPvpComp = this.RegisterComp(new(modelPvpComp)).(*modelPvpComp) } //创建Pvp @@ -196,6 +198,7 @@ func (this *Pvp) PvpFinishPush(battleId string) { go this.friend.QiecuoFinishNotify(battle.Red.Uid, battleId) break } + this.modelPvpComp.delpvp(battleId) } } @@ -314,10 +317,53 @@ func (this *Pvp) startBattle(battle *BattleItem) { }, battle.RedSession, battle.BlueSession); err != nil { this.Errorln(err) } + + this.modelPvpComp.addpvp(&pb.DBPvpBattle{ + Id: info.Id, + ServicePath: fmt.Sprintf("%s/%s", this.service.GetType(), this.service.GetId()), + Ptype: battle.Ptype, + State: battle.State, + Red: battle.Red, + Blue: battle.Blue, + }) } } } +//用户离线处理 +func (this *Pvp) userlogin(session comm.IUserSession) { + var ( + result []*pb.DBPvpBattle + userpvp []*pb.DBPvpBattle + push *pb.PvpListPush + err error + ) + if result, err = this.modelPvpComp.querypvps(); err != nil { + this.Errorln(err) + return + } + userpvp = make([]*pb.DBPvpBattle, 0, len(userpvp)) + for _, v := range result { + if v.Red.Uid == session.GetUserId() || v.Blue.Uid == session.GetUserId() { + userpvp = append(userpvp, v) + } + } + push = &pb.PvpListPush{} + for _, v := range result { + push.List = append(push.List, &pb.DBPvpBattle{ + Id: v.Id, + ServicePath: v.ServicePath, + Ptype: v.Ptype, + State: v.State, + Red: v.Red, + Blue: v.Blue, + }) + } + + session.SendMsg(string(comm.ModulePvp), "list", push) + session.Push() +} + //用户离线处理 func (this *Pvp) useroffline(session comm.IUserSession) { var ( diff --git a/pb/battle_msg.pb.go b/pb/battle_msg.pb.go index 2c38e78ba..c3f436510 100644 --- a/pb/battle_msg.pb.go +++ b/pb/battle_msg.pb.go @@ -1003,6 +1003,110 @@ func (x *BattleCheckResults) GetIscheck() bool { return false } +//创建战斗服务 请求 +type BattleGetInfoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"` +} + +func (x *BattleGetInfoReq) Reset() { + *x = BattleGetInfoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_battle_battle_msg_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BattleGetInfoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BattleGetInfoReq) ProtoMessage() {} + +func (x *BattleGetInfoReq) ProtoReflect() protoreflect.Message { + mi := &file_battle_battle_msg_proto_msgTypes[13] + 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 BattleGetInfoReq.ProtoReflect.Descriptor instead. +func (*BattleGetInfoReq) Descriptor() ([]byte, []int) { + return file_battle_battle_msg_proto_rawDescGZIP(), []int{13} +} + +func (x *BattleGetInfoReq) GetBattleid() string { + if x != nil { + return x.Battleid + } + return "" +} + +//创建战斗服务 请求回应 +type BattleGetInfoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"` + Info *BattleStateInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` +} + +func (x *BattleGetInfoResp) Reset() { + *x = BattleGetInfoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_battle_battle_msg_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BattleGetInfoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BattleGetInfoResp) ProtoMessage() {} + +func (x *BattleGetInfoResp) ProtoReflect() protoreflect.Message { + mi := &file_battle_battle_msg_proto_msgTypes[14] + 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 BattleGetInfoResp.ProtoReflect.Descriptor instead. +func (*BattleGetInfoResp) Descriptor() ([]byte, []int) { + return file_battle_battle_msg_proto_rawDescGZIP(), []int{14} +} + +func (x *BattleGetInfoResp) GetBattleid() string { + if x != nil { + return x.Battleid + } + return "" +} + +func (x *BattleGetInfoResp) GetInfo() *BattleStateInfo { + if x != nil { + return x.Info + } + return nil +} + //创建战斗服务 请求 type BattleCreateServerReq struct { state protoimpl.MessageState @@ -1015,7 +1119,7 @@ type BattleCreateServerReq struct { func (x *BattleCreateServerReq) Reset() { *x = BattleCreateServerReq{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[13] + mi := &file_battle_battle_msg_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1028,7 +1132,7 @@ func (x *BattleCreateServerReq) String() string { func (*BattleCreateServerReq) ProtoMessage() {} func (x *BattleCreateServerReq) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[13] + mi := &file_battle_battle_msg_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1041,7 +1145,7 @@ func (x *BattleCreateServerReq) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleCreateServerReq.ProtoReflect.Descriptor instead. func (*BattleCreateServerReq) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{13} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{15} } func (x *BattleCreateServerReq) GetInfo() *BattleInfo { @@ -1063,7 +1167,7 @@ type BattleCreateServerResp struct { func (x *BattleCreateServerResp) Reset() { *x = BattleCreateServerResp{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[14] + mi := &file_battle_battle_msg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1076,7 +1180,7 @@ func (x *BattleCreateServerResp) String() string { func (*BattleCreateServerResp) ProtoMessage() {} func (x *BattleCreateServerResp) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[14] + mi := &file_battle_battle_msg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1089,7 +1193,7 @@ func (x *BattleCreateServerResp) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleCreateServerResp.ProtoReflect.Descriptor instead. func (*BattleCreateServerResp) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{14} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{16} } func (x *BattleCreateServerResp) GetIssucc() bool { @@ -1113,7 +1217,7 @@ type BattleInCmdReq struct { func (x *BattleInCmdReq) Reset() { *x = BattleInCmdReq{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[15] + mi := &file_battle_battle_msg_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1126,7 +1230,7 @@ func (x *BattleInCmdReq) String() string { func (*BattleInCmdReq) ProtoMessage() {} func (x *BattleInCmdReq) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[15] + mi := &file_battle_battle_msg_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1139,7 +1243,7 @@ func (x *BattleInCmdReq) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleInCmdReq.ProtoReflect.Descriptor instead. func (*BattleInCmdReq) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{15} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{17} } func (x *BattleInCmdReq) GetBattleid() string { @@ -1177,7 +1281,7 @@ type BattleInCmdResp struct { func (x *BattleInCmdResp) Reset() { *x = BattleInCmdResp{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[16] + mi := &file_battle_battle_msg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1190,7 +1294,7 @@ func (x *BattleInCmdResp) String() string { func (*BattleInCmdResp) ProtoMessage() {} func (x *BattleInCmdResp) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[16] + mi := &file_battle_battle_msg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1203,7 +1307,7 @@ func (x *BattleInCmdResp) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleInCmdResp.ProtoReflect.Descriptor instead. func (*BattleInCmdResp) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{16} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{18} } func (x *BattleInCmdResp) GetBattleid() string { @@ -1240,7 +1344,7 @@ type BattleOutCmdPush struct { func (x *BattleOutCmdPush) Reset() { *x = BattleOutCmdPush{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[17] + mi := &file_battle_battle_msg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1253,7 +1357,7 @@ func (x *BattleOutCmdPush) String() string { func (*BattleOutCmdPush) ProtoMessage() {} func (x *BattleOutCmdPush) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[17] + mi := &file_battle_battle_msg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1266,7 +1370,7 @@ func (x *BattleOutCmdPush) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleOutCmdPush.ProtoReflect.Descriptor instead. func (*BattleOutCmdPush) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{17} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{19} } func (x *BattleOutCmdPush) GetBattleid() string { @@ -1295,7 +1399,7 @@ type BattleFinishPush struct { func (x *BattleFinishPush) Reset() { *x = BattleFinishPush{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[18] + mi := &file_battle_battle_msg_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1308,7 +1412,7 @@ func (x *BattleFinishPush) String() string { func (*BattleFinishPush) ProtoMessage() {} func (x *BattleFinishPush) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[18] + mi := &file_battle_battle_msg_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1321,7 +1425,7 @@ func (x *BattleFinishPush) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleFinishPush.ProtoReflect.Descriptor instead. func (*BattleFinishPush) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{18} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{20} } func (x *BattleFinishPush) GetBattleid() string { @@ -1344,7 +1448,7 @@ type BattleConcedeReq struct { func (x *BattleConcedeReq) Reset() { *x = BattleConcedeReq{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[19] + mi := &file_battle_battle_msg_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1357,7 +1461,7 @@ func (x *BattleConcedeReq) String() string { func (*BattleConcedeReq) ProtoMessage() {} func (x *BattleConcedeReq) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[19] + mi := &file_battle_battle_msg_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1370,7 +1474,7 @@ func (x *BattleConcedeReq) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleConcedeReq.ProtoReflect.Descriptor instead. func (*BattleConcedeReq) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{19} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{21} } func (x *BattleConcedeReq) GetBattleid() string { @@ -1399,7 +1503,7 @@ type BattleConcedeResp struct { func (x *BattleConcedeResp) Reset() { *x = BattleConcedeResp{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[20] + mi := &file_battle_battle_msg_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1412,7 +1516,7 @@ func (x *BattleConcedeResp) String() string { func (*BattleConcedeResp) ProtoMessage() {} func (x *BattleConcedeResp) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[20] + mi := &file_battle_battle_msg_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1425,7 +1529,7 @@ func (x *BattleConcedeResp) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleConcedeResp.ProtoReflect.Descriptor instead. func (*BattleConcedeResp) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{20} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{22} } func (x *BattleConcedeResp) GetIssucc() bool { @@ -1435,6 +1539,70 @@ func (x *BattleConcedeResp) GetIssucc() bool { return false } +//战斗状态数据 +type BattleStateInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Info *BattleInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info"` + OutCmds []*BattleCmd `protobuf:"bytes,2,rep,name=outCmds,proto3" json:"outCmds"` + InputCmds []*BattleCmd `protobuf:"bytes,3,rep,name=inputCmds,proto3" json:"inputCmds"` +} + +func (x *BattleStateInfo) Reset() { + *x = BattleStateInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_battle_battle_msg_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BattleStateInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BattleStateInfo) ProtoMessage() {} + +func (x *BattleStateInfo) ProtoReflect() protoreflect.Message { + mi := &file_battle_battle_msg_proto_msgTypes[23] + 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 BattleStateInfo.ProtoReflect.Descriptor instead. +func (*BattleStateInfo) Descriptor() ([]byte, []int) { + return file_battle_battle_msg_proto_rawDescGZIP(), []int{23} +} + +func (x *BattleStateInfo) GetInfo() *BattleInfo { + if x != nil { + return x.Info + } + return nil +} + +func (x *BattleStateInfo) GetOutCmds() []*BattleCmd { + if x != nil { + return x.OutCmds + } + return nil +} + +func (x *BattleStateInfo) GetInputCmds() []*BattleCmd { + if x != nil { + return x.InputCmds + } + return nil +} + var File_battle_battle_msg_proto protoreflect.FileDescriptor var file_battle_battle_msg_proto_rawDesc = []byte{ @@ -1566,41 +1734,58 @@ var file_battle_battle_msg_proto_rawDesc = []byte{ 0x74, 0x61, 0x22, 0x2e, 0x0a, 0x12, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x22, 0x38, 0x0a, 0x15, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 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, 0x30, 0x0a, 0x16, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x5c, - 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, - 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x02, 0x69, 0x6e, 0x22, 0x61, 0x0a, 0x0f, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x02, 0x69, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x43, 0x6d, 0x64, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, - 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, - 0x4c, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x50, - 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, - 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x2e, 0x0a, - 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x50, 0x75, 0x73, - 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x42, 0x0a, - 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, - 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, - 0x65, 0x22, 0x2b, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6b, 0x22, 0x2e, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x69, 0x64, 0x22, 0x55, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x38, 0x0a, 0x15, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x71, 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, 0x30, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, + 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x5c, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, + 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, + 0x02, 0x69, 0x6e, 0x22, 0x61, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x43, + 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x4c, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x4f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, + 0x03, 0x63, 0x6d, 0x64, 0x22, 0x2e, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, + 0x6e, 0x69, 0x73, 0x68, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x69, 0x64, 0x22, 0x42, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, + 0x6e, 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x65, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, + 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 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, 0x24, 0x0a, 0x07, 0x6f, 0x75, + 0x74, 0x43, 0x6d, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, + 0x12, 0x28, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, + 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1615,7 +1800,7 @@ func file_battle_battle_msg_proto_rawDescGZIP() []byte { return file_battle_battle_msg_proto_rawDescData } -var file_battle_battle_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_battle_battle_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 24) var file_battle_battle_msg_proto_goTypes = []interface{}{ (*LineUp)(nil), // 0: LineUp (*BattleFormation)(nil), // 1: BattleFormation @@ -1630,51 +1815,58 @@ var file_battle_battle_msg_proto_goTypes = []interface{}{ (*BattleReport)(nil), // 10: BattleReport (*BattleRpcMessage)(nil), // 11: BattleRpcMessage (*BattleCheckResults)(nil), // 12: BattleCheckResults - (*BattleCreateServerReq)(nil), // 13: BattleCreateServerReq - (*BattleCreateServerResp)(nil), // 14: BattleCreateServerResp - (*BattleInCmdReq)(nil), // 15: BattleInCmdReq - (*BattleInCmdResp)(nil), // 16: BattleInCmdResp - (*BattleOutCmdPush)(nil), // 17: BattleOutCmdPush - (*BattleFinishPush)(nil), // 18: BattleFinishPush - (*BattleConcedeReq)(nil), // 19: BattleConcedeReq - (*BattleConcedeResp)(nil), // 20: BattleConcedeResp - (PlayType)(0), // 21: PlayType - (*DBHero)(nil), // 22: DBHero - (BattleType)(0), // 23: BattleType - (*DBBattleFormt)(nil), // 24: DBBattleFormt - (*anypb.Any)(nil), // 25: google.protobuf.Any + (*BattleGetInfoReq)(nil), // 13: BattleGetInfoReq + (*BattleGetInfoResp)(nil), // 14: BattleGetInfoResp + (*BattleCreateServerReq)(nil), // 15: BattleCreateServerReq + (*BattleCreateServerResp)(nil), // 16: BattleCreateServerResp + (*BattleInCmdReq)(nil), // 17: BattleInCmdReq + (*BattleInCmdResp)(nil), // 18: BattleInCmdResp + (*BattleOutCmdPush)(nil), // 19: BattleOutCmdPush + (*BattleFinishPush)(nil), // 20: BattleFinishPush + (*BattleConcedeReq)(nil), // 21: BattleConcedeReq + (*BattleConcedeResp)(nil), // 22: BattleConcedeResp + (*BattleStateInfo)(nil), // 23: BattleStateInfo + (PlayType)(0), // 24: PlayType + (*DBHero)(nil), // 25: DBHero + (BattleType)(0), // 26: BattleType + (*DBBattleFormt)(nil), // 27: DBBattleFormt + (*anypb.Any)(nil), // 28: google.protobuf.Any } var file_battle_battle_msg_proto_depIdxs = []int32{ - 21, // 0: BattleEVEReq.ptype:type_name -> PlayType + 24, // 0: BattleEVEReq.ptype:type_name -> PlayType 1, // 1: BattleEVEReq.format:type_name -> BattleFormation - 21, // 2: BattlePVEReq.ptype:type_name -> PlayType + 24, // 2: BattlePVEReq.ptype:type_name -> PlayType 1, // 3: BattlePVEReq.format:type_name -> BattleFormation - 22, // 4: PVPFormation.format:type_name -> DBHero - 21, // 5: BattlePVPReq.ptype:type_name -> PlayType + 25, // 4: PVPFormation.format:type_name -> DBHero + 24, // 5: BattlePVPReq.ptype:type_name -> PlayType 4, // 6: BattlePVPReq.redformat:type_name -> PVPFormation 4, // 7: BattlePVPReq.buleformat:type_name -> PVPFormation - 21, // 8: BattleRTPVPReq.ptype:type_name -> PlayType + 24, // 8: BattleRTPVPReq.ptype:type_name -> PlayType 1, // 9: BattleRTPVPReq.redformat:type_name -> BattleFormation 1, // 10: BattleRTPVPReq.bulefformat:type_name -> BattleFormation - 21, // 11: BattlePVBReq.ptype:type_name -> PlayType + 24, // 11: BattlePVBReq.ptype:type_name -> PlayType 1, // 12: BattlePVBReq.format:type_name -> BattleFormation - 23, // 13: BattleInfo.btype:type_name -> BattleType - 21, // 14: BattleInfo.ptype:type_name -> PlayType - 24, // 15: BattleInfo.redflist:type_name -> DBBattleFormt - 24, // 16: BattleInfo.buleflist:type_name -> DBBattleFormt + 26, // 13: BattleInfo.btype:type_name -> BattleType + 24, // 14: BattleInfo.ptype:type_name -> PlayType + 27, // 15: BattleInfo.redflist:type_name -> DBBattleFormt + 27, // 16: BattleInfo.buleflist:type_name -> DBBattleFormt 8, // 17: BattleReport.info:type_name -> BattleInfo 9, // 18: BattleReport.incmd:type_name -> BattleCmd 9, // 19: BattleReport.outcmd:type_name -> BattleCmd - 25, // 20: BattleRpcMessage.data:type_name -> google.protobuf.Any - 8, // 21: BattleCreateServerReq.info:type_name -> BattleInfo - 9, // 22: BattleInCmdReq.in:type_name -> BattleCmd - 9, // 23: BattleInCmdResp.in:type_name -> BattleCmd - 9, // 24: BattleOutCmdPush.cmd:type_name -> BattleCmd - 25, // [25:25] is the sub-list for method output_type - 25, // [25:25] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 28, // 20: BattleRpcMessage.data:type_name -> google.protobuf.Any + 23, // 21: BattleGetInfoResp.info:type_name -> BattleStateInfo + 8, // 22: BattleCreateServerReq.info:type_name -> BattleInfo + 9, // 23: BattleInCmdReq.in:type_name -> BattleCmd + 9, // 24: BattleInCmdResp.in:type_name -> BattleCmd + 9, // 25: BattleOutCmdPush.cmd:type_name -> BattleCmd + 8, // 26: BattleStateInfo.info:type_name -> BattleInfo + 9, // 27: BattleStateInfo.outCmds:type_name -> BattleCmd + 9, // 28: BattleStateInfo.inputCmds:type_name -> BattleCmd + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_battle_battle_msg_proto_init() } @@ -1842,7 +2034,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleCreateServerReq); i { + switch v := v.(*BattleGetInfoReq); i { case 0: return &v.state case 1: @@ -1854,7 +2046,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleCreateServerResp); i { + switch v := v.(*BattleGetInfoResp); i { case 0: return &v.state case 1: @@ -1866,7 +2058,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleInCmdReq); i { + switch v := v.(*BattleCreateServerReq); i { case 0: return &v.state case 1: @@ -1878,7 +2070,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleInCmdResp); i { + switch v := v.(*BattleCreateServerResp); i { case 0: return &v.state case 1: @@ -1890,7 +2082,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleOutCmdPush); i { + switch v := v.(*BattleInCmdReq); i { case 0: return &v.state case 1: @@ -1902,7 +2094,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleFinishPush); i { + switch v := v.(*BattleInCmdResp); i { case 0: return &v.state case 1: @@ -1914,7 +2106,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleConcedeReq); i { + switch v := v.(*BattleOutCmdPush); i { case 0: return &v.state case 1: @@ -1926,6 +2118,30 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BattleFinishPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_battle_battle_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BattleConcedeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_battle_battle_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BattleConcedeResp); i { case 0: return &v.state @@ -1937,6 +2153,18 @@ func file_battle_battle_msg_proto_init() { return nil } } + file_battle_battle_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BattleStateInfo); 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{ @@ -1944,7 +2172,7 @@ func file_battle_battle_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_battle_battle_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 21, + NumMessages: 24, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/pvp_db.pb.go b/pb/pvp_db.pb.go index 810f588e5..8b7a61d87 100644 --- a/pb/pvp_db.pb.go +++ b/pb/pvp_db.pb.go @@ -195,13 +195,12 @@ type DBPvpBattle struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id - Ptype PvpType `protobuf:"varint,2,opt,name=ptype,proto3,enum=PvpType" json:"ptype"` //pvp类型 - State PvpState `protobuf:"varint,3,opt,name=state,proto3,enum=PvpState" json:"state"` //战斗状态 - Red *PvpUserInfo `protobuf:"bytes,4,opt,name=red,proto3" json:"red"` //红方id - Redformation *BattleFormation `protobuf:"bytes,5,opt,name=redformation,proto3" json:"redformation"` //红方阵型列表 - Blue *PvpUserInfo `protobuf:"bytes,6,opt,name=blue,proto3" json:"blue"` //红方id - Blueformation *BattleFormation `protobuf:"bytes,7,opt,name=blueformation,proto3" json:"blueformation"` //红方阵型列表 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //战斗id + ServicePath string `protobuf:"bytes,2,opt,name=servicePath,proto3" json:"servicePath"` //战斗区服地址 + Ptype PvpType `protobuf:"varint,3,opt,name=ptype,proto3,enum=PvpType" json:"ptype"` //pvp类型 + State PvpState `protobuf:"varint,4,opt,name=state,proto3,enum=PvpState" json:"state"` //战斗状态 + Red *PvpUserInfo `protobuf:"bytes,5,opt,name=red,proto3" json:"red"` //红方id + Blue *PvpUserInfo `protobuf:"bytes,6,opt,name=blue,proto3" json:"blue"` //红方id } func (x *DBPvpBattle) Reset() { @@ -243,6 +242,13 @@ func (x *DBPvpBattle) GetId() string { return "" } +func (x *DBPvpBattle) GetServicePath() string { + if x != nil { + return x.ServicePath + } + return "" +} + func (x *DBPvpBattle) GetPtype() PvpType { if x != nil { return x.Ptype @@ -264,13 +270,6 @@ func (x *DBPvpBattle) GetRed() *PvpUserInfo { return nil } -func (x *DBPvpBattle) GetRedformation() *BattleFormation { - if x != nil { - return x.Redformation - } - return nil -} - func (x *DBPvpBattle) GetBlue() *PvpUserInfo { if x != nil { return x.Blue @@ -278,49 +277,36 @@ func (x *DBPvpBattle) GetBlue() *PvpUserInfo { return nil } -func (x *DBPvpBattle) GetBlueformation() *BattleFormation { - if x != nil { - return x.Blueformation - } - return nil -} - var File_pvp_pvp_db_proto protoreflect.FileDescriptor var file_pvp_pvp_db_proto_rawDesc = []byte{ 0x0a, 0x10, 0x70, 0x76, 0x70, 0x2f, 0x70, 0x76, 0x70, 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, 0x22, 0x5b, 0x0a, 0x0b, 0x50, - 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x8e, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x50, - 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x08, 0x2e, 0x50, 0x76, 0x70, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x72, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x0c, 0x72, 0x65, 0x64, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x20, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x62, 0x6c, 0x75, - 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x62, 0x6c, 0x75, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x62, 0x6c, 0x75, 0x65, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x16, 0x0a, 0x07, 0x50, 0x76, 0x70, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x10, - 0x00, 0x2a, 0x43, 0x0a, 0x08, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, - 0x04, 0x76, 0x6f, 0x69, 0x64, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, - 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x69, - 0x6e, 0x69, 0x73, 0x68, 0x10, 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, + 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, + 0xc2, 0x01, 0x0a, 0x0b, 0x44, 0x42, 0x50, 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x1e, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x08, 0x2e, 0x50, 0x76, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x09, 0x2e, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, + 0x65, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, + 0x62, 0x6c, 0x75, 0x65, 0x2a, 0x16, 0x0a, 0x07, 0x50, 0x76, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0b, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x10, 0x00, 0x2a, 0x43, 0x0a, 0x08, + 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x76, 0x6f, 0x69, 0x64, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x10, 0x01, 0x12, 0x0a, 0x0a, + 0x06, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x61, 0x6e, + 0x63, 0x65, 0x6c, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x10, + 0x04, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -338,24 +324,21 @@ func file_pvp_pvp_db_proto_rawDescGZIP() []byte { var file_pvp_pvp_db_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_pvp_pvp_db_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_pvp_pvp_db_proto_goTypes = []interface{}{ - (PvpType)(0), // 0: PvpType - (PvpState)(0), // 1: PvpState - (*PvpUserInfo)(nil), // 2: PvpUserInfo - (*DBPvpBattle)(nil), // 3: DBPvpBattle - (*BattleFormation)(nil), // 4: BattleFormation + (PvpType)(0), // 0: PvpType + (PvpState)(0), // 1: PvpState + (*PvpUserInfo)(nil), // 2: PvpUserInfo + (*DBPvpBattle)(nil), // 3: DBPvpBattle } var file_pvp_pvp_db_proto_depIdxs = []int32{ 0, // 0: DBPvpBattle.ptype:type_name -> PvpType 1, // 1: DBPvpBattle.state:type_name -> PvpState 2, // 2: DBPvpBattle.red:type_name -> PvpUserInfo - 4, // 3: DBPvpBattle.redformation:type_name -> BattleFormation - 2, // 4: DBPvpBattle.blue:type_name -> PvpUserInfo - 4, // 5: DBPvpBattle.blueformation:type_name -> BattleFormation - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 2, // 3: DBPvpBattle.blue:type_name -> PvpUserInfo + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_pvp_pvp_db_proto_init() } @@ -363,7 +346,6 @@ func file_pvp_pvp_db_proto_init() { if File_pvp_pvp_db_proto != nil { return } - file_battle_battle_msg_proto_init() if !protoimpl.UnsafeEnabled { file_pvp_pvp_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PvpUserInfo); i { diff --git a/pb/pvp_msg.pb.go b/pb/pvp_msg.pb.go index ae21070c7..e21838266 100644 --- a/pb/pvp_msg.pb.go +++ b/pb/pvp_msg.pb.go @@ -20,6 +20,166 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +//战斗列表推送 +type PvpListPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + List []*DBPvpBattle `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +} + +func (x *PvpListPush) Reset() { + *x = PvpListPush{} + if protoimpl.UnsafeEnabled { + mi := &file_pvp_pvp_msg_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PvpListPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PvpListPush) ProtoMessage() {} + +func (x *PvpListPush) ProtoReflect() protoreflect.Message { + mi := &file_pvp_pvp_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 PvpListPush.ProtoReflect.Descriptor instead. +func (*PvpListPush) Descriptor() ([]byte, []int) { + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{0} +} + +func (x *PvpListPush) GetList() []*DBPvpBattle { + if x != nil { + return x.List + } + return nil +} + +//战斗列表推送 +type PvpIntoReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Battleid string `protobuf:"bytes,1,opt,name=battleid,proto3" json:"battleid"` //战斗id +} + +func (x *PvpIntoReq) Reset() { + *x = PvpIntoReq{} + if protoimpl.UnsafeEnabled { + mi := &file_pvp_pvp_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PvpIntoReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PvpIntoReq) ProtoMessage() {} + +func (x *PvpIntoReq) ProtoReflect() protoreflect.Message { + mi := &file_pvp_pvp_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 PvpIntoReq.ProtoReflect.Descriptor instead. +func (*PvpIntoReq) Descriptor() ([]byte, []int) { + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *PvpIntoReq) GetBattleid() string { + if x != nil { + return x.Battleid + } + return "" +} + +//战斗列表推送 +type PvpIntoResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=ErrorCode" json:"code"` //是否成功 + Battleid string `protobuf:"bytes,2,opt,name=battleid,proto3" json:"battleid"` //战斗id + Info *BattleStateInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info"` //战斗状态数据 +} + +func (x *PvpIntoResp) Reset() { + *x = PvpIntoResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pvp_pvp_msg_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PvpIntoResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PvpIntoResp) ProtoMessage() {} + +func (x *PvpIntoResp) ProtoReflect() protoreflect.Message { + mi := &file_pvp_pvp_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 PvpIntoResp.ProtoReflect.Descriptor instead. +func (*PvpIntoResp) Descriptor() ([]byte, []int) { + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{2} +} + +func (x *PvpIntoResp) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_Success +} + +func (x *PvpIntoResp) GetBattleid() string { + if x != nil { + return x.Battleid + } + return "" +} + +func (x *PvpIntoResp) GetInfo() *BattleStateInfo { + if x != nil { + return x.Info + } + return nil +} + //Pvp 战斗准备推送 type PvpReadyPush struct { state protoimpl.MessageState @@ -36,7 +196,7 @@ type PvpReadyPush struct { func (x *PvpReadyPush) Reset() { *x = PvpReadyPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[0] + mi := &file_pvp_pvp_msg_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +209,7 @@ func (x *PvpReadyPush) String() string { func (*PvpReadyPush) ProtoMessage() {} func (x *PvpReadyPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[0] + mi := &file_pvp_pvp_msg_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +222,7 @@ func (x *PvpReadyPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpReadyPush.ProtoReflect.Descriptor instead. func (*PvpReadyPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{0} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{3} } func (x *PvpReadyPush) GetServicePath() string { @@ -113,7 +273,7 @@ type PvpCancelPush struct { func (x *PvpCancelPush) Reset() { *x = PvpCancelPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[1] + mi := &file_pvp_pvp_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -126,7 +286,7 @@ func (x *PvpCancelPush) String() string { func (*PvpCancelPush) ProtoMessage() {} func (x *PvpCancelPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[1] + mi := &file_pvp_pvp_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -139,7 +299,7 @@ func (x *PvpCancelPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpCancelPush.ProtoReflect.Descriptor instead. func (*PvpCancelPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{1} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{4} } func (x *PvpCancelPush) GetServicePath() string { @@ -169,7 +329,7 @@ type PvpFormationReq struct { func (x *PvpFormationReq) Reset() { *x = PvpFormationReq{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[2] + mi := &file_pvp_pvp_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -182,7 +342,7 @@ func (x *PvpFormationReq) String() string { func (*PvpFormationReq) ProtoMessage() {} func (x *PvpFormationReq) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[2] + mi := &file_pvp_pvp_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -195,7 +355,7 @@ func (x *PvpFormationReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpFormationReq.ProtoReflect.Descriptor instead. func (*PvpFormationReq) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{2} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{5} } func (x *PvpFormationReq) GetBattleid() string { @@ -224,7 +384,7 @@ type PvpFormationResp struct { func (x *PvpFormationResp) Reset() { *x = PvpFormationResp{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[3] + mi := &file_pvp_pvp_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -237,7 +397,7 @@ func (x *PvpFormationResp) String() string { func (*PvpFormationResp) ProtoMessage() {} func (x *PvpFormationResp) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[3] + mi := &file_pvp_pvp_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -250,7 +410,7 @@ func (x *PvpFormationResp) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpFormationResp.ProtoReflect.Descriptor instead. func (*PvpFormationResp) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{3} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{6} } func (x *PvpFormationResp) GetIssucc() bool { @@ -273,7 +433,7 @@ type PvpStartPush struct { func (x *PvpStartPush) Reset() { *x = PvpStartPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[4] + mi := &file_pvp_pvp_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +446,7 @@ func (x *PvpStartPush) String() string { func (*PvpStartPush) ProtoMessage() {} func (x *PvpStartPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[4] + mi := &file_pvp_pvp_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,7 +459,7 @@ func (x *PvpStartPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpStartPush.ProtoReflect.Descriptor instead. func (*PvpStartPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{4} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{7} } func (x *PvpStartPush) GetCode() ErrorCode { @@ -329,7 +489,7 @@ type PvpOutCmdPush struct { func (x *PvpOutCmdPush) Reset() { *x = PvpOutCmdPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[5] + mi := &file_pvp_pvp_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +502,7 @@ func (x *PvpOutCmdPush) String() string { func (*PvpOutCmdPush) ProtoMessage() {} func (x *PvpOutCmdPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[5] + mi := &file_pvp_pvp_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +515,7 @@ func (x *PvpOutCmdPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpOutCmdPush.ProtoReflect.Descriptor instead. func (*PvpOutCmdPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{5} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{8} } func (x *PvpOutCmdPush) GetBattleid() string { @@ -385,7 +545,7 @@ type PvpInCmdReq struct { func (x *PvpInCmdReq) Reset() { *x = PvpInCmdReq{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[6] + mi := &file_pvp_pvp_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -398,7 +558,7 @@ func (x *PvpInCmdReq) String() string { func (*PvpInCmdReq) ProtoMessage() {} func (x *PvpInCmdReq) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[6] + mi := &file_pvp_pvp_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -411,7 +571,7 @@ func (x *PvpInCmdReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpInCmdReq.ProtoReflect.Descriptor instead. func (*PvpInCmdReq) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{6} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{9} } func (x *PvpInCmdReq) GetBattleid() string { @@ -442,7 +602,7 @@ type PvpInCmdResp struct { func (x *PvpInCmdResp) Reset() { *x = PvpInCmdResp{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[7] + mi := &file_pvp_pvp_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -455,7 +615,7 @@ func (x *PvpInCmdResp) String() string { func (*PvpInCmdResp) ProtoMessage() {} func (x *PvpInCmdResp) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[7] + mi := &file_pvp_pvp_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -468,7 +628,7 @@ func (x *PvpInCmdResp) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpInCmdResp.ProtoReflect.Descriptor instead. func (*PvpInCmdResp) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{7} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{10} } func (x *PvpInCmdResp) GetCode() ErrorCode { @@ -500,53 +660,66 @@ var file_pvp_pvp_msg_proto_rawDesc = []byte{ 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, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xac, 0x01, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, - 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1e, - 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, - 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x20, - 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, - 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, - 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x4d, - 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x75, 0x73, 0x68, 0x12, - 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, - 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x5d, 0x0a, - 0x0f, 0x50, 0x76, 0x70, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x09, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x10, - 0x50, 0x76, 0x70, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x4f, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, - 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x49, 0x0a, 0x0d, 0x50, 0x76, 0x70, - 0x4f, 0x75, 0x74, 0x43, 0x6d, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, - 0x03, 0x63, 0x6d, 0x64, 0x22, 0x47, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x43, 0x6d, 0x64, - 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, - 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x68, 0x0a, - 0x0c, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, + 0x2f, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, + 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, + 0x42, 0x50, 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, + 0x22, 0x28, 0x0a, 0x0a, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, + 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x0b, 0x50, 0x76, + 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x0c, + 0x50, 0x76, 0x70, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, + 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x03, 0x72, 0x65, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x62, 0x6c, + 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x4d, 0x0a, 0x0d, 0x50, 0x76, + 0x70, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, - 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x76, 0x70, + 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x09, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x10, 0x50, 0x76, 0x70, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, + 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, + 0x73, 0x75, 0x63, 0x63, 0x22, 0x4f, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x49, 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x4f, 0x75, 0x74, 0x43, + 0x6d, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, + 0x22, 0x47, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x12, + 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, + 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x68, 0x0a, 0x0c, 0x50, 0x76, 0x70, + 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, + 0x63, 0x6d, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -561,37 +734,45 @@ func file_pvp_pvp_msg_proto_rawDescGZIP() []byte { return file_pvp_pvp_msg_proto_rawDescData } -var file_pvp_pvp_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_pvp_pvp_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_pvp_pvp_msg_proto_goTypes = []interface{}{ - (*PvpReadyPush)(nil), // 0: PvpReadyPush - (*PvpCancelPush)(nil), // 1: PvpCancelPush - (*PvpFormationReq)(nil), // 2: PvpFormationReq - (*PvpFormationResp)(nil), // 3: PvpFormationResp - (*PvpStartPush)(nil), // 4: PvpStartPush - (*PvpOutCmdPush)(nil), // 5: PvpOutCmdPush - (*PvpInCmdReq)(nil), // 6: PvpInCmdReq - (*PvpInCmdResp)(nil), // 7: PvpInCmdResp - (*PvpUserInfo)(nil), // 8: PvpUserInfo - (*BattleFormation)(nil), // 9: BattleFormation - (ErrorCode)(0), // 10: ErrorCode - (*BattleInfo)(nil), // 11: BattleInfo - (*BattleCmd)(nil), // 12: BattleCmd + (*PvpListPush)(nil), // 0: PvpListPush + (*PvpIntoReq)(nil), // 1: PvpIntoReq + (*PvpIntoResp)(nil), // 2: PvpIntoResp + (*PvpReadyPush)(nil), // 3: PvpReadyPush + (*PvpCancelPush)(nil), // 4: PvpCancelPush + (*PvpFormationReq)(nil), // 5: PvpFormationReq + (*PvpFormationResp)(nil), // 6: PvpFormationResp + (*PvpStartPush)(nil), // 7: PvpStartPush + (*PvpOutCmdPush)(nil), // 8: PvpOutCmdPush + (*PvpInCmdReq)(nil), // 9: PvpInCmdReq + (*PvpInCmdResp)(nil), // 10: PvpInCmdResp + (*DBPvpBattle)(nil), // 11: DBPvpBattle + (ErrorCode)(0), // 12: ErrorCode + (*BattleStateInfo)(nil), // 13: BattleStateInfo + (*PvpUserInfo)(nil), // 14: PvpUserInfo + (*BattleFormation)(nil), // 15: BattleFormation + (*BattleInfo)(nil), // 16: BattleInfo + (*BattleCmd)(nil), // 17: BattleCmd } var file_pvp_pvp_msg_proto_depIdxs = []int32{ - 8, // 0: PvpReadyPush.red:type_name -> PvpUserInfo - 8, // 1: PvpReadyPush.blue:type_name -> PvpUserInfo - 9, // 2: PvpFormationReq.formation:type_name -> BattleFormation - 10, // 3: PvpStartPush.code:type_name -> ErrorCode - 11, // 4: PvpStartPush.info:type_name -> BattleInfo - 12, // 5: PvpOutCmdPush.cmd:type_name -> BattleCmd - 12, // 6: PvpInCmdReq.cmd:type_name -> BattleCmd - 10, // 7: PvpInCmdResp.code:type_name -> ErrorCode - 12, // 8: PvpInCmdResp.cmd:type_name -> BattleCmd - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 11, // 0: PvpListPush.list:type_name -> DBPvpBattle + 12, // 1: PvpIntoResp.code:type_name -> ErrorCode + 13, // 2: PvpIntoResp.info:type_name -> BattleStateInfo + 14, // 3: PvpReadyPush.red:type_name -> PvpUserInfo + 14, // 4: PvpReadyPush.blue:type_name -> PvpUserInfo + 15, // 5: PvpFormationReq.formation:type_name -> BattleFormation + 12, // 6: PvpStartPush.code:type_name -> ErrorCode + 16, // 7: PvpStartPush.info:type_name -> BattleInfo + 17, // 8: PvpOutCmdPush.cmd:type_name -> BattleCmd + 17, // 9: PvpInCmdReq.cmd:type_name -> BattleCmd + 12, // 10: PvpInCmdResp.code:type_name -> ErrorCode + 17, // 11: PvpInCmdResp.cmd:type_name -> BattleCmd + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_pvp_pvp_msg_proto_init() } @@ -604,7 +785,7 @@ func file_pvp_pvp_msg_proto_init() { file_errorcode_proto_init() if !protoimpl.UnsafeEnabled { file_pvp_pvp_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpReadyPush); i { + switch v := v.(*PvpListPush); i { case 0: return &v.state case 1: @@ -616,7 +797,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpCancelPush); i { + switch v := v.(*PvpIntoReq); i { case 0: return &v.state case 1: @@ -628,7 +809,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpFormationReq); i { + switch v := v.(*PvpIntoResp); i { case 0: return &v.state case 1: @@ -640,7 +821,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpFormationResp); i { + switch v := v.(*PvpReadyPush); i { case 0: return &v.state case 1: @@ -652,7 +833,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpStartPush); i { + switch v := v.(*PvpCancelPush); i { case 0: return &v.state case 1: @@ -664,7 +845,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpOutCmdPush); i { + switch v := v.(*PvpFormationReq); i { case 0: return &v.state case 1: @@ -676,7 +857,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpInCmdReq); i { + switch v := v.(*PvpFormationResp); i { case 0: return &v.state case 1: @@ -688,6 +869,42 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PvpStartPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pvp_pvp_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PvpOutCmdPush); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pvp_pvp_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PvpInCmdReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pvp_pvp_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PvpInCmdResp); i { case 0: return &v.state @@ -706,7 +923,7 @@ func file_pvp_pvp_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pvp_pvp_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index 63b3d6e10..7c951c095 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -200,6 +200,9 @@ func (this *SCompGateRoute) NoticeUserLogin(ctx context.Context, args *pb.Notice "gatewayServiceId": args.GatewayServiceId, "ip": args.Ip, }, db.SetDBMgoLog(false)) + session := this.pools.Get().(comm.IUserSession) + session.SetSession(args.Ip, args.UserSessionId, args.ServiceTag, args.GatewayServiceId, args.UserId) + event.TriggerEvent(comm.EventUserLogin, session) return nil } From 4936f3be4096c303e6cd2b38234c655b6560b9d8 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 14 Feb 2023 11:35:30 +0800 Subject: [PATCH 11/21] =?UTF-8?q?=E6=94=B9=E5=8C=85=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithyv2/api.go | 2 +- modules/smithyv2/api_createorder.go | 2 +- modules/smithyv2/api_deskskilllv.go | 2 +- modules/smithyv2/api_getReward.go | 2 +- modules/smithyv2/api_getlist.go | 2 +- modules/smithyv2/api_getranduser.go | 2 +- modules/smithyv2/api_stoveskilllv.go | 2 +- modules/smithyv2/api_trade.go | 12 ++ modules/smithyv2/comp_configure.go | 2 +- modules/smithyv2/model_smithy.go | 2 +- modules/smithyv2/module.go | 2 +- pb/smithy_msg.pb.go | 174 +++++++++++++++++++++++---- 12 files changed, 172 insertions(+), 34 deletions(-) create mode 100644 modules/smithyv2/api_trade.go diff --git a/modules/smithyv2/api.go b/modules/smithyv2/api.go index ac92b2ac9..3b3a5f157 100644 --- a/modules/smithyv2/api.go +++ b/modules/smithyv2/api.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "go_dreamfactory/lego/core" diff --git a/modules/smithyv2/api_createorder.go b/modules/smithyv2/api_createorder.go index 652e9ba70..dd6d5bcc0 100644 --- a/modules/smithyv2/api_createorder.go +++ b/modules/smithyv2/api_createorder.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "go_dreamfactory/comm" diff --git a/modules/smithyv2/api_deskskilllv.go b/modules/smithyv2/api_deskskilllv.go index 2942405f3..41034512d 100644 --- a/modules/smithyv2/api_deskskilllv.go +++ b/modules/smithyv2/api_deskskilllv.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "crypto/rand" diff --git a/modules/smithyv2/api_getReward.go b/modules/smithyv2/api_getReward.go index 8981ae4ed..4123200d9 100644 --- a/modules/smithyv2/api_getReward.go +++ b/modules/smithyv2/api_getReward.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "go_dreamfactory/comm" diff --git a/modules/smithyv2/api_getlist.go b/modules/smithyv2/api_getlist.go index 177223f8f..814f16995 100644 --- a/modules/smithyv2/api_getlist.go +++ b/modules/smithyv2/api_getlist.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "go_dreamfactory/comm" diff --git a/modules/smithyv2/api_getranduser.go b/modules/smithyv2/api_getranduser.go index 8389d55d7..668c39b9a 100644 --- a/modules/smithyv2/api_getranduser.go +++ b/modules/smithyv2/api_getranduser.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "context" diff --git a/modules/smithyv2/api_stoveskilllv.go b/modules/smithyv2/api_stoveskilllv.go index 285b3693d..b10801d2e 100644 --- a/modules/smithyv2/api_stoveskilllv.go +++ b/modules/smithyv2/api_stoveskilllv.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "crypto/rand" diff --git a/modules/smithyv2/api_trade.go b/modules/smithyv2/api_trade.go new file mode 100644 index 000000000..081b0728e --- /dev/null +++ b/modules/smithyv2/api_trade.go @@ -0,0 +1,12 @@ +package smithyv2 + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" +) + +// 贸易 + +func (this *apiComp) TradeCheck(session comm.IUserSession, req *pb.SmithyTradeReq) (code pb.ErrorCode) { + return +} diff --git a/modules/smithyv2/comp_configure.go b/modules/smithyv2/comp_configure.go index 3487bcfb7..16a30fb6e 100644 --- a/modules/smithyv2/comp_configure.go +++ b/modules/smithyv2/comp_configure.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "go_dreamfactory/lego/core" diff --git a/modules/smithyv2/model_smithy.go b/modules/smithyv2/model_smithy.go index 4328c3be4..5ca39f653 100644 --- a/modules/smithyv2/model_smithy.go +++ b/modules/smithyv2/model_smithy.go @@ -1,4 +1,4 @@ -package smithy +package smithyv2 import ( "go_dreamfactory/comm" diff --git a/modules/smithyv2/module.go b/modules/smithyv2/module.go index c6cc7c76b..cadf12620 100644 --- a/modules/smithyv2/module.go +++ b/modules/smithyv2/module.go @@ -3,7 +3,7 @@ 描述:铁匠铺模块 开发:梅雄风 */ -package smithy +package smithyv2 import ( "go_dreamfactory/comm" diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go index 0fbe0ff3e..262330c1a 100644 --- a/pb/smithy_msg.pb.go +++ b/pb/smithy_msg.pb.go @@ -1368,6 +1368,101 @@ func (x *SmithyGetListResp) GetData() *DBSmithy { return nil } +// 贸易 +type SmithyTradeReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ItemId []string `protobuf:"bytes,1,rep,name=itemId,proto3" json:"itemId"` //物品ID +} + +func (x *SmithyTradeReq) Reset() { + *x = SmithyTradeReq{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyTradeReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyTradeReq) ProtoMessage() {} + +func (x *SmithyTradeReq) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[28] + 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 SmithyTradeReq.ProtoReflect.Descriptor instead. +func (*SmithyTradeReq) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{28} +} + +func (x *SmithyTradeReq) GetItemId() []string { + if x != nil { + return x.ItemId + } + return nil +} + +type SmithyTradeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsSucc bool `protobuf:"varint,1,opt,name=isSucc,proto3" json:"isSucc"` +} + +func (x *SmithyTradeResp) Reset() { + *x = SmithyTradeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_smithy_smithy_msg_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SmithyTradeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SmithyTradeResp) ProtoMessage() {} + +func (x *SmithyTradeResp) ProtoReflect() protoreflect.Message { + mi := &file_smithy_smithy_msg_proto_msgTypes[29] + 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 SmithyTradeResp.ProtoReflect.Descriptor instead. +func (*SmithyTradeResp) Descriptor() ([]byte, []int) { + return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{29} +} + +func (x *SmithyTradeResp) GetIsSucc() bool { + if x != nil { + return x.IsSucc + } + return false +} + var File_smithy_smithy_msg_proto protoreflect.FileDescriptor var file_smithy_smithy_msg_proto_rawDesc = []byte{ @@ -1467,8 +1562,13 @@ var file_smithy_smithy_msg_proto_rawDesc = []byte{ 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x28, 0x0a, 0x0e, 0x53, 0x6d, 0x69, 0x74, + 0x68, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, + 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, + 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0f, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x54, 0x72, 0x61, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1483,7 +1583,7 @@ func file_smithy_smithy_msg_proto_rawDescGZIP() []byte { return file_smithy_smithy_msg_proto_rawDescData } -var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 30) var file_smithy_smithy_msg_proto_goTypes = []interface{}{ (*SmithyGetStoveInfoReq)(nil), // 0: SmithyGetStoveInfoReq (*SmithyGetStoveInfoResp)(nil), // 1: SmithyGetStoveInfoResp @@ -1513,28 +1613,30 @@ var file_smithy_smithy_msg_proto_goTypes = []interface{}{ (*SmithyGetRandUserResp)(nil), // 25: SmithyGetRandUserResp (*SmithyGetListReq)(nil), // 26: SmithyGetListReq (*SmithyGetListResp)(nil), // 27: SmithyGetListResp - (*DBStove)(nil), // 28: DBStove - (*DBBusiness)(nil), // 29: DBBusiness - (*OrderClang)(nil), // 30: OrderClang - (*DBSmithy)(nil), // 31: DBSmithy - (*DBUser)(nil), // 32: DBUser + (*SmithyTradeReq)(nil), // 28: SmithyTradeReq + (*SmithyTradeResp)(nil), // 29: SmithyTradeResp + (*DBStove)(nil), // 30: DBStove + (*DBBusiness)(nil), // 31: DBBusiness + (*OrderClang)(nil), // 32: OrderClang + (*DBSmithy)(nil), // 33: DBSmithy + (*DBUser)(nil), // 34: DBUser } var file_smithy_smithy_msg_proto_depIdxs = []int32{ - 28, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove - 28, // 1: SmithyForgeEquipResp.data:type_name -> DBStove - 28, // 2: SmithyOrderEquipResp.data:type_name -> DBStove - 28, // 3: SmithyStoveUpResp.data:type_name -> DBStove - 28, // 4: SmithyRiseResp.data:type_name -> DBStove - 28, // 5: SmithyToolsUpResp.data:type_name -> DBStove - 29, // 6: SmithyRefreshShopResp.data:type_name -> DBBusiness - 29, // 7: SmithySellItemResp.data:type_name -> DBBusiness - 30, // 8: SmithyCreateOrderReq.order:type_name -> OrderClang - 31, // 9: SmithyCreateOrderResp.data:type_name -> DBSmithy - 31, // 10: SmithyGetRewardResp.data:type_name -> DBSmithy - 31, // 11: SmithyDeskSkillLvResp.data:type_name -> DBSmithy - 31, // 12: SmithyStoveSkillLvResp.data:type_name -> DBSmithy - 32, // 13: SmithyGetRandUserResp.user:type_name -> DBUser - 31, // 14: SmithyGetListResp.data:type_name -> DBSmithy + 30, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove + 30, // 1: SmithyForgeEquipResp.data:type_name -> DBStove + 30, // 2: SmithyOrderEquipResp.data:type_name -> DBStove + 30, // 3: SmithyStoveUpResp.data:type_name -> DBStove + 30, // 4: SmithyRiseResp.data:type_name -> DBStove + 30, // 5: SmithyToolsUpResp.data:type_name -> DBStove + 31, // 6: SmithyRefreshShopResp.data:type_name -> DBBusiness + 31, // 7: SmithySellItemResp.data:type_name -> DBBusiness + 32, // 8: SmithyCreateOrderReq.order:type_name -> OrderClang + 33, // 9: SmithyCreateOrderResp.data:type_name -> DBSmithy + 33, // 10: SmithyGetRewardResp.data:type_name -> DBSmithy + 33, // 11: SmithyDeskSkillLvResp.data:type_name -> DBSmithy + 33, // 12: SmithyStoveSkillLvResp.data:type_name -> DBSmithy + 34, // 13: SmithyGetRandUserResp.user:type_name -> DBUser + 33, // 14: SmithyGetListResp.data:type_name -> DBSmithy 15, // [15:15] is the sub-list for method output_type 15, // [15:15] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name @@ -1886,6 +1988,30 @@ func file_smithy_smithy_msg_proto_init() { return nil } } + file_smithy_smithy_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyTradeReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_smithy_smithy_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SmithyTradeResp); 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{ @@ -1893,7 +2019,7 @@ func file_smithy_smithy_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 28, + NumMessages: 30, NumExtensions: 0, NumServices: 0, }, From 5711441b484cd124fbd3a9cca82f6abc79842b3a Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 14 Feb 2023 11:42:29 +0800 Subject: [PATCH 12/21] update --- .../api_getstoveinfo.go} | 0 .../{model_smithy.go => model_smithyv2.go} | 0 modules/smithyv2/model_smithy.go | 1 - pb/smithy_db.pb.go | 38 +++++++++---------- 4 files changed, 19 insertions(+), 20 deletions(-) rename modules/{smithyv2/api_getlist.go => smithy/api_getstoveinfo.go} (100%) rename modules/smithy/{model_smithy.go => model_smithyv2.go} (100%) diff --git a/modules/smithyv2/api_getlist.go b/modules/smithy/api_getstoveinfo.go similarity index 100% rename from modules/smithyv2/api_getlist.go rename to modules/smithy/api_getstoveinfo.go diff --git a/modules/smithy/model_smithy.go b/modules/smithy/model_smithyv2.go similarity index 100% rename from modules/smithy/model_smithy.go rename to modules/smithy/model_smithyv2.go diff --git a/modules/smithyv2/model_smithy.go b/modules/smithyv2/model_smithy.go index 4328c3be4..f9396c3bc 100644 --- a/modules/smithyv2/model_smithy.go +++ b/modules/smithyv2/model_smithy.go @@ -35,7 +35,6 @@ func (this *modelSmithy) getSmithyStoveList(uid string) (result *pb.DBStove, err result = &pb.DBStove{} if err = this.Get(uid, result); err != nil { if redis.RedisNil != err { // 没有数据直接创建新的数据 - result.Id = primitive.NewObjectID().Hex() result.Uid = uid result.Data = make(map[int32]int32, 0) diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index 6d5fb3c46..d6f0a8400 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -259,7 +259,7 @@ type DBTujian struct { 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" bson:"uid"` //用户ID - Tujian map[int32]*EquipData `protobuf:"bytes,3,rep,name=tujian,proto3" json:"tujian" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 图鉴信息 + Tujian map[int32]*ForgeData `protobuf:"bytes,3,rep,name=tujian,proto3" json:"tujian" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 图鉴信息 Slider int32 `protobuf:"varint,4,opt,name=slider,proto3" json:"slider"` // 进度 } @@ -309,7 +309,7 @@ func (x *DBTujian) GetUid() string { return "" } -func (x *DBTujian) GetTujian() map[int32]*EquipData { +func (x *DBTujian) GetTujian() map[int32]*ForgeData { if x != nil { return x.Tujian } @@ -323,7 +323,7 @@ func (x *DBTujian) GetSlider() int32 { return 0 } -type EquipData struct { +type ForgeData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -333,8 +333,8 @@ type EquipData struct { Quality int32 `protobuf:"varint,3,opt,name=quality,proto3" json:"quality"` } -func (x *EquipData) Reset() { - *x = EquipData{} +func (x *ForgeData) Reset() { + *x = ForgeData{} if protoimpl.UnsafeEnabled { mi := &file_smithy_smithy_db_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -342,13 +342,13 @@ func (x *EquipData) Reset() { } } -func (x *EquipData) String() string { +func (x *ForgeData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*EquipData) ProtoMessage() {} +func (*ForgeData) ProtoMessage() {} -func (x *EquipData) ProtoReflect() protoreflect.Message { +func (x *ForgeData) ProtoReflect() protoreflect.Message { mi := &file_smithy_smithy_db_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -360,26 +360,26 @@ func (x *EquipData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use EquipData.ProtoReflect.Descriptor instead. -func (*EquipData) Descriptor() ([]byte, []int) { +// Deprecated: Use ForgeData.ProtoReflect.Descriptor instead. +func (*ForgeData) Descriptor() ([]byte, []int) { return file_smithy_smithy_db_proto_rawDescGZIP(), []int{4} } -func (x *EquipData) GetForgeCount() int32 { +func (x *ForgeData) GetForgeCount() int32 { if x != nil { return x.ForgeCount } return 0 } -func (x *EquipData) GetLv() int32 { +func (x *ForgeData) GetLv() int32 { if x != nil { return x.Lv } return 0 } -func (x *EquipData) GetQuality() int32 { +func (x *ForgeData) GetQuality() int32 { if x != nil { return x.Quality } @@ -701,9 +701,9 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x45, - 0x71, 0x75, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x44, 0x61, 0x74, 0x61, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x46, + 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, @@ -773,7 +773,7 @@ var file_smithy_smithy_db_proto_goTypes = []interface{}{ (*DBBusiness)(nil), // 1: DBBusiness (*DBBusinessData)(nil), // 2: DBBusinessData (*DBTujian)(nil), // 3: DBTujian - (*EquipData)(nil), // 4: EquipData + (*ForgeData)(nil), // 4: ForgeData (*Clang)(nil), // 5: Clang (*OrderClang)(nil), // 6: OrderClang (*DBSmithy)(nil), // 7: DBSmithy @@ -796,7 +796,7 @@ var file_smithy_smithy_db_proto_depIdxs = []int32{ 14, // 7: DBSmithy.items:type_name -> UserAssets 12, // 8: DBSmithy.skill:type_name -> DBSmithy.SkillEntry 13, // 9: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry - 4, // 10: DBTujian.TujianEntry.value:type_name -> EquipData + 4, // 10: DBTujian.TujianEntry.value:type_name -> ForgeData 11, // [11:11] is the sub-list for method output_type 11, // [11:11] is the sub-list for method input_type 11, // [11:11] is the sub-list for extension type_name @@ -860,7 +860,7 @@ func file_smithy_smithy_db_proto_init() { } } file_smithy_smithy_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EquipData); i { + switch v := v.(*ForgeData); i { case 0: return &v.state case 1: From b016f03ffb3159c6a037c80828c92f42db16476e Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 14 Feb 2023 11:46:26 +0800 Subject: [PATCH 13/21] update --- modules/smithy/api_getstoveinfo.go | 2 +- modules/{smithyv2 => smithy}/api_trade.go | 2 +- modules/{smithyv2 => smithy}/model_smithy.go | 45 ++++- modules/smithy/model_smithyv2.go | 188 ------------------- modules/smithyv2/api.go | 35 ---- modules/smithyv2/api_createorder.go | 114 ----------- modules/smithyv2/api_deskskilllv.go | 81 -------- modules/smithyv2/api_getReward.go | 48 ----- modules/smithyv2/api_getranduser.go | 96 ---------- modules/smithyv2/api_stoveskilllv.go | 62 ------ modules/smithyv2/comp_configure.go | 93 --------- modules/smithyv2/module.go | 63 ------- 12 files changed, 39 insertions(+), 790 deletions(-) rename modules/{smithyv2 => smithy}/api_trade.go (91%) rename modules/{smithyv2 => smithy}/model_smithy.go (88%) delete mode 100644 modules/smithy/model_smithyv2.go delete mode 100644 modules/smithyv2/api.go delete mode 100644 modules/smithyv2/api_createorder.go delete mode 100644 modules/smithyv2/api_deskskilllv.go delete mode 100644 modules/smithyv2/api_getReward.go delete mode 100644 modules/smithyv2/api_getranduser.go delete mode 100644 modules/smithyv2/api_stoveskilllv.go delete mode 100644 modules/smithyv2/comp_configure.go delete mode 100644 modules/smithyv2/module.go diff --git a/modules/smithy/api_getstoveinfo.go b/modules/smithy/api_getstoveinfo.go index 814f16995..177223f8f 100644 --- a/modules/smithy/api_getstoveinfo.go +++ b/modules/smithy/api_getstoveinfo.go @@ -1,4 +1,4 @@ -package smithyv2 +package smithy import ( "go_dreamfactory/comm" diff --git a/modules/smithyv2/api_trade.go b/modules/smithy/api_trade.go similarity index 91% rename from modules/smithyv2/api_trade.go rename to modules/smithy/api_trade.go index 081b0728e..90fc2f7e7 100644 --- a/modules/smithyv2/api_trade.go +++ b/modules/smithy/api_trade.go @@ -1,4 +1,4 @@ -package smithyv2 +package smithy import ( "go_dreamfactory/comm" diff --git a/modules/smithyv2/model_smithy.go b/modules/smithy/model_smithy.go similarity index 88% rename from modules/smithyv2/model_smithy.go rename to modules/smithy/model_smithy.go index 9a80d9c2a..f9189e12c 100644 --- a/modules/smithyv2/model_smithy.go +++ b/modules/smithy/model_smithy.go @@ -1,4 +1,4 @@ -package smithyv2 +package smithy import ( "go_dreamfactory/comm" @@ -31,18 +31,21 @@ func (this *modelSmithy) Init(service core.IService, module core.IModule, comp c } // 获取铁匠铺信息 -func (this *modelSmithy) getSmithyStoveList(uid string) (result *pb.DBStove, err error) { - result = &pb.DBStove{} +func (this *modelSmithy) getSmithyList(uid string) (result *pb.DBSmithy, err error) { + result = &pb.DBSmithy{} if err = this.Get(uid, result); err != nil { if redis.RedisNil != err { // 没有数据直接创建新的数据 + result.Id = primitive.NewObjectID().Hex() result.Uid = uid - result.Data = make(map[int32]int32, 0) result.Skill = make(map[int32]int32, 0) - result.Lv = 1 - result.Temperature = 20000 // 配置 - result.Business = 0 - result.RecoveTime = 0 + result.StoveLv = 1 // storv 等级默认1级 + result.DeskFloor = make(map[int32]int32, 0) + mapType := this.module.configure.GetSmithyTypeConfigData() // 找类型 + for key := range mapType { + result.Skill[key] = 1 + result.DeskFloor[key] = 0 + } if err = this.Add(uid, result); err != nil { this.module.Errorf("err:%v", err) @@ -183,3 +186,29 @@ func (this *modelSmithy) CalculationStoveSkillLv(uid string, Smithy *pb.DBSmithy mapData["orderCostTime"] = Smithy.OrderCostTime this.module.ModifySmithyData(uid, mapData) } + +// 获取铁匠铺信息 +func (this *modelSmithy) getSmithyStoveList(uid string) (result *pb.DBStove, err error) { + result = &pb.DBStove{} + if err = this.Get(uid, result); err != nil { + if redis.RedisNil != err { // 没有数据直接创建新的数据 + result.Id = primitive.NewObjectID().Hex() + result.Uid = uid + result.Data = make(map[int32]int32, 0) + result.Skill = make(map[int32]int32, 0) + result.Lv = 1 + result.Temperature = 20000 // 配置 + result.Business = 0 + result.RecoveTime = 0 + + if err = this.Add(uid, result); err != nil { + this.module.Errorf("err:%v", err) + err = nil + return + } + } + return + } + err = nil + return result, err +} diff --git a/modules/smithy/model_smithyv2.go b/modules/smithy/model_smithyv2.go deleted file mode 100644 index 728863f21..000000000 --- a/modules/smithy/model_smithyv2.go +++ /dev/null @@ -1,188 +0,0 @@ -package smithy - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/redis" - "go_dreamfactory/modules" - "go_dreamfactory/pb" - "go_dreamfactory/sys/configure" - "go_dreamfactory/utils" - - "go.mongodb.org/mongo-driver/bson/primitive" - "go.mongodb.org/mongo-driver/mongo" - "go.mongodb.org/mongo-driver/x/bsonx" -) - -type modelSmithy struct { - modules.MCompModel - module *Smithy -} - -func (this *modelSmithy) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - this.TableName = string(comm.TableSmithy) - err = this.MCompModel.Init(service, module, comp, options) - this.module = module.(*Smithy) - // uid 创建索引 - this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ - Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, - }) - return -} - -// 获取铁匠铺信息 -func (this *modelSmithy) getSmithyList(uid string) (result *pb.DBSmithy, err error) { - result = &pb.DBSmithy{} - if err = this.Get(uid, result); err != nil { - if redis.RedisNil != err { // 没有数据直接创建新的数据 - - result.Id = primitive.NewObjectID().Hex() - result.Uid = uid - result.Skill = make(map[int32]int32, 0) - result.StoveLv = 1 // storv 等级默认1级 - result.DeskFloor = make(map[int32]int32, 0) - mapType := this.module.configure.GetSmithyTypeConfigData() // 找类型 - for key := range mapType { - result.Skill[key] = 1 - result.DeskFloor[key] = 0 - } - - if err = this.Add(uid, result); err != nil { - this.module.Errorf("err:%v", err) - err = nil - return - } - } - return - } - err = nil - return result, err -} -func (this *modelSmithy) modifySmithyDataByObjId(uid string, data map[string]interface{}) error { - return this.Change(uid, data) -} -func (this *modelSmithy) CalculationSmithy(uid string, smithy *pb.DBSmithy) { - var ( - szTime map[int32]int32 - zeroTime int64 // 当前时间对应的0点时间戳,用来判断是否跨天了 - ) - mapData := make(map[string]interface{}, 0) - szTime = make(map[int32]int32, 0) - - // 记录每个食材耗时 - for k, v := range smithy.Skill { - // 计算出需要的时间 - _skillCfg := this.module.configure.GetSmithyStoveConfigData(v) - szTime[k] += _skillCfg.Time - } - - // 有订单在做 - zeroTime = utils.GetTodayZeroTime(configure.Now().Unix()) - - if (smithy.Clang != nil && smithy.Clang.ETime >= configure.Now().Unix()) || smithy.Clang == nil { - for _, order := range smithy.Orders { - _gourmetcfg := this.module.configure.GetSmithyConfigData(order.DeskType, smithy.Skill[order.DeskType]) // 美食家配置表 - - if order.Count > 0 { - if smithy.Clang != nil && smithy.Clang.ETime > configure.Now().Unix() { - break - } - order.Count-- - if order.Count == 0 { - order.NeedTime = 0 - } - order.NeedTime = order.Count * szTime[order.DeskType] - if smithy.Clang == nil { - smithy.Clang = &pb.Clang{} - smithy.Clang.STime = configure.Now().Unix() - smithy.Clang.ETime = configure.Now().Unix() + int64(szTime[order.DeskType]) - if smithy.Clang.STime < zeroTime && zeroTime <= smithy.Clang.ETime { // 跨天清空订单耗时 - smithy.OrderCostTime = 0 - for _, order := range smithy.Orders { // 重新计算订单时常 - smithy.OrderCostTime += order.Count * szTime[order.DeskType] - } - } - } else { - smithy.Clang.STime += int64(szTime[order.DeskType]) - oldTime := smithy.Clang.ETime - smithy.Clang.ETime += int64(szTime[order.DeskType]) - // 如果此时跨天了 清除订单时常 - if oldTime < zeroTime && zeroTime <= smithy.Clang.ETime { // 跨天清空订单耗时 - smithy.OrderCostTime = 0 - for _, order := range smithy.Orders { // 重新计算订单时常 - smithy.OrderCostTime += order.Count * szTime[order.DeskType] - } - } - } - smithy.Clang.DeskType = order.DeskType - // 设置掉落组 - smithy.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Drop, smithy.Items) // 获取掉落奖励 - // 记录下订单时间 - smithy.Ctime = smithy.Clang.ETime - smithy.TotalTime += szTime[order.DeskType] - } - } - - if smithy.Clang != nil && smithy.Clang.ETime <= configure.Now().Unix() { - _gourmetcfg := this.module.configure.GetSmithyConfigData(smithy.Clang.DeskType, smithy.Skill[smithy.Clang.DeskType]) - smithy.Items = this.module.configure.GetMultipleDropReward(_gourmetcfg.Using, _gourmetcfg.Drop, smithy.Items) - smithy.Clang = nil - } - } - - // 清除数量为0 的订单 - pos := 0 - for _, order := range smithy.Orders { - if order.Count == 0 { - pos++ - } - } - smithy.Orders = append(smithy.Orders[:0], smithy.Orders[pos:]...) - // 保存信息 - mapData["items"] = smithy.Items - mapData["orders"] = smithy.Orders - mapData["orderCostTime"] = smithy.OrderCostTime - mapData["clang"] = smithy.Clang // 正在做的 - mapData["ctime"] = smithy.Ctime - mapData["totalTime"] = smithy.TotalTime - this.module.ModifySmithyData(uid, mapData) // 同步数据 -} - -func (this *modelSmithy) CalculationDeskSkillLv(uid string, Smithy *pb.DBSmithy) { - mapData := make(map[string]interface{}, 0) - - mapData["skill"] = Smithy.Skill - mapData["deskFloor"] = Smithy.DeskFloor - this.module.ModifySmithyData(uid, mapData) -} - -func (this *modelSmithy) CalculationStoveSkillLv(uid string, Smithy *pb.DBSmithy, stoveSkillLv int32) { - mapData := make(map[string]interface{}, 0) - - var totalTime int32 - for _, v := range Smithy.Orders { - if v.Count > 0 { - preScaleTime := 0 - preSkillConf := this.module.configure.GetSmithyStoveConfigData(stoveSkillLv - 1) - if preSkillConf != nil { - preScaleTime += int(preSkillConf.Time) - } - _skillCfg := this.module.configure.GetSmithyStoveConfigData(stoveSkillLv) - if _skillCfg != nil { - scaleTime := (_skillCfg.Time - int32(preScaleTime)) * v.Count - v.NeedTime += scaleTime - totalTime += scaleTime - if v.NeedTime < 0 { // 担心配置错误 为负数情况 所以这里做下判断 - v.NeedTime = 0 - } - - } - } - } - mapData["orders"] = Smithy.Orders - mapData["stoveLv"] = Smithy.StoveLv - mapData["deskFloor"] = Smithy.DeskFloor - Smithy.OrderCostTime += totalTime - mapData["orderCostTime"] = Smithy.OrderCostTime - this.module.ModifySmithyData(uid, mapData) -} diff --git a/modules/smithyv2/api.go b/modules/smithyv2/api.go deleted file mode 100644 index 3b3a5f157..000000000 --- a/modules/smithyv2/api.go +++ /dev/null @@ -1,35 +0,0 @@ -package smithyv2 - -import ( - "go_dreamfactory/lego/core" - "go_dreamfactory/modules" -) - -const ( - SmithyGetListResp = "getlist" - SmithyCreateOrderResp = "createorder" - SmithyDeskSkillLvResp = "deskskilllv" - SmithyStoveSkillLvResp = "stoveskilllv" - SmithyGetRewardResp = "getreward" - SmithyGetRandUserResp = "getranduser" -) - -type apiComp struct { - modules.MCompGate - service core.IService - module *Smithy -} - -//组件初始化接口 -func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - err = this.MCompGate.Init(service, module, comp, options) - this.module = module.(*Smithy) - this.service = service - return -} - -func (this *apiComp) Start() (err error) { - err = this.MCompGate.Start() - - return -} diff --git a/modules/smithyv2/api_createorder.go b/modules/smithyv2/api_createorder.go deleted file mode 100644 index dd6d5bcc0..000000000 --- a/modules/smithyv2/api_createorder.go +++ /dev/null @@ -1,114 +0,0 @@ -package smithyv2 - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" - "go_dreamfactory/sys/configure" - cfg "go_dreamfactory/sys/configure/structs" - - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) CreateOrderCheck(session comm.IUserSession, req *pb.SmithyCreateOrderReq) (code pb.ErrorCode) { - if len(req.Order) == 0 { - code = pb.ErrorCode_ReqParameterError - return - } - return -} - -func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreateOrderReq) (code pb.ErrorCode, data proto.Message) { - var ( - res []*cfg.Gameatn - costTime int32 - privilegeAddItme int32 // 特权额外增加的时间 - _smithy *pb.DBSmithy - ) - - code = this.CreateOrderCheck(session, req) - if code != pb.ErrorCode_Success { - return // 参数校验失败直接返回 - } - - _skillCfg := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv) - needTime := _skillCfg.Time // 订单需要的时间 - for _, order := range req.Order { - if order.Count == 0 { - continue - } - costTime += needTime * order.Count - } - if _smithy.Ctime == 0 { - _smithy.Ctime = configure.Now().Unix() - } - // if !utils.IsToday(_smithy.Ctime) { - // _smithy.Ctime = configure.Now().Unix() - // _smithy.OrderCostTime = 0 - // } - _smithy.Orders = append(_smithy.Orders, req.Order...) // 直接追加订单数据 - if _smithy.Clang == nil || (_smithy.Clang != nil && _smithy.Clang.ETime == 0) { - for _, v := range _smithy.Orders { - if v.Count > 0 { - v.Count-- - // 获取生产时间 - _smithy.Clang = &pb.Clang{ - DeskType: v.DeskType, - ETime: configure.Now().Unix() + int64(needTime), - STime: configure.Now().Unix(), - } - break - } - } - } - // 計算耗時 - for _, v := range _smithy.Orders { - if v.Count > 0 { - v.NeedTime = needTime * v.Count - } - if skillLv, ok := _smithy.Skill[v.DeskType]; ok { - conf := this.module.configure.GetSmithyConfigData(v.DeskType, skillLv) - res = append(res, conf.Orderneed...) // 订单消耗 - } - } - if _smithy.Clang != nil && _smithy.Clang.ETime == 0 { - _smithy.Clang = nil - } - // 获取总的下单时长 - cfgCom := this.module.configure.GetGlobalConf() - if cfgCom == nil { - return - } - _smithy.OrderCostTime += costTime - privilegeAddItme = this.module.ModulePrivilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType10) - if cfgCom.SmithyMaxtime+privilegeAddItme < _smithy.OrderCostTime { // 大于总时长是不允许的 - code = pb.ErrorCode_GourmetMoreOrderTime - return - } - if code = this.module.ConsumeRes(session, res, true); code != pb.ErrorCode_Success { // 消耗校验 - return - } - - // 校验通过 写数据 - mapData := make(map[string]interface{}, 0) - sz := make([]*pb.OrderClang, 0) - for _, v := range _smithy.Orders { - if v.Count != 0 { - sz = append(sz, v) - } - } - _smithy.Orders = sz - mapData["orders"] = _smithy.Orders - mapData["orderCostTime"] = _smithy.OrderCostTime - mapData["clang"] = _smithy.Clang // 正在做的 - mapData["ctime"] = _smithy.Ctime - code = this.module.ModifySmithyData(session.GetUserId(), mapData) - iTotal := 0 - for _, v := range req.Order { - iTotal += int(v.Count) - } - this.module.ModuleRtask.SendToRtask(session, comm.Rtype148, int32(iTotal)) - - session.SendMsg(string(this.module.GetType()), SmithyCreateOrderResp, &pb.SmithyCreateOrderResp{Data: _smithy}) - return -} diff --git a/modules/smithyv2/api_deskskilllv.go b/modules/smithyv2/api_deskskilllv.go deleted file mode 100644 index 41034512d..000000000 --- a/modules/smithyv2/api_deskskilllv.go +++ /dev/null @@ -1,81 +0,0 @@ -package smithyv2 - -import ( - "crypto/rand" - "go_dreamfactory/comm" - "go_dreamfactory/pb" - cfg "go_dreamfactory/sys/configure/structs" - "math/big" - - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) DeskSkillLvCheck(session comm.IUserSession, req *pb.SmithyDeskSkillLvReq) (code pb.ErrorCode) { - if req.DeskType == 0 { - code = pb.ErrorCode_ReqParameterError - } - return -} - -func (this *apiComp) DeskSkillLv(session comm.IUserSession, req *pb.SmithyDeskSkillLvReq) (code pb.ErrorCode, dat proto.Message) { - var ( - bFindSkill bool - curSkillCfg *cfg.GameSmithyData - _smithy *pb.DBSmithy - ) - code = this.DeskSkillLvCheck(session, req) - if code != pb.ErrorCode_Success { - return // 参数校验失败直接返回 - } - - for k, v := range _smithy.Skill { - if k == req.DeskType { - bFindSkill = true - // 查询配置文件 - curSkillCfg = this.module.configure.GetSmithyConfigData(k, v) - if curSkillCfg != nil && curSkillCfg.Starupneed != nil { - //获取下一级 - NextSkillCfg := this.module.configure.GetSmithyConfigData(k, v+1) - if NextSkillCfg == nil { - code = pb.ErrorCode_GourmetSkillMaxLv - return - } - // 升级 - code = this.module.ConsumeRes(session, curSkillCfg.Starupneed, true) // 消耗检测 - if code != pb.ErrorCode_Success { - return - } - // 概率升级 - n, _ := rand.Int(rand.Reader, big.NewInt(100)) - - if n.Int64() < int64(curSkillCfg.Probability) { // 可以升级 - // 技能升级成功 - _smithy.Skill[req.DeskType] += 1 - _smithy.DeskFloor[req.DeskType] = 0 - this.module.modelSmithy.CalculationDeskSkillLv(session.GetUserId(), _smithy) - - } else { - _smithy.DeskFloor[req.DeskType] += 1 - if _smithy.DeskFloor[req.DeskType] >= curSkillCfg.Floors { // 触发保底 - _smithy.Skill[req.DeskType] += 1 - _smithy.DeskFloor[req.DeskType] = 0 - this.module.modelSmithy.CalculationDeskSkillLv(session.GetUserId(), _smithy) - - } - } - } else { - code = pb.ErrorCode_GourmetSkillMaxLv - return - } - break - } - } - if !bFindSkill { - code = pb.ErrorCode_ReqParameterError - return - } - - session.SendMsg(string(this.module.GetType()), SmithyDeskSkillLvResp, &pb.SmithyDeskSkillLvResp{Data: _smithy}) - return -} diff --git a/modules/smithyv2/api_getReward.go b/modules/smithyv2/api_getReward.go deleted file mode 100644 index 4123200d9..000000000 --- a/modules/smithyv2/api_getReward.go +++ /dev/null @@ -1,48 +0,0 @@ -package smithyv2 - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/pb" - cfg "go_dreamfactory/sys/configure/structs" - - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.SmithyGetRewardReq) (code pb.ErrorCode) { - - return -} - -///美食城领取奖励 -func (this *apiComp) GetReward(session comm.IUserSession, req *pb.SmithyGetRewardReq) (code pb.ErrorCode, data proto.Message) { - var ( - _gourmet *pb.DBSmithy - ) - code = this.GetRewardCheck(session, req) - - if len(_gourmet.Items) > 0 { - res := make([]*cfg.Gameatn, 0) - for _, v := range _gourmet.Items { - res = append(res, &cfg.Gameatn{ - A: v.A, - T: v.T, - N: v.N, - }) - } - code = this.module.DispenseRes(session, res, true) - if code != pb.ErrorCode_Success { - return - } - // 随机任务 - this.module.SendRdTask(session, _gourmet.Items) - - _gourmet.Items = nil - mapData := make(map[string]interface{}, 0) - mapData["items"] = nil - code = this.module.ModifySmithyData(session.GetUserId(), mapData) - } - session.SendMsg(string(this.module.GetType()), SmithyGetRewardResp, &pb.SmithyGetRewardResp{Data: _gourmet}) - - return -} diff --git a/modules/smithyv2/api_getranduser.go b/modules/smithyv2/api_getranduser.go deleted file mode 100644 index 668c39b9a..000000000 --- a/modules/smithyv2/api_getranduser.go +++ /dev/null @@ -1,96 +0,0 @@ -package smithyv2 - -import ( - "context" - "go_dreamfactory/comm" - "go_dreamfactory/lego/core" - "go_dreamfactory/pb" - "go_dreamfactory/sys/db" - "go_dreamfactory/utils" - "time" - - "go.mongodb.org/mongo-driver/bson" - "go.mongodb.org/mongo-driver/mongo/options" - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) GetRandUserCheck(session comm.IUserSession, req *pb.SmithyGetRandUserReq) (code pb.ErrorCode) { - if req.People <= 0 { - code = pb.ErrorCode_ReqParameterError - return - } - return -} - -/// 获取一些玩家数据 -func (this *apiComp) GetRandUser(session comm.IUserSession, req *pb.SmithyGetRandUserReq) (code pb.ErrorCode, data proto.Message) { - var ( - szDbUser []*pb.DBUser - mapUser map[string]struct{} - ) - mapUser = make(map[string]struct{}, 0) - code = this.GetRandUserCheck(session, req) - if code != pb.ErrorCode_Success { - return // 参数校验失败直接返回 - } - - // 获取在线玩家信息 - onlineList, err := this.module.ModuleUser.UserOnlineList() - if err != nil { - code = pb.ErrorCode_DBError - return - } - - var szUid []string - for _, v := range onlineList { - if v.Uid == session.GetUserId() || v.Uid == "" { // 过滤自己信息 - continue - } - szUid = append(szUid, v.Uid) - } - // 随机在线玩家信息 - if len(szUid) > int(req.People) { - randArr := utils.RandomNumbers(0, len(szUid), int(req.People)) - for _, v := range randArr { - if szUid[v] != "" { - mapUser[szUid[v]] = struct{}{} - } - } - } else { // 数量不足 则有多少给多少 - for _, v := range szUid { - mapUser[v] = struct{}{} - } - left := int(req.People) - len(mapUser) - if left > 0 { // 一个人也没有 那就从db 中随机取 - tag, _, b := utils.UIdSplit(session.GetUserId()) - if b { - if conn, err := db.ServerDBConn(tag); err == nil { - dbModel := db.NewDBModel(comm.TableHero, time.Hour, conn) - if _data, err1 := dbModel.DB.Find(core.SqlTable(comm.TableUser), bson.M{}, options.Find().SetSort(bson.M{"lv": -1}).SetLimit(int64(req.People))); err1 == nil { - for _data.Next(context.TODO()) { - temp := &pb.DBUser{} - if err = _data.Decode(temp); err == nil { - if len(mapUser)+len(szDbUser) >= int(req.People) { - break - } - if _, ok := mapUser[temp.Uid]; !ok { - szDbUser = append(szDbUser, temp) - } - } - } - } - } - } - } - } - for k := range mapUser { - if user := this.module.ModuleUser.GetUser(k); user != nil { - szDbUser = append(szDbUser, user) // 转成user对象 - } else { - this.module.Errorf("%v", err) - } - } - session.SendMsg(string(this.module.GetType()), SmithyGetRandUserResp, &pb.SmithyGetRandUserResp{User: szDbUser}) - return -} diff --git a/modules/smithyv2/api_stoveskilllv.go b/modules/smithyv2/api_stoveskilllv.go deleted file mode 100644 index b10801d2e..000000000 --- a/modules/smithyv2/api_stoveskilllv.go +++ /dev/null @@ -1,62 +0,0 @@ -package smithyv2 - -import ( - "crypto/rand" - "go_dreamfactory/comm" - "go_dreamfactory/pb" - "math/big" - - "google.golang.org/protobuf/proto" -) - -//参数校验 -func (this *apiComp) StoveSkillLvCheck(session comm.IUserSession, req *pb.SmithyStoveSkillLvReq) (code pb.ErrorCode) { - - return -} - -func (this *apiComp) StoveSkillLv(session comm.IUserSession, req *pb.SmithyStoveSkillLvReq) (code pb.ErrorCode, dat proto.Message) { - var ( - bLevelUp bool - _smithy *pb.DBSmithy - ) - code = this.StoveSkillLvCheck(session, req) - if code != pb.ErrorCode_Success { - return // 参数校验失败直接返回 - } - - curLvData := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv) - if curLvData == nil { - code = pb.ErrorCode_GourmetSkillMaxLv - return - } - nextLvData := this.module.configure.GetSmithyStoveConfigData(_smithy.StoveLv + 1) - if nextLvData == nil { - code = pb.ErrorCode_GourmetSkillMaxLv - return - } - // 升级 - code = this.module.ConsumeRes(session, curLvData.Starupneed, true) // 消耗检测 - if code != pb.ErrorCode_Success { - return - } - - // 概率升级 - n, _ := rand.Int(rand.Reader, big.NewInt(100)) - - if n.Int64() < int64(curLvData.Probability) { // 可以升级 - bLevelUp = true - } else { // 升级失败了 记录 - _smithy.StoveFloor += 1 - if curLvData.Floors >= _smithy.StoveFloor { // 触发保底 - bLevelUp = true - } - } - if bLevelUp { - _smithy.StoveFloor = 0 // 清理保底数据 - _smithy.StoveLv += 1 - this.module.modelSmithy.CalculationStoveSkillLv(session.GetUserId(), _smithy, _smithy.StoveLv) - } - session.SendMsg(string(this.module.GetType()), SmithyStoveSkillLvResp, &pb.SmithyStoveSkillLvResp{Data: _smithy}) - return -} diff --git a/modules/smithyv2/comp_configure.go b/modules/smithyv2/comp_configure.go deleted file mode 100644 index 16a30fb6e..000000000 --- a/modules/smithyv2/comp_configure.go +++ /dev/null @@ -1,93 +0,0 @@ -package smithyv2 - -import ( - "go_dreamfactory/lego/core" - "go_dreamfactory/lego/sys/log" - "go_dreamfactory/modules" - "go_dreamfactory/sys/configure" - cfg "go_dreamfactory/sys/configure/structs" - "sync" -) - -const ( - game_smithy = "game_smithy.json" - game_smithystove = "game_smithystove.json" -) - -///配置管理基础组件 -type configureComp struct { - modules.MCompConfigure - module *Smithy - hlock sync.RWMutex - _smithyMap map[int64]*cfg.GameSmithyData -} - -//组件初始化接口 -func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { - err = this.MCompConfigure.Init(service, module, comp, options) - this._smithyMap = make(map[int64]*cfg.GameSmithyData, 0) - this.module = module.(*Smithy) - configure.RegisterConfigure(game_smithy, cfg.NewGameSmithy, func() { - if v, err := this.GetConfigure(game_smithy); err == nil { - if configure, ok := v.(*cfg.GameSmithy); ok { - this.hlock.Lock() - defer this.hlock.Unlock() - for _, value := range configure.GetDataList() { - this._smithyMap[int64(value.Type<<16)+int64(value.Star)] = value - } - return - } - } - log.Errorf("get game_pagoda conf err:%v", err) - return - }) - err = this.LoadConfigure(game_smithystove, cfg.NewGameSmithyStove) - return -} - -func (this *configureComp) GetSmithyConfigData(smithyType int32, level int32) (data *cfg.GameSmithyData) { - - return this._smithyMap[int64(smithyType<<16)+int64(level)] -} -func (this *configureComp) GetSmithyTypeConfigData() (mapType map[int32]struct{}) { - mapType = make(map[int32]struct{}, 0) - if v, err := this.GetConfigure(game_smithy); err == nil { - if configure, ok := v.(*cfg.GameSmithy); ok { - for _, v1 := range configure.GetDataList() { - if _, ok := mapType[v1.Type]; !ok { - mapType[v1.Type] = struct{}{} - } - } - return - } - } - return -} - -// 获取炉子配置数据 -func (this *configureComp) GetSmithyStoveConfigData(level int32) (data *cfg.GameSmithyStoveData) { - if v, err := this.GetConfigure(game_smithystove); err == nil { - if configure, ok := v.(*cfg.GameSmithyStove); ok { - data = configure.Get(int32(level)) - return - } - } - return -} - -//加载多个配置文件 -func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) { - for k, v := range confs { - err = configure.RegisterConfigure(k, v, nil) - if err != nil { - log.Errorf("配置文件:%s解析失败!", k) - break - } - } - return -} - -//读取配置数据 -func (this *configureComp) GetConfigure(name string) (v interface{}, err error) { - return configure.GetConfigure(name) -} diff --git a/modules/smithyv2/module.go b/modules/smithyv2/module.go deleted file mode 100644 index cadf12620..000000000 --- a/modules/smithyv2/module.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -模块名:Smithy -描述:铁匠铺模块 -开发:梅雄风 -*/ -package smithyv2 - -import ( - "go_dreamfactory/comm" - "go_dreamfactory/lego/core" - "go_dreamfactory/modules" - "go_dreamfactory/pb" -) - -type Smithy struct { - modules.ModuleBase - modelSmithy *modelSmithy - api *apiComp - configure *configureComp -} - -func NewModule() core.IModule { - return &Smithy{} -} - -func (this *Smithy) GetType() core.M_Modules { - return comm.ModuleSmithy -} - -func (this *Smithy) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { - err = this.ModuleBase.Init(service, module, options) - - return -} - -func (this *Smithy) OnInstallComp() { - this.ModuleBase.OnInstallComp() - this.api = this.RegisterComp(new(apiComp)).(*apiComp) - this.modelSmithy = this.RegisterComp(new(modelSmithy)).(*modelSmithy) - this.configure = this.RegisterComp(new(configureComp)).(*configureComp) -} - -// 接口信息 -func (this *Smithy) ModifySmithyData(uid string, data map[string]interface{}) (code pb.ErrorCode) { - err := this.modelSmithy.modifySmithyDataByObjId(uid, data) - if err != nil { - code = pb.ErrorCode_DBError - } - return -} - -func (this *Smithy) SendRdTask(session comm.IUserSession, Items []*pb.UserAssets) { - var equip map[int32]int32 // key xingji value 数量 - equip = make(map[int32]int32, 0) - for _, v := range Items { - if cfg := this.configure.GetEquipmentConfigureById(v.T); cfg == nil { - equip[cfg.Star]++ - } - } - for k, v := range equip { - this.ModuleRtask.SendToRtask(session, comm.Rtype51, v, k) - } -} From 4d69b0c3dc0a9fa86f551103bcb3ddefa63d2e45 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 14 Feb 2023 14:17:49 +0800 Subject: [PATCH 14/21] =?UTF-8?q?api=20=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/api_forgeequip.go | 35 ++++ modules/smithy/api_getstoveinfo.go | 2 +- modules/smithy/api_orderequip.go | 35 ++++ modules/smithy/api_rise.go | 34 ++++ modules/smithy/api_stoveup.go | 32 ++++ pb/smithy_db.pb.go | 247 +++++++++++++++-------------- pb/smithy_msg.pb.go | 174 +++----------------- 7 files changed, 293 insertions(+), 266 deletions(-) create mode 100644 modules/smithy/api_forgeequip.go create mode 100644 modules/smithy/api_orderequip.go create mode 100644 modules/smithy/api_rise.go create mode 100644 modules/smithy/api_stoveup.go diff --git a/modules/smithy/api_forgeequip.go b/modules/smithy/api_forgeequip.go new file mode 100644 index 000000000..2776c12f4 --- /dev/null +++ b/modules/smithy/api_forgeequip.go @@ -0,0 +1,35 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) ForgeEquipCheck(session comm.IUserSession, req *pb.SmithyForgeEquipReq) (code pb.ErrorCode) { + if req.EquipType == 0 { + code = pb.ErrorCode_ReqParameterError + return + } + return +} + +// 打造装备 +func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEquipReq) (code pb.ErrorCode, data proto.Message) { + var () + + code = this.ForgeEquipCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + session.SendMsg(string(this.module.GetType()), "forgeequip", &pb.SmithyForgeEquipResp{Data: stove}) + return +} diff --git a/modules/smithy/api_getstoveinfo.go b/modules/smithy/api_getstoveinfo.go index 177223f8f..ee80cc7da 100644 --- a/modules/smithy/api_getstoveinfo.go +++ b/modules/smithy/api_getstoveinfo.go @@ -13,7 +13,7 @@ func (this *apiComp) GetStoveInfoCheck(session comm.IUserSession, req *pb.Smithy return } -///获取美食城基本信息 +// 获取铁匠铺信息 func (this *apiComp) GetStoveInfo(session comm.IUserSession, req *pb.SmithyGetStoveInfoReq) (code pb.ErrorCode, data proto.Message) { code = this.GetStoveInfoCheck(session, req) diff --git a/modules/smithy/api_orderequip.go b/modules/smithy/api_orderequip.go new file mode 100644 index 000000000..2077d094d --- /dev/null +++ b/modules/smithy/api_orderequip.go @@ -0,0 +1,35 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) OrderEquipCheck(session comm.IUserSession, req *pb.SmithyOrderEquipReq) (code pb.ErrorCode) { + if req.SuiteId == 0 || req.Position == 0 { + code = pb.ErrorCode_ReqParameterError + return + } + return +} + +// 打造装备 +func (this *apiComp) OrderEquip(session comm.IUserSession, req *pb.SmithyOrderEquipReq) (code pb.ErrorCode, data proto.Message) { + var () + + code = this.OrderEquipCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + session.SendMsg(string(this.module.GetType()), "orderequip", &pb.SmithyOrderEquipResp{Data: stove}) + return +} diff --git a/modules/smithy/api_rise.go b/modules/smithy/api_rise.go new file mode 100644 index 000000000..49a203fbe --- /dev/null +++ b/modules/smithy/api_rise.go @@ -0,0 +1,34 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) RiseCheck(session comm.IUserSession, req *pb.SmithyRiseReq) (code pb.ErrorCode) { + if req.ItemId != "" && req.Count == 0 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +// 炉子升温 +func (this *apiComp) Rise(session comm.IUserSession, req *pb.SmithyRiseReq) (code pb.ErrorCode, data proto.Message) { + var () + + code = this.RiseCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + session.SendMsg(string(this.module.GetType()), "rise", &pb.SmithyRiseResp{Data: stove}) + return +} diff --git a/modules/smithy/api_stoveup.go b/modules/smithy/api_stoveup.go new file mode 100644 index 000000000..e2c37284a --- /dev/null +++ b/modules/smithy/api_stoveup.go @@ -0,0 +1,32 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) StrveUpCheck(session comm.IUserSession, req *pb.SmithyStoveUpReq) (code pb.ErrorCode) { + + return +} + +// 炉子升级 +func (this *apiComp) StrveUp(session comm.IUserSession, req *pb.SmithyStoveUpReq) (code pb.ErrorCode, data proto.Message) { + var () + + code = this.StrveUpCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + session.SendMsg(string(this.module.GetType()), "stoveup", &pb.SmithyStoveUpResp{Data: stove}) + return +} diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index d6f0a8400..49546fd46 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -31,9 +31,10 @@ type DBStove struct { Lv int32 `protobuf:"varint,3,opt,name=lv,proto3" json:"lv"` // 炉子等级 Data map[int32]int32 `protobuf:"bytes,4,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 熟练度 Skill map[int32]int32 `protobuf:"bytes,5,rep,name=skill,proto3" json:"skill" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 台子技能 - Temperature int32 `protobuf:"varint,6,opt,name=temperature,proto3" json:"temperature"` // 炉子温度 - RecoveTime int64 `protobuf:"varint,7,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间 - Business int32 `protobuf:"varint,8,opt,name=business,proto3" json:"business"` // + Forge map[int32]int32 `protobuf:"bytes,6,rep,name=forge,proto3" json:"forge" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 打造次数 + Temperature int32 `protobuf:"varint,7,opt,name=temperature,proto3" json:"temperature"` // 炉子温度 + RecoveTime int64 `protobuf:"varint,8,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间 + Business int32 `protobuf:"varint,9,opt,name=business,proto3" json:"business"` // } func (x *DBStove) Reset() { @@ -103,6 +104,13 @@ func (x *DBStove) GetSkill() map[int32]int32 { return nil } +func (x *DBStove) GetForge() map[int32]int32 { + if x != nil { + return x.Forge + } + return nil +} + func (x *DBStove) GetTemperature() int32 { if x != nil { return x.Temperature @@ -653,7 +661,7 @@ var File_smithy_smithy_db_proto protoreflect.FileDescriptor var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x02, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x03, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 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, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, @@ -662,97 +670,104 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, - 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, - 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, - 0x65, 0x73, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, - 0x65, 0x73, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x29, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, 0x2e, 0x46, + 0x6f, 0x72, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x67, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0x37, + 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x38, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x67, 0x65, 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, 0x22, 0x70, 0x0a, 0x0a, 0x44, + 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x68, 0x6f, + 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, + 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, + 0x73, 0x68, 0x6f, 0x70, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 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, 0x22, 0x8b, 0x01, + 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x44, 0x61, 0x74, 0x61, + 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, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, + 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x08, + 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 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, 0x2d, 0x0a, 0x06, 0x74, 0x75, + 0x6a, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x54, + 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x2e, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6c, 0x69, + 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, + 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 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, 0x38, 0x0a, 0x0a, - 0x53, 0x6b, 0x69, 0x6c, 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, 0x22, 0x70, 0x0a, 0x0a, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, - 0x6e, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, - 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x1a, - 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 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, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x42, - 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x44, 0x61, 0x74, 0x61, 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, 0x1f, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, - 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x54, 0x75, 0x6a, - 0x69, 0x61, 0x6e, 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, 0x2d, 0x0a, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, - 0x2e, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x75, - 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, - 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x46, - 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, - 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, - 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, - 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, - 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, - 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, - 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, - 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, - 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, - 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, - 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, - 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, - 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, - 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, - 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, - 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, - 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, - 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, - 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, - 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 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, + 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x67, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, + 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, + 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, + 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, + 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, + 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, + 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, + 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, + 0x6c, 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, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, + 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 ( @@ -767,7 +782,7 @@ func file_smithy_smithy_db_proto_rawDescGZIP() []byte { return file_smithy_smithy_db_proto_rawDescData } -var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_smithy_smithy_db_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_smithy_smithy_db_proto_goTypes = []interface{}{ (*DBStove)(nil), // 0: DBStove (*DBBusiness)(nil), // 1: DBBusiness @@ -779,29 +794,31 @@ var file_smithy_smithy_db_proto_goTypes = []interface{}{ (*DBSmithy)(nil), // 7: DBSmithy nil, // 8: DBStove.DataEntry nil, // 9: DBStove.SkillEntry - nil, // 10: DBBusiness.ShopEntry - nil, // 11: DBTujian.TujianEntry - nil, // 12: DBSmithy.SkillEntry - nil, // 13: DBSmithy.DeskFloorEntry - (*UserAssets)(nil), // 14: UserAssets + nil, // 10: DBStove.ForgeEntry + nil, // 11: DBBusiness.ShopEntry + nil, // 12: DBTujian.TujianEntry + nil, // 13: DBSmithy.SkillEntry + nil, // 14: DBSmithy.DeskFloorEntry + (*UserAssets)(nil), // 15: UserAssets } var file_smithy_smithy_db_proto_depIdxs = []int32{ 8, // 0: DBStove.data:type_name -> DBStove.DataEntry 9, // 1: DBStove.skill:type_name -> DBStove.SkillEntry - 10, // 2: DBBusiness.shop:type_name -> DBBusiness.ShopEntry - 1, // 3: DBBusinessData.data:type_name -> DBBusiness - 11, // 4: DBTujian.tujian:type_name -> DBTujian.TujianEntry - 5, // 5: DBSmithy.clang:type_name -> Clang - 6, // 6: DBSmithy.orders:type_name -> OrderClang - 14, // 7: DBSmithy.items:type_name -> UserAssets - 12, // 8: DBSmithy.skill:type_name -> DBSmithy.SkillEntry - 13, // 9: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry - 4, // 10: DBTujian.TujianEntry.value:type_name -> ForgeData - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 10, // 2: DBStove.forge:type_name -> DBStove.ForgeEntry + 11, // 3: DBBusiness.shop:type_name -> DBBusiness.ShopEntry + 1, // 4: DBBusinessData.data:type_name -> DBBusiness + 12, // 5: DBTujian.tujian:type_name -> DBTujian.TujianEntry + 5, // 6: DBSmithy.clang:type_name -> Clang + 6, // 7: DBSmithy.orders:type_name -> OrderClang + 15, // 8: DBSmithy.items:type_name -> UserAssets + 13, // 9: DBSmithy.skill:type_name -> DBSmithy.SkillEntry + 14, // 10: DBSmithy.deskFloor:type_name -> DBSmithy.DeskFloorEntry + 4, // 11: DBTujian.TujianEntry.value:type_name -> ForgeData + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_smithy_smithy_db_proto_init() } @@ -914,7 +931,7 @@ func file_smithy_smithy_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_db_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 15, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/smithy_msg.pb.go b/pb/smithy_msg.pb.go index 262330c1a..0fbe0ff3e 100644 --- a/pb/smithy_msg.pb.go +++ b/pb/smithy_msg.pb.go @@ -1368,101 +1368,6 @@ func (x *SmithyGetListResp) GetData() *DBSmithy { return nil } -// 贸易 -type SmithyTradeReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ItemId []string `protobuf:"bytes,1,rep,name=itemId,proto3" json:"itemId"` //物品ID -} - -func (x *SmithyTradeReq) Reset() { - *x = SmithyTradeReq{} - if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SmithyTradeReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SmithyTradeReq) ProtoMessage() {} - -func (x *SmithyTradeReq) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[28] - 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 SmithyTradeReq.ProtoReflect.Descriptor instead. -func (*SmithyTradeReq) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{28} -} - -func (x *SmithyTradeReq) GetItemId() []string { - if x != nil { - return x.ItemId - } - return nil -} - -type SmithyTradeResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IsSucc bool `protobuf:"varint,1,opt,name=isSucc,proto3" json:"isSucc"` -} - -func (x *SmithyTradeResp) Reset() { - *x = SmithyTradeResp{} - if protoimpl.UnsafeEnabled { - mi := &file_smithy_smithy_msg_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SmithyTradeResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SmithyTradeResp) ProtoMessage() {} - -func (x *SmithyTradeResp) ProtoReflect() protoreflect.Message { - mi := &file_smithy_smithy_msg_proto_msgTypes[29] - 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 SmithyTradeResp.ProtoReflect.Descriptor instead. -func (*SmithyTradeResp) Descriptor() ([]byte, []int) { - return file_smithy_smithy_msg_proto_rawDescGZIP(), []int{29} -} - -func (x *SmithyTradeResp) GetIsSucc() bool { - if x != nil { - return x.IsSucc - } - return false -} - var File_smithy_smithy_msg_proto protoreflect.FileDescriptor var file_smithy_smithy_msg_proto_rawDesc = []byte{ @@ -1562,13 +1467,8 @@ var file_smithy_smithy_msg_proto_rawDesc = []byte{ 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x28, 0x0a, 0x0e, 0x53, 0x6d, 0x69, 0x74, - 0x68, 0x79, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x74, - 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x74, 0x65, 0x6d, - 0x49, 0x64, 0x22, 0x29, 0x0a, 0x0f, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, - 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1583,7 +1483,7 @@ func file_smithy_smithy_msg_proto_rawDescGZIP() []byte { return file_smithy_smithy_msg_proto_rawDescData } -var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_smithy_smithy_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_smithy_smithy_msg_proto_goTypes = []interface{}{ (*SmithyGetStoveInfoReq)(nil), // 0: SmithyGetStoveInfoReq (*SmithyGetStoveInfoResp)(nil), // 1: SmithyGetStoveInfoResp @@ -1613,30 +1513,28 @@ var file_smithy_smithy_msg_proto_goTypes = []interface{}{ (*SmithyGetRandUserResp)(nil), // 25: SmithyGetRandUserResp (*SmithyGetListReq)(nil), // 26: SmithyGetListReq (*SmithyGetListResp)(nil), // 27: SmithyGetListResp - (*SmithyTradeReq)(nil), // 28: SmithyTradeReq - (*SmithyTradeResp)(nil), // 29: SmithyTradeResp - (*DBStove)(nil), // 30: DBStove - (*DBBusiness)(nil), // 31: DBBusiness - (*OrderClang)(nil), // 32: OrderClang - (*DBSmithy)(nil), // 33: DBSmithy - (*DBUser)(nil), // 34: DBUser + (*DBStove)(nil), // 28: DBStove + (*DBBusiness)(nil), // 29: DBBusiness + (*OrderClang)(nil), // 30: OrderClang + (*DBSmithy)(nil), // 31: DBSmithy + (*DBUser)(nil), // 32: DBUser } var file_smithy_smithy_msg_proto_depIdxs = []int32{ - 30, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove - 30, // 1: SmithyForgeEquipResp.data:type_name -> DBStove - 30, // 2: SmithyOrderEquipResp.data:type_name -> DBStove - 30, // 3: SmithyStoveUpResp.data:type_name -> DBStove - 30, // 4: SmithyRiseResp.data:type_name -> DBStove - 30, // 5: SmithyToolsUpResp.data:type_name -> DBStove - 31, // 6: SmithyRefreshShopResp.data:type_name -> DBBusiness - 31, // 7: SmithySellItemResp.data:type_name -> DBBusiness - 32, // 8: SmithyCreateOrderReq.order:type_name -> OrderClang - 33, // 9: SmithyCreateOrderResp.data:type_name -> DBSmithy - 33, // 10: SmithyGetRewardResp.data:type_name -> DBSmithy - 33, // 11: SmithyDeskSkillLvResp.data:type_name -> DBSmithy - 33, // 12: SmithyStoveSkillLvResp.data:type_name -> DBSmithy - 34, // 13: SmithyGetRandUserResp.user:type_name -> DBUser - 33, // 14: SmithyGetListResp.data:type_name -> DBSmithy + 28, // 0: SmithyGetStoveInfoResp.data:type_name -> DBStove + 28, // 1: SmithyForgeEquipResp.data:type_name -> DBStove + 28, // 2: SmithyOrderEquipResp.data:type_name -> DBStove + 28, // 3: SmithyStoveUpResp.data:type_name -> DBStove + 28, // 4: SmithyRiseResp.data:type_name -> DBStove + 28, // 5: SmithyToolsUpResp.data:type_name -> DBStove + 29, // 6: SmithyRefreshShopResp.data:type_name -> DBBusiness + 29, // 7: SmithySellItemResp.data:type_name -> DBBusiness + 30, // 8: SmithyCreateOrderReq.order:type_name -> OrderClang + 31, // 9: SmithyCreateOrderResp.data:type_name -> DBSmithy + 31, // 10: SmithyGetRewardResp.data:type_name -> DBSmithy + 31, // 11: SmithyDeskSkillLvResp.data:type_name -> DBSmithy + 31, // 12: SmithyStoveSkillLvResp.data:type_name -> DBSmithy + 32, // 13: SmithyGetRandUserResp.user:type_name -> DBUser + 31, // 14: SmithyGetListResp.data:type_name -> DBSmithy 15, // [15:15] is the sub-list for method output_type 15, // [15:15] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name @@ -1988,30 +1886,6 @@ func file_smithy_smithy_msg_proto_init() { return nil } } - file_smithy_smithy_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyTradeReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_smithy_smithy_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmithyTradeResp); 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{ @@ -2019,7 +1893,7 @@ func file_smithy_smithy_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_smithy_smithy_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 30, + NumMessages: 28, NumExtensions: 0, NumServices: 0, }, From 01476853e015cf6f0b72c330da9c7f849afeb360 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 14 Feb 2023 14:53:46 +0800 Subject: [PATCH 15/21] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=88=87=E7=A3=8Bpvp?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/friend/api_cross_qiecuo.go | 23 +++++++++-------------- modules/friend/model_qiecuo.go | 15 +++++++++------ modules/smithy/api_trade.go | 2 +- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/modules/friend/api_cross_qiecuo.go b/modules/friend/api_cross_qiecuo.go index 1599e31b7..be3dad986 100644 --- a/modules/friend/api_cross_qiecuo.go +++ b/modules/friend/api_cross_qiecuo.go @@ -1,6 +1,7 @@ package friend import ( + "errors" "go_dreamfactory/comm" "go_dreamfactory/pb" @@ -25,21 +26,15 @@ func (this *apiComp) Qiecuo(session comm.IUserSession, req *pb.FriendQiecuoReq) return } - //校验目标是否已正在切磋 - if targetQr := this.moduleFriend.ModelFriendQiecuo.getQiecuo(req.TargetUid); targetQr != nil { - code = pb.ErrorCode_FriendQiecuoTargetPk - return - } - - qr, err := this.moduleFriend.ModelFriendQiecuo.createQiecuoRecord(session.GetUserId(), req.TargetUid) + //切磋请求处理 + err := this.moduleFriend.ModelFriendQiecuo.qiecuoReq(session.GetUserId(), req.TargetUid) if err != nil { - code = pb.ErrorCode_DBError - return - } - - //判断是否切磋中 - if qr.MatchId != "" { - code = pb.ErrorCode_FriendQiecuoing + var customErr = new(comm.CustomError) + if errors.As(err, &customErr) { + code = customErr.Code + } else { + code = pb.ErrorCode_DBError + } return } diff --git a/modules/friend/model_qiecuo.go b/modules/friend/model_qiecuo.go index b9a865e41..1a6c12c1a 100644 --- a/modules/friend/model_qiecuo.go +++ b/modules/friend/model_qiecuo.go @@ -37,10 +37,11 @@ func (this *ModelFriendQiecuo) getQiecuo(uid string) *pb.QiecuoRecord { return record } -// 保存切磋记录 -func (this *ModelFriendQiecuo) createQiecuoRecord(uid, targetUid string) (*pb.QiecuoRecord, error) { +// 切磋请求处理 +func (this *ModelFriendQiecuo) qiecuoReq(uid, targetUid string) error { qr := this.getQiecuo(uid) if qr == nil { + //创建切磋记录 qr = &pb.QiecuoRecord{ Uid: uid, TargetId: targetUid, @@ -49,25 +50,27 @@ func (this *ModelFriendQiecuo) createQiecuoRecord(uid, targetUid string) (*pb.Qi } if err := this.Add(uid, qr); err != nil { this.moduleFriend.Errorln(err) - return nil, err + return err } } else { //如果目标未接受且在超时时间内,不允许再次发送 now := configure.Now().Unix() if qr.Status == 1 && now-qr.Timestamp < 10 { - return qr, comm.NewCustomError(pb.ErrorCode_FriendQiecuoRequested) + return comm.NewCustomError(pb.ErrorCode_FriendQiecuoRequested) + } else if qr.Status == 2 || qr.MatchId != "" { + return comm.NewCustomError(pb.ErrorCode_FriendQiecuoing) } else { update := map[string]interface{}{ "targetId": targetUid, "timestamp": configure.Now().Unix(), } if err := this.Change(uid, update); err != nil { - return nil, err + return err } } } - return qr, nil + return nil } // 更新切磋记录 diff --git a/modules/smithy/api_trade.go b/modules/smithy/api_trade.go index 90fc2f7e7..61a53e49e 100644 --- a/modules/smithy/api_trade.go +++ b/modules/smithy/api_trade.go @@ -7,6 +7,6 @@ import ( // 贸易 -func (this *apiComp) TradeCheck(session comm.IUserSession, req *pb.SmithyTradeReq) (code pb.ErrorCode) { +func (this *apiComp) TradeCheck(session comm.IUserSession, req *pb.SmithySellItemReq) (code pb.ErrorCode) { return } From 80688110a50349fe5ca43f96094773dc8d5c2eb6 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 14 Feb 2023 17:03:40 +0800 Subject: [PATCH 16/21] =?UTF-8?q?=E5=AE=9E=E6=97=B6pvp=E6=96=AD=E7=BA=BF?= =?UTF-8?q?=E9=87=8D=E8=BF=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/autoBattle/model_auto.go | 2 +- modules/battle/battleclientmgr.go | 6 +- modules/battle/module.go | 2 +- modules/comp_model.go | 4 +- modules/equipment/modelEquipment.go | 4 +- modules/gateway/agentmgr_comp.go | 20 ++ modules/gateway/configure_comp.go | 2 + modules/hero/model_hero.go | 4 +- modules/items/modelitems.go | 6 +- modules/mline/model_mainline.go | 2 +- modules/modulebase.go | 9 +- modules/moonfantasy/modelDream.go | 2 +- modules/pvp/api_incmd.go | 18 +- modules/pvp/api_into.go | 4 + modules/pvp/api_list.go | 57 +++++ modules/pvp/modelPvp.go | 4 +- modules/pvp/module.go | 70 +++--- modules/sociaty/model_sociaty.go | 4 +- modules/sociaty/model_sociatytask.go | 2 +- modules/user/module.go | 13 +- pb/battle_struct.pb.go | 82 ++++++- pb/pvp_msg.pb.go | 339 ++++++++++++++++----------- sys/db/dbmodel.go | 7 +- 23 files changed, 448 insertions(+), 215 deletions(-) create mode 100644 modules/pvp/api_list.go diff --git a/modules/autoBattle/model_auto.go b/modules/autoBattle/model_auto.go index cd52ea16b..b7e329fb8 100644 --- a/modules/autoBattle/model_auto.go +++ b/modules/autoBattle/model_auto.go @@ -35,7 +35,7 @@ func (this *modelAutoBattle) ChangeListByObjId(uid string, id string, data map[s // 删除自动战斗信息 func (this *modelAutoBattle) DelListByObjId(uid string, id string) error { - err := this.DelListlds(uid, id) + err := this.DelListlds(uid, []string{id}) return err } diff --git a/modules/battle/battleclientmgr.go b/modules/battle/battleclientmgr.go index 43f2d2fec..dd37984ec 100644 --- a/modules/battle/battleclientmgr.go +++ b/modules/battle/battleclientmgr.go @@ -71,10 +71,10 @@ func (this *battleClientMgrComp) CheckBattle(ctx context.Context, req *pb.Battle } //实时pvp战斗创建 -func (this *battleClientMgrComp) GetInfo(ctx context.Context, req *pb.BattleGetInfoReq) (reply *pb.BattleGetInfoReq, err error) { - this.module.Debug("CreateBattle", log.Field{Key: "req", Value: req}) +func (this *battleClientMgrComp) GetInfo(ctx context.Context, req *pb.BattleGetInfoReq) (reply *pb.BattleGetInfoResp, err error) { + this.module.Debug("GetInfo", log.Field{Key: "req", Value: req}) - reply = &pb.BattleGetInfoReq{} + reply = &pb.BattleGetInfoResp{} if err = this.clinet.callBattle(ctx, "GetInfo", req, reply); err != nil { this.module.Errorln(err) } diff --git a/modules/battle/module.go b/modules/battle/module.go index f65948e22..aa17d976a 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -221,7 +221,7 @@ func (this *Battle) CreateRtPvpBattle(req *pb.BattleRTPVPReq) (code pb.ErrorCode } ///获取战斗详情 -func (this *Battle) GetBattleInfo(req *pb.BattleGetInfoReq) (code pb.ErrorCode, resp *pb.BattleGetInfoReq) { +func (this *Battle) GetBattleInfo(req *pb.BattleGetInfoReq) (code pb.ErrorCode, resp *pb.BattleGetInfoResp) { this.Debug("GetBattleInfo", log.Field{Key: "req", Value: req}) var ( ctx context.Context diff --git a/modules/comp_model.go b/modules/comp_model.go index cadaeb6ea..ef50507b0 100644 --- a/modules/comp_model.go +++ b/modules/comp_model.go @@ -149,8 +149,8 @@ func (this *MCompModel) DelByUId(uid string, opt ...db.DBOption) (err error) { } //删除多条数据 -func (this *MCompModel) DelListlds(uid string, ids ...string) (err error) { - return this.DBModel.DelListlds(uid, ids...) +func (this *MCompModel) DelListlds(uid string, ids []string, opt ...db.DBOption) (err error) { + return this.DBModel.DelListlds(uid, ids, opt...) } //批量删除数据 diff --git a/modules/equipment/modelEquipment.go b/modules/equipment/modelEquipment.go index 14146da05..00183cf3f 100644 --- a/modules/equipment/modelEquipment.go +++ b/modules/equipment/modelEquipment.go @@ -188,13 +188,13 @@ func (this *modelEquipmentComp) DelEquipments(uId string, eIds []string) (change if model, err = this.module.GetDBModuleByUid(uId, this.TableName, this.Expired); err != nil { this.module.Errorln(err) } else { - if err = model.DelListlds(uId, eIds...); err != nil { + if err = model.DelListlds(uId, eIds); err != nil { this.module.Errorln(err) return } } } else { - if err = this.DelListlds(uId, eIds...); err != nil { + if err = this.DelListlds(uId, eIds); err != nil { this.module.Errorln(err) return } diff --git a/modules/gateway/agentmgr_comp.go b/modules/gateway/agentmgr_comp.go index 0b811f83f..1cbc4847a 100644 --- a/modules/gateway/agentmgr_comp.go +++ b/modules/gateway/agentmgr_comp.go @@ -37,6 +37,11 @@ func (this *AgentMgrComp) Init(service core.IService, module core.IModule, comp return } +func (this *AgentMgrComp) Start() (err error) { + err = this.ModuleCompBase.Start() + return +} + // Connect 加入新的用户 func (this *AgentMgrComp) Connect(a IAgent) { this.agents.Store(a.SessionId(), a) @@ -191,3 +196,18 @@ func (this *AgentMgrComp) CloseAgent(ctx context.Context, args *pb.AgentCloseeRe } return nil } + +// 用户代理心跳 维护session表对象 +func (this *AgentMgrComp) agentsHeartbeat() { + // var ( + // loadpipe *pipe.RedisPipe + // loadpipe *pipe.RedisPipe + // ) + // this.agents.Range(func(key, value any) bool { + // agent := value.(IAgent) + // if agent.UserId() != "" { //只发送登录用户 + + // } + // return true + // }) +} diff --git a/modules/gateway/configure_comp.go b/modules/gateway/configure_comp.go index 76da9ccbb..7503a3010 100644 --- a/modules/gateway/configure_comp.go +++ b/modules/gateway/configure_comp.go @@ -25,6 +25,8 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp return } + + // GetMsgDistribute 获取消息分发规则读取配置表 func (this *configureComp) GetMsgDistribute(msgmid, msguid string) (rule string, ok bool) { var ( diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 330b416dc..677dd2c47 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -185,7 +185,7 @@ func (this *ModelHero) consumeHeroCard(uid string, hero *pb.DBHero, count int32) } hero.SameCount -= count // 数量-1 if hero.SameCount == 0 { - if err := this.DelListlds(uid, hero.Id); err != nil { + if err := this.DelListlds(uid, []string{hero.Id}); err != nil { this.moduleHero.Errorf("%v", err) } } else { @@ -482,7 +482,7 @@ func (this *ModelHero) ChangeHeroProperty(session comm.IUserSession, hero *pb.DB func (this *ModelHero) cleanData(uid string) { userList := this.moduleHero.GetHeroList(uid) for _, v := range userList { - if err := this.DelListlds(uid, v.Id); err != nil { + if err := this.DelListlds(uid, []string{v.Id}); err != nil { this.moduleHero.Errorf("cleanData err:%v", err) } } diff --git a/modules/items/modelitems.go b/modules/items/modelitems.go index 742874cfa..d7e795f26 100644 --- a/modules/items/modelitems.go +++ b/modules/items/modelitems.go @@ -175,13 +175,13 @@ func (this *ModelItemsComp) DeleteUserPack(uid string, itmes ...*pb.DB_UserItemD if model, err = this.module.GetDBModuleByUid(uid, this.TableName, this.Expired); err != nil { this.module.Errorln(err) } else { - if err = model.DelListlds(uid, gridIds...); err != nil { + if err = model.DelListlds(uid, gridIds); err != nil { this.module.Errorf("err:%v", err) return } } } else { - if err = this.DelListlds(uid, gridIds...); err != nil { + if err = this.DelListlds(uid, gridIds); err != nil { this.module.Errorf("err:%v", err) return } @@ -195,7 +195,7 @@ func (this *ModelItemsComp) QueryUserPackItemsAmount(uId string, itemid ...strin itmes []*pb.DB_UserItemData err error ) - + if itmes, err = this.QueryUserPack(uId); err != nil { this.module.Errorf("err:%v", err) return diff --git a/modules/mline/model_mainline.go b/modules/mline/model_mainline.go index 9563316ac..0493ea022 100644 --- a/modules/mline/model_mainline.go +++ b/modules/mline/model_mainline.go @@ -72,7 +72,7 @@ func (this *ModelMline) cleanChapter(uId string) (err error) { // 清除数据 func (this *ModelMline) cleanChapterDataById(uId string, ids ...string) (err error) { - if err = this.DelListlds(uId, ids...); err != nil { + if err = this.DelListlds(uId, ids); err != nil { this.module.Errorf("err:%v", err) return } diff --git a/modules/modulebase.go b/modules/modulebase.go index cf574d9cc..7990fe405 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -188,7 +188,8 @@ func (this *ModuleBase) SendMsgToUsers(mainType, subType string, msg proto.Messa data, _ := anypb.New(msg) for k, v := range gateways { for k1, v1 := range v { - if _, err = this.service.AcrossClusterRpcGo(context.Background(), k, fmt.Sprintf("%s/%s", comm.Service_Gateway, k1), string(comm.Rpc_GatewaySendBatchMsg), &pb.BatchMessageReq{ + ctx, _ := context.WithTimeout(context.Background(), time.Second*5) + if _, err = this.service.AcrossClusterRpcGo(ctx, k, fmt.Sprintf("%s/%s", comm.Service_Gateway, k1), string(comm.Rpc_GatewaySendBatchMsg), &pb.BatchMessageReq{ UserSessionIds: v1, MainType: mainType, SubType: subType, @@ -223,7 +224,8 @@ func (this *ModuleBase) SendMsgToCUsers(mainType, subType string, msg proto.Mess data, _ := anypb.New(msg) for k, v := range gateways { for k1, v1 := range v { - if _, err = this.service.AcrossClusterRpcGo(context.Background(), k, fmt.Sprintf("%s/%s", comm.Service_Gateway, k1), string(comm.Rpc_GatewaySendBatchMsg), &pb.BatchMessageReq{ + ctx, _ := context.WithTimeout(context.Background(), time.Second*5) + if _, err = this.service.AcrossClusterRpcGo(ctx, k, fmt.Sprintf("%s/%s", comm.Service_Gateway, k1), string(comm.Rpc_GatewaySendBatchMsg), &pb.BatchMessageReq{ UserSessionIds: v1, MainType: mainType, SubType: subType, @@ -258,7 +260,8 @@ func (this *ModuleBase) SendMsgToSession(mainType, subType string, msg proto.Mes data, _ := anypb.New(msg) for k, v := range gateways { for k1, v1 := range v { - if _, err = this.service.AcrossClusterRpcGo(context.Background(), k, fmt.Sprintf("%s/%s", comm.Service_Gateway, k1), string(comm.Rpc_GatewaySendBatchMsg), &pb.BatchMessageReq{ + ctx, _ := context.WithTimeout(context.Background(), time.Second*5) + if _, err = this.service.AcrossClusterRpcGo(ctx, k, fmt.Sprintf("%s/%s", comm.Service_Gateway, k1), string(comm.Rpc_GatewaySendBatchMsg), &pb.BatchMessageReq{ UserSessionIds: v1, MainType: mainType, SubType: subType, diff --git a/modules/moonfantasy/modelDream.go b/modules/moonfantasy/modelDream.go index a49016a1f..e2e6dbcc0 100644 --- a/modules/moonfantasy/modelDream.go +++ b/modules/moonfantasy/modelDream.go @@ -242,7 +242,7 @@ func (this *modelDreamComp) delaynoticeWorld(mid string, chat *pb.DBChat) { func (this *modelDreamComp) checkMFantasyExpiration(mf *pb.DBMoonFantasy) bool { if configure.Now().After(time.Unix(mf.Expir, 0)) { //已过期 - this.DelListlds("", mf.Id) + this.DelListlds("", []string{mf.Id}) return true } return false diff --git a/modules/pvp/api_incmd.go b/modules/pvp/api_incmd.go index cf97c1558..f93d5cbd1 100644 --- a/modules/pvp/api_incmd.go +++ b/modules/pvp/api_incmd.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/timewheel" "go_dreamfactory/pb" + "time" "google.golang.org/protobuf/proto" ) @@ -32,6 +33,19 @@ func (this *apiComp) InCmd(session comm.IUserSession, req *pb.PvpInCmdReq) (code } else { side = 2 } + //不该自己出手 + if battle.curroperate.Side != side { + session.SendMsg(string(this.module.GetType()), "incmd", &pb.PvpInCmdResp{Code: pb.ErrorCode_BattleInCmdFailed, Battleid: req.Battleid, Cmd: req.Cmd}) + return + } + + //请求倒计时开始 + if req.Cmd.Cmdtype == "ComEmitCountdown" { + battle.operatetimer = timewheel.Add(time.Second*30, this.module.operateTimeOut, battle.Id) + session.SendMsg(string(this.module.GetType()), "incmd", &pb.PvpInCmdResp{Battleid: req.Battleid, Cmd: req.Cmd}) + return + } + //技能释放指令 if code = this.module.battle.InCmdBattle(&pb.BattleInCmdReq{ Battleid: req.Battleid, Side: side, @@ -39,7 +53,9 @@ func (this *apiComp) InCmd(session comm.IUserSession, req *pb.PvpInCmdReq) (code }); code != pb.ErrorCode_Success { return } else { - timewheel.Remove(battle.operatetimer) + if battle.operatetimer != nil { + timewheel.Remove(battle.operatetimer) + } } } else { code = pb.ErrorCode_BattleInCmdFailed diff --git a/modules/pvp/api_into.go b/modules/pvp/api_into.go index 9dd1e0eec..a81c57f5e 100644 --- a/modules/pvp/api_into.go +++ b/modules/pvp/api_into.go @@ -30,11 +30,15 @@ func (this *apiComp) Into(session comm.IUserSession, req *pb.PvpIntoReq) (code p if cd, resp = this.module.battle.GetBattleInfo(&pb.BattleGetInfoReq{ Battleid: req.Battleid, }); cd == pb.ErrorCode_Success { + battle.lock.Lock() if session.GetUserId() == battle.Red.Uid { battle.RedOffline = false + battle.RedSession.SetSession(session.GetIP(), session.GetSessionId(), session.GetServiecTag(), session.GetGatewayServiceId(), session.GetUserId()) } else { battle.BlueOffline = false + battle.RedSession.SetSession(session.GetIP(), session.GetSessionId(), session.GetServiecTag(), session.GetGatewayServiceId(), session.GetUserId()) } + battle.lock.Unlock() } } else { cd = pb.ErrorCode_BattleInCmdFailed diff --git a/modules/pvp/api_list.go b/modules/pvp/api_list.go new file mode 100644 index 000000000..687bf39b6 --- /dev/null +++ b/modules/pvp/api_list.go @@ -0,0 +1,57 @@ +package pvp + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.PvpListReq) (code pb.ErrorCode) { + return +} + +///设置战斗阵型 +func (this *apiComp) List(session comm.IUserSession, req *pb.PvpListReq) (code pb.ErrorCode, data proto.Message) { + var ( + result []*pb.DBPvpBattle + userpvp []*pb.DBPvpBattle + list []*pb.DBPvpBattle + + err error + ) + if code = this.ListCheck(session, req); code != pb.ErrorCode_Success { + return + } + + defer func() { + session.SendMsg(string(this.module.GetType()), "list", &pb.PvpListResp{List: list}) + }() + + if result, err = this.module.modelPvpComp.querypvps(); err != nil { + this.module.Errorln(err) + return + } + + userpvp = make([]*pb.DBPvpBattle, 0, len(userpvp)) + for _, v := range result { + if v.Red.Uid == session.GetUserId() || v.Blue.Uid == session.GetUserId() { + userpvp = append(userpvp, v) + } + } + if len(userpvp) <= 0 { + return + } + for _, v := range result { + list = append(list, &pb.DBPvpBattle{ + Id: v.Id, + ServicePath: v.ServicePath, + Ptype: v.Ptype, + State: v.State, + Red: v.Red, + Blue: v.Blue, + }) + } + return +} diff --git a/modules/pvp/modelPvp.go b/modules/pvp/modelPvp.go index 8e35b9388..547093d41 100644 --- a/modules/pvp/modelPvp.go +++ b/modules/pvp/modelPvp.go @@ -30,7 +30,7 @@ func (this *modelPvpComp) Init(service core.IService, module core.IModule, comp //查询用户重置数据 func (this *modelPvpComp) querypvps() (result []*pb.DBPvpBattle, err error) { result = make([]*pb.DBPvpBattle, 0) - if err = this.GetList("", result); err != nil && err != mgo.MongodbNil { + if err = this.GetList("", &result); err != nil && err != mgo.MongodbNil { this.module.Errorf("err:%v", err) } if err == mgo.MongodbNil { @@ -49,7 +49,7 @@ func (this *modelPvpComp) addpvp(battle *pb.DBPvpBattle) (err error) { //删除pvp记录 func (this *modelPvpComp) delpvp(battleid string) (err error) { - if err = this.Del(battleid, db.SetDBMgoLog(false)); err != nil { + if err = this.DelListlds("", []string{battleid}, db.SetDBMgoLog(false)); err != nil { this.module.Errorln(err) } return diff --git a/modules/pvp/module.go b/modules/pvp/module.go index 424a3b5a9..7356e1274 100644 --- a/modules/pvp/module.go +++ b/modules/pvp/module.go @@ -63,7 +63,7 @@ func (this *Pvp) Start() (err error) { return } this.friend = module.(comm.IFriend) - event.RegisterGO(comm.EventUserLogin, this.userlogin) + // event.RegisterGO(comm.EventUserLogin, this.userlogin) event.RegisterGO(comm.EventUserOffline, this.useroffline) return } @@ -132,12 +132,14 @@ func (this *Pvp) PvpOutCmdPush(out *pb.PvpOutCmdPush) { battle, ok = this.battles[out.Battleid] this.lock.RUnlock() if ok { + battle.lock.Lock() if err = this.SendMsgToSession(string(comm.ModulePvp), "outcmd", &pb.PvpOutCmdPush{ Battleid: battle.Id, Cmd: out.Cmd, }, battle.RedSession, battle.BlueSession); err != nil { this.Errorln(err) } + battle.lock.Unlock() for _, v := range out.Cmd { if v.Cmdtype == "ComWaitInputSkill" { if err = proto.Unmarshal(v.Value, battle.curroperate); err != nil { @@ -173,7 +175,6 @@ func (this *Pvp) PvpOutCmdPush(out *pb.PvpOutCmdPush) { } return } - battle.operatetimer = timewheel.Add(time.Second*60, this.operateTimeOut, battle.Id) } } @@ -330,38 +331,43 @@ func (this *Pvp) startBattle(battle *BattleItem) { } } -//用户离线处理 +//用户离线处理 弃用 func (this *Pvp) userlogin(session comm.IUserSession) { - var ( - result []*pb.DBPvpBattle - userpvp []*pb.DBPvpBattle - push *pb.PvpListPush - err error - ) - if result, err = this.modelPvpComp.querypvps(); err != nil { - this.Errorln(err) - return - } - userpvp = make([]*pb.DBPvpBattle, 0, len(userpvp)) - for _, v := range result { - if v.Red.Uid == session.GetUserId() || v.Blue.Uid == session.GetUserId() { - userpvp = append(userpvp, v) - } - } - push = &pb.PvpListPush{} - for _, v := range result { - push.List = append(push.List, &pb.DBPvpBattle{ - Id: v.Id, - ServicePath: v.ServicePath, - Ptype: v.Ptype, - State: v.State, - Red: v.Red, - Blue: v.Blue, - }) - } + // var ( + // result []*pb.DBPvpBattle + // userpvp []*pb.DBPvpBattle + // push *pb.PvpListPush + // err error + // ) + // if result, err = this.modelPvpComp.querypvps(); err != nil { + // this.Errorln(err) + // return + // } - session.SendMsg(string(comm.ModulePvp), "list", push) - session.Push() + // userpvp = make([]*pb.DBPvpBattle, 0, len(userpvp)) + // for _, v := range result { + // if v.Red.Uid == session.GetUserId() || v.Blue.Uid == session.GetUserId() { + // userpvp = append(userpvp, v) + // } + // } + // if len(userpvp) <= 0 { + // return + // } + // push = &pb.PvpListPush{} + // for _, v := range result { + // push.List = append(push.List, &pb.DBPvpBattle{ + // Id: v.Id, + // ServicePath: v.ServicePath, + // Ptype: v.Ptype, + // State: v.State, + // Red: v.Red, + // Blue: v.Blue, + // }) + // } + + // session.SendMsg(string(comm.ModulePvp), "list", push) + // session.Push() + // this.Debug("GetPvpInfo", log.Field{Key: "uid", Value: session.GetSessionId()}, log.Field{Key: "list", Value: push.String()}) } //用户离线处理 diff --git a/modules/sociaty/model_sociaty.go b/modules/sociaty/model_sociaty.go index 4c39a9244..c47212f3b 100644 --- a/modules/sociaty/model_sociaty.go +++ b/modules/sociaty/model_sociaty.go @@ -373,7 +373,7 @@ func (this *ModelSociaty) dismiss(sociaty *pb.DBSociaty) error { if err := this.memberClear(sociaty); err != nil { return err } - if err := this.DelListlds("", sociaty.Id); err != nil { + if err := this.DelListlds("", []string{sociaty.Id}); err != nil { return err } //推送 @@ -832,7 +832,7 @@ func (this *ModelSociaty) rankDataChanged(event interface{}, next func(event int for _, v := range lastData { delIds = append(delIds, v.SociatyId) } - this.DelListlds("", delIds...) + this.DelListlds("", delIds) } } diff --git a/modules/sociaty/model_sociatytask.go b/modules/sociaty/model_sociatytask.go index 5bb6e8f0f..e292caa66 100644 --- a/modules/sociaty/model_sociatytask.go +++ b/modules/sociaty/model_sociatytask.go @@ -68,7 +68,7 @@ func (this *ModelSociatyTask) getUserTask(uid, sociatyId string) (task *pb.DBSoc // 删除公会任务 func (this *ModelSociatyTask) deleTask(sociatyId, uid string) error { - return this.DelListlds(sociatyId, uid) + return this.DelListlds(sociatyId, []string{uid}) } // 任务奖励领取 diff --git a/modules/user/module.go b/modules/user/module.go index 4b23a682f..c398423fa 100644 --- a/modules/user/module.go +++ b/modules/user/module.go @@ -146,7 +146,7 @@ func (this *User) ResetSession() { } for _, v := range us { - this.modelSession.DelListlds(comm.RDS_EMPTY, v.Uid) + this.modelSession.DelListlds(comm.RDS_EMPTY, []string{v.Uid}) } } @@ -155,10 +155,15 @@ func (this *User) CleanSession(session comm.IUserSession) { this.stopTicker(session.GetUserId()) if !this.IsCross() { this.modelUser.updateOfflineTime(session.GetUserId()) + + } + // sId := fmt.Sprintf("%s-%s", comm.RDS_EMPTY, session.GetUserId()) + // this.modelSession.Del(sId, db.SetDBMgoLog(false)) + // this.modelSession.DelListlds(comm.RDS_EMPTY, session.GetUserId()) + //确保删除的会话是目标会话 不是就不要删除了 + if user := this.modelSession.getUserSession(session.GetUserId()); user != nil && user.SessionId == session.GetSessionId() { + this.modelSession.Del(session.GetUserId(), db.SetDBMgoLog(false)) } - sId := fmt.Sprintf("%s-%s", comm.RDS_EMPTY, session.GetUserId()) - this.modelSession.Del(sId, db.SetDBMgoLog(false)) - this.modelSession.DelListlds(comm.RDS_EMPTY, session.GetUserId()) this.modelUser.DelByUId(session.GetUserId(), db.SetDBMgoLog(false)) this.modelExpand.DelByUId(session.GetUserId(), db.SetDBMgoLog(false)) this.modelSetting.DelByUId(session.GetUserId(), db.SetDBMgoLog(false)) diff --git a/pb/battle_struct.pb.go b/pb/battle_struct.pb.go index e60573068..abcea88e0 100644 --- a/pb/battle_struct.pb.go +++ b/pb/battle_struct.pb.go @@ -1380,6 +1380,54 @@ func (x *ComPlayEffect) GetSide() int32 { return 0 } +//出手倒计时 +type ComEmitCountdown struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reserve int32 `protobuf:"varint,1,opt,name=reserve,proto3" json:"reserve"` +} + +func (x *ComEmitCountdown) Reset() { + *x = ComEmitCountdown{} + if protoimpl.UnsafeEnabled { + mi := &file_battle_battle_struct_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComEmitCountdown) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComEmitCountdown) ProtoMessage() {} + +func (x *ComEmitCountdown) ProtoReflect() protoreflect.Message { + mi := &file_battle_battle_struct_proto_msgTypes[20] + 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 ComEmitCountdown.ProtoReflect.Descriptor instead. +func (*ComEmitCountdown) Descriptor() ([]byte, []int) { + return file_battle_battle_struct_proto_rawDescGZIP(), []int{20} +} + +func (x *ComEmitCountdown) GetReserve() int32 { + if x != nil { + return x.Reserve + } + return 0 +} + var File_battle_battle_struct_proto protoreflect.FileDescriptor var file_battle_battle_struct_proto_rawDesc = []byte{ @@ -1517,8 +1565,11 @@ var file_battle_battle_struct_proto_rawDesc = []byte{ 0x1e, 0x0a, 0x0a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, - 0x69, 0x64, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x69, 0x64, 0x65, 0x22, 0x2c, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x45, 0x6d, 0x69, 0x74, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1533,7 +1584,7 @@ func file_battle_battle_struct_proto_rawDescGZIP() []byte { return file_battle_battle_struct_proto_rawDescData } -var file_battle_battle_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_battle_battle_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_battle_battle_struct_proto_goTypes = []interface{}{ (*ComModifyOperate)(nil), // 0: ComModifyOperate (*ComStartFight)(nil), // 1: ComStartFight @@ -1555,16 +1606,17 @@ var file_battle_battle_struct_proto_goTypes = []interface{}{ (*ComGuide)(nil), // 17: ComGuide (*ComCreateRoles)(nil), // 18: ComCreateRoles (*ComPlayEffect)(nil), // 19: ComPlayEffect - (*BattleRole)(nil), // 20: BattleRole - (*BattleCmd)(nil), // 21: BattleCmd + (*ComEmitCountdown)(nil), // 20: ComEmitCountdown + (*BattleRole)(nil), // 21: BattleRole + (*BattleCmd)(nil), // 22: BattleCmd } var file_battle_battle_struct_proto_depIdxs = []int32{ - 20, // 0: ComInitFight.roles:type_name -> BattleRole + 21, // 0: ComInitFight.roles:type_name -> BattleRole 5, // 1: ComStartAction.skillInfo:type_name -> ComSkillInfo 5, // 2: ComSkillCDAction.skillInfo:type_name -> ComSkillInfo 11, // 3: ComSkillAtk.comList:type_name -> ComSkillAfterAtk - 21, // 4: ComSkillAfterAtk.comList:type_name -> BattleCmd - 20, // 5: ComCreateRoles.roles:type_name -> BattleRole + 22, // 4: ComSkillAfterAtk.comList:type_name -> BattleCmd + 21, // 5: ComCreateRoles.roles:type_name -> BattleRole 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -1820,6 +1872,18 @@ func file_battle_battle_struct_proto_init() { return nil } } + file_battle_battle_struct_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComEmitCountdown); 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{ @@ -1827,7 +1891,7 @@ func file_battle_battle_struct_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_battle_battle_struct_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/pvp_msg.pb.go b/pb/pvp_msg.pb.go index e21838266..baf8bb24a 100644 --- a/pb/pvp_msg.pb.go +++ b/pb/pvp_msg.pb.go @@ -20,17 +20,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -//战斗列表推送 -type PvpListPush struct { +//战斗列表 请求 +type PvpListReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - List []*DBPvpBattle `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` } -func (x *PvpListPush) Reset() { - *x = PvpListPush{} +func (x *PvpListReq) Reset() { + *x = PvpListReq{} if protoimpl.UnsafeEnabled { mi := &file_pvp_pvp_msg_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -38,13 +36,13 @@ func (x *PvpListPush) Reset() { } } -func (x *PvpListPush) String() string { +func (x *PvpListReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PvpListPush) ProtoMessage() {} +func (*PvpListReq) ProtoMessage() {} -func (x *PvpListPush) ProtoReflect() protoreflect.Message { +func (x *PvpListReq) ProtoReflect() protoreflect.Message { mi := &file_pvp_pvp_msg_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56,12 +54,53 @@ func (x *PvpListPush) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PvpListPush.ProtoReflect.Descriptor instead. -func (*PvpListPush) Descriptor() ([]byte, []int) { +// Deprecated: Use PvpListReq.ProtoReflect.Descriptor instead. +func (*PvpListReq) Descriptor() ([]byte, []int) { return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{0} } -func (x *PvpListPush) GetList() []*DBPvpBattle { +//战斗列表 请求回应 +type PvpListResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + List []*DBPvpBattle `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +} + +func (x *PvpListResp) Reset() { + *x = PvpListResp{} + if protoimpl.UnsafeEnabled { + mi := &file_pvp_pvp_msg_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PvpListResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PvpListResp) ProtoMessage() {} + +func (x *PvpListResp) ProtoReflect() protoreflect.Message { + mi := &file_pvp_pvp_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 PvpListResp.ProtoReflect.Descriptor instead. +func (*PvpListResp) Descriptor() ([]byte, []int) { + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{1} +} + +func (x *PvpListResp) GetList() []*DBPvpBattle { if x != nil { return x.List } @@ -80,7 +119,7 @@ type PvpIntoReq struct { func (x *PvpIntoReq) Reset() { *x = PvpIntoReq{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[1] + mi := &file_pvp_pvp_msg_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -93,7 +132,7 @@ func (x *PvpIntoReq) String() string { func (*PvpIntoReq) ProtoMessage() {} func (x *PvpIntoReq) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[1] + mi := &file_pvp_pvp_msg_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106,7 +145,7 @@ func (x *PvpIntoReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpIntoReq.ProtoReflect.Descriptor instead. func (*PvpIntoReq) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{1} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{2} } func (x *PvpIntoReq) GetBattleid() string { @@ -130,7 +169,7 @@ type PvpIntoResp struct { func (x *PvpIntoResp) Reset() { *x = PvpIntoResp{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[2] + mi := &file_pvp_pvp_msg_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -143,7 +182,7 @@ func (x *PvpIntoResp) String() string { func (*PvpIntoResp) ProtoMessage() {} func (x *PvpIntoResp) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[2] + mi := &file_pvp_pvp_msg_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -156,7 +195,7 @@ func (x *PvpIntoResp) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpIntoResp.ProtoReflect.Descriptor instead. func (*PvpIntoResp) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{2} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{3} } func (x *PvpIntoResp) GetCode() ErrorCode { @@ -196,7 +235,7 @@ type PvpReadyPush struct { func (x *PvpReadyPush) Reset() { *x = PvpReadyPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[3] + mi := &file_pvp_pvp_msg_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -209,7 +248,7 @@ func (x *PvpReadyPush) String() string { func (*PvpReadyPush) ProtoMessage() {} func (x *PvpReadyPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[3] + mi := &file_pvp_pvp_msg_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -222,7 +261,7 @@ func (x *PvpReadyPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpReadyPush.ProtoReflect.Descriptor instead. func (*PvpReadyPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{3} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{4} } func (x *PvpReadyPush) GetServicePath() string { @@ -273,7 +312,7 @@ type PvpCancelPush struct { func (x *PvpCancelPush) Reset() { *x = PvpCancelPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[4] + mi := &file_pvp_pvp_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -286,7 +325,7 @@ func (x *PvpCancelPush) String() string { func (*PvpCancelPush) ProtoMessage() {} func (x *PvpCancelPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[4] + mi := &file_pvp_pvp_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -299,7 +338,7 @@ func (x *PvpCancelPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpCancelPush.ProtoReflect.Descriptor instead. func (*PvpCancelPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{4} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{5} } func (x *PvpCancelPush) GetServicePath() string { @@ -329,7 +368,7 @@ type PvpFormationReq struct { func (x *PvpFormationReq) Reset() { *x = PvpFormationReq{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[5] + mi := &file_pvp_pvp_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +381,7 @@ func (x *PvpFormationReq) String() string { func (*PvpFormationReq) ProtoMessage() {} func (x *PvpFormationReq) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[5] + mi := &file_pvp_pvp_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +394,7 @@ func (x *PvpFormationReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpFormationReq.ProtoReflect.Descriptor instead. func (*PvpFormationReq) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{5} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{6} } func (x *PvpFormationReq) GetBattleid() string { @@ -384,7 +423,7 @@ type PvpFormationResp struct { func (x *PvpFormationResp) Reset() { *x = PvpFormationResp{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[6] + mi := &file_pvp_pvp_msg_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -397,7 +436,7 @@ func (x *PvpFormationResp) String() string { func (*PvpFormationResp) ProtoMessage() {} func (x *PvpFormationResp) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[6] + mi := &file_pvp_pvp_msg_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -410,7 +449,7 @@ func (x *PvpFormationResp) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpFormationResp.ProtoReflect.Descriptor instead. func (*PvpFormationResp) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{6} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{7} } func (x *PvpFormationResp) GetIssucc() bool { @@ -433,7 +472,7 @@ type PvpStartPush struct { func (x *PvpStartPush) Reset() { *x = PvpStartPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[7] + mi := &file_pvp_pvp_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -446,7 +485,7 @@ func (x *PvpStartPush) String() string { func (*PvpStartPush) ProtoMessage() {} func (x *PvpStartPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[7] + mi := &file_pvp_pvp_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -459,7 +498,7 @@ func (x *PvpStartPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpStartPush.ProtoReflect.Descriptor instead. func (*PvpStartPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{7} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{8} } func (x *PvpStartPush) GetCode() ErrorCode { @@ -489,7 +528,7 @@ type PvpOutCmdPush struct { func (x *PvpOutCmdPush) Reset() { *x = PvpOutCmdPush{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[8] + mi := &file_pvp_pvp_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -502,7 +541,7 @@ func (x *PvpOutCmdPush) String() string { func (*PvpOutCmdPush) ProtoMessage() {} func (x *PvpOutCmdPush) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[8] + mi := &file_pvp_pvp_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -515,7 +554,7 @@ func (x *PvpOutCmdPush) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpOutCmdPush.ProtoReflect.Descriptor instead. func (*PvpOutCmdPush) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{8} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{9} } func (x *PvpOutCmdPush) GetBattleid() string { @@ -545,7 +584,7 @@ type PvpInCmdReq struct { func (x *PvpInCmdReq) Reset() { *x = PvpInCmdReq{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[9] + mi := &file_pvp_pvp_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -558,7 +597,7 @@ func (x *PvpInCmdReq) String() string { func (*PvpInCmdReq) ProtoMessage() {} func (x *PvpInCmdReq) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[9] + mi := &file_pvp_pvp_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -571,7 +610,7 @@ func (x *PvpInCmdReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpInCmdReq.ProtoReflect.Descriptor instead. func (*PvpInCmdReq) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{9} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{10} } func (x *PvpInCmdReq) GetBattleid() string { @@ -602,7 +641,7 @@ type PvpInCmdResp struct { func (x *PvpInCmdResp) Reset() { *x = PvpInCmdResp{} if protoimpl.UnsafeEnabled { - mi := &file_pvp_pvp_msg_proto_msgTypes[10] + mi := &file_pvp_pvp_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -615,7 +654,7 @@ func (x *PvpInCmdResp) String() string { func (*PvpInCmdResp) ProtoMessage() {} func (x *PvpInCmdResp) ProtoReflect() protoreflect.Message { - mi := &file_pvp_pvp_msg_proto_msgTypes[10] + mi := &file_pvp_pvp_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -628,7 +667,7 @@ func (x *PvpInCmdResp) ProtoReflect() protoreflect.Message { // Deprecated: Use PvpInCmdResp.ProtoReflect.Descriptor instead. func (*PvpInCmdResp) Descriptor() ([]byte, []int) { - return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{10} + return file_pvp_pvp_msg_proto_rawDescGZIP(), []int{11} } func (x *PvpInCmdResp) GetCode() ErrorCode { @@ -660,66 +699,67 @@ var file_pvp_pvp_msg_proto_rawDesc = []byte{ 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, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x2f, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, - 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, - 0x42, 0x50, 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, - 0x22, 0x28, 0x0a, 0x0a, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, - 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x0b, 0x50, 0x76, - 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x0c, - 0x50, 0x76, 0x70, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, - 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x03, 0x72, 0x65, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x62, 0x6c, - 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x4d, 0x0a, 0x0d, 0x50, 0x76, - 0x70, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, - 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x76, 0x70, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, + 0x0c, 0x0a, 0x0a, 0x50, 0x76, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x2f, 0x0a, + 0x0b, 0x50, 0x76, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x04, + 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x44, 0x42, 0x50, + 0x76, 0x70, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x28, + 0x0a, 0x0a, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x09, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x10, 0x50, 0x76, 0x70, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x63, 0x63, 0x22, 0x4f, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, - 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x49, 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x4f, 0x75, 0x74, 0x43, - 0x6d, 0x64, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, - 0x22, 0x47, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x12, - 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, - 0x6d, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x68, 0x0a, 0x0c, 0x50, 0x76, 0x70, - 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, - 0x63, 0x6d, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x6f, 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, + 0x6e, 0x74, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x50, 0x76, + 0x70, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x76, 0x70, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x4d, 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x76, 0x70, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 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, 0x09, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2a, 0x0a, 0x10, 0x50, 0x76, 0x70, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, + 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, + 0x63, 0x63, 0x22, 0x4f, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, + 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, + 0x6e, 0x66, 0x6f, 0x22, 0x49, 0x0a, 0x0d, 0x50, 0x76, 0x70, 0x4f, 0x75, 0x74, 0x43, 0x6d, 0x64, + 0x50, 0x75, 0x73, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, + 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x47, + 0x0a, 0x0b, 0x50, 0x76, 0x70, 0x49, 0x6e, 0x43, 0x6d, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, + 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, + 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x22, 0x68, 0x0a, 0x0c, 0x50, 0x76, 0x70, 0x49, 0x6e, + 0x43, 0x6d, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6d, 0x64, 0x52, 0x03, 0x63, 0x6d, + 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -734,40 +774,41 @@ func file_pvp_pvp_msg_proto_rawDescGZIP() []byte { return file_pvp_pvp_msg_proto_rawDescData } -var file_pvp_pvp_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_pvp_pvp_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_pvp_pvp_msg_proto_goTypes = []interface{}{ - (*PvpListPush)(nil), // 0: PvpListPush - (*PvpIntoReq)(nil), // 1: PvpIntoReq - (*PvpIntoResp)(nil), // 2: PvpIntoResp - (*PvpReadyPush)(nil), // 3: PvpReadyPush - (*PvpCancelPush)(nil), // 4: PvpCancelPush - (*PvpFormationReq)(nil), // 5: PvpFormationReq - (*PvpFormationResp)(nil), // 6: PvpFormationResp - (*PvpStartPush)(nil), // 7: PvpStartPush - (*PvpOutCmdPush)(nil), // 8: PvpOutCmdPush - (*PvpInCmdReq)(nil), // 9: PvpInCmdReq - (*PvpInCmdResp)(nil), // 10: PvpInCmdResp - (*DBPvpBattle)(nil), // 11: DBPvpBattle - (ErrorCode)(0), // 12: ErrorCode - (*BattleStateInfo)(nil), // 13: BattleStateInfo - (*PvpUserInfo)(nil), // 14: PvpUserInfo - (*BattleFormation)(nil), // 15: BattleFormation - (*BattleInfo)(nil), // 16: BattleInfo - (*BattleCmd)(nil), // 17: BattleCmd + (*PvpListReq)(nil), // 0: PvpListReq + (*PvpListResp)(nil), // 1: PvpListResp + (*PvpIntoReq)(nil), // 2: PvpIntoReq + (*PvpIntoResp)(nil), // 3: PvpIntoResp + (*PvpReadyPush)(nil), // 4: PvpReadyPush + (*PvpCancelPush)(nil), // 5: PvpCancelPush + (*PvpFormationReq)(nil), // 6: PvpFormationReq + (*PvpFormationResp)(nil), // 7: PvpFormationResp + (*PvpStartPush)(nil), // 8: PvpStartPush + (*PvpOutCmdPush)(nil), // 9: PvpOutCmdPush + (*PvpInCmdReq)(nil), // 10: PvpInCmdReq + (*PvpInCmdResp)(nil), // 11: PvpInCmdResp + (*DBPvpBattle)(nil), // 12: DBPvpBattle + (ErrorCode)(0), // 13: ErrorCode + (*BattleStateInfo)(nil), // 14: BattleStateInfo + (*PvpUserInfo)(nil), // 15: PvpUserInfo + (*BattleFormation)(nil), // 16: BattleFormation + (*BattleInfo)(nil), // 17: BattleInfo + (*BattleCmd)(nil), // 18: BattleCmd } var file_pvp_pvp_msg_proto_depIdxs = []int32{ - 11, // 0: PvpListPush.list:type_name -> DBPvpBattle - 12, // 1: PvpIntoResp.code:type_name -> ErrorCode - 13, // 2: PvpIntoResp.info:type_name -> BattleStateInfo - 14, // 3: PvpReadyPush.red:type_name -> PvpUserInfo - 14, // 4: PvpReadyPush.blue:type_name -> PvpUserInfo - 15, // 5: PvpFormationReq.formation:type_name -> BattleFormation - 12, // 6: PvpStartPush.code:type_name -> ErrorCode - 16, // 7: PvpStartPush.info:type_name -> BattleInfo - 17, // 8: PvpOutCmdPush.cmd:type_name -> BattleCmd - 17, // 9: PvpInCmdReq.cmd:type_name -> BattleCmd - 12, // 10: PvpInCmdResp.code:type_name -> ErrorCode - 17, // 11: PvpInCmdResp.cmd:type_name -> BattleCmd + 12, // 0: PvpListResp.list:type_name -> DBPvpBattle + 13, // 1: PvpIntoResp.code:type_name -> ErrorCode + 14, // 2: PvpIntoResp.info:type_name -> BattleStateInfo + 15, // 3: PvpReadyPush.red:type_name -> PvpUserInfo + 15, // 4: PvpReadyPush.blue:type_name -> PvpUserInfo + 16, // 5: PvpFormationReq.formation:type_name -> BattleFormation + 13, // 6: PvpStartPush.code:type_name -> ErrorCode + 17, // 7: PvpStartPush.info:type_name -> BattleInfo + 18, // 8: PvpOutCmdPush.cmd:type_name -> BattleCmd + 18, // 9: PvpInCmdReq.cmd:type_name -> BattleCmd + 13, // 10: PvpInCmdResp.code:type_name -> ErrorCode + 18, // 11: PvpInCmdResp.cmd:type_name -> BattleCmd 12, // [12:12] is the sub-list for method output_type 12, // [12:12] is the sub-list for method input_type 12, // [12:12] is the sub-list for extension type_name @@ -785,7 +826,7 @@ func file_pvp_pvp_msg_proto_init() { file_errorcode_proto_init() if !protoimpl.UnsafeEnabled { file_pvp_pvp_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpListPush); i { + switch v := v.(*PvpListReq); i { case 0: return &v.state case 1: @@ -797,7 +838,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpIntoReq); i { + switch v := v.(*PvpListResp); i { case 0: return &v.state case 1: @@ -809,7 +850,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpIntoResp); i { + switch v := v.(*PvpIntoReq); i { case 0: return &v.state case 1: @@ -821,7 +862,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpReadyPush); i { + switch v := v.(*PvpIntoResp); i { case 0: return &v.state case 1: @@ -833,7 +874,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpCancelPush); i { + switch v := v.(*PvpReadyPush); i { case 0: return &v.state case 1: @@ -845,7 +886,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpFormationReq); i { + switch v := v.(*PvpCancelPush); i { case 0: return &v.state case 1: @@ -857,7 +898,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpFormationResp); i { + switch v := v.(*PvpFormationReq); i { case 0: return &v.state case 1: @@ -869,7 +910,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpStartPush); i { + switch v := v.(*PvpFormationResp); i { case 0: return &v.state case 1: @@ -881,7 +922,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpOutCmdPush); i { + switch v := v.(*PvpStartPush); i { case 0: return &v.state case 1: @@ -893,7 +934,7 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PvpInCmdReq); i { + switch v := v.(*PvpOutCmdPush); i { case 0: return &v.state case 1: @@ -905,6 +946,18 @@ func file_pvp_pvp_msg_proto_init() { } } file_pvp_pvp_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PvpInCmdReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pvp_pvp_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PvpInCmdResp); i { case 0: return &v.state @@ -923,7 +976,7 @@ func file_pvp_pvp_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pvp_pvp_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/db/dbmodel.go b/sys/db/dbmodel.go index 9b6ebf045..8d76c449c 100644 --- a/sys/db/dbmodel.go +++ b/sys/db/dbmodel.go @@ -882,7 +882,7 @@ func (this *DBModel) DelByUId(uid string, opt ...DBOption) (err error) { } //删除多条数据 -func (this *DBModel) DelListlds(uid string, ids ...string) (err error) { +func (this *DBModel) DelListlds(uid string, ids []string, opt ...DBOption) (err error) { //defer log.Debug("DBModel DelListlds", log.Field{Key: "TableName", Value: this.TableName}, log.Field{Key: "uid", Value: uid}, log.Field{Key: "ids", Value: ids}) listkey := this.ukey(uid) pipe := this.Redis.RedisPipe(context.TODO()) @@ -892,7 +892,10 @@ func (this *DBModel) DelListlds(uid string, ids ...string) (err error) { } pipe.HDel(listkey, ids...) if _, err = pipe.Exec(); err == nil { - err = this.DeleteModelLogs(this.TableName, uid, bson.M{"_id": bson.M{"$in": ids}}) + option := newDBOption(opt...) + if option.IsMgoLog { + err = this.DeleteModelLogs(this.TableName, uid, bson.M{"_id": bson.M{"$in": ids}}) + } } return } From 311f45c351958ef7f16e50b2f6006ebd9b265eb1 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 14 Feb 2023 17:24:19 +0800 Subject: [PATCH 17/21] update trade --- comm/const.go | 1 + modules/smithy/model_trade.go | 27 +++++++++++++++++++++++++++ modules/smithy/module.go | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 modules/smithy/model_trade.go diff --git a/comm/const.go b/comm/const.go index 55ea51491..7428fa987 100644 --- a/comm/const.go +++ b/comm/const.go @@ -141,6 +141,7 @@ const ( TableSeasonRecord = "seasonRecord" // 赛季塔记录 /// 美食馆 TableSmithy = "smithy" + TableSmithyTrade = "trade" /// 赛季塔数据表 TableSeasonPagoda = "seasonpagoda" // diff --git a/modules/smithy/model_trade.go b/modules/smithy/model_trade.go new file mode 100644 index 000000000..2254a8b27 --- /dev/null +++ b/modules/smithy/model_trade.go @@ -0,0 +1,27 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/core" + "go_dreamfactory/modules" + + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/x/bsonx" +) + +type modelTrade struct { + modules.MCompModel + module *Smithy +} + +func (this *modelTrade) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { + this.TableName = string(comm.TableSmithyTrade) + err = this.MCompModel.Init(service, module, comp, options) + this.module = module.(*Smithy) + // uid 创建索引 + this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{ + Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}}, + }) + return +} +// \ No newline at end of file diff --git a/modules/smithy/module.go b/modules/smithy/module.go index 1bcebeaaf..319c74782 100644 --- a/modules/smithy/module.go +++ b/modules/smithy/module.go @@ -15,6 +15,7 @@ import ( type Smithy struct { modules.ModuleBase modelSmithy *modelSmithy + modelTrade *modelTrade api *apiComp configure *configureComp } @@ -38,6 +39,7 @@ func (this *Smithy) OnInstallComp() { this.api = this.RegisterComp(new(apiComp)).(*apiComp) this.modelSmithy = this.RegisterComp(new(modelSmithy)).(*modelSmithy) this.configure = this.RegisterComp(new(configureComp)).(*configureComp) + this.modelTrade = this.RegisterComp(new(modelTrade)).(*modelTrade) } // 接口信息 From 992237568fed569267f7859f106ba0cfd3661f71 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 14 Feb 2023 18:27:25 +0800 Subject: [PATCH 18/21] =?UTF-8?q?api=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/api_stoveup.go | 2 - modules/smithy/api_toolsup.go | 30 ++++++ modules/smithy/model_smithy.go | 6 +- pb/hero_db.pb.go | 48 ++++----- pb/smithy_db.pb.go | 180 ++++++++++++++++----------------- 5 files changed, 144 insertions(+), 122 deletions(-) create mode 100644 modules/smithy/api_toolsup.go diff --git a/modules/smithy/api_stoveup.go b/modules/smithy/api_stoveup.go index e2c37284a..126464119 100644 --- a/modules/smithy/api_stoveup.go +++ b/modules/smithy/api_stoveup.go @@ -15,8 +15,6 @@ func (this *apiComp) StrveUpCheck(session comm.IUserSession, req *pb.SmithyStove // 炉子升级 func (this *apiComp) StrveUp(session comm.IUserSession, req *pb.SmithyStoveUpReq) (code pb.ErrorCode, data proto.Message) { - var () - code = this.StrveUpCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 diff --git a/modules/smithy/api_toolsup.go b/modules/smithy/api_toolsup.go new file mode 100644 index 000000000..685abf26c --- /dev/null +++ b/modules/smithy/api_toolsup.go @@ -0,0 +1,30 @@ +package smithy + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) ToolsUpCheck(session comm.IUserSession, req *pb.SmithyToolsUpReq) (code pb.ErrorCode) { + + return +} + +// 工具升级 +func (this *apiComp) ToolsUp(session comm.IUserSession, req *pb.SmithyToolsUpReq) (code pb.ErrorCode, data proto.Message) { + code = this.ToolsUpCheck(session, req) + if code != pb.ErrorCode_Success { + return // 参数校验失败直接返回 + } + stove, err := this.module.modelSmithy.getSmithyStoveList(session.GetUserId()) + if err != nil { + code = pb.ErrorCode_DBError + return + } + + session.SendMsg(string(this.module.GetType()), "toolsup", &pb.SmithyToolsUpResp{Data: stove}) + return +} diff --git a/modules/smithy/model_smithy.go b/modules/smithy/model_smithy.go index f9189e12c..bee6178c8 100644 --- a/modules/smithy/model_smithy.go +++ b/modules/smithy/model_smithy.go @@ -198,7 +198,6 @@ func (this *modelSmithy) getSmithyStoveList(uid string) (result *pb.DBStove, err result.Skill = make(map[int32]int32, 0) result.Lv = 1 result.Temperature = 20000 // 配置 - result.Business = 0 result.RecoveTime = 0 if err = this.Add(uid, result); err != nil { @@ -212,3 +211,8 @@ func (this *modelSmithy) getSmithyStoveList(uid string) (result *pb.DBStove, err err = nil return result, err } + +func (this *modelSmithy) updateSmithyStove(uid string, update map[string]interface{}) (err error) { + err = this.Change(uid, update) + return err +} diff --git a/pb/hero_db.pb.go b/pb/hero_db.pb.go index 934378650..bce2ee678 100644 --- a/pb/hero_db.pb.go +++ b/pb/hero_db.pb.go @@ -87,18 +87,18 @@ type DBHero struct { Skins []int32 `protobuf:"varint,14,rep,packed,name=skins,proto3" json:"skins"` // 所有皮肤ID Block bool `protobuf:"varint,15,opt,name=block,proto3" json:"block"` // 锁定 EquipID []string `protobuf:"bytes,16,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID - SameCount int32 `protobuf:"varint,20,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量 - SuiteId int32 `protobuf:"varint,21,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id - SuiteExtId int32 `protobuf:"varint,22,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id - JuexProperty map[string]int32 `protobuf:"bytes,25,rep,name=juexProperty,proto3" json:"juexProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"juexProperty"` ////hp - Status HeroType `protobuf:"varint,26,opt,name=status,proto3,enum=HeroType" json:"status" bson:"status"` //状态 (1 练功) - Suite1Star int32 `protobuf:"varint,27,opt,name=suite1Star,proto3" json:"suite1Star" bson:"suite1Star"` - Suite2Star int32 `protobuf:"varint,28,opt,name=suite2Star,proto3" json:"suite2Star" bson:"suite2Star"` - Suite1Lv int32 `protobuf:"varint,29,opt,name=suite1Lv,proto3" json:"suite1Lv" bson:"suite1Lv"` - Suite2Lv int32 `protobuf:"varint,30,opt,name=suite2Lv,proto3" json:"suite2Lv" bson:"suite2Lv"` - TalentProperty map[string]int32 `protobuf:"bytes,31,rep,name=talentProperty,proto3" json:"talentProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"talentProperty"` // // 天赋属性 - EquipSkill []*SkillData `protobuf:"bytes,32,rep,name=equipSkill,proto3" json:"equipSkill" bson:"equipSkill"` //装备技能 - HoroscopeProperty map[string]int32 `protobuf:"bytes,33,rep,name=horoscopeProperty,proto3" json:"horoscopeProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"horoscopeProperty"` ////星座属性加成 + SameCount int32 `protobuf:"varint,17,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量 + SuiteId int32 `protobuf:"varint,18,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id + SuiteExtId int32 `protobuf:"varint,19,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id + JuexProperty map[string]int32 `protobuf:"bytes,20,rep,name=juexProperty,proto3" json:"juexProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"juexProperty"` ////hp + Status HeroType `protobuf:"varint,21,opt,name=status,proto3,enum=HeroType" json:"status" bson:"status"` //状态 (1 练功) + Suite1Star int32 `protobuf:"varint,22,opt,name=suite1Star,proto3" json:"suite1Star" bson:"suite1Star"` + Suite2Star int32 `protobuf:"varint,23,opt,name=suite2Star,proto3" json:"suite2Star" bson:"suite2Star"` + Suite1Lv int32 `protobuf:"varint,24,opt,name=suite1Lv,proto3" json:"suite1Lv" bson:"suite1Lv"` + Suite2Lv int32 `protobuf:"varint,25,opt,name=suite2Lv,proto3" json:"suite2Lv" bson:"suite2Lv"` + TalentProperty map[string]int32 `protobuf:"bytes,26,rep,name=talentProperty,proto3" json:"talentProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"talentProperty"` // // 天赋属性 + EquipSkill []*SkillData `protobuf:"bytes,27,rep,name=equipSkill,proto3" json:"equipSkill" bson:"equipSkill"` //装备技能 + HoroscopeProperty map[string]int32 `protobuf:"bytes,28,rep,name=horoscopeProperty,proto3" json:"horoscopeProperty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"horoscopeProperty"` ////星座属性加成 } func (x *DBHero) Reset() { @@ -588,33 +588,33 @@ var file_hero_hero_db_proto_rawDesc = []byte{ 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x18, 0x10, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x71, 0x75, 0x69, 0x70, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x43, + 0x75, 0x6e, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1e, - 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x45, 0x78, 0x74, 0x49, 0x64, 0x18, 0x16, 0x20, 0x01, + 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1e, + 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x45, 0x78, 0x74, 0x49, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x45, 0x78, 0x74, 0x49, 0x64, 0x12, 0x3d, - 0x0a, 0x0c, 0x6a, 0x75, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x19, + 0x0a, 0x0c, 0x6a, 0x75, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x4a, 0x75, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6a, 0x75, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x21, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x31, 0x53, 0x74, 0x61, 0x72, 0x18, 0x1b, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x31, 0x53, 0x74, 0x61, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x31, 0x53, 0x74, 0x61, 0x72, - 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x32, 0x53, 0x74, 0x61, 0x72, 0x18, 0x1c, + 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x32, 0x53, 0x74, 0x61, 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x75, 0x69, 0x74, 0x65, 0x32, 0x53, 0x74, 0x61, 0x72, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x69, 0x74, 0x65, 0x31, 0x4c, 0x76, 0x18, 0x1d, 0x20, 0x01, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x75, 0x69, 0x74, 0x65, 0x31, 0x4c, 0x76, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x75, 0x69, 0x74, 0x65, 0x31, 0x4c, 0x76, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x75, 0x69, 0x74, 0x65, 0x32, 0x4c, 0x76, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x73, 0x75, 0x69, 0x74, 0x65, 0x32, 0x4c, 0x76, 0x18, 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x75, 0x69, 0x74, 0x65, 0x32, 0x4c, 0x76, 0x12, 0x43, 0x0a, 0x0e, 0x74, 0x61, 0x6c, 0x65, - 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x1f, 0x20, 0x03, 0x28, 0x0b, + 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x2a, 0x0a, - 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x20, 0x20, 0x03, 0x28, + 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x4c, 0x0a, 0x11, 0x68, 0x6f, 0x72, - 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x21, + 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x2e, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x68, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x50, diff --git a/pb/smithy_db.pb.go b/pb/smithy_db.pb.go index 49546fd46..7ae947142 100644 --- a/pb/smithy_db.pb.go +++ b/pb/smithy_db.pb.go @@ -34,7 +34,6 @@ type DBStove struct { Forge map[int32]int32 `protobuf:"bytes,6,rep,name=forge,proto3" json:"forge" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 套装类型 value 打造次数 Temperature int32 `protobuf:"varint,7,opt,name=temperature,proto3" json:"temperature"` // 炉子温度 RecoveTime int64 `protobuf:"varint,8,opt,name=recoveTime,proto3" json:"recoveTime"` // 恢复满时间 - Business int32 `protobuf:"varint,9,opt,name=business,proto3" json:"business"` // } func (x *DBStove) Reset() { @@ -125,13 +124,6 @@ func (x *DBStove) GetRecoveTime() int64 { return 0 } -func (x *DBStove) GetBusiness() int32 { - if x != nil { - return x.Business - } - return 0 -} - // 商人信息 type DBBusiness struct { state protoimpl.MessageState @@ -661,7 +653,7 @@ var File_smithy_smithy_db_proto protoreflect.FileDescriptor var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2f, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x03, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 0x65, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x03, 0x0a, 0x07, 0x44, 0x42, 0x53, 0x74, 0x6f, 0x76, 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, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, @@ -677,97 +669,95 @@ var file_smithy_smithy_db_proto_rawDesc = []byte{ 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0x37, - 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x38, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 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, 0x22, 0x70, 0x0a, 0x0a, 0x44, - 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x73, 0x68, 0x6f, - 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, - 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, - 0x73, 0x68, 0x6f, 0x70, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 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, 0x22, 0x8b, 0x01, - 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x44, 0x61, 0x74, 0x61, - 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, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x08, - 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 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, 0x2d, 0x0a, 0x06, 0x74, 0x75, - 0x6a, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, 0x54, - 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x2e, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6c, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, - 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x67, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, 0x6f, 0x72, 0x67, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x22, - 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x04, 0x0a, - 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, - 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x43, 0x6c, 0x61, - 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x06, 0x6f, 0x72, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x72, 0x64, 0x65, - 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x12, 0x21, - 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x53, 0x6b, 0x69, 0x6c, - 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, - 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, - 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x74, - 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, - 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, - 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x6b, 0x69, - 0x6c, 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, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x53, + 0x6b, 0x69, 0x6c, 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, 0x38, 0x0a, 0x0a, 0x46, 0x6f, 0x72, 0x67, 0x65, 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, 0x22, + 0x70, 0x0a, 0x0a, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x29, 0x0a, + 0x04, 0x73, 0x68, 0x6f, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x44, 0x42, + 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x04, 0x73, 0x68, 0x6f, 0x70, 0x1a, 0x37, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 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, + 0x01, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, + 0x44, 0x61, 0x74, 0x61, 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, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x42, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, + 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, + 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, + 0xba, 0x01, 0x0a, 0x08, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 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, 0x2d, + 0x0a, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x44, 0x42, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x2e, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x74, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, + 0x6c, 0x69, 0x64, 0x65, 0x72, 0x1a, 0x45, 0x0a, 0x0b, 0x54, 0x75, 0x6a, 0x69, 0x61, 0x6e, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x09, + 0x46, 0x6f, 0x72, 0x67, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6f, 0x72, + 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x66, + 0x6f, 0x72, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, + 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, + 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x05, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5a, 0x0a, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, + 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x65, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x82, 0x04, 0x0a, 0x08, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 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, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, + 0x2e, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x6e, 0x67, 0x12, 0x23, 0x0a, + 0x06, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, + 0x4f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x6e, 0x67, 0x52, 0x06, 0x6f, 0x72, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x6b, 0x69, 0x6c, + 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x4c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, + 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, + 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x44, 0x42, 0x53, + 0x6d, 0x69, 0x74, 0x68, 0x79, 0x2e, 0x44, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x65, 0x73, 0x6b, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, + 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x76, 0x65, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x38, 0x0a, + 0x0a, 0x53, 0x6b, 0x69, 0x6c, 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, 0x3c, 0x0a, 0x0e, 0x44, 0x65, 0x73, 0x6b, 0x46, + 0x6c, 0x6f, 0x6f, 0x72, 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 ( From 81552f2effbdf70320daa685d61b134b63a7bfd4 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 14 Feb 2023 18:37:10 +0800 Subject: [PATCH 19/21] =?UTF-8?q?=E4=B8=8A=E4=BC=A0pvp=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pvp/api_into.go | 2 +- modules/pvp/module.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/pvp/api_into.go b/modules/pvp/api_into.go index a81c57f5e..7a2e853b6 100644 --- a/modules/pvp/api_into.go +++ b/modules/pvp/api_into.go @@ -36,7 +36,7 @@ func (this *apiComp) Into(session comm.IUserSession, req *pb.PvpIntoReq) (code p battle.RedSession.SetSession(session.GetIP(), session.GetSessionId(), session.GetServiecTag(), session.GetGatewayServiceId(), session.GetUserId()) } else { battle.BlueOffline = false - battle.RedSession.SetSession(session.GetIP(), session.GetSessionId(), session.GetServiecTag(), session.GetGatewayServiceId(), session.GetUserId()) + battle.BlueSession.SetSession(session.GetIP(), session.GetSessionId(), session.GetServiecTag(), session.GetGatewayServiceId(), session.GetUserId()) } battle.lock.Unlock() } diff --git a/modules/pvp/module.go b/modules/pvp/module.go index 7356e1274..2f6659f57 100644 --- a/modules/pvp/module.go +++ b/modules/pvp/module.go @@ -389,7 +389,9 @@ func (this *Pvp) useroffline(session comm.IUserSession) { } if v.curroperate.Side == side { - timewheel.Remove(v.operatetimer) + if v.operatetimer != nil { + timewheel.Remove(v.operatetimer) + } v.curroperate.Auto = true data, _ = proto.Marshal(v.curroperate) if code = this.battle.InCmdBattle(&pb.BattleInCmdReq{ From ceeae6f6a16890c154972621eacaf18a00dcd3f1 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 15 Feb 2023 16:21:14 +0800 Subject: [PATCH 20/21] =?UTF-8?q?=E4=B8=8A=E4=BC=A0cmd=20=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/gameconfig.go | 1 + services/cmd/main.go | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/comm/gameconfig.go b/comm/gameconfig.go index c593f99b6..3fa0e52ea 100644 --- a/comm/gameconfig.go +++ b/comm/gameconfig.go @@ -18,6 +18,7 @@ type GameConfig struct { Gateways []string //网关服务["127.0.0.1:7895"] GatewayPorts []int //网关通信端口 Workers []string //工作服 + BattleAddr string //战斗服地址 } //区服db配置 diff --git a/services/cmd/main.go b/services/cmd/main.go index cc347f900..d1c4ceefd 100644 --- a/services/cmd/main.go +++ b/services/cmd/main.go @@ -306,6 +306,12 @@ func convertServiceSttings(config *comm.GameConfig, id int, stype string, ip str sseting.Id = fmt.Sprintf("%s_%s%d", config.AreaId, comm.Service_Worker, id) sseting.Type = comm.Service_Worker sseting.Sys["rpcx"]["RpcxStartType"] = 2 + if config.BattleAddr != "" { + sseting.Modules["battle"]["OpenCheck"] = true + sseting.Modules["battle"]["BattleServerAddr"] = config.BattleAddr + } else { + sseting.Modules["battle"]["OpenCheck"] = false + } break case comm.Service_Mainte: //维护服务 sseting.Id = fmt.Sprintf("%s_%s", config.AreaId, comm.Service_Mainte) From 936bed87570003734f774dcb6eebfafb71536808 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 16 Feb 2023 10:57:01 +0800 Subject: [PATCH 21/21] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/编译部署文档.md | 91 ++++++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 35 deletions(-) diff --git a/bin/编译部署文档.md b/bin/编译部署文档.md index 1a4c65d83..9286b6123 100644 --- a/bin/编译部署文档.md +++ b/bin/编译部署文档.md @@ -1,69 +1,85 @@ ## 梦工厂编译部署文档 ### 梦工厂外网测试服 -1. DB服务:119.3.105.109 账号:root 密码:l2qMQigN4xOA MongoDB和Rides 的地址 - - MongoDB 账号:root 密码:iamciniao - - Rides 密码:kujqweiasd + +1. DB 服务:119.3.105.109 账号:root 密码:l2qMQigN4xOA MongoDB 和 Rides 的地址 + +- MongoDB 账号:root 密码:iamciniao +- Rides 密码:kujqweiasd + 2. 程序运行服:119.3.89.14 账号:root 密码:l2qMQigN4xOA - ### 编译项目代码 -1. 拉取git仓库代码:git clone http://git.legu.cc/liwei_3d/go_dreamfactory.git -2. 进入 go_dreamfactory 目录 执行:go mod tidy (需要安装golang 版本 go1.18.2以上环境:https://www.jianshu.com/p/35a161738d83) + +1. 拉取 git 仓库代码:git clone http://git.legu.cc/liwei_3d/go_dreamfactory.git +2. 进入 go_dreamfactory 目录 执行:go mod tidy (需要安装 golang 版本 go1.18.2 以上环境:https://www.jianshu.com/p/35a161738d83) 3. 进入 go_dreamfactory/bin 目录下,执行 bulid_linux.sh 脚本 编译执行文件 -4. 拷贝bin目录作为发布文件 +4. 拷贝 bin 目录作为发布文件 ### 安装部署依赖环境 + 1. 安装 MongoDB 教程 https://segmentfault.com/a/1190000039268500 -2. 安装 Redis 教程 - - 单节点 https://segmentfault.com/a/1190000023178516 - - 集群:https://blog.csdn.net/jiang1986829/article/details/108667854 +2. 安装 Redis 教程 + - 单节点 https://segmentfault.com/a/1190000023178516 + - 集群:https://blog.csdn.net/jiang1986829/article/details/108667854 3. 安装 Consul https://blog.csdn.net/jeikerxiao/article/details/78114413 +4. 安装 NetCore SDK6 版本 https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos ### 修改配置文件 + 1. 进入发布文件(bin 目录) 下 conf 目录 2. 修改配置文件中 MongoDB,Redis,Consul 相关配置 + ``` rpcx: #rpcx 系统配置 Debug: true AutoConnect: true #自动连接到集群服务节点 RpcxStartType: 1 #0 服务端 1是客户端 ConsulServers: ["10.0.0.9:8500"] #Consul 服务地址 - cache: #缓存系统 + cache: #缓存系统 Redis_IsCluster: false #是否是集群 Redis_Addr: ["10.0.0.9:6986"] #Redis 服务地址 Redis_Password: "li13451234" #Redis 服务密码 Redis_DB: 6 #Redis 数据存储db - db: #存储系统 + db: #存储系统 MongodbUrl: "mongodb://10.0.0.9:27019" #Mongodb服务地址 MongodbDatabase: "dreamfactory" #梦工厂数据库名 ``` -3. 修改区服id + +3. 修改区服 id + ``` tag : "dreamfactory_liwei" #服务集群标签 在梦工厂中作为区服id 同区服内的服务可以互相通信,不同区服的不能互相通信 ``` -4. 配置跨服服务器 此配置只在gateway服务器上 + +4. 配置跨服服务器 此配置只在 gateway 服务器上 + ``` gateway: Debug: true SpanServiceTag: "dreamfactory_span" #服务服务集群 ListenPort: 7891 ``` -5. 配置多个worker服务 - - 配置多个worker 只需要拷贝 worker_1.yaml 文件到 worker_2.yaml 文件 - - 修改 worker_2.yaml 下配置文件中 - ``` - id: "worker_1" #修改worker_1 到worker_2, 服务的唯一id 在同一集群下唯一即可 - ip: "127.0.0.1" #运行主机Ip 保证同集群下服务可以通过此ip互相访问 - port: 9569 #rpc通信端口 不被占用即可 - log: #日志系统 - FileName: "./log/worker_1.log" #修改日志文件地址 以免和其他worker冲突 日志文件存放地址 - ``` +5. 配置多个 worker 服务 + +- 配置多个 worker 只需要拷贝 worker_1.yaml 文件到 worker_2.yaml 文件 +- 修改 worker_2.yaml 下配置文件中 + +``` + id: "worker_1" #修改worker_1 到worker_2, 服务的唯一id 在同一集群下唯一即可 + ip: "127.0.0.1" #运行主机Ip 保证同集群下服务可以通过此ip互相访问 + port: 9569 #rpc通信端口 不被占用即可 + + log: #日志系统 + FileName: "./log/worker_1.log" #修改日志文件地址 以免和其他worker冲突 日志文件存放地址 +``` ### 部署梦工厂服务 + 1. 将修改完毕的发布文件(bin 目录)考本到目标主机服务器上,选择适合目录保存 2. 进入发布文件 执行 ./start.sh 脚本 正常执行 + ``` [root@master bin]# ./start.sh starting mainte... @@ -73,7 +89,9 @@ starting gateway_1... start success ``` -3. 程序启动后会自动生成 log目录,进入log 目录 查看各个服务文件启动日志是否正常 ,每个服务会对应一个日志文件 日志文件名在 服务配置中有配置,正常启动 + +3. 程序启动后会自动生成 log 目录,进入 log 目录 查看各个服务文件启动日志是否正常 ,每个服务会对应一个日志文件 日志文件名在 服务配置中有配置,正常启动 + ``` 2022/07/22 11:45:56.681 INFO rpcx/service.go:80 Sys log Init success ! 2022/07/22 11:45:56.682 INFO rpcx/service.go:86 Sys event Init success ! @@ -85,29 +103,32 @@ 2022/07/22 11:45:56.682 INFO cbase/servicebase.go:109 注册模块【gateway】 ``` -4. 是同网页工具以及客户端 测试服务是否正常 -1. 网页工具 http://ip:prot/#/protocol/index 修改页面中服务器连接地址 点击连接,测试user.login协议 +4. 是同网页工具以及客户端 测试服务是否正常 +1. 网页工具 http://ip:prot/#/protocol/index 修改页面中服务器连接地址 点击连接,测试 user.login 协议 ### 外网服务器地址 + - ip:119.3.89.14 - user:root - password:l2qMQigN4xOA ### df01 区服 (暂时不动) + - 目录:/home/go/bin - 关闭命令: - * ./cmd stop -g ./conf/gm02.json - * ./cmd stop -g ./conf/gm01.json + - ./cmd stop -g ./conf/gm02.json + - ./cmd stop -g ./conf/gm01.json - 启动命令: - * ./cmd start -g ./conf/gm01.json - * ./cmd start -g ./conf/gm02.json + - ./cmd start -g ./conf/gm01.json + - ./cmd start -g ./conf/gm02.json ### df02 区服 + - 目录:/home/liwei/bin - 关闭命令: - * ./cmd stop -g ./conf/gm02.json - * ./cmd stop -g ./conf/gm01.json + - ./cmd stop -g ./conf/gm02.json + - ./cmd stop -g ./conf/gm01.json - 启动命令: - * ./cmd start -g ./conf/gm01.json - * ./cmd start -g ./conf/gm02.json \ No newline at end of file + - ./cmd start -g ./conf/gm01.json + - ./cmd start -g ./conf/gm02.json