From 0368a2da91e41175497705eac5974317e8308469 Mon Sep 17 00:00:00 2001 From: NorthLan <6995syu@163.com> Date: Thu, 26 May 2022 21:18:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B8=B8=E6=88=8F=E7=AE=A1=E7=90=86=E5=99=A8?= =?UTF-8?q?=EF=BC=8C=E6=88=BF=E9=97=B4=E7=AE=A1=E7=90=86=E5=99=A8=EF=BC=8C?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86=E5=99=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/user_center/pb/user_center.pb.go | 2274 +++++++++++--- app/user_center/pb/user_center.proto | 200 +- app/user_center/pb/user_center_grpc.pb.go | 200 +- app/user_center/usercenter/user_center.go | 46 +- config-dev.yml | 18 +- config/Config.go | 6 +- game/live_logic/common_handler.go | 75 +- game/live_logic/logic.go | 21 +- game/live_logic/manager.go | 11 + game/live_logic/zhg_handler.go | 16 +- game/live_logic/zhghz_handler.go | 12 +- game/logic/game_status/game_status.go | 50 + game/logic/init.go | 18 +- game/logic/room/manager.go | 48 + game/logic/user/user_integral.go | 38 +- game/logic/zhg/statistics/stat_pvp.go | 44 +- game/manager/data.go | 50 + game/manager/data_manager.go | 36 + game/manager/manager.go | 48 + .../manager.go => manager/room_manager.go} | 159 +- game/manager/vars.go | 7 + game/msg_transfer/init.go | 6 + game/msg_transfer/nobility_transfer.go | 84 + game/msg_transfer/reward_transfer.go | 76 + game/pb/common/Common.cs | 2758 ++++++++++++----- game/pb/common/common.pb.go | 694 ++++- game/pb/common/common.proto | 58 +- game/pb/game/zhg/Rank.cs | 2 +- game/pb/game/zhg/Stat.cs | 728 ++--- game/pb/game/zhg/rank.pb.go | 2 +- game/pb/game/zhg/rank.proto | 2 +- game/pb/game/zhg/stat.pb.go | 288 +- game/pb/game/zhg/stat.proto | 27 +- game/pb/mq/mq.pb.go | 369 ++- game/pb/mq/mq.proto | 28 +- go.mod | 3 +- go.sum | 2 - 37 files changed, 6380 insertions(+), 2124 deletions(-) create mode 100644 game/logic/game_status/game_status.go create mode 100644 game/logic/room/manager.go create mode 100644 game/manager/data.go create mode 100644 game/manager/data_manager.go create mode 100644 game/manager/manager.go rename game/{room/manager.go => manager/room_manager.go} (50%) create mode 100644 game/manager/vars.go create mode 100644 game/msg_transfer/nobility_transfer.go create mode 100644 game/msg_transfer/reward_transfer.go diff --git a/app/user_center/pb/user_center.pb.go b/app/user_center/pb/user_center.pb.go index 623210e..556bd71 100644 --- a/app/user_center/pb/user_center.pb.go +++ b/app/user_center/pb/user_center.pb.go @@ -20,6 +20,181 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type IntegralType int32 + +const ( + IntegralType_Battle IntegralType = 0 // 战斗 + IntegralType_Gift IntegralType = 1 // 礼物 + IntegralType_Other IntegralType = 10 // 其它积分 +) + +// Enum value maps for IntegralType. +var ( + IntegralType_name = map[int32]string{ + 0: "Battle", + 1: "Gift", + 10: "Other", + } + IntegralType_value = map[string]int32{ + "Battle": 0, + "Gift": 1, + "Other": 10, + } +) + +func (x IntegralType) Enum() *IntegralType { + p := new(IntegralType) + *p = x + return p +} + +func (x IntegralType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IntegralType) Descriptor() protoreflect.EnumDescriptor { + return file_user_center_proto_enumTypes[0].Descriptor() +} + +func (IntegralType) Type() protoreflect.EnumType { + return &file_user_center_proto_enumTypes[0] +} + +func (x IntegralType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IntegralType.Descriptor instead. +func (IntegralType) EnumDescriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{0} +} + +type GiftType int32 + +const ( + GiftType_starter GiftType = 0 // 新手礼包 + GiftType_subsistence GiftType = 1 // 低保 +) + +// Enum value maps for GiftType. +var ( + GiftType_name = map[int32]string{ + 0: "starter", + 1: "subsistence", + } + GiftType_value = map[string]int32{ + "starter": 0, + "subsistence": 1, + } +) + +func (x GiftType) Enum() *GiftType { + p := new(GiftType) + *p = x + return p +} + +func (x GiftType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GiftType) Descriptor() protoreflect.EnumDescriptor { + return file_user_center_proto_enumTypes[1].Descriptor() +} + +func (GiftType) Type() protoreflect.EnumType { + return &file_user_center_proto_enumTypes[1] +} + +func (x GiftType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GiftType.Descriptor instead. +func (GiftType) EnumDescriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{1} +} + +////////////////////// rank +type RankType int32 + +const ( + RankType_Unknown RankType = 0 + RankType_Damage RankType = 1 // 伤害榜 + RankType_DeDamage RankType = 2 // 受伤榜 + RankType_General RankType = 3 // 名将榜 + RankType_DeGeneral RankType = 4 // 落马榜 + RankType_KillUnit RankType = 5 // 小兵击杀 + RankType_DeKillUnit RankType = 6 // 小兵被杀 + RankType_KillPlayer RankType = 7 // 击杀玩家 + RankType_DeKillPlayer RankType = 8 // 被杀榜 + RankType_Win RankType = 9 // 获胜榜 + RankType_Lost RankType = 10 // 战败榜 + RankType_FirstBlood RankType = 11 // 一血榜 + RankType_DeFirstBlood RankType = 12 // 被拿一血榜 +) + +// Enum value maps for RankType. +var ( + RankType_name = map[int32]string{ + 0: "Unknown", + 1: "Damage", + 2: "DeDamage", + 3: "General", + 4: "DeGeneral", + 5: "KillUnit", + 6: "DeKillUnit", + 7: "KillPlayer", + 8: "DeKillPlayer", + 9: "Win", + 10: "Lost", + 11: "FirstBlood", + 12: "DeFirstBlood", + } + RankType_value = map[string]int32{ + "Unknown": 0, + "Damage": 1, + "DeDamage": 2, + "General": 3, + "DeGeneral": 4, + "KillUnit": 5, + "DeKillUnit": 6, + "KillPlayer": 7, + "DeKillPlayer": 8, + "Win": 9, + "Lost": 10, + "FirstBlood": 11, + "DeFirstBlood": 12, + } +) + +func (x RankType) Enum() *RankType { + p := new(RankType) + *p = x + return p +} + +func (x RankType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RankType) Descriptor() protoreflect.EnumDescriptor { + return file_user_center_proto_enumTypes[2].Descriptor() +} + +func (RankType) Type() protoreflect.EnumType { + return &file_user_center_proto_enumTypes[2] +} + +func (x RankType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RankType.Descriptor instead. +func (RankType) EnumDescriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{2} +} + // model type User struct { state protoimpl.MessageState @@ -368,8 +543,10 @@ type ChangeIntegralReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID - Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 变更数量 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID(RPC内部) + Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"` // 变更数量 + IntegralType IntegralType `protobuf:"varint,4,opt,name=integralType,proto3,enum=pb.IntegralType" json:"integralType,omitempty"` // 积分类型 } func (x *ChangeIntegralReq) Reset() { @@ -411,6 +588,13 @@ func (x *ChangeIntegralReq) GetUserId() int64 { return 0 } +func (x *ChangeIntegralReq) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + func (x *ChangeIntegralReq) GetChange() int64 { if x != nil { return x.Change @@ -418,6 +602,13 @@ func (x *ChangeIntegralReq) GetChange() int64 { return 0 } +func (x *ChangeIntegralReq) GetIntegralType() IntegralType { + if x != nil { + return x.IntegralType + } + return IntegralType_Battle +} + // 变更积分回复 type ChangeIntegralResp struct { state protoimpl.MessageState @@ -544,7 +735,7 @@ type UserCheckInResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 成功与否 + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 IntegralChange int64 `protobuf:"varint,3,opt,name=integralChange,proto3" json:"integralChange,omitempty"` // 积分变动量 Integral int64 `protobuf:"varint,4,opt,name=integral,proto3" json:"integral,omitempty"` // 变动后的积分量 @@ -583,11 +774,11 @@ func (*UserCheckInResp) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{9} } -func (x *UserCheckInResp) GetSuccess() bool { +func (x *UserCheckInResp) GetCode() int32 { if x != nil { - return x.Success + return x.Code } - return false + return 0 } func (x *UserCheckInResp) GetMsg() string { @@ -618,27 +809,211 @@ func (x *UserCheckInResp) GetIsCritical() bool { return false } +// 转移用户积分 +type TransferUserIntegralReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 源用户ID + TargetUserId int64 `protobuf:"varint,2,opt,name=targetUserId,proto3" json:"targetUserId,omitempty"` // 目标用户 + Transfer int64 `protobuf:"varint,3,opt,name=transfer,proto3" json:"transfer,omitempty"` // 待转移量 +} + +func (x *TransferUserIntegralReq) Reset() { + *x = TransferUserIntegralReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransferUserIntegralReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferUserIntegralReq) ProtoMessage() {} + +func (x *TransferUserIntegralReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_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 TransferUserIntegralReq.ProtoReflect.Descriptor instead. +func (*TransferUserIntegralReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{10} +} + +func (x *TransferUserIntegralReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *TransferUserIntegralReq) GetTargetUserId() int64 { + if x != nil { + return x.TargetUserId + } + return 0 +} + +func (x *TransferUserIntegralReq) GetTransfer() int64 { + if x != nil { + return x.Transfer + } + return 0 +} + +type TransferUserIntegralResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 + UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` + Uname string `protobuf:"bytes,4,opt,name=uname,proto3" json:"uname,omitempty"` + Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` + TargetUserId int64 `protobuf:"varint,6,opt,name=targetUserId,proto3" json:"targetUserId,omitempty"` + TargetUname string `protobuf:"bytes,7,opt,name=targetUname,proto3" json:"targetUname,omitempty"` + TargetAvatar string `protobuf:"bytes,8,opt,name=targetAvatar,proto3" json:"targetAvatar,omitempty"` + UserIntegral int64 `protobuf:"varint,10,opt,name=userIntegral,proto3" json:"userIntegral,omitempty"` // 源用户积分剩余 + TargetUserIntegral int64 `protobuf:"varint,11,opt,name=targetUserIntegral,proto3" json:"targetUserIntegral,omitempty"` // 目标用户积分剩余 +} + +func (x *TransferUserIntegralResp) Reset() { + *x = TransferUserIntegralResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransferUserIntegralResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferUserIntegralResp) ProtoMessage() {} + +func (x *TransferUserIntegralResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_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 TransferUserIntegralResp.ProtoReflect.Descriptor instead. +func (*TransferUserIntegralResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{11} +} + +func (x *TransferUserIntegralResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *TransferUserIntegralResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *TransferUserIntegralResp) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *TransferUserIntegralResp) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *TransferUserIntegralResp) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *TransferUserIntegralResp) GetTargetUserId() int64 { + if x != nil { + return x.TargetUserId + } + return 0 +} + +func (x *TransferUserIntegralResp) GetTargetUname() string { + if x != nil { + return x.TargetUname + } + return "" +} + +func (x *TransferUserIntegralResp) GetTargetAvatar() string { + if x != nil { + return x.TargetAvatar + } + return "" +} + +func (x *TransferUserIntegralResp) GetUserIntegral() int64 { + if x != nil { + return x.UserIntegral + } + return 0 +} + +func (x *TransferUserIntegralResp) GetTargetUserIntegral() int64 { + if x != nil { + return x.TargetUserIntegral + } + return 0 +} + // 用户送礼请求 type UserSendGiftReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` // 平台 - UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID - PUid string `protobuf:"bytes,3,opt,name=pUid,proto3" json:"pUid,omitempty"` // 平台用户ID - RoomId string `protobuf:"bytes,4,opt,name=roomId,proto3" json:"roomId,omitempty"` // 直播间ID - GiftId int64 `protobuf:"varint,5,opt,name=giftId,proto3" json:"giftId,omitempty"` // 礼物ID - GiftName string `protobuf:"bytes,6,opt,name=giftName,proto3" json:"giftName,omitempty"` // 礼物名 - Num int64 `protobuf:"varint,7,opt,name=num,proto3" json:"num,omitempty"` // 赠送数量 - Price int64 `protobuf:"varint,8,opt,name=price,proto3" json:"price,omitempty"` // 礼物单价(系统不存在对应礼物数据时使用) - IsPaid bool `protobuf:"varint,9,opt,name=isPaid,proto3" json:"isPaid,omitempty"` // 是否收费礼物 + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` // 平台 + UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID + PUid string `protobuf:"bytes,3,opt,name=pUid,proto3" json:"pUid,omitempty"` // 平台用户ID + RoomId string `protobuf:"bytes,4,opt,name=roomId,proto3" json:"roomId,omitempty"` // 直播间ID + GiftId int64 `protobuf:"varint,5,opt,name=giftId,proto3" json:"giftId,omitempty"` // 礼物ID + GiftName string `protobuf:"bytes,6,opt,name=giftName,proto3" json:"giftName,omitempty"` // 礼物名 + Num int64 `protobuf:"varint,7,opt,name=num,proto3" json:"num,omitempty"` // 赠送数量 + Price int64 `protobuf:"varint,8,opt,name=price,proto3" json:"price,omitempty"` // 礼物单价(系统不存在对应礼物数据时使用) + IsPaid bool `protobuf:"varint,9,opt,name=isPaid,proto3" json:"isPaid,omitempty"` // 是否收费礼物 + BattleId int64 `protobuf:"varint,10,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战局ID } func (x *UserSendGiftReq) Reset() { *x = UserSendGiftReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[10] + mi := &file_user_center_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -651,7 +1026,7 @@ func (x *UserSendGiftReq) String() string { func (*UserSendGiftReq) ProtoMessage() {} func (x *UserSendGiftReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[10] + mi := &file_user_center_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -664,7 +1039,7 @@ func (x *UserSendGiftReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserSendGiftReq.ProtoReflect.Descriptor instead. func (*UserSendGiftReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{10} + return file_user_center_proto_rawDescGZIP(), []int{12} } func (x *UserSendGiftReq) GetPlatform() string { @@ -730,6 +1105,13 @@ func (x *UserSendGiftReq) GetIsPaid() bool { return false } +func (x *UserSendGiftReq) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + // 用户送礼回复 type UserSendGiftResp struct { state protoimpl.MessageState @@ -742,7 +1124,7 @@ type UserSendGiftResp struct { func (x *UserSendGiftResp) Reset() { *x = UserSendGiftResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[11] + mi := &file_user_center_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -755,7 +1137,7 @@ func (x *UserSendGiftResp) String() string { func (*UserSendGiftResp) ProtoMessage() {} func (x *UserSendGiftResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[11] + mi := &file_user_center_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -768,7 +1150,7 @@ func (x *UserSendGiftResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserSendGiftResp.ProtoReflect.Descriptor instead. func (*UserSendGiftResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{11} + return file_user_center_proto_rawDescGZIP(), []int{13} } func (x *UserSendGiftResp) GetIntegral() *ChangeIntegralResp { @@ -784,22 +1166,24 @@ type UserBuyNobilityReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` // 平台 - PUid string `protobuf:"bytes,2,opt,name=pUid,proto3" json:"pUid,omitempty"` // 平台用户ID - RoomId string `protobuf:"bytes,3,opt,name=roomId,proto3" json:"roomId,omitempty"` // 直播间ID - GiftId int64 `protobuf:"varint,4,opt,name=giftId,proto3" json:"giftId,omitempty"` // 礼物ID - GiftName string `protobuf:"bytes,5,opt,name=giftName,proto3" json:"giftName,omitempty"` // 礼物名 - Num int64 `protobuf:"varint,6,opt,name=num,proto3" json:"num,omitempty"` // 赠送数量 - Price int64 `protobuf:"varint,7,opt,name=price,proto3" json:"price,omitempty"` // 礼物单价(系统不存在对应礼物数据时使用) - Level int64 `protobuf:"varint,8,opt,name=level,proto3" json:"level,omitempty"` // 贵族等级 - StartTime int64 `protobuf:"varint,9,opt,name=startTime,proto3" json:"startTime,omitempty"` // 开始时间 - EndTime int64 `protobuf:"varint,10,opt,name=endTime,proto3" json:"endTime,omitempty"` // 结束时间 + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` // 平台 + UserId int64 `protobuf:"varint,2,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID + PUid string `protobuf:"bytes,3,opt,name=pUid,proto3" json:"pUid,omitempty"` // 平台用户ID + BattleId int64 `protobuf:"varint,4,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战局ID + RoomId string `protobuf:"bytes,5,opt,name=roomId,proto3" json:"roomId,omitempty"` // 直播间ID + GiftId int64 `protobuf:"varint,6,opt,name=giftId,proto3" json:"giftId,omitempty"` // 礼物ID + GiftName string `protobuf:"bytes,7,opt,name=giftName,proto3" json:"giftName,omitempty"` // 礼物名 + Num int64 `protobuf:"varint,8,opt,name=num,proto3" json:"num,omitempty"` // 赠送数量 + Price int64 `protobuf:"varint,9,opt,name=price,proto3" json:"price,omitempty"` // 礼物单价(系统不存在对应礼物数据时使用) + Level int64 `protobuf:"varint,10,opt,name=level,proto3" json:"level,omitempty"` // 贵族等级 + StartTime int64 `protobuf:"varint,11,opt,name=startTime,proto3" json:"startTime,omitempty"` // 开始时间 + EndTime int64 `protobuf:"varint,12,opt,name=endTime,proto3" json:"endTime,omitempty"` // 结束时间 } func (x *UserBuyNobilityReq) Reset() { *x = UserBuyNobilityReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[12] + mi := &file_user_center_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -812,7 +1196,7 @@ func (x *UserBuyNobilityReq) String() string { func (*UserBuyNobilityReq) ProtoMessage() {} func (x *UserBuyNobilityReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[12] + mi := &file_user_center_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -825,7 +1209,7 @@ func (x *UserBuyNobilityReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserBuyNobilityReq.ProtoReflect.Descriptor instead. func (*UserBuyNobilityReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{12} + return file_user_center_proto_rawDescGZIP(), []int{14} } func (x *UserBuyNobilityReq) GetPlatform() string { @@ -835,6 +1219,13 @@ func (x *UserBuyNobilityReq) GetPlatform() string { return "" } +func (x *UserBuyNobilityReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + func (x *UserBuyNobilityReq) GetPUid() string { if x != nil { return x.PUid @@ -842,6 +1233,13 @@ func (x *UserBuyNobilityReq) GetPUid() string { return "" } +func (x *UserBuyNobilityReq) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + func (x *UserBuyNobilityReq) GetRoomId() string { if x != nil { return x.RoomId @@ -904,14 +1302,13 @@ type UserBuyNobilityResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // 系统用户信息 Integral *ChangeIntegralResp `protobuf:"bytes,10,opt,name=integral,proto3" json:"integral,omitempty"` // 积分变动 } func (x *UserBuyNobilityResp) Reset() { *x = UserBuyNobilityResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[13] + mi := &file_user_center_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -924,7 +1321,7 @@ func (x *UserBuyNobilityResp) String() string { func (*UserBuyNobilityResp) ProtoMessage() {} func (x *UserBuyNobilityResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[13] + mi := &file_user_center_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -937,14 +1334,7 @@ func (x *UserBuyNobilityResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserBuyNobilityResp.ProtoReflect.Descriptor instead. func (*UserBuyNobilityResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{13} -} - -func (x *UserBuyNobilityResp) GetUser() *User { - if x != nil { - return x.User - } - return nil + return file_user_center_proto_rawDescGZIP(), []int{15} } func (x *UserBuyNobilityResp) GetIntegral() *ChangeIntegralResp { @@ -968,7 +1358,7 @@ type StatPvPKillReq struct { func (x *StatPvPKillReq) Reset() { *x = StatPvPKillReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[14] + mi := &file_user_center_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -981,7 +1371,7 @@ func (x *StatPvPKillReq) String() string { func (*StatPvPKillReq) ProtoMessage() {} func (x *StatPvPKillReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[14] + mi := &file_user_center_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -994,7 +1384,7 @@ func (x *StatPvPKillReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPKillReq.ProtoReflect.Descriptor instead. func (*StatPvPKillReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{14} + return file_user_center_proto_rawDescGZIP(), []int{16} } func (x *StatPvPKillReq) GetUid() int64 { @@ -1031,7 +1421,7 @@ type StatPvPFirstBloodReq struct { func (x *StatPvPFirstBloodReq) Reset() { *x = StatPvPFirstBloodReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[15] + mi := &file_user_center_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1044,7 +1434,7 @@ func (x *StatPvPFirstBloodReq) String() string { func (*StatPvPFirstBloodReq) ProtoMessage() {} func (x *StatPvPFirstBloodReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[15] + mi := &file_user_center_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1057,7 +1447,7 @@ func (x *StatPvPFirstBloodReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPFirstBloodReq.ProtoReflect.Descriptor instead. func (*StatPvPFirstBloodReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{15} + return file_user_center_proto_rawDescGZIP(), []int{17} } func (x *StatPvPFirstBloodReq) GetUid() int64 { @@ -1080,16 +1470,16 @@ type StatPvPReportReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 - General *StatPvPReportReq_General `protobuf:"bytes,2,opt,name=general,proto3" json:"general,omitempty"` - WinItems []*StatPvPReportReq_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 - LostItems []*StatPvPReportReq_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 + WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID + WinItems []*StatPvPReportReq_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 + LostItems []*StatPvPReportReq_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 } func (x *StatPvPReportReq) Reset() { *x = StatPvPReportReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[16] + mi := &file_user_center_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1102,7 +1492,7 @@ func (x *StatPvPReportReq) String() string { func (*StatPvPReportReq) ProtoMessage() {} func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[16] + mi := &file_user_center_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1115,7 +1505,7 @@ func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportReq.ProtoReflect.Descriptor instead. func (*StatPvPReportReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{16} + return file_user_center_proto_rawDescGZIP(), []int{18} } func (x *StatPvPReportReq) GetWinCamp() int32 { @@ -1125,11 +1515,11 @@ func (x *StatPvPReportReq) GetWinCamp() int32 { return 0 } -func (x *StatPvPReportReq) GetGeneral() *StatPvPReportReq_General { +func (x *StatPvPReportReq) GetBattleId() int64 { if x != nil { - return x.General + return x.BattleId } - return nil + return 0 } func (x *StatPvPReportReq) GetWinItems() []*StatPvPReportReq_Item { @@ -1152,15 +1542,14 @@ type StatPvPReportResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - General *StatPvPReportResp_Item `protobuf:"bytes,1,opt,name=general,proto3" json:"general,omitempty"` // 名将 - WinItems []*StatPvPReportResp_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 - LostItems []*StatPvPReportResp_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 + WinItems []*StatPvPReportResp_Item `protobuf:"bytes,1,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 + LostItems []*StatPvPReportResp_Item `protobuf:"bytes,2,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 } func (x *StatPvPReportResp) Reset() { *x = StatPvPReportResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[17] + mi := &file_user_center_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1173,7 +1562,7 @@ func (x *StatPvPReportResp) String() string { func (*StatPvPReportResp) ProtoMessage() {} func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[17] + mi := &file_user_center_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1186,31 +1575,301 @@ func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportResp.ProtoReflect.Descriptor instead. func (*StatPvPReportResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{17} + return file_user_center_proto_rawDescGZIP(), []int{19} } -func (x *StatPvPReportResp) GetGeneral() *StatPvPReportResp_Item { +func (x *StatPvPReportResp) GetWinItems() []*StatPvPReportResp_Item { if x != nil { - return x.General + return x.WinItems } return nil } -func (x *StatPvPReportResp) GetWinItems() []*StatPvPReportResp_Item { +func (x *StatPvPReportResp) GetLostItems() []*StatPvPReportResp_Item { if x != nil { - return x.WinItems + return x.LostItems } return nil } -func (x *StatPvPReportResp) GetLostItems() []*StatPvPReportResp_Item { +type GiftPackItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PackType string `protobuf:"bytes,1,opt,name=packType,proto3" json:"packType,omitempty"` // 礼包类型 starter:新手礼包 + PackName string `protobuf:"bytes,2,opt,name=packName,proto3" json:"packName,omitempty"` // 礼包名称 + Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral,omitempty"` // 获取的积分 + Title []string `protobuf:"bytes,4,rep,name=title,proto3" json:"title,omitempty"` // 获取的称号 +} + +func (x *GiftPackItem) Reset() { + *x = GiftPackItem{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GiftPackItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GiftPackItem) ProtoMessage() {} + +func (x *GiftPackItem) ProtoReflect() protoreflect.Message { + mi := &file_user_center_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 GiftPackItem.ProtoReflect.Descriptor instead. +func (*GiftPackItem) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{20} +} + +func (x *GiftPackItem) GetPackType() string { if x != nil { - return x.LostItems + return x.PackType + } + return "" +} + +func (x *GiftPackItem) GetPackName() string { + if x != nil { + return x.PackName + } + return "" +} + +func (x *GiftPackItem) GetIntegral() int64 { + if x != nil { + return x.Integral + } + return 0 +} + +func (x *GiftPackItem) GetTitle() []string { + if x != nil { + return x.Title + } + return nil +} + +// 领取礼包 +type DrawGiftPackReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` + GiftType string `protobuf:"bytes,3,opt,name=giftType,proto3" json:"giftType,omitempty"` +} + +func (x *DrawGiftPackReq) Reset() { + *x = DrawGiftPackReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DrawGiftPackReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DrawGiftPackReq) ProtoMessage() {} + +func (x *DrawGiftPackReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[21] + 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 DrawGiftPackReq.ProtoReflect.Descriptor instead. +func (*DrawGiftPackReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{21} +} + +func (x *DrawGiftPackReq) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *DrawGiftPackReq) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *DrawGiftPackReq) GetGiftType() string { + if x != nil { + return x.GiftType + } + return "" +} + +type DrawGiftPackResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` + Code int32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` // 领取结果 200:成功 201100:已经领取过 201101:已领取完 + Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 [领取成功|已经领取过|该用户已领取(当日|每周|每月)完所有礼包] + Item *GiftPackItem `protobuf:"bytes,10,opt,name=item,proto3" json:"item,omitempty"` +} + +func (x *DrawGiftPackResp) Reset() { + *x = DrawGiftPackResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DrawGiftPackResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DrawGiftPackResp) ProtoMessage() {} + +func (x *DrawGiftPackResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[22] + 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 DrawGiftPackResp.ProtoReflect.Descriptor instead. +func (*DrawGiftPackResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{22} +} + +func (x *DrawGiftPackResp) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *DrawGiftPackResp) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *DrawGiftPackResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *DrawGiftPackResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *DrawGiftPackResp) GetItem() *GiftPackItem { + if x != nil { + return x.Item } return nil } -// rank +// 往福利池中添加福利,扣除自己积分 +type IncreaseWelfareReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 + Welfare int64 `protobuf:"varint,3,opt,name=welfare,proto3" json:"welfare,omitempty"` // 投入值 +} + +func (x *IncreaseWelfareReq) Reset() { + *x = IncreaseWelfareReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IncreaseWelfareReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IncreaseWelfareReq) ProtoMessage() {} + +func (x *IncreaseWelfareReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_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 IncreaseWelfareReq.ProtoReflect.Descriptor instead. +func (*IncreaseWelfareReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{23} +} + +func (x *IncreaseWelfareReq) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *IncreaseWelfareReq) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *IncreaseWelfareReq) GetWelfare() int64 { + if x != nil { + return x.Welfare + } + return 0 +} + type RankPvpReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1223,7 +1882,7 @@ type RankPvpReq struct { func (x *RankPvpReq) Reset() { *x = RankPvpReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[18] + mi := &file_user_center_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1236,7 +1895,7 @@ func (x *RankPvpReq) String() string { func (*RankPvpReq) ProtoMessage() {} func (x *RankPvpReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[18] + mi := &file_user_center_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1249,7 +1908,7 @@ func (x *RankPvpReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpReq.ProtoReflect.Descriptor instead. func (*RankPvpReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{18} + return file_user_center_proto_rawDescGZIP(), []int{24} } func (x *RankPvpReq) GetType() int32 { @@ -1278,7 +1937,7 @@ type RankPvpResp struct { func (x *RankPvpResp) Reset() { *x = RankPvpResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[19] + mi := &file_user_center_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1291,7 +1950,7 @@ func (x *RankPvpResp) String() string { func (*RankPvpResp) ProtoMessage() {} func (x *RankPvpResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[19] + mi := &file_user_center_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1304,7 +1963,7 @@ func (x *RankPvpResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpResp.ProtoReflect.Descriptor instead. func (*RankPvpResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{19} + return file_user_center_proto_rawDescGZIP(), []int{25} } func (x *RankPvpResp) GetType() int32 { @@ -1321,36 +1980,33 @@ func (x *RankPvpResp) GetItems() []*RankPvpResp_Item { return nil } -type StatPvPReportReq_Item struct { +// RankPvpSubmitReq 手动排行榜结算 +type RankPvpSubmitReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - Damage int64 `protobuf:"varint,3,opt,name=damage,proto3" json:"damage,omitempty"` // 伤害量 - DeDamage int64 `protobuf:"varint,4,opt,name=deDamage,proto3" json:"deDamage,omitempty"` // 承受伤害 - KillUnit int64 `protobuf:"varint,5,opt,name=killUnit,proto3" json:"killUnit,omitempty"` // 击杀单位数量 - DeKillUnit int64 `protobuf:"varint,6,opt,name=deKillUnit,proto3" json:"deKillUnit,omitempty"` // 被杀单位数量 + RankType int32 `protobuf:"varint,1,opt,name=rankType,proto3" json:"rankType,omitempty"` // 待结算的排行榜类型 + AllRankType bool `protobuf:"varint,2,opt,name=allRankType,proto3" json:"allRankType,omitempty"` // 是否直接结算所有排行类型 } -func (x *StatPvPReportReq_Item) Reset() { - *x = StatPvPReportReq_Item{} +func (x *RankPvpSubmitReq) Reset() { + *x = RankPvpSubmitReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[20] + mi := &file_user_center_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatPvPReportReq_Item) String() string { +func (x *RankPvpSubmitReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatPvPReportReq_Item) ProtoMessage() {} +func (*RankPvpSubmitReq) ProtoMessage() {} -func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[20] +func (x *RankPvpSubmitReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1361,79 +2017,498 @@ func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatPvPReportReq_Item.ProtoReflect.Descriptor instead. -func (*StatPvPReportReq_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{16, 0} +// Deprecated: Use RankPvpSubmitReq.ProtoReflect.Descriptor instead. +func (*RankPvpSubmitReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{26} } -func (x *StatPvPReportReq_Item) GetUid() int64 { +func (x *RankPvpSubmitReq) GetRankType() int32 { if x != nil { - return x.Uid + return x.RankType } return 0 } -func (x *StatPvPReportReq_Item) GetUname() string { +func (x *RankPvpSubmitReq) GetAllRankType() bool { if x != nil { - return x.Uname + return x.AllRankType } - return "" + return false +} + +type RankPvpSubmitResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*RankPvpSubmitResp_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *RankPvpSubmitResp) Reset() { + *x = RankPvpSubmitResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RankPvpSubmitResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RankPvpSubmitResp) ProtoMessage() {} + +func (x *RankPvpSubmitResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_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 RankPvpSubmitResp.ProtoReflect.Descriptor instead. +func (*RankPvpSubmitResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{27} +} + +func (x *RankPvpSubmitResp) GetItems() []*RankPvpSubmitResp_Item { + if x != nil { + return x.Items + } + return nil +} + +// UserRankReq 查询用户自己的排行 +type UserRankReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // 用户名 + RankType int32 `protobuf:"varint,3,opt,name=rankType,proto3" json:"rankType,omitempty"` // 排行榜类型 + AllRankType bool `protobuf:"varint,4,opt,name=allRankType,proto3" json:"allRankType,omitempty"` // 直接查询所有排行类型 +} + +func (x *UserRankReq) Reset() { + *x = UserRankReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserRankReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserRankReq) ProtoMessage() {} + +func (x *UserRankReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_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 UserRankReq.ProtoReflect.Descriptor instead. +func (*UserRankReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{28} +} + +func (x *UserRankReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *UserRankReq) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UserRankReq) GetRankType() int32 { + if x != nil { + return x.RankType + } + return 0 +} + +func (x *UserRankReq) GetAllRankType() bool { + if x != nil { + return x.AllRankType + } + return false +} + +type UserRankResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*UserRankResp_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *UserRankResp) Reset() { + *x = UserRankResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserRankResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserRankResp) ProtoMessage() {} + +func (x *UserRankResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_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 UserRankResp.ProtoReflect.Descriptor instead. +func (*UserRankResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{29} +} + +func (x *UserRankResp) GetItems() []*UserRankResp_Item { + if x != nil { + return x.Items + } + return nil +} + +type StatPvPReportReq_Item struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 + Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) + Damage int64 `protobuf:"varint,4,opt,name=damage,proto3" json:"damage,omitempty"` // 伤害量 + DeDamage int64 `protobuf:"varint,5,opt,name=deDamage,proto3" json:"deDamage,omitempty"` // 承受伤害 + KillUnit int64 `protobuf:"varint,6,opt,name=killUnit,proto3" json:"killUnit,omitempty"` // 击杀单位数量 + DeKillUnit int64 `protobuf:"varint,7,opt,name=deKillUnit,proto3" json:"deKillUnit,omitempty"` // 被杀单位数量 +} + +func (x *StatPvPReportReq_Item) Reset() { + *x = StatPvPReportReq_Item{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatPvPReportReq_Item) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatPvPReportReq_Item) ProtoMessage() {} + +func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[30] + 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 StatPvPReportReq_Item.ProtoReflect.Descriptor instead. +func (*StatPvPReportReq_Item) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *StatPvPReportReq_Item) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *StatPvPReportReq_Item) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *StatPvPReportReq_Item) GetPosition() int32 { + if x != nil { + return x.Position + } + return 0 +} + +func (x *StatPvPReportReq_Item) GetDamage() int64 { + if x != nil { + return x.Damage + } + return 0 +} + +func (x *StatPvPReportReq_Item) GetDeDamage() int64 { + if x != nil { + return x.DeDamage + } + return 0 +} + +func (x *StatPvPReportReq_Item) GetKillUnit() int64 { + if x != nil { + return x.KillUnit + } + return 0 +} + +func (x *StatPvPReportReq_Item) GetDeKillUnit() int64 { + if x != nil { + return x.DeKillUnit + } + return 0 +} + +type StatPvPReportResp_Item struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 + Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) + ReturnsIntegral int64 `protobuf:"varint,4,opt,name=returnsIntegral,proto3" json:"returnsIntegral,omitempty"` // 回收的积分(获胜方才能回收,0不要展示) + RewardPoolIntegral int64 `protobuf:"varint,5,opt,name=rewardPoolIntegral,proto3" json:"rewardPoolIntegral,omitempty"` // 瓜分奖池分 + GeneralIntegral int64 `protobuf:"varint,6,opt,name=generalIntegral,proto3" json:"generalIntegral,omitempty"` // 名将 + NobilityIntegral int64 `protobuf:"varint,7,opt,name=nobilityIntegral,proto3" json:"nobilityIntegral,omitempty"` // 舰长|总督|贵族 加成分 + BattleIntegral int64 `protobuf:"varint,8,opt,name=battleIntegral,proto3" json:"battleIntegral,omitempty"` // 战斗结算奖励(普通) + TotalIntegral int64 `protobuf:"varint,10,opt,name=totalIntegral,proto3" json:"totalIntegral,omitempty"` // 总计加分 +} + +func (x *StatPvPReportResp_Item) Reset() { + *x = StatPvPReportResp_Item{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StatPvPReportResp_Item) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatPvPReportResp_Item) ProtoMessage() {} + +func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[31] + 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 StatPvPReportResp_Item.ProtoReflect.Descriptor instead. +func (*StatPvPReportResp_Item) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *StatPvPReportResp_Item) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *StatPvPReportResp_Item) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *StatPvPReportResp_Item) GetPosition() int32 { + if x != nil { + return x.Position + } + return 0 +} + +func (x *StatPvPReportResp_Item) GetReturnsIntegral() int64 { + if x != nil { + return x.ReturnsIntegral + } + return 0 +} + +func (x *StatPvPReportResp_Item) GetRewardPoolIntegral() int64 { + if x != nil { + return x.RewardPoolIntegral + } + return 0 +} + +func (x *StatPvPReportResp_Item) GetGeneralIntegral() int64 { + if x != nil { + return x.GeneralIntegral + } + return 0 +} + +func (x *StatPvPReportResp_Item) GetNobilityIntegral() int64 { + if x != nil { + return x.NobilityIntegral + } + return 0 +} + +func (x *StatPvPReportResp_Item) GetBattleIntegral() int64 { + if x != nil { + return x.BattleIntegral + } + return 0 +} + +func (x *StatPvPReportResp_Item) GetTotalIntegral() int64 { + if x != nil { + return x.TotalIntegral + } + return 0 +} + +type RankPvpResp_Item struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` + Score int64 `protobuf:"varint,3,opt,name=score,proto3" json:"score,omitempty"` + Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` +} + +func (x *RankPvpResp_Item) Reset() { + *x = RankPvpResp_Item{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RankPvpResp_Item) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RankPvpResp_Item) ProtoMessage() {} + +func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[32] + 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) } -func (x *StatPvPReportReq_Item) GetDamage() int64 { +// Deprecated: Use RankPvpResp_Item.ProtoReflect.Descriptor instead. +func (*RankPvpResp_Item) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{25, 0} +} + +func (x *RankPvpResp_Item) GetUid() int64 { if x != nil { - return x.Damage + return x.Uid } return 0 } -func (x *StatPvPReportReq_Item) GetDeDamage() int64 { +func (x *RankPvpResp_Item) GetUname() string { if x != nil { - return x.DeDamage + return x.Uname } - return 0 + return "" } -func (x *StatPvPReportReq_Item) GetKillUnit() int64 { +func (x *RankPvpResp_Item) GetScore() int64 { if x != nil { - return x.KillUnit + return x.Score } return 0 } -func (x *StatPvPReportReq_Item) GetDeKillUnit() int64 { +func (x *RankPvpResp_Item) GetAvatar() string { if x != nil { - return x.DeKillUnit + return x.Avatar } - return 0 + return "" } -type StatPvPReportReq_General struct { +type RankPvpSubmitResp_Result struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 名将UID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 名将用户名 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + Integral int64 `protobuf:"varint,4,opt,name=integral,proto3" json:"integral,omitempty"` // 获取到的积分数 + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` // 获取到的称号 + TitleDuration int64 `protobuf:"varint,6,opt,name=titleDuration,proto3" json:"titleDuration,omitempty"` // 称号持续时间(单位: 秒,负数为无限长) } -func (x *StatPvPReportReq_General) Reset() { - *x = StatPvPReportReq_General{} +func (x *RankPvpSubmitResp_Result) Reset() { + *x = RankPvpSubmitResp_Result{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[21] + mi := &file_user_center_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatPvPReportReq_General) String() string { +func (x *RankPvpSubmitResp_Result) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatPvPReportReq_General) ProtoMessage() {} +func (*RankPvpSubmitResp_Result) ProtoMessage() {} -func (x *StatPvPReportReq_General) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[21] +func (x *RankPvpSubmitResp_Result) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1444,52 +2519,79 @@ func (x *StatPvPReportReq_General) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatPvPReportReq_General.ProtoReflect.Descriptor instead. -func (*StatPvPReportReq_General) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{16, 1} +// Deprecated: Use RankPvpSubmitResp_Result.ProtoReflect.Descriptor instead. +func (*RankPvpSubmitResp_Result) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{27, 0} } -func (x *StatPvPReportReq_General) GetUid() int64 { +func (x *RankPvpSubmitResp_Result) GetUserId() int64 { if x != nil { - return x.Uid + return x.UserId } return 0 } -func (x *StatPvPReportReq_General) GetUname() string { +func (x *RankPvpSubmitResp_Result) GetUsername() string { if x != nil { - return x.Uname + return x.Username } return "" } -type StatPvPReportResp_Item struct { +func (x *RankPvpSubmitResp_Result) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *RankPvpSubmitResp_Result) GetIntegral() int64 { + if x != nil { + return x.Integral + } + return 0 +} + +func (x *RankPvpSubmitResp_Result) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *RankPvpSubmitResp_Result) GetTitleDuration() int64 { + if x != nil { + return x.TitleDuration + } + return 0 +} + +type RankPvpSubmitResp_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - AddonIntegral int64 `protobuf:"varint,3,opt,name=addonIntegral,proto3" json:"addonIntegral,omitempty"` // 本次获取的积分 + RankType int32 `protobuf:"varint,1,opt,name=rankType,proto3" json:"rankType,omitempty"` // 排行榜类型 + Results []*RankPvpSubmitResp_Result `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // 上榜玩家? } -func (x *StatPvPReportResp_Item) Reset() { - *x = StatPvPReportResp_Item{} +func (x *RankPvpSubmitResp_Item) Reset() { + *x = RankPvpSubmitResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[22] + mi := &file_user_center_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatPvPReportResp_Item) String() string { +func (x *RankPvpSubmitResp_Item) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatPvPReportResp_Item) ProtoMessage() {} +func (*RankPvpSubmitResp_Item) ProtoMessage() {} -func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[22] +func (x *RankPvpSubmitResp_Item) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1500,60 +2602,52 @@ func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatPvPReportResp_Item.ProtoReflect.Descriptor instead. -func (*StatPvPReportResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{17, 0} +// Deprecated: Use RankPvpSubmitResp_Item.ProtoReflect.Descriptor instead. +func (*RankPvpSubmitResp_Item) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{27, 1} } -func (x *StatPvPReportResp_Item) GetUid() int64 { +func (x *RankPvpSubmitResp_Item) GetRankType() int32 { if x != nil { - return x.Uid + return x.RankType } return 0 } -func (x *StatPvPReportResp_Item) GetUname() string { - if x != nil { - return x.Uname - } - return "" -} - -func (x *StatPvPReportResp_Item) GetAddonIntegral() int64 { +func (x *RankPvpSubmitResp_Item) GetResults() []*RankPvpSubmitResp_Result { if x != nil { - return x.AddonIntegral + return x.Results } - return 0 + return nil } -type RankPvpResp_Item struct { +type UserRankResp_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` - Score int64 `protobuf:"varint,3,opt,name=score,proto3" json:"score,omitempty"` - Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"` + RankType int32 `protobuf:"varint,1,opt,name=rankType,proto3" json:"rankType,omitempty"` // 排行类型 + Pos int32 `protobuf:"varint,2,opt,name=pos,proto3" json:"pos,omitempty"` // 名次 + Score int64 `protobuf:"varint,3,opt,name=score,proto3" json:"score,omitempty"` // 分数 } -func (x *RankPvpResp_Item) Reset() { - *x = RankPvpResp_Item{} +func (x *UserRankResp_Item) Reset() { + *x = UserRankResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[23] + mi := &file_user_center_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *RankPvpResp_Item) String() string { +func (x *UserRankResp_Item) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RankPvpResp_Item) ProtoMessage() {} +func (*UserRankResp_Item) ProtoMessage() {} -func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[23] +func (x *UserRankResp_Item) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1564,39 +2658,32 @@ func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RankPvpResp_Item.ProtoReflect.Descriptor instead. -func (*RankPvpResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{19, 0} +// Deprecated: Use UserRankResp_Item.ProtoReflect.Descriptor instead. +func (*UserRankResp_Item) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{29, 0} } -func (x *RankPvpResp_Item) GetUid() int64 { +func (x *UserRankResp_Item) GetRankType() int32 { if x != nil { - return x.Uid + return x.RankType } return 0 } -func (x *RankPvpResp_Item) GetUname() string { +func (x *UserRankResp_Item) GetPos() int32 { if x != nil { - return x.Uname + return x.Pos } - return "" + return 0 } -func (x *RankPvpResp_Item) GetScore() int64 { +func (x *UserRankResp_Item) GetScore() int64 { if x != nil { return x.Score } return 0 } -func (x *RankPvpResp_Item) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - var File_user_center_proto protoreflect.FileDescriptor var file_user_center_proto_rawDesc = []byte{ @@ -1627,184 +2714,336 @@ var file_user_center_proto_rawDesc = []byte{ 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x24, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x11, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x60, - 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0xa1, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, - 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0xe5, 0x01, 0x0a, - 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, - 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, - 0x50, 0x61, 0x69, 0x64, 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, - 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x86, 0x02, 0x0a, - 0x12, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x55, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, - 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, - 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, - 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, - 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, - 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, - 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, - 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, - 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x5e, - 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, - 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x22, 0x3c, - 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, - 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xa8, 0x03, 0x0a, - 0x10, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x71, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x07, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, - 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x65, 0x71, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x6c, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, - 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, - 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x6c, 0x6f, - 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, - 0x65, 0x6d, 0x73, 0x1a, 0x9e, 0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x69, 0x6c, 0x6c, - 0x55, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6b, 0x69, 0x6c, 0x6c, - 0x55, 0x6e, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, - 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, - 0x55, 0x6e, 0x69, 0x74, 0x1a, 0x31, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x12, + 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x95, 0x01, 0x0a, 0x11, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x60, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x9b, 0x01, 0x0a, 0x0f, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, + 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, + 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x71, 0x0a, 0x17, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x22, 0xc4, 0x02, 0x0a, + 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x55, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, + 0x22, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x22, 0x81, 0x02, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, + 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x55, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e, + 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x62, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, + 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, + 0xba, 0x02, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, + 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, + 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, + 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, + 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x13, + 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x52, 0x08, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x5e, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x50, + 0x76, 0x50, 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x22, 0x3c, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x50, + 0x76, 0x50, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x91, 0x02, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, - 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, - 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x6c, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xf5, 0x02, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, + 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, + 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, + 0x43, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, + 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x77, + 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0x1a, 0xba, 0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, + 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x22, 0xd0, 0x03, + 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x6c, - 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, - 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x54, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0xc8, 0x02, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x12, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x0f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x10, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, + 0x22, 0x78, 0x0a, 0x0c, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x0f, 0x44, 0x72, + 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x6f, 0x6e, 0x49, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x61, 0x64, - 0x64, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x34, 0x0a, 0x0a, 0x52, - 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x6f, 0x70, - 0x4e, 0x22, 0xab, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x32, - 0x84, 0x05, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x41, - 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, - 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x79, - 0x50, 0x55, 0x69, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, 0x0a, 0x0e, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x15, 0x2e, 0x70, 0x62, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x0d, 0x2e, - 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, - 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, - 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, - 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x42, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, - 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x4b, - 0x69, 0x6c, 0x6c, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, - 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x38, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x46, 0x69, 0x72, - 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x50, 0x76, 0x50, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x52, 0x65, - 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, - 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x2e, + 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x56, 0x0a, 0x12, 0x49, 0x6e, + 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x57, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x6c, 0x66, + 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, + 0x72, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x22, 0xab, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x6e, + 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x50, 0x0a, 0x10, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, + 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, + 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, + 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, 0x6c, + 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x52, 0x61, 0x6e, + 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x1a, 0xac, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 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, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0x5a, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, + 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x7f, 0x0a, 0x0b, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, + 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x87, 0x01, 0x0a, + 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x4a, 0x0a, 0x04, 0x49, 0x74, + 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x2a, 0x2f, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x69, 0x66, 0x74, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x4f, 0x74, 0x68, 0x65, 0x72, 0x10, 0x0a, 0x2a, 0x28, 0x0a, 0x08, 0x47, 0x69, 0x66, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x10, 0x00, + 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x10, + 0x01, 0x2a, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, + 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, + 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x44, 0x61, 0x6d, + 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, + 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, + 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x05, 0x12, + 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x06, 0x12, + 0x0e, 0x0a, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x07, 0x12, + 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, + 0x08, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, + 0x73, 0x74, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, + 0x6f, 0x64, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, + 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0c, 0x32, 0xb8, 0x07, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, + 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, + 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, + 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x79, 0x50, 0x55, 0x69, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, + 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x3f, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x75, 0x73, 0x65, + 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x14, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, + 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x39, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, + 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, + 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0f, 0x75, 0x73, + 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, + 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, + 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, + 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x4b, 0x69, 0x6c, 0x6c, 0x12, 0x12, 0x2e, + 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, + 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x11, + 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, + 0x64, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x46, 0x69, + 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, + 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x61, - 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, - 0x76, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, - 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, + 0x50, 0x61, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, + 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x34, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x57, 0x65, 0x6c, 0x66, 0x61, + 0x72, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, + 0x57, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, + 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, + 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x3c, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, + 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x30, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0f, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x1a, + 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1819,72 +3058,100 @@ func file_user_center_proto_rawDescGZIP() []byte { return file_user_center_proto_rawDescData } -var file_user_center_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_user_center_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_user_center_proto_msgTypes = make([]protoimpl.MessageInfo, 36) var file_user_center_proto_goTypes = []interface{}{ - (*User)(nil), // 0: pb.User - (*Empty)(nil), // 1: pb.Empty - (*PlatformUserReq)(nil), // 2: pb.PlatformUserReq - (*PlatformUserResp)(nil), // 3: pb.PlatformUserResp - (*UserIdReq)(nil), // 4: pb.UserIdReq - (*UserIdResp)(nil), // 5: pb.UserIdResp - (*ChangeIntegralReq)(nil), // 6: pb.ChangeIntegralReq - (*ChangeIntegralResp)(nil), // 7: pb.ChangeIntegralResp - (*UserIntegralResp)(nil), // 8: pb.UserIntegralResp - (*UserCheckInResp)(nil), // 9: pb.UserCheckInResp - (*UserSendGiftReq)(nil), // 10: pb.UserSendGiftReq - (*UserSendGiftResp)(nil), // 11: pb.UserSendGiftResp - (*UserBuyNobilityReq)(nil), // 12: pb.UserBuyNobilityReq - (*UserBuyNobilityResp)(nil), // 13: pb.UserBuyNobilityResp - (*StatPvPKillReq)(nil), // 14: pb.StatPvPKillReq - (*StatPvPFirstBloodReq)(nil), // 15: pb.StatPvPFirstBloodReq - (*StatPvPReportReq)(nil), // 16: pb.StatPvPReportReq - (*StatPvPReportResp)(nil), // 17: pb.StatPvPReportResp - (*RankPvpReq)(nil), // 18: pb.RankPvpReq - (*RankPvpResp)(nil), // 19: pb.RankPvpResp - (*StatPvPReportReq_Item)(nil), // 20: pb.StatPvPReportReq.Item - (*StatPvPReportReq_General)(nil), // 21: pb.StatPvPReportReq.General - (*StatPvPReportResp_Item)(nil), // 22: pb.StatPvPReportResp.Item - (*RankPvpResp_Item)(nil), // 23: pb.RankPvpResp.Item + (IntegralType)(0), // 0: pb.IntegralType + (GiftType)(0), // 1: pb.GiftType + (RankType)(0), // 2: pb.RankType + (*User)(nil), // 3: pb.User + (*Empty)(nil), // 4: pb.Empty + (*PlatformUserReq)(nil), // 5: pb.PlatformUserReq + (*PlatformUserResp)(nil), // 6: pb.PlatformUserResp + (*UserIdReq)(nil), // 7: pb.UserIdReq + (*UserIdResp)(nil), // 8: pb.UserIdResp + (*ChangeIntegralReq)(nil), // 9: pb.ChangeIntegralReq + (*ChangeIntegralResp)(nil), // 10: pb.ChangeIntegralResp + (*UserIntegralResp)(nil), // 11: pb.UserIntegralResp + (*UserCheckInResp)(nil), // 12: pb.UserCheckInResp + (*TransferUserIntegralReq)(nil), // 13: pb.TransferUserIntegralReq + (*TransferUserIntegralResp)(nil), // 14: pb.TransferUserIntegralResp + (*UserSendGiftReq)(nil), // 15: pb.UserSendGiftReq + (*UserSendGiftResp)(nil), // 16: pb.UserSendGiftResp + (*UserBuyNobilityReq)(nil), // 17: pb.UserBuyNobilityReq + (*UserBuyNobilityResp)(nil), // 18: pb.UserBuyNobilityResp + (*StatPvPKillReq)(nil), // 19: pb.StatPvPKillReq + (*StatPvPFirstBloodReq)(nil), // 20: pb.StatPvPFirstBloodReq + (*StatPvPReportReq)(nil), // 21: pb.StatPvPReportReq + (*StatPvPReportResp)(nil), // 22: pb.StatPvPReportResp + (*GiftPackItem)(nil), // 23: pb.GiftPackItem + (*DrawGiftPackReq)(nil), // 24: pb.DrawGiftPackReq + (*DrawGiftPackResp)(nil), // 25: pb.DrawGiftPackResp + (*IncreaseWelfareReq)(nil), // 26: pb.IncreaseWelfareReq + (*RankPvpReq)(nil), // 27: pb.RankPvpReq + (*RankPvpResp)(nil), // 28: pb.RankPvpResp + (*RankPvpSubmitReq)(nil), // 29: pb.RankPvpSubmitReq + (*RankPvpSubmitResp)(nil), // 30: pb.RankPvpSubmitResp + (*UserRankReq)(nil), // 31: pb.UserRankReq + (*UserRankResp)(nil), // 32: pb.UserRankResp + (*StatPvPReportReq_Item)(nil), // 33: pb.StatPvPReportReq.Item + (*StatPvPReportResp_Item)(nil), // 34: pb.StatPvPReportResp.Item + (*RankPvpResp_Item)(nil), // 35: pb.RankPvpResp.Item + (*RankPvpSubmitResp_Result)(nil), // 36: pb.RankPvpSubmitResp.Result + (*RankPvpSubmitResp_Item)(nil), // 37: pb.RankPvpSubmitResp.Item + (*UserRankResp_Item)(nil), // 38: pb.UserRankResp.Item } var file_user_center_proto_depIdxs = []int32{ - 0, // 0: pb.PlatformUserResp.user:type_name -> pb.User - 7, // 1: pb.UserSendGiftResp.integral:type_name -> pb.ChangeIntegralResp - 0, // 2: pb.UserBuyNobilityResp.user:type_name -> pb.User - 7, // 3: pb.UserBuyNobilityResp.integral:type_name -> pb.ChangeIntegralResp - 21, // 4: pb.StatPvPReportReq.general:type_name -> pb.StatPvPReportReq.General - 20, // 5: pb.StatPvPReportReq.winItems:type_name -> pb.StatPvPReportReq.Item - 20, // 6: pb.StatPvPReportReq.lostItems:type_name -> pb.StatPvPReportReq.Item - 22, // 7: pb.StatPvPReportResp.general:type_name -> pb.StatPvPReportResp.Item - 22, // 8: pb.StatPvPReportResp.winItems:type_name -> pb.StatPvPReportResp.Item - 22, // 9: pb.StatPvPReportResp.lostItems:type_name -> pb.StatPvPReportResp.Item - 23, // 10: pb.RankPvpResp.items:type_name -> pb.RankPvpResp.Item - 2, // 11: pb.userCenter.retrievePlatformUser:input_type -> pb.PlatformUserReq - 2, // 12: pb.userCenter.getUserIdByPUid:input_type -> pb.PlatformUserReq - 6, // 13: pb.userCenter.ChangeIntegral:input_type -> pb.ChangeIntegralReq - 4, // 14: pb.userCenter.GetUserIntegral:input_type -> pb.UserIdReq - 4, // 15: pb.userCenter.UserCheckIn:input_type -> pb.UserIdReq - 10, // 16: pb.userCenter.userSendGift:input_type -> pb.UserSendGiftReq - 12, // 17: pb.userCenter.userBuyNobility:input_type -> pb.UserBuyNobilityReq - 14, // 18: pb.userCenter.statPvpKill:input_type -> pb.StatPvPKillReq - 15, // 19: pb.userCenter.statPvpFirstBlood:input_type -> pb.StatPvPFirstBloodReq - 16, // 20: pb.userCenter.statPvpReport:input_type -> pb.StatPvPReportReq - 18, // 21: pb.userCenter.rankPvp:input_type -> pb.RankPvpReq - 3, // 22: pb.userCenter.retrievePlatformUser:output_type -> pb.PlatformUserResp - 5, // 23: pb.userCenter.getUserIdByPUid:output_type -> pb.UserIdResp - 7, // 24: pb.userCenter.ChangeIntegral:output_type -> pb.ChangeIntegralResp - 8, // 25: pb.userCenter.GetUserIntegral:output_type -> pb.UserIntegralResp - 9, // 26: pb.userCenter.UserCheckIn:output_type -> pb.UserCheckInResp - 11, // 27: pb.userCenter.userSendGift:output_type -> pb.UserSendGiftResp - 13, // 28: pb.userCenter.userBuyNobility:output_type -> pb.UserBuyNobilityResp - 1, // 29: pb.userCenter.statPvpKill:output_type -> pb.Empty - 1, // 30: pb.userCenter.statPvpFirstBlood:output_type -> pb.Empty - 17, // 31: pb.userCenter.statPvpReport:output_type -> pb.StatPvPReportResp - 19, // 32: pb.userCenter.rankPvp:output_type -> pb.RankPvpResp - 22, // [22:33] is the sub-list for method output_type - 11, // [11:22] 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 + 3, // 0: pb.PlatformUserResp.user:type_name -> pb.User + 0, // 1: pb.ChangeIntegralReq.integralType:type_name -> pb.IntegralType + 10, // 2: pb.UserSendGiftResp.integral:type_name -> pb.ChangeIntegralResp + 10, // 3: pb.UserBuyNobilityResp.integral:type_name -> pb.ChangeIntegralResp + 33, // 4: pb.StatPvPReportReq.winItems:type_name -> pb.StatPvPReportReq.Item + 33, // 5: pb.StatPvPReportReq.lostItems:type_name -> pb.StatPvPReportReq.Item + 34, // 6: pb.StatPvPReportResp.winItems:type_name -> pb.StatPvPReportResp.Item + 34, // 7: pb.StatPvPReportResp.lostItems:type_name -> pb.StatPvPReportResp.Item + 23, // 8: pb.DrawGiftPackResp.item:type_name -> pb.GiftPackItem + 35, // 9: pb.RankPvpResp.items:type_name -> pb.RankPvpResp.Item + 37, // 10: pb.RankPvpSubmitResp.items:type_name -> pb.RankPvpSubmitResp.Item + 38, // 11: pb.UserRankResp.items:type_name -> pb.UserRankResp.Item + 36, // 12: pb.RankPvpSubmitResp.Item.results:type_name -> pb.RankPvpSubmitResp.Result + 5, // 13: pb.userCenter.retrievePlatformUser:input_type -> pb.PlatformUserReq + 5, // 14: pb.userCenter.getUserIdByPUid:input_type -> pb.PlatformUserReq + 9, // 15: pb.userCenter.changeIntegral:input_type -> pb.ChangeIntegralReq + 7, // 16: pb.userCenter.getUserIntegral:input_type -> pb.UserIdReq + 7, // 17: pb.userCenter.userCheckIn:input_type -> pb.UserIdReq + 13, // 18: pb.userCenter.transferUserIntegral:input_type -> pb.TransferUserIntegralReq + 15, // 19: pb.userCenter.userSendGift:input_type -> pb.UserSendGiftReq + 17, // 20: pb.userCenter.userBuyNobility:input_type -> pb.UserBuyNobilityReq + 19, // 21: pb.userCenter.statPvpKill:input_type -> pb.StatPvPKillReq + 20, // 22: pb.userCenter.statPvpFirstBlood:input_type -> pb.StatPvPFirstBloodReq + 21, // 23: pb.userCenter.statPvpReport:input_type -> pb.StatPvPReportReq + 24, // 24: pb.userCenter.drawGiftPack:input_type -> pb.DrawGiftPackReq + 26, // 25: pb.userCenter.increaseWelfare:input_type -> pb.IncreaseWelfareReq + 27, // 26: pb.userCenter.rankPvp:input_type -> pb.RankPvpReq + 29, // 27: pb.userCenter.rankPvpSubmit:input_type -> pb.RankPvpSubmitReq + 31, // 28: pb.userCenter.userRankPvp:input_type -> pb.UserRankReq + 6, // 29: pb.userCenter.retrievePlatformUser:output_type -> pb.PlatformUserResp + 8, // 30: pb.userCenter.getUserIdByPUid:output_type -> pb.UserIdResp + 10, // 31: pb.userCenter.changeIntegral:output_type -> pb.ChangeIntegralResp + 11, // 32: pb.userCenter.getUserIntegral:output_type -> pb.UserIntegralResp + 12, // 33: pb.userCenter.userCheckIn:output_type -> pb.UserCheckInResp + 14, // 34: pb.userCenter.transferUserIntegral:output_type -> pb.TransferUserIntegralResp + 16, // 35: pb.userCenter.userSendGift:output_type -> pb.UserSendGiftResp + 18, // 36: pb.userCenter.userBuyNobility:output_type -> pb.UserBuyNobilityResp + 4, // 37: pb.userCenter.statPvpKill:output_type -> pb.Empty + 4, // 38: pb.userCenter.statPvpFirstBlood:output_type -> pb.Empty + 22, // 39: pb.userCenter.statPvpReport:output_type -> pb.StatPvPReportResp + 25, // 40: pb.userCenter.drawGiftPack:output_type -> pb.DrawGiftPackResp + 4, // 41: pb.userCenter.increaseWelfare:output_type -> pb.Empty + 28, // 42: pb.userCenter.rankPvp:output_type -> pb.RankPvpResp + 30, // 43: pb.userCenter.rankPvpSubmit:output_type -> pb.RankPvpSubmitResp + 32, // 44: pb.userCenter.userRankPvp:output_type -> pb.UserRankResp + 29, // [29:45] is the sub-list for method output_type + 13, // [13:29] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_user_center_proto_init() } @@ -2014,7 +3281,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserSendGiftReq); i { + switch v := v.(*TransferUserIntegralReq); i { case 0: return &v.state case 1: @@ -2026,7 +3293,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserSendGiftResp); i { + switch v := v.(*TransferUserIntegralResp); i { case 0: return &v.state case 1: @@ -2038,7 +3305,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserBuyNobilityReq); i { + switch v := v.(*UserSendGiftReq); i { case 0: return &v.state case 1: @@ -2050,7 +3317,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserBuyNobilityResp); i { + switch v := v.(*UserSendGiftResp); i { case 0: return &v.state case 1: @@ -2062,7 +3329,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPKillReq); i { + switch v := v.(*UserBuyNobilityReq); i { case 0: return &v.state case 1: @@ -2074,7 +3341,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPFirstBloodReq); i { + switch v := v.(*UserBuyNobilityResp); i { case 0: return &v.state case 1: @@ -2086,7 +3353,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq); i { + switch v := v.(*StatPvPKillReq); i { case 0: return &v.state case 1: @@ -2098,7 +3365,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportResp); i { + switch v := v.(*StatPvPFirstBloodReq); i { case 0: return &v.state case 1: @@ -2110,7 +3377,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpReq); i { + switch v := v.(*StatPvPReportReq); i { case 0: return &v.state case 1: @@ -2122,7 +3389,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpResp); i { + switch v := v.(*StatPvPReportResp); i { case 0: return &v.state case 1: @@ -2134,7 +3401,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq_Item); i { + switch v := v.(*GiftPackItem); i { case 0: return &v.state case 1: @@ -2146,7 +3413,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq_General); i { + switch v := v.(*DrawGiftPackReq); i { case 0: return &v.state case 1: @@ -2158,7 +3425,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportResp_Item); i { + switch v := v.(*DrawGiftPackResp); i { case 0: return &v.state case 1: @@ -2170,6 +3437,114 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IncreaseWelfareReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserRankReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserRankResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatPvPReportReq_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatPvPReportResp_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RankPvpResp_Item); i { case 0: return &v.state @@ -2181,19 +3556,56 @@ func file_user_center_proto_init() { return nil } } + file_user_center_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitResp_Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitResp_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserRankResp_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_center_proto_rawDesc, - NumEnums: 0, - NumMessages: 24, + NumEnums: 3, + NumMessages: 36, NumExtensions: 0, NumServices: 1, }, GoTypes: file_user_center_proto_goTypes, DependencyIndexes: file_user_center_proto_depIdxs, + EnumInfos: file_user_center_proto_enumTypes, MessageInfos: file_user_center_proto_msgTypes, }.Build() File_user_center_proto = out.File diff --git a/app/user_center/pb/user_center.proto b/app/user_center/pb/user_center.proto index 0d4b78f..6e80cb2 100644 --- a/app/user_center/pb/user_center.proto +++ b/app/user_center/pb/user_center.proto @@ -39,10 +39,18 @@ message UserIdResp { int64 userId = 1; } +enum IntegralType { + Battle = 0; // 战斗 + Gift = 1; // 礼物 + Other = 10; // 其它积分 +} + // 变更积分请求 message ChangeIntegralReq { int64 userId = 1; // 系统用户ID - int64 change = 2; // 变更数量 + int64 battleId = 2; // 战斗ID(RPC内部) + int64 change = 3; // 变更数量 + IntegralType integralType = 4; // 积分类型 } // 变更积分回复 @@ -60,13 +68,36 @@ message UserIntegralResp { // 用户打卡(签到)回复 message UserCheckInResp { - bool success = 1; // 成功与否 + int32 code = 1; string msg = 2; // 消息 int64 integralChange = 3; // 积分变动量 int64 integral = 4; // 变动后的积分量 bool isCritical = 5; // 是否发生了暴击奖励 } +// 转移用户积分 +message TransferUserIntegralReq { + int64 userId = 1; // 源用户ID + int64 targetUserId = 2; // 目标用户 + int64 transfer = 3; // 待转移量 +} + +message TransferUserIntegralResp { + int32 code = 1; + string msg = 2; // 消息 + + int64 userId = 3; + string uname = 4; + string avatar = 5; + + int64 targetUserId = 6; + string targetUname = 7; + string targetAvatar = 8; + + int64 userIntegral = 10; // 源用户积分剩余 + int64 targetUserIntegral = 11; // 目标用户积分剩余 +} + // 用户送礼请求 message UserSendGiftReq { string platform = 1; // 平台 @@ -78,6 +109,7 @@ message UserSendGiftReq { int64 num = 7; // 赠送数量 int64 price = 8; // 礼物单价(系统不存在对应礼物数据时使用) bool isPaid = 9; // 是否收费礼物 + int64 battleId = 10; // 战局ID } // 用户送礼回复 @@ -88,20 +120,22 @@ message UserSendGiftResp { // 用户购买舰长请求 message UserBuyNobilityReq { string platform = 1; // 平台 - string pUid = 2; // 平台用户ID - string roomId = 3; // 直播间ID - int64 giftId = 4; // 礼物ID - string giftName = 5; // 礼物名 - int64 num = 6; // 赠送数量 - int64 price = 7; // 礼物单价(系统不存在对应礼物数据时使用) - int64 level = 8; // 贵族等级 - int64 startTime = 9; // 开始时间 - int64 endTime = 10; // 结束时间 + int64 userId = 2; // 系统用户ID + string pUid = 3; // 平台用户ID + int64 battleId = 4; // 战局ID + string roomId = 5; // 直播间ID + + int64 giftId = 6; // 礼物ID + string giftName = 7; // 礼物名 + int64 num = 8; // 赠送数量 + int64 price = 9; // 礼物单价(系统不存在对应礼物数据时使用) + int64 level = 10; // 贵族等级 + int64 startTime = 11; // 开始时间 + int64 endTime = 12; // 结束时间 } // 用户购买舰长回复 message UserBuyNobilityResp { - User user = 1; // 系统用户信息 ChangeIntegralResp integral = 10; // 积分变动 } @@ -123,17 +157,14 @@ message StatPvPReportReq { message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 - int64 damage = 3; // 伤害量 - int64 deDamage = 4; // 承受伤害 - int64 killUnit = 5; // 击杀单位数量 - int64 deKillUnit = 6; // 被杀单位数量 - } - message General { - int64 uid = 1; // 名将UID - string uname = 2; // 名将用户名 + int32 position = 3; // 名次(特指在某一方的名次) + int64 damage = 4; // 伤害量 + int64 deDamage = 5; // 承受伤害 + int64 killUnit = 6; // 击杀单位数量 + int64 deKillUnit = 7; // 被杀单位数量 } int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 - General general = 2; + int64 battleId = 2; // 战斗ID repeated Item winItems = 10; // 获胜方数据 repeated Item lostItems = 11; // 战败方数据 } @@ -143,14 +174,73 @@ message StatPvPReportResp { message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 - int64 addonIntegral = 3; // 本次获取的积分 + int32 position = 3; // 名次(特指在某一方的名次) + int64 returnsIntegral = 4; // 回收的积分(获胜方才能回收,0不要展示) + int64 rewardPoolIntegral = 5; // 瓜分奖池分 + int64 generalIntegral = 6; // 名将 + int64 nobilityIntegral = 7; // 舰长|总督|贵族 加成分 + int64 battleIntegral = 8; // 战斗结算奖励(普通) + int64 totalIntegral = 10; // 总计加分 } - Item general = 1; // 名将 - repeated Item winItems = 10; // 获胜方数据 - repeated Item lostItems = 11; // 战败方数据 + repeated Item winItems = 1; // 获胜方数据 + repeated Item lostItems = 2; // 战败方数据 +} + +//////////////////// 礼包 + +enum GiftType { + starter = 0; // 新手礼包 + subsistence = 1; // 低保 +} + +message GiftPackItem { + string packType = 1; // 礼包类型 starter:新手礼包 + string packName = 2; // 礼包名称 + int64 integral = 3; // 获取的积分 + repeated string title = 4; // 获取的称号 +} + +// 领取礼包 +message DrawGiftPackReq { + int64 uid = 1; + string uname = 2; + string giftType = 3; +} + +message DrawGiftPackResp { + int64 uid = 1; + string uname = 2; + int32 code = 3; // 领取结果 200:成功 201100:已经领取过 201101:已领取完 + string msg = 4; // 消息 [领取成功|已经领取过|该用户已领取(当日|每周|每月)完所有礼包] + GiftPackItem item = 10; +} + +////////////////////// drawPool + +// 往福利池中添加福利,扣除自己积分 +message IncreaseWelfareReq { + int64 uid = 1; // 用户ID + string uname = 2; // 用户名 + int64 welfare = 3; // 投入值 +} + +////////////////////// rank +enum RankType { + Unknown = 0; + Damage = 1; // 伤害榜 + DeDamage = 2; // 受伤榜 + General = 3; // 名将榜 + DeGeneral = 4; // 落马榜 + KillUnit = 5; // 小兵击杀 + DeKillUnit = 6; // 小兵被杀 + KillPlayer = 7; // 击杀玩家 + DeKillPlayer = 8; // 被杀榜 + Win = 9; // 获胜榜 + Lost = 10; // 战败榜 + FirstBlood = 11; // 一血榜 + DeFirstBlood = 12; // 被拿一血榜 } -// rank message RankPvpReq { int32 type = 1; // rank类型 int32 topN = 2; // TopN @@ -167,6 +257,46 @@ message RankPvpResp { repeated Item items = 2; // rank数据 } +// RankPvpSubmitReq 手动排行榜结算 +message RankPvpSubmitReq { + int32 rankType = 1; // 待结算的排行榜类型 + bool allRankType = 2; // 是否直接结算所有排行类型 +} + +message RankPvpSubmitResp { + message Result { + int64 userId = 1; + string username = 2; + string avatar = 3; + int64 integral = 4; // 获取到的积分数 + string title = 5; // 获取到的称号 + int64 titleDuration = 6; // 称号持续时间(单位: 秒,负数为无限长) + } + message Item { + int32 rankType = 1; // 排行榜类型 + repeated Result results = 2; // 上榜玩家? + } + + repeated Item items = 1; +} + +// UserRankReq 查询用户自己的排行 +message UserRankReq { + int64 userId = 1; // 系统用户ID + string username = 2; // 用户名 + int32 rankType = 3; // 排行榜类型 + bool allRankType = 4; // 直接查询所有排行类型 +} + +message UserRankResp { + message Item { + int32 rankType = 1; // 排行类型 + int32 pos = 2; // 名次 + int64 score = 3; // 分数 + } + repeated Item items = 1; +} + service userCenter { /// @ZeroGroup: platform_user @@ -178,11 +308,13 @@ service userCenter { /// @ZeroGroup: integral //ChangeIntegral 新增用户积分 - rpc ChangeIntegral(ChangeIntegralReq) returns (ChangeIntegralResp); + rpc changeIntegral(ChangeIntegralReq) returns (ChangeIntegralResp); //GetUserIntegral 获取用户积分 - rpc GetUserIntegral(UserIdReq) returns (UserIntegralResp); + rpc getUserIntegral(UserIdReq) returns (UserIntegralResp); //UserCheckIn 用户签到|打卡 - rpc UserCheckIn(UserIdReq) returns (UserCheckInResp); + rpc userCheckIn(UserIdReq) returns (UserCheckInResp); + //TransferUserIntegral 转移积分 + rpc transferUserIntegral(TransferUserIntegralReq) returns (TransferUserIntegralResp); /// @ZeroGroup: gift @@ -196,8 +328,18 @@ service userCenter { rpc statPvpFirstBlood(StatPvPFirstBloodReq) returns (Empty); rpc statPvpReport(StatPvPReportReq) returns (StatPvPReportResp); + /// @ZeroGroup: giftPack + + rpc drawGiftPack(DrawGiftPackReq) returns(DrawGiftPackResp); + + /// @ZeroGroup: drawPool + + rpc increaseWelfare(IncreaseWelfareReq) returns (Empty); + /// @ZeroGroup: rank // rankPvp pvp排行 rpc rankPvp(RankPvpReq) returns(RankPvpResp); + rpc rankPvpSubmit(RankPvpSubmitReq) returns(RankPvpSubmitResp); + rpc userRankPvp(UserRankReq) returns (UserRankResp); } \ No newline at end of file diff --git a/app/user_center/pb/user_center_grpc.pb.go b/app/user_center/pb/user_center_grpc.pb.go index e95fea4..3db7050 100644 --- a/app/user_center/pb/user_center_grpc.pb.go +++ b/app/user_center/pb/user_center_grpc.pb.go @@ -32,14 +32,20 @@ type UserCenterClient interface { GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error) //UserCheckIn 用户签到|打卡 UserCheckIn(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserCheckInResp, error) + //TransferUserIntegral 转移积分 + TransferUserIntegral(ctx context.Context, in *TransferUserIntegralReq, opts ...grpc.CallOption) (*TransferUserIntegralResp, error) // UserSendGift 用户赠送礼物 UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error) StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error) StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error) + DrawGiftPack(ctx context.Context, in *DrawGiftPackReq, opts ...grpc.CallOption) (*DrawGiftPackResp, error) + IncreaseWelfare(ctx context.Context, in *IncreaseWelfareReq, opts ...grpc.CallOption) (*Empty, error) // rankPvp pvp排行 RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error) + RankPvpSubmit(ctx context.Context, in *RankPvpSubmitReq, opts ...grpc.CallOption) (*RankPvpSubmitResp, error) + UserRankPvp(ctx context.Context, in *UserRankReq, opts ...grpc.CallOption) (*UserRankResp, error) } type userCenterClient struct { @@ -70,7 +76,7 @@ func (c *userCenterClient) GetUserIdByPUid(ctx context.Context, in *PlatformUser func (c *userCenterClient) ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error) { out := new(ChangeIntegralResp) - err := c.cc.Invoke(ctx, "/pb.userCenter/ChangeIntegral", in, out, opts...) + err := c.cc.Invoke(ctx, "/pb.userCenter/changeIntegral", in, out, opts...) if err != nil { return nil, err } @@ -79,7 +85,7 @@ func (c *userCenterClient) ChangeIntegral(ctx context.Context, in *ChangeIntegra func (c *userCenterClient) GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error) { out := new(UserIntegralResp) - err := c.cc.Invoke(ctx, "/pb.userCenter/GetUserIntegral", in, out, opts...) + err := c.cc.Invoke(ctx, "/pb.userCenter/getUserIntegral", in, out, opts...) if err != nil { return nil, err } @@ -88,7 +94,16 @@ func (c *userCenterClient) GetUserIntegral(ctx context.Context, in *UserIdReq, o func (c *userCenterClient) UserCheckIn(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserCheckInResp, error) { out := new(UserCheckInResp) - err := c.cc.Invoke(ctx, "/pb.userCenter/UserCheckIn", in, out, opts...) + err := c.cc.Invoke(ctx, "/pb.userCenter/userCheckIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) TransferUserIntegral(ctx context.Context, in *TransferUserIntegralReq, opts ...grpc.CallOption) (*TransferUserIntegralResp, error) { + out := new(TransferUserIntegralResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/transferUserIntegral", in, out, opts...) if err != nil { return nil, err } @@ -140,6 +155,24 @@ func (c *userCenterClient) StatPvpReport(ctx context.Context, in *StatPvPReportR return out, nil } +func (c *userCenterClient) DrawGiftPack(ctx context.Context, in *DrawGiftPackReq, opts ...grpc.CallOption) (*DrawGiftPackResp, error) { + out := new(DrawGiftPackResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/drawGiftPack", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) IncreaseWelfare(ctx context.Context, in *IncreaseWelfareReq, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/pb.userCenter/increaseWelfare", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *userCenterClient) RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error) { out := new(RankPvpResp) err := c.cc.Invoke(ctx, "/pb.userCenter/rankPvp", in, out, opts...) @@ -149,6 +182,24 @@ func (c *userCenterClient) RankPvp(ctx context.Context, in *RankPvpReq, opts ... return out, nil } +func (c *userCenterClient) RankPvpSubmit(ctx context.Context, in *RankPvpSubmitReq, opts ...grpc.CallOption) (*RankPvpSubmitResp, error) { + out := new(RankPvpSubmitResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/rankPvpSubmit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) UserRankPvp(ctx context.Context, in *UserRankReq, opts ...grpc.CallOption) (*UserRankResp, error) { + out := new(UserRankResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/userRankPvp", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // UserCenterServer is the server API for UserCenter service. // All implementations must embed UnimplementedUserCenterServer // for forward compatibility @@ -163,14 +214,20 @@ type UserCenterServer interface { GetUserIntegral(context.Context, *UserIdReq) (*UserIntegralResp, error) //UserCheckIn 用户签到|打卡 UserCheckIn(context.Context, *UserIdReq) (*UserCheckInResp, error) + //TransferUserIntegral 转移积分 + TransferUserIntegral(context.Context, *TransferUserIntegralReq) (*TransferUserIntegralResp, error) // UserSendGift 用户赠送礼物 UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error) UserBuyNobility(context.Context, *UserBuyNobilityReq) (*UserBuyNobilityResp, error) StatPvpKill(context.Context, *StatPvPKillReq) (*Empty, error) StatPvpFirstBlood(context.Context, *StatPvPFirstBloodReq) (*Empty, error) StatPvpReport(context.Context, *StatPvPReportReq) (*StatPvPReportResp, error) + DrawGiftPack(context.Context, *DrawGiftPackReq) (*DrawGiftPackResp, error) + IncreaseWelfare(context.Context, *IncreaseWelfareReq) (*Empty, error) // rankPvp pvp排行 RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error) + RankPvpSubmit(context.Context, *RankPvpSubmitReq) (*RankPvpSubmitResp, error) + UserRankPvp(context.Context, *UserRankReq) (*UserRankResp, error) mustEmbedUnimplementedUserCenterServer() } @@ -193,6 +250,9 @@ func (UnimplementedUserCenterServer) GetUserIntegral(context.Context, *UserIdReq func (UnimplementedUserCenterServer) UserCheckIn(context.Context, *UserIdReq) (*UserCheckInResp, error) { return nil, status.Errorf(codes.Unimplemented, "method UserCheckIn not implemented") } +func (UnimplementedUserCenterServer) TransferUserIntegral(context.Context, *TransferUserIntegralReq) (*TransferUserIntegralResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferUserIntegral not implemented") +} func (UnimplementedUserCenterServer) UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error) { return nil, status.Errorf(codes.Unimplemented, "method UserSendGift not implemented") } @@ -208,9 +268,21 @@ func (UnimplementedUserCenterServer) StatPvpFirstBlood(context.Context, *StatPvP func (UnimplementedUserCenterServer) StatPvpReport(context.Context, *StatPvPReportReq) (*StatPvPReportResp, error) { return nil, status.Errorf(codes.Unimplemented, "method StatPvpReport not implemented") } +func (UnimplementedUserCenterServer) DrawGiftPack(context.Context, *DrawGiftPackReq) (*DrawGiftPackResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DrawGiftPack not implemented") +} +func (UnimplementedUserCenterServer) IncreaseWelfare(context.Context, *IncreaseWelfareReq) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method IncreaseWelfare not implemented") +} func (UnimplementedUserCenterServer) RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error) { return nil, status.Errorf(codes.Unimplemented, "method RankPvp not implemented") } +func (UnimplementedUserCenterServer) RankPvpSubmit(context.Context, *RankPvpSubmitReq) (*RankPvpSubmitResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method RankPvpSubmit not implemented") +} +func (UnimplementedUserCenterServer) UserRankPvp(context.Context, *UserRankReq) (*UserRankResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserRankPvp not implemented") +} func (UnimplementedUserCenterServer) mustEmbedUnimplementedUserCenterServer() {} // UnsafeUserCenterServer may be embedded to opt out of forward compatibility for this service. @@ -270,7 +342,7 @@ func _UserCenter_ChangeIntegral_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/ChangeIntegral", + FullMethod: "/pb.userCenter/changeIntegral", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserCenterServer).ChangeIntegral(ctx, req.(*ChangeIntegralReq)) @@ -288,7 +360,7 @@ func _UserCenter_GetUserIntegral_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/GetUserIntegral", + FullMethod: "/pb.userCenter/getUserIntegral", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserCenterServer).GetUserIntegral(ctx, req.(*UserIdReq)) @@ -306,7 +378,7 @@ func _UserCenter_UserCheckIn_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/UserCheckIn", + FullMethod: "/pb.userCenter/userCheckIn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UserCenterServer).UserCheckIn(ctx, req.(*UserIdReq)) @@ -314,6 +386,24 @@ func _UserCenter_UserCheckIn_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _UserCenter_TransferUserIntegral_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransferUserIntegralReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).TransferUserIntegral(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/transferUserIntegral", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).TransferUserIntegral(ctx, req.(*TransferUserIntegralReq)) + } + return interceptor(ctx, in, info, handler) +} + func _UserCenter_UserSendGift_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserSendGiftReq) if err := dec(in); err != nil { @@ -404,6 +494,42 @@ func _UserCenter_StatPvpReport_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _UserCenter_DrawGiftPack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DrawGiftPackReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).DrawGiftPack(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/drawGiftPack", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).DrawGiftPack(ctx, req.(*DrawGiftPackReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserCenter_IncreaseWelfare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IncreaseWelfareReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).IncreaseWelfare(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/increaseWelfare", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).IncreaseWelfare(ctx, req.(*IncreaseWelfareReq)) + } + return interceptor(ctx, in, info, handler) +} + func _UserCenter_RankPvp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RankPvpReq) if err := dec(in); err != nil { @@ -422,6 +548,42 @@ func _UserCenter_RankPvp_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _UserCenter_RankPvpSubmit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RankPvpSubmitReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).RankPvpSubmit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/rankPvpSubmit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).RankPvpSubmit(ctx, req.(*RankPvpSubmitReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserCenter_UserRankPvp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserRankReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).UserRankPvp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/userRankPvp", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).UserRankPvp(ctx, req.(*UserRankReq)) + } + return interceptor(ctx, in, info, handler) +} + // UserCenter_ServiceDesc is the grpc.ServiceDesc for UserCenter service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -438,17 +600,21 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{ Handler: _UserCenter_GetUserIdByPUid_Handler, }, { - MethodName: "ChangeIntegral", + MethodName: "changeIntegral", Handler: _UserCenter_ChangeIntegral_Handler, }, { - MethodName: "GetUserIntegral", + MethodName: "getUserIntegral", Handler: _UserCenter_GetUserIntegral_Handler, }, { - MethodName: "UserCheckIn", + MethodName: "userCheckIn", Handler: _UserCenter_UserCheckIn_Handler, }, + { + MethodName: "transferUserIntegral", + Handler: _UserCenter_TransferUserIntegral_Handler, + }, { MethodName: "userSendGift", Handler: _UserCenter_UserSendGift_Handler, @@ -469,10 +635,26 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{ MethodName: "statPvpReport", Handler: _UserCenter_StatPvpReport_Handler, }, + { + MethodName: "drawGiftPack", + Handler: _UserCenter_DrawGiftPack_Handler, + }, + { + MethodName: "increaseWelfare", + Handler: _UserCenter_IncreaseWelfare_Handler, + }, { MethodName: "rankPvp", Handler: _UserCenter_RankPvp_Handler, }, + { + MethodName: "rankPvpSubmit", + Handler: _UserCenter_RankPvpSubmit_Handler, + }, + { + MethodName: "userRankPvp", + Handler: _UserCenter_UserRankPvp_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "user_center.proto", diff --git a/app/user_center/usercenter/user_center.go b/app/user_center/usercenter/user_center.go index e8e7945..24c706a 100644 --- a/app/user_center/usercenter/user_center.go +++ b/app/user_center/usercenter/user_center.go @@ -15,19 +15,28 @@ import ( type ( ChangeIntegralReq = pb.ChangeIntegralReq ChangeIntegralResp = pb.ChangeIntegralResp + DrawGiftPackReq = pb.DrawGiftPackReq + DrawGiftPackResp = pb.DrawGiftPackResp Empty = pb.Empty + GiftPackItem = pb.GiftPackItem + IncreaseWelfareReq = pb.IncreaseWelfareReq PlatformUserReq = pb.PlatformUserReq PlatformUserResp = pb.PlatformUserResp RankPvpReq = pb.RankPvpReq RankPvpResp = pb.RankPvpResp RankPvpResp_Item = pb.RankPvpResp_Item + RankPvpSubmitReq = pb.RankPvpSubmitReq + RankPvpSubmitResp = pb.RankPvpSubmitResp + RankPvpSubmitResp_Item = pb.RankPvpSubmitResp_Item + RankPvpSubmitResp_Result = pb.RankPvpSubmitResp_Result StatPvPFirstBloodReq = pb.StatPvPFirstBloodReq StatPvPKillReq = pb.StatPvPKillReq StatPvPReportReq = pb.StatPvPReportReq - StatPvPReportReq_General = pb.StatPvPReportReq_General StatPvPReportReq_Item = pb.StatPvPReportReq_Item StatPvPReportResp = pb.StatPvPReportResp StatPvPReportResp_Item = pb.StatPvPReportResp_Item + TransferUserIntegralReq = pb.TransferUserIntegralReq + TransferUserIntegralResp = pb.TransferUserIntegralResp User = pb.User UserBuyNobilityReq = pb.UserBuyNobilityReq UserBuyNobilityResp = pb.UserBuyNobilityResp @@ -35,6 +44,9 @@ type ( UserIdReq = pb.UserIdReq UserIdResp = pb.UserIdResp UserIntegralResp = pb.UserIntegralResp + UserRankReq = pb.UserRankReq + UserRankResp = pb.UserRankResp + UserRankResp_Item = pb.UserRankResp_Item UserSendGiftReq = pb.UserSendGiftReq UserSendGiftResp = pb.UserSendGiftResp @@ -49,14 +61,20 @@ type ( GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error) // UserCheckIn 用户签到|打卡 UserCheckIn(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserCheckInResp, error) + // TransferUserIntegral 转移积分 + TransferUserIntegral(ctx context.Context, in *TransferUserIntegralReq, opts ...grpc.CallOption) (*TransferUserIntegralResp, error) // UserSendGift 用户赠送礼物 UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error) StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error) StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error) + DrawGiftPack(ctx context.Context, in *DrawGiftPackReq, opts ...grpc.CallOption) (*DrawGiftPackResp, error) + IncreaseWelfare(ctx context.Context, in *IncreaseWelfareReq, opts ...grpc.CallOption) (*Empty, error) // rankPvp pvp排行 RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error) + RankPvpSubmit(ctx context.Context, in *RankPvpSubmitReq, opts ...grpc.CallOption) (*RankPvpSubmitResp, error) + UserRankPvp(ctx context.Context, in *UserRankReq, opts ...grpc.CallOption) (*UserRankResp, error) } defaultUserCenter struct { @@ -100,6 +118,12 @@ func (m *defaultUserCenter) UserCheckIn(ctx context.Context, in *UserIdReq, opts return client.UserCheckIn(ctx, in, opts...) } +// TransferUserIntegral 转移积分 +func (m *defaultUserCenter) TransferUserIntegral(ctx context.Context, in *TransferUserIntegralReq, opts ...grpc.CallOption) (*TransferUserIntegralResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.TransferUserIntegral(ctx, in, opts...) +} + // UserSendGift 用户赠送礼物 func (m *defaultUserCenter) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) { client := pb.NewUserCenterClient(m.cli.Conn()) @@ -126,8 +150,28 @@ func (m *defaultUserCenter) StatPvpReport(ctx context.Context, in *StatPvPReport return client.StatPvpReport(ctx, in, opts...) } +func (m *defaultUserCenter) DrawGiftPack(ctx context.Context, in *DrawGiftPackReq, opts ...grpc.CallOption) (*DrawGiftPackResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.DrawGiftPack(ctx, in, opts...) +} + +func (m *defaultUserCenter) IncreaseWelfare(ctx context.Context, in *IncreaseWelfareReq, opts ...grpc.CallOption) (*Empty, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.IncreaseWelfare(ctx, in, opts...) +} + // rankPvp pvp排行 func (m *defaultUserCenter) RankPvp(ctx context.Context, in *RankPvpReq, opts ...grpc.CallOption) (*RankPvpResp, error) { client := pb.NewUserCenterClient(m.cli.Conn()) return client.RankPvp(ctx, in, opts...) } + +func (m *defaultUserCenter) RankPvpSubmit(ctx context.Context, in *RankPvpSubmitReq, opts ...grpc.CallOption) (*RankPvpSubmitResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.RankPvpSubmit(ctx, in, opts...) +} + +func (m *defaultUserCenter) UserRankPvp(ctx context.Context, in *UserRankReq, opts ...grpc.CallOption) (*UserRankResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.UserRankPvp(ctx, in, opts...) +} diff --git a/config-dev.yml b/config-dev.yml index 25fb507..ddb2e80 100644 --- a/config-dev.yml +++ b/config-dev.yml @@ -15,19 +15,29 @@ Kafka: Addr: [ "127.0.0.1:9093" ] Topic: "gift-dev" ConsumerGroup: "giftToPush-dev" + GuardBuy: + Addr: [ "127.0.0.1:9093" ] + Topic: "guardBuy-dev" + ConsumerGroup: "guardBuyConsumerG-dev" + RewardPool: + Addr: [ "127.0.0.1:9093" ] + Topic: "rewardPool-dev" + ConsumerGroup: "rewardPoolConsumerG-dev" Game: ModeDict: 8722013: 0 Common: - Commands: [ "q", "查询", "打卡", "签到" ] + # jc示例格式:jc 阵营(r|b):(数字积分数) + # fp封盘?仅主播可用? TODO 暂时要不得,再想想 + Commands: [ "q", "查询", "打卡", "签到", "新手礼包", "低保" ] Zhg: Commands: [ "j", "加入", "加入游戏", "s", "w", "我在哪", "s1", "s2", "s3", "s4", "c1", "c2", "c3", "c4", "r1", "r2", "r3", "m1", "m2", "m3" ] OutbreakCount: 5 OutbreakBaseCost: 200 OutbreakCostDict: - 1: 120 # 步兵 - 2: 160 # 骑兵 - 3: 200 # 弓箭手 + 1: 220 # 步兵 + 2: 260 # 骑兵 + 3: 240 # 弓箭手 4: 220 # 法师 Zhghz: Commands: [ "j", "加入", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "w", "我在哪", "m1", "m2", "m3", "m4", "f", "开炮" ] diff --git a/config/Config.go b/config/Config.go index 66635d2..8224cf9 100644 --- a/config/Config.go +++ b/config/Config.go @@ -34,8 +34,10 @@ type ( } // Kafka 队列配置 Kafka struct { - Danmaku Kafka - Gift Kafka + Danmaku Kafka // 发送弹幕 + Gift Kafka // 赠送礼物 + GuardBuy Kafka // TODO 购买贵族 改名 + RewardPool Kafka // 奖池消息 } Game struct { ModeDict map[int64]int32 // 直播间对应模式(临时) diff --git a/game/live_logic/common_handler.go b/game/live_logic/common_handler.go index b119b0e..2f88a0e 100644 --- a/game/live_logic/common_handler.go +++ b/game/live_logic/common_handler.go @@ -3,7 +3,7 @@ package live_logic import ( "dcg/app/user_center/usercenter" "dcg/config" - "dcg/game/logic" + "dcg/game/manager" pbCommon "dcg/game/pb/common" pbMq "dcg/game/pb/mq" "dcg/game/svc" @@ -27,11 +27,12 @@ func NewCommonLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { resp.RegisterCMDHandler(resp.handleCheckIn, "打卡", "签到") // 通用礼物处理器 resp.RegisterGiftHandler(resp.handleGift) + resp.RegisterNobilityHandler(resp.handleNobility) return resp.LiveGameLogic } func (h *commonGameLogic) handleCheckIn(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -42,7 +43,7 @@ func (h *commonGameLogic) handleCheckIn(roomId int64, _ string, user *pbCommon.P respMsg.Msg = "打卡失败,UP主有罪。" } else { user.Integral = resp.Integral - respMsg.Success = resp.Success + respMsg.Code = resp.Code respMsg.Msg = resp.Msg respMsg.IntegralChange = resp.IntegralChange respMsg.IsCritical = resp.IsCritical @@ -51,20 +52,38 @@ func (h *commonGameLogic) handleCheckIn(roomId int64, _ string, user *pbCommon.P } func (h *commonGameLogic) handleQuery(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.PushToLiveRoom(roomId, "user.query", &pbCommon.UserQueryMsg{User: user}) + rank := make([]*pbCommon.UserQueryMsg_RankItem, 0) + if rpcRank, err := h.svcCtx.UserCenterRpc.UserRankPvp(h.svcCtx.Ctx, &usercenter.UserRankReq{ + UserId: user.UId, + Username: user.Uname, + AllRankType: true, + }); err == nil { + for _, item := range rpcRank.Items { + rank = append(rank, &pbCommon.UserQueryMsg_RankItem{ + RankType: item.RankType, + Score: item.Score, + Rank: item.Pos, + }) + } + } + room.PushToLiveRoom(roomId, "user.query", &pbCommon.UserQueryMsg{ + User: user, + Rank: rank, + TitleIds: []int64{}, + }) } func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } // 1. 发送通用礼物消息 - room.PushToLiveRoom(roomId, "live.gift", &pbCommon.GiftMsg{ + room.PushToLiveRoom(roomId, "live.gift.common", &pbCommon.GiftMsg{ User: user, GiftId: gift.GiftId, Num: gift.Num, @@ -83,6 +102,7 @@ func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift * Num: gift.Num, Price: gift.Price, IsPaid: gift.IsPaid, + BattleId: manager.GameManager.BattleIdByLiveRoomId(roomId), } giftResp, err := h.svcCtx.UserCenterRpc.UserSendGift(h.svcCtx.Ctx, req) if err != nil { @@ -96,3 +116,44 @@ func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift * Integral: giftResp.Integral.Integral, }) } + +func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, msg *pbMq.MqGuardBuy) { + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + // 1. 发送通用礼物消息 + room.PushToLiveRoom(roomId, "live.gift.nobility", &pbCommon.GiftMsg{ + User: user, + GiftId: msg.GiftId, + Num: int64(msg.Num), + GiftName: msg.GiftName, + Price: msg.Price, + IsPaid: true, + }) + // 2. rpc + nobilityResp, err := h.svcCtx.UserCenterRpc.UserBuyNobility(h.svcCtx.Ctx, &usercenter.UserBuyNobilityReq{ + Platform: msg.Platform, + UserId: user.UId, + PUid: strconv.FormatInt(msg.Uid, 10), + BattleId: manager.GameManager.BattleIdByLiveRoomId(roomId), + RoomId: strconv.FormatInt(roomId, 10), + GiftId: msg.GiftId, + GiftName: msg.GiftName, + Num: int64(msg.Num), + Price: msg.Price, + Level: int64(msg.GuardLevel), + StartTime: msg.StartTime, + EndTime: msg.EndTime, + }) + if err != nil { + logger.SLog.Info("rpc 购买舰长记录失败,积分变动不通知了...") + return + } + user.Integral = nobilityResp.Integral.Integral // 更新最新积分 + room.PushToLiveRoom(roomId, "user.integral.change", &pbCommon.UserIntegralChanged{ + User: user, + Change: nobilityResp.Integral.Change, + Integral: nobilityResp.Integral.Integral, + }) +} diff --git a/game/live_logic/logic.go b/game/live_logic/logic.go index 843151a..3da30a3 100644 --- a/game/live_logic/logic.go +++ b/game/live_logic/logic.go @@ -1,7 +1,7 @@ package live_logic import ( - "dcg/game/logic" + "dcg/game/manager" pbCommon "dcg/game/pb/common" pbMq "dcg/game/pb/mq" pbRoom "dcg/game/pb/room" @@ -17,9 +17,11 @@ type ( CmdParser *cmd.Parser // 命令解析 CmdHandlerMapper map[string]CMDHandlerFunc // 具体命令处理(同类型) GiftHandler GiftHandlerFunc // 礼物处理 + NobilityHandler NobilityHandlerFunc // 贵族购买处理 } - CMDHandlerFunc func(roomId int64, cmd string, user *pbCommon.PbUser) - GiftHandlerFunc func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) + CMDHandlerFunc func(roomId int64, cmd string, user *pbCommon.PbUser) + GiftHandlerFunc func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) + NobilityHandlerFunc func(roomId int64, user *pbCommon.PbUser, nobility *pbMq.MqGuardBuy) ) func NewLiveGameLogic(gameType pbRoom.GameType, cmdParser *cmd.Parser) *LiveGameLogic { @@ -49,6 +51,10 @@ func (l *LiveGameLogic) RegisterGiftHandler(h GiftHandlerFunc) { l.GiftHandler = h } +func (l *LiveGameLogic) RegisterNobilityHandler(h NobilityHandlerFunc) { + l.NobilityHandler = h +} + // HandleDanmaku 弹幕数据处理 // pushCommonMsg 非弹幕数据是否转发 func (l *LiveGameLogic) HandleDanmaku(pushCommonMsg bool, user *pbCommon.PbUser, dm *pbMq.MqDanmaku) { @@ -58,7 +64,7 @@ func (l *LiveGameLogic) HandleDanmaku(pushCommonMsg bool, user *pbCommon.PbUser, l.handleCMD(dm.LiveRoomId, c, user) } } else if pushCommonMsg { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(dm.LiveRoomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(dm.LiveRoomId) if err != nil { return } @@ -82,3 +88,10 @@ func (l *LiveGameLogic) HandleGift(roomId int64, user *pbCommon.PbUser, gift *pb } l.GiftHandler(roomId, user, gift) } + +func (l *LiveGameLogic) HandleNobility(roomId int64, user *pbCommon.PbUser, msg *pbMq.MqGuardBuy) { + if l.NobilityHandler == nil { + return + } + l.NobilityHandler(roomId, user, msg) +} diff --git a/game/live_logic/manager.go b/game/live_logic/manager.go index 37c7bc1..eae8c34 100644 --- a/game/live_logic/manager.go +++ b/game/live_logic/manager.go @@ -72,3 +72,14 @@ func (m *Manager) HandleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqG } l.HandleGift(roomId, user, gift) } + +func (m *Manager) HandleNobility(roomId int64, user *pbCommon.PbUser, msg *pbMq.MqGuardBuy) { + m.commonLogic.HandleNobility(roomId, user, msg) + + l, err := m.logicByLiveRoomId(roomId) + if err != nil { + logger.SLog.Errorf("获取游戏逻辑失败, err:%+v", err) + return + } + l.HandleNobility(roomId, user, msg) +} diff --git a/game/live_logic/zhg_handler.go b/game/live_logic/zhg_handler.go index 9bed412..05c2cd9 100644 --- a/game/live_logic/zhg_handler.go +++ b/game/live_logic/zhg_handler.go @@ -2,7 +2,7 @@ package live_logic import ( "dcg/config" - "dcg/game/logic" + "dcg/game/manager" pbCommon "dcg/game/pb/common" pbGameZhg "dcg/game/pb/game/zhg" pbMq "dcg/game/pb/mq" @@ -35,7 +35,7 @@ func NewZhgLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { } func (h *ZhgGameLogic) handleJoinGame(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -43,7 +43,7 @@ func (h *ZhgGameLogic) handleJoinGame(roomId int64, _ string, user *pbCommon.PbU } func (h *ZhgGameLogic) handleOutbreak(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -51,7 +51,7 @@ func (h *ZhgGameLogic) handleOutbreak(roomId int64, _ string, user *pbCommon.PbU } func (h *ZhgGameLogic) handleOutbreakIntegral(roomId int64, cmd string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -84,7 +84,7 @@ func (h *ZhgGameLogic) handleCreateUnit(roomId int64, cmd string, user *pbCommon } unit := cmd[1] - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -101,7 +101,7 @@ func (h *ZhgGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUse } line := cmd[1] - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -112,7 +112,7 @@ func (h *ZhgGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUse } func (h *ZhgGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -124,7 +124,7 @@ func (h *ZhgGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbUse return } line := cmd[1] - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } diff --git a/game/live_logic/zhghz_handler.go b/game/live_logic/zhghz_handler.go index 5691367..7132f9d 100644 --- a/game/live_logic/zhghz_handler.go +++ b/game/live_logic/zhghz_handler.go @@ -2,7 +2,7 @@ package live_logic import ( "dcg/config" - "dcg/game/logic" + "dcg/game/manager" pbCommon "dcg/game/pb/common" pbGameZhghz "dcg/game/pb/game/zhghz" pbMq "dcg/game/pb/mq" @@ -41,7 +41,7 @@ func NewZhghzLiveGameLogic() *ZhghzGameLogic { } func (h *ZhghzGameLogic) handleJoinGame(roomId int64, cmd string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -58,7 +58,7 @@ func (h *ZhghzGameLogic) handleJoinGame(roomId int64, cmd string, user *pbCommon } func (h *ZhghzGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -75,7 +75,7 @@ func (h *ZhghzGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbU } func (h *ZhghzGameLogic) handleShoot(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -85,7 +85,7 @@ func (h *ZhghzGameLogic) handleShoot(roomId int64, _ string, user *pbCommon.PbUs } func (h *ZhghzGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } @@ -107,7 +107,7 @@ func (h *ZhghzGameLogic) handleGiftLogic(cmd string, roomId int64, user *pbCommo } func (h *ZhghzGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { - room, err := logic.GameLogic.RoomManager.RoomByLiveRoomId(roomId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) if err != nil { return } diff --git a/game/logic/game_status/game_status.go b/game/logic/game_status/game_status.go new file mode 100644 index 0000000..0f50d10 --- /dev/null +++ b/game/logic/game_status/game_status.go @@ -0,0 +1,50 @@ +package game_status + +import ( + "dcg/game/manager" + pbCommon "dcg/game/pb/common" + "dcg/game/svc" + "git.noahlan.cn/northlan/ngs/component" + "git.noahlan.cn/northlan/ngs/session" +) + +type GameStatus struct { + component.Base + svcCtx *svc.ServiceContext +} + +func NewGameStatus(svcCtx *svc.ServiceContext) *GameStatus { + return &GameStatus{ + svcCtx: svcCtx, + } +} + +func (p *GameStatus) Init() { +} + +func (p *GameStatus) Shutdown() { +} + +func (p *GameStatus) CMD() string { + return "game" +} + +func (p *GameStatus) Prefix() string { + return "" +} + +// Status 游戏房间状态变更 +func (p *GameStatus) Status(s *session.Session, msg *pbCommon.GameStatusReq) error { + manager.GameManager.DataManager.SessionGameStatus(s, manager.GameStatus(msg.Status)) + data, err := manager.GameManager.DataManager.SessionData(s) + if err != nil { + return s.Response(&pbCommon.GameStatusResp{ + Success: false, + }) + } + return s.Response(&pbCommon.GameStatusResp{ + Success: true, + BattleId: data.BattleId(), + Timestamp: msg.Timestamp, + }) +} diff --git a/game/logic/init.go b/game/logic/init.go index fa13563..ccd8462 100644 --- a/game/logic/init.go +++ b/game/logic/init.go @@ -1,10 +1,11 @@ package logic import ( + "dcg/game/logic/game_status" + "dcg/game/logic/room" "dcg/game/logic/user" "dcg/game/logic/zhg/rank" "dcg/game/logic/zhg/statistics" - "dcg/game/room" "dcg/game/svc" "git.noahlan.cn/northlan/ngs/component" "strings" @@ -15,16 +16,16 @@ var GameLogic *Logics type Logics struct { Services *component.Components - RoomManager *room.Manager + RoomLogic *room.Logic StatisticsPvP *statistics.PvP Rank *rank.Rank - UserIntegral *user.UserIntegral + UserIntegral *user.UserLogic } func Init(svcCtx *svc.ServiceContext) { services := &component.Components{} - roomManager := room.NewRoomManager() + roomManager := room.NewRoomLogic() services.Register(roomManager, component.WithName(roomManager.CMD()), component.WithNameFunc(func(s string) string { @@ -52,9 +53,16 @@ func Init(svcCtx *svc.ServiceContext) { return userIntegral.Prefix() + "." + strings.ToLower(s) })) + gameStatus := game_status.NewGameStatus(svcCtx) + services.Register(gameStatus, + component.WithName(gameStatus.CMD()), + component.WithNameFunc(func(s string) string { + return strings.ToLower(s) + })) + GameLogic = &Logics{ Services: services, - RoomManager: roomManager, + RoomLogic: roomManager, StatisticsPvP: statisticsPvP, Rank: rk, UserIntegral: userIntegral, diff --git a/game/logic/room/manager.go b/game/logic/room/manager.go new file mode 100644 index 0000000..e9c2a9b --- /dev/null +++ b/game/logic/room/manager.go @@ -0,0 +1,48 @@ +package room + +import ( + "dcg/game/manager" + pbRoom "dcg/game/pb/room" + "git.noahlan.cn/northlan/ngs/component" + "git.noahlan.cn/northlan/ngs/session" +) + +type ( + Logic struct { + component.Base + } +) + +func NewRoomLogic() *Logic { + return &Logic{} +} + +func (m *Logic) CMD() string { + return "room" +} + +func (m *Logic) Init() { +} + +func (m *Logic) AfterInit() { + session.Lifetime.OnClosed(func(s *session.Session) { + manager.GameManager.RoomManager.SessionLeaveRoom(s) + }) +} + +func (m *Logic) Shutdown() { + manager.GameManager.RoomManager.Clean() +} + +func (m *Logic) Join(s *session.Session, msg *pbRoom.JoinRoomReq) error { + if err := manager.GameManager.RoomManager.SessionJoinRoom(s, msg.GameType, msg.LiveRoomId); err != nil { + return s.Response(&pbRoom.JoinRoomResp{ + Code: 500, + Result: "加入房间失败", + }) + } + return s.Response(&pbRoom.JoinRoomResp{ + Code: 200, + Result: "success", + }) +} diff --git a/game/logic/user/user_integral.go b/game/logic/user/user_integral.go index 03ca72d..3d04bca 100644 --- a/game/logic/user/user_integral.go +++ b/game/logic/user/user_integral.go @@ -1,55 +1,61 @@ package user import ( + "dcg/app/user_center/pb" "dcg/app/user_center/usercenter" + "dcg/game/manager" pbCommon "dcg/game/pb/common" "dcg/game/svc" "git.noahlan.cn/northlan/ngs/component" "git.noahlan.cn/northlan/ngs/session" + "github.com/pkg/errors" + "google.golang.org/grpc/status" ) -type UserIntegral struct { +type UserLogic struct { component.Base svcCtx *svc.ServiceContext } -func NewUserIntegral(svcCtx *svc.ServiceContext) *UserIntegral { - return &UserIntegral{ +func NewUserIntegral(svcCtx *svc.ServiceContext) *UserLogic { + return &UserLogic{ svcCtx: svcCtx, } } -func (p *UserIntegral) Init() { +func (p *UserLogic) Init() { } -func (p *UserIntegral) Shutdown() { +func (p *UserLogic) Shutdown() { } -func (p *UserIntegral) CMD() string { +func (p *UserLogic) CMD() string { return "user" } -func (p *UserIntegral) Prefix() string { +func (p *UserLogic) Prefix() string { return "integral" } // Change 更新积分 -func (p *UserIntegral) Change(s *session.Session, msg *pbCommon.ChangeUserIntegralReq) error { +func (p *UserLogic) Change(s *session.Session, msg *pbCommon.ChangeUserIntegralReq) error { integral, err := p.svcCtx.UserCenterRpc.ChangeIntegral(p.svcCtx.Ctx, &usercenter.ChangeIntegralReq{ - UserId: msg.UserId, - Change: msg.Change, + UserId: msg.UserId, + BattleId: manager.GameManager.DataManager.BattleIdBySession(s), + Change: msg.Change, + IntegralType: pb.IntegralType_Battle, }) if err != nil { + cause := errors.Cause(err) + gStatus, _ := status.FromError(cause) + return s.Response(&pbCommon.ChangeUserIntegralResp{ - Success: false, - Msg: err.Error(), - UserId: msg.UserId, - Change: 0, - Integral: 0, + Code: int32(gStatus.Code()), + Msg: gStatus.Message(), }) } return s.Response(&pbCommon.ChangeUserIntegralResp{ - Success: true, + Code: 200, Msg: "成功", UserId: msg.UserId, Change: msg.Change, diff --git a/game/logic/zhg/statistics/stat_pvp.go b/game/logic/zhg/statistics/stat_pvp.go index ebc092a..3671c93 100644 --- a/game/logic/zhg/statistics/stat_pvp.go +++ b/game/logic/zhg/statistics/stat_pvp.go @@ -2,11 +2,11 @@ package statistics import ( "dcg/app/user_center/usercenter" + "dcg/game/manager" pbGameZhg "dcg/game/pb/game/zhg" "dcg/game/svc" "git.noahlan.cn/northlan/ngs/component" "git.noahlan.cn/northlan/ngs/session" - "git.noahlan.cn/northlan/ntools-go/logger" ) type PvP struct { @@ -63,35 +63,32 @@ func (p *PvP) First(s *session.Session, msg *pbGameZhg.StatPvPFirstBlood) error func (p *PvP) Report(s *session.Session, msg *pbGameZhg.StatPvPReportReq) error { winItems := make([]*usercenter.StatPvPReportReq_Item, 0, len(msg.WinItems)) lostItems := make([]*usercenter.StatPvPReportReq_Item, 0, len(msg.LostItems)) - for _, item := range msg.WinItems { winItems = append(winItems, &usercenter.StatPvPReportReq_Item{ Uid: item.Uid, Uname: item.Uname, + Position: item.Position, Damage: item.Damage, DeDamage: item.DeDamage, KillUnit: item.KillUnit, DeKillUnit: item.DeKillUnit, }) } - for _, item := range msg.LostItems { lostItems = append(lostItems, &usercenter.StatPvPReportReq_Item{ Uid: item.Uid, Uname: item.Uname, + Position: item.Position, Damage: item.Damage, DeDamage: item.DeDamage, KillUnit: item.KillUnit, DeKillUnit: item.DeKillUnit, }) } - logger.SLog.Info("接收客户端战报", msg) + // 战局ID resp, err := p.svcCtx.UserCenterRpc.StatPvpReport(p.svcCtx.Ctx, &usercenter.StatPvPReportReq{ - WinCamp: msg.WinCamp, - General: &usercenter.StatPvPReportReq_General{ - Uid: msg.General.Uid, - Uname: msg.General.Uname, - }, + WinCamp: msg.WinCamp, + BattleId: manager.GameManager.DataManager.BattleIdBySession(s), WinItems: winItems, LostItems: lostItems, }) @@ -102,25 +99,32 @@ func (p *PvP) Report(s *session.Session, msg *pbGameZhg.StatPvPReportReq) error lostItemsResp := make([]*pbGameZhg.StatPvPReportResp_Item, 0, len(resp.LostItems)) for _, item := range resp.WinItems { winItemsResp = append(winItemsResp, &pbGameZhg.StatPvPReportResp_Item{ - Uid: item.Uid, - Uname: item.Uname, - AddonIntegral: item.AddonIntegral, + Uid: item.Uid, + Uname: item.Uname, + Position: item.Position, + ReturnsIntegral: item.ReturnsIntegral, + RewardPoolIntegral: item.RewardPoolIntegral, + GeneralIntegral: item.GeneralIntegral, + NobilityIntegral: item.NobilityIntegral, + BattleIntegral: item.BattleIntegral, + TotalIntegral: item.TotalIntegral, }) } for _, item := range resp.LostItems { lostItemsResp = append(lostItemsResp, &pbGameZhg.StatPvPReportResp_Item{ - Uid: item.Uid, - Uname: item.Uname, - AddonIntegral: item.AddonIntegral, + Uid: item.Uid, + Uname: item.Uname, + Position: item.Position, + ReturnsIntegral: item.ReturnsIntegral, + RewardPoolIntegral: item.RewardPoolIntegral, + GeneralIntegral: item.GeneralIntegral, + NobilityIntegral: item.NobilityIntegral, + BattleIntegral: item.BattleIntegral, + TotalIntegral: item.TotalIntegral, }) } return s.Response(&pbGameZhg.StatPvPReportResp{ - General: &pbGameZhg.StatPvPReportResp_Item{ - Uid: resp.General.Uid, - Uname: resp.General.Uname, - AddonIntegral: resp.General.AddonIntegral, - }, WinItems: winItemsResp, LostItems: lostItemsResp, }) diff --git a/game/manager/data.go b/game/manager/data.go new file mode 100644 index 0000000..3008392 --- /dev/null +++ b/game/manager/data.go @@ -0,0 +1,50 @@ +package manager + +import ( + "git.noahlan.cn/northlan/ntools-go/uuid" + "sync" +) + +type GameStatus int32 + +const ( + GameStarted GameStatus = iota + 1 // 游戏已经开始 + GameEnded // 游戏已结束 +) + +type GameData struct { + battleId int64 // 战局ID + current GameStatus // 当前战局状态 + mutex sync.RWMutex // 锁 +} + +func NewGameData() *GameData { + return &GameData{ + current: GameEnded, + } +} + +func (m *GameData) SetStatus(status GameStatus) GameStatus { + m.mutex.Lock() + defer m.mutex.Unlock() + m.current = status + + if status == GameStarted { + m.battleId = uuid.NextId() + } else if status == GameEnded { + m.battleId = 0 + } + return m.current +} + +func (m *GameData) Status() GameStatus { + m.mutex.RLock() + defer m.mutex.RUnlock() + return m.current +} + +func (m *GameData) BattleId() int64 { + m.mutex.RLock() + defer m.mutex.RUnlock() + return m.battleId +} diff --git a/game/manager/data_manager.go b/game/manager/data_manager.go new file mode 100644 index 0000000..ae794ed --- /dev/null +++ b/game/manager/data_manager.go @@ -0,0 +1,36 @@ +package manager + +import ( + "errors" + "git.noahlan.cn/northlan/ngs/session" +) + +type DataManager struct { +} + +func NewDataManager() *DataManager { + return &DataManager{} +} + +func (m *DataManager) SessionGameStatus(session *session.Session, status GameStatus) GameStatus { + if data, err := m.SessionData(session); err != nil { + return GameEnded + } else { + return data.SetStatus(status) + } +} + +func (m *DataManager) SessionData(session *session.Session) (*GameData, error) { + if !session.HasKey(DataKey) { + return nil, errors.New("session中无data数据") + } + return session.Value(DataKey).(*GameData), nil +} + +func (m *DataManager) BattleIdBySession(session *session.Session) int64 { + data, err := m.SessionData(session) + if err != nil { + return 0 + } + return data.BattleId() +} diff --git a/game/manager/manager.go b/game/manager/manager.go new file mode 100644 index 0000000..441f36f --- /dev/null +++ b/game/manager/manager.go @@ -0,0 +1,48 @@ +package manager + +var GameManager *gameManager + +type ( + gameManager struct { + RoomManager *RoomManager // 房间管理器 + DataManager *DataManager // 数据管理器(Session) + } +) + +func init() { + GameManager = newGameManager() +} + +func newGameManager() *gameManager { + return &gameManager{ + RoomManager: NewRoomManager(), + } +} + +func (m *gameManager) BattleIdByLiveRoomId(liveRoomId int64) int64 { + sess, err := m.RoomManager.SessionByLiveRoomId(liveRoomId) + if err != nil { + return 0 + } + data, err := m.DataManager.SessionData(sess) + if err != nil { + return 0 + } + return data.BattleId() +} + +func (m *gameManager) LiveRoomIdByBattleId(battleId int64) int64 { + for _, session := range m.RoomManager.Sessions() { + data, err := m.DataManager.SessionData(session) + if err != nil { + continue + } + if data.BattleId() == battleId { + if !session.HasKey(LiveRoomIdKey) { + continue + } + return session.Int64(LiveRoomIdKey) + } + } + return 0 +} diff --git a/game/room/manager.go b/game/manager/room_manager.go similarity index 50% rename from game/room/manager.go rename to game/manager/room_manager.go index bca751f..8b04872 100644 --- a/game/room/manager.go +++ b/game/manager/room_manager.go @@ -1,22 +1,15 @@ -package room +package manager import ( "dcg/game" pbRoom "dcg/game/pb/room" + "errors" "fmt" "git.noahlan.cn/northlan/ngs" - "git.noahlan.cn/northlan/ngs/component" - "git.noahlan.cn/northlan/ngs/scheduler" "git.noahlan.cn/northlan/ngs/session" "git.noahlan.cn/northlan/ntools-go/logger" "git.noahlan.cn/northlan/ntools-go/uuid" "github.com/golang/protobuf/proto" - "time" -) - -const ( - roomKey = "ROOM" - liveRoomIdKey = "LIVE_ROOM_ID" ) type ( @@ -26,86 +19,46 @@ type ( Room struct { Id int64 // 房间ID GameType pbRoom.GameType // 游戏类型 - group *ngs.Group // 分组 + + group *ngs.Group // 分组 } - Manager struct { - component.Base - timer *scheduler.Timer + RoomManager struct { rooms map[pbRoom.GameType]*Room } ) -func NewRoomManager() *Manager { - return &Manager{ +func NewRoomManager() *RoomManager { + return &RoomManager{ rooms: make(map[pbRoom.GameType]*Room), } } -func (m *Manager) CMD() string { - return "room" -} - -func (m *Manager) Init() { -} - -func (m *Manager) AfterInit() { - session.Lifetime.OnClosed(func(s *session.Session) { - if !s.HasKey(roomKey) { - return - } - room := s.Value(roomKey).(*Room) - _ = room.group.Leave(s) - }) - m.timer = scheduler.NewTimer(30*time.Second, func() { - for roomId, room := range m.rooms { - logger.SLog.Debugf("UserCount: RoomID=%d, Time=%s, Count=%d", - roomId, time.Now().String(), room.group.Count()) - } - }) -} - -func (m *Manager) Shutdown() { +func (m *RoomManager) Rooms() []*Room { + resp := make([]*Room, 0, len(m.rooms)) for _, room := range m.rooms { - _ = room.group.LeaveAll() + resp = append(resp, room) } + return resp } -func (m *Manager) Join(s *session.Session, msg *pbRoom.JoinRoomReq) error { - room := m.RoomByGameType(msg.GameType) - game.CacheGameType(msg.LiveRoomId, msg.GameType) - - // uid - uuid - err := s.Bind(uuid.NextId()) - if err != nil { - return err - } - s.Set(roomKey, room) - s.Set(liveRoomIdKey, msg.LiveRoomId) - - // members - var resp = &pbRoom.JoinRoomResp{ - Code: 200, - Result: "加入房间成功", - } - - err = room.group.Add(s) - if err != nil { - resp.Code = 500 - resp.Result = "加入房间失败" - } else { - _ = room.group.Broadcast("onNewClient", &pbRoom.Client{Id: msg.LiveRoomId}) +func (m *RoomManager) Sessions() []*session.Session { + resp := make([]*session.Session, 0) + for _, room := range m.rooms { + for _, sid := range room.group.Members() { + member, err := room.group.Member(sid) + if err != nil { + return resp + } + resp = append(resp, member) + } } - - return s.Response(&pbRoom.JoinRoomResp{ - Code: 200, - Result: "success", - }) + return resp } // RoomByGameType 通过游戏类型获取游戏房间 // 若房间不存在,则创建之 -func (m *Manager) RoomByGameType(gameType pbRoom.GameType) *Room { +func (m *RoomManager) RoomByGameType(gameType pbRoom.GameType) *Room { room, found := m.rooms[gameType] if !found { room = &Room{ @@ -118,7 +71,7 @@ func (m *Manager) RoomByGameType(gameType pbRoom.GameType) *Room { return room } -func (m *Manager) RoomByLiveRoomId(liveRoomId int64) (*Room, error) { +func (m *RoomManager) RoomByLiveRoomId(liveRoomId int64) (*Room, error) { gameType, err := game.GameTypeByLiveRoomId(liveRoomId) if err != nil { return nil, err @@ -126,8 +79,47 @@ func (m *Manager) RoomByLiveRoomId(liveRoomId int64) (*Room, error) { return m.RoomByGameType(gameType), nil } +func (m *RoomManager) SessionByLiveRoomId(liveRoomId int64) (*session.Session, error) { + room, err := m.RoomByLiveRoomId(liveRoomId) + if err != nil { + return nil, err + } + return room.SessionByLiveRoomId(liveRoomId) +} + +func (m *RoomManager) SessionJoinRoom(s *session.Session, gameType pbRoom.GameType, liveRoomId int64) error { + room := m.RoomByGameType(gameType) + game.CacheGameType(liveRoomId, gameType) + + // uid - uuid + err := s.Bind(uuid.NextId()) + if err != nil { + return err + } + + s.Set(RoomKey, room) + s.Set(LiveRoomIdKey, liveRoomId) + s.Set(DataKey, NewGameData()) + + return room.group.Add(s) +} + +func (m *RoomManager) SessionLeaveRoom(s *session.Session) { + if !s.HasKey(RoomKey) { + return + } + room := s.Value(RoomKey).(*Room) + _ = room.group.Leave(s) +} + +func (m *RoomManager) Clean() { + for _, room := range m.rooms { + _ = room.group.LeaveAll() + } +} + // Broadcast 消息全局分发 -func (m *Manager) Broadcast(route string, msg proto.Message) { +func (m *RoomManager) Broadcast(route string, msg proto.Message) { for _, room := range m.rooms { err := room.group.Broadcast(route, msg) if err != nil { @@ -138,19 +130,32 @@ func (m *Manager) Broadcast(route string, msg proto.Message) { // PushToLiveRoom 消息Push到直播间ID指定客户端 func (r *Room) PushToLiveRoom(liveRoomId int64, route string, msg proto.Message) { + sess, err := r.SessionByLiveRoomId(liveRoomId) + if err != nil { + return + } + err = sess.Push(route, msg) + if err != nil { + logger.SLog.Errorf("推送消息到 直播间[%d]客户端 失败, err:%+v", liveRoomId, err) + } +} + +func (r *Room) SessionByLiveRoomId(liveRoomId int64) (*session.Session, error) { for _, sid := range r.group.Members() { member, err := r.group.Member(sid) if err != nil { continue } - lRId := member.Value(liveRoomIdKey).(int64) + if !member.HasKey(LiveRoomIdKey) { + continue + } + lRId := member.Value(LiveRoomIdKey).(int64) if lRId == liveRoomId { - err = member.Push(route, msg) - if err != nil { - logger.SLog.Errorf("推送消息到 直播间[%d]客户端 失败, err:%+v", liveRoomId, err) - } + return member, nil } } + logger.SLog.Errorf("未找到直播间 [%d] 的客户端实例", liveRoomId) + return nil, errors.New("未找到客户端实例") } // Broadcast 房间内分发消息 diff --git a/game/manager/vars.go b/game/manager/vars.go new file mode 100644 index 0000000..b0ae295 --- /dev/null +++ b/game/manager/vars.go @@ -0,0 +1,7 @@ +package manager + +const ( + RoomKey = "ROOM" + LiveRoomIdKey = "LIVE_ROOM_ID" + DataKey = "DATA" +) diff --git a/game/msg_transfer/init.go b/game/msg_transfer/init.go index 8244fa8..b76ed2e 100644 --- a/game/msg_transfer/init.go +++ b/game/msg_transfer/init.go @@ -7,14 +7,20 @@ import ( var ( danmakuMsgToPush MsgToPushHandler giftMsgToPush GiftToPushHandler + nobilityTransfer NobilityTransferHandler + rewardTransfer RewardTransferHandler ) func Init(svc *svc.ServiceContext) { danmakuMsgToPush.Init(svc) giftMsgToPush.Init(svc) + nobilityTransfer.Init(svc) + rewardTransfer.Init(svc) } func Run() { go danmakuMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&danmakuMsgToPush) go giftMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&giftMsgToPush) + go nobilityTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&nobilityTransfer) + go rewardTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&rewardTransfer) } diff --git a/game/msg_transfer/nobility_transfer.go b/game/msg_transfer/nobility_transfer.go new file mode 100644 index 0000000..c7cc53f --- /dev/null +++ b/game/msg_transfer/nobility_transfer.go @@ -0,0 +1,84 @@ +package msg_transfer + +import ( + "dcg/app/user_center/usercenter" + "dcg/config" + "dcg/game/live_logic" + pbCommon "dcg/game/pb/common" + pbMq "dcg/game/pb/mq" + "dcg/game/svc" + kfk "dcg/pkg/kafka" + "git.noahlan.cn/northlan/ntools-go/kafka" + "git.noahlan.cn/northlan/ntools-go/logger" + "github.com/Shopify/sarama" + "github.com/golang/protobuf/proto" + "strconv" +) + +type NobilityTransferHandler struct { + svcCtx *svc.ServiceContext + msgHandle map[string]kafkaMsgHandlerFunc + ConsumerGroup *kafka.ConsumerGroup +} + +func (h *NobilityTransferHandler) Init(svcCtx *svc.ServiceContext) { + h.svcCtx = svcCtx + cfg := config.Config.Kafka.GuardBuy + h.msgHandle = make(map[string]kafkaMsgHandlerFunc) + h.msgHandle[cfg.Topic] = h.handleTopic + + var err error + h.ConsumerGroup, err = kafka.NewConsumerGroup(&kafka.ConsumerGroupConfig{ + KafkaVersion: sarama.V3_1_0_0, + OffsetsInitial: sarama.OffsetNewest, + IsReturnErr: false, + UnMarshaler: kfk.ProtobufMarshaler, + }, cfg.Addr, []string{cfg.Topic}, cfg.ConsumerGroup) + + if err != nil { + logger.SLog.Error(err) + } +} + +func (h *NobilityTransferHandler) handleTopic(data []byte, _ string) { + // msg proto + var msgFromMq pbMq.MqGuardBuy + err := proto.Unmarshal(data, &msgFromMq) + if err != nil { + logger.SLog.Error("unmarshal msg err", err) + return + } + // rpc创建或获取用户数据 + rpcUser, err := h.svcCtx.UserCenterRpc.RetrievePlatformUser(h.svcCtx.Ctx, &usercenter.PlatformUserReq{ + Platform: msgFromMq.Platform, + PUid: strconv.FormatInt(msgFromMq.Uid, 10), + }) + if err != nil { + logger.SLog.Info("rpc获取用户信息失败,本条消息丢弃...") + return + } + pbUser := &pbCommon.PbUser{ + UId: rpcUser.User.Id, + Uname: msgFromMq.Uname, + Avatar: rpcUser.User.PAvatar, + NobilityLevel: rpcUser.User.NobilityLevel, + Integral: rpcUser.User.Integral, + } + logger.SLog.Debugf("队列舰长消息: %s 送出 %sx%d 价值 %d", msgFromMq.Uname, msgFromMq.GiftName, msgFromMq.Num, msgFromMq.Price*int64(msgFromMq.Num)) + + // 游戏逻辑处理 + live_logic.LiveManager.HandleNobility(msgFromMq.LiveRoomId, pbUser, &msgFromMq) +} + +func (NobilityTransferHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } +func (NobilityTransferHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } +func (h *NobilityTransferHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error { + for msg := range claim.Messages() { + //logger.SLog.Infow("kafka get info to mysql", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value)) + if hFunc, ok := h.msgHandle[msg.Topic]; ok { + hFunc(msg.Value, string(msg.Key)) + } + sess.MarkMessage(msg, "") + } + return nil +} diff --git a/game/msg_transfer/reward_transfer.go b/game/msg_transfer/reward_transfer.go new file mode 100644 index 0000000..936f494 --- /dev/null +++ b/game/msg_transfer/reward_transfer.go @@ -0,0 +1,76 @@ +package msg_transfer + +import ( + "dcg/config" + "dcg/game/manager" + pbCommon "dcg/game/pb/common" + pbMq "dcg/game/pb/mq" + "dcg/game/svc" + kfk "dcg/pkg/kafka" + "git.noahlan.cn/northlan/ntools-go/kafka" + "git.noahlan.cn/northlan/ntools-go/logger" + "github.com/Shopify/sarama" + "github.com/golang/protobuf/proto" +) + +type RewardTransferHandler struct { + svcCtx *svc.ServiceContext + msgHandle map[string]kafkaMsgHandlerFunc + ConsumerGroup *kafka.ConsumerGroup +} + +func (h *RewardTransferHandler) Init(svcCtx *svc.ServiceContext) { + h.svcCtx = svcCtx + cfg := config.Config.Kafka.RewardPool + h.msgHandle = make(map[string]kafkaMsgHandlerFunc) + h.msgHandle[cfg.Topic] = h.handleTopic + + var err error + h.ConsumerGroup, err = kafka.NewConsumerGroup(&kafka.ConsumerGroupConfig{ + KafkaVersion: sarama.V3_1_0_0, + OffsetsInitial: sarama.OffsetNewest, + IsReturnErr: false, + UnMarshaler: kfk.ProtobufMarshaler, + }, cfg.Addr, []string{cfg.Topic}, cfg.ConsumerGroup) + + if err != nil { + logger.SLog.Error(err) + } +} + +func (h *RewardTransferHandler) handleTopic(data []byte, _ string) { + // msg proto + var msgFromMq pbMq.MqRewardPool + err := proto.Unmarshal(data, &msgFromMq) + if err != nil { + logger.SLog.Error("unmarshal msg err", err) + return + } + roomId := manager.GameManager.LiveRoomIdByBattleId(msgFromMq.BattleId) + room, err := manager.GameManager.RoomManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + room.PushToLiveRoom(roomId, "game.rewardPool", &pbCommon.RewardPoolMsg{ + WelfarePool: msgFromMq.WelfarePool, + BattleId: msgFromMq.BattleId, + InitReward: msgFromMq.InitReward, + GiftReward: msgFromMq.GiftReward, + BattleReward: msgFromMq.BattleReward, + OtherReward: msgFromMq.OtherReward, + AllRewards: msgFromMq.AllRewards, + }) +} + +func (RewardTransferHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } +func (RewardTransferHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } +func (h *RewardTransferHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error { + for msg := range claim.Messages() { + //logger.SLog.Infow("kafka get info to mysql", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value)) + if hFunc, ok := h.msgHandle[msg.Topic]; ok { + hFunc(msg.Value, string(msg.Key)) + } + sess.MarkMessage(msg, "") + } + return nil +} diff --git a/game/pb/common/Common.cs b/game/pb/common/Common.cs index eb6b659..66cd6f5 100644 --- a/game/pb/common/Common.cs +++ b/game/pb/common/Common.cs @@ -26,36 +26,48 @@ namespace Pb.Common { string.Concat( "Cgxjb21tb24ucHJvdG8SCXBiLmNvbW1vbiJdCgZQYlVzZXISCwoDdUlkGAEg", "ASgDEg0KBXVuYW1lGAIgASgJEg4KBmF2YXRhchgDIAEoCRIVCg1ub2JpbGl0", - "eUxldmVsGAQgASgFEhAKCGludGVncmFsGAUgASgDIlgKE1VzZXJJbnRlZ3Jh", - "bENoYW5nZWQSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISDgoG", - "Y2hhbmdlGAIgASgDEhAKCGludGVncmFsGAMgASgDIjcKFUNoYW5nZVVzZXJJ", - "bnRlZ3JhbFJlcRIOCgZ1c2VySWQYASABKAMSDgoGY2hhbmdlGAIgASgDImgK", - "FkNoYW5nZVVzZXJJbnRlZ3JhbFJlc3ASDwoHc3VjY2VzcxgBIAEoCBILCgNt", - "c2cYAiABKAkSDgoGdXNlcklkGAMgASgDEg4KBmNoYW5nZRgEIAEoAxIQCghp", - "bnRlZ3JhbBgFIAEoAyJ3CgpDaGVja0luTXNnEh8KBHVzZXIYASABKAsyES5w", - "Yi5jb21tb24uUGJVc2VyEg8KB3N1Y2Nlc3MYAiABKAgSCwoDbXNnGAMgASgJ", - "EhYKDmludGVncmFsQ2hhbmdlGAQgASgDEhIKCmlzQ3JpdGljYWwYBSABKAgi", - "ZwoOU3RhcnRlclBhY2tNc2cSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5Q", - "YlVzZXISDwoHc3VjY2VzcxgCIAEoCBILCgNtc2cYAyABKAkSFgoOaW50ZWdy", - "YWxDaGFuZ2UYBCABKAMiLwoMVXNlclF1ZXJ5TXNnEh8KBHVzZXIYASABKAsy", - "ES5wYi5jb21tb24uUGJVc2VyIj4KCkRhbm1ha3VNc2cSHwoEdXNlchgBIAEo", - "CzIRLnBiLmNvbW1vbi5QYlVzZXISDwoHY29udGVudBgCIAEoCSJ4CgdHaWZ0", - "TXNnEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmdpZnRJ", - "ZBgCIAEoAxILCgNudW0YAyABKAMSEAoIZ2lmdE5hbWUYBCABKAkSDQoFcHJp", - "Y2UYBSABKAMSDgoGaXNQYWlkGAYgASgIQh1aG2RjZy9nYW1lL3BiL2NvbW1v", - "bjtwYkNvbW1vbmIGcHJvdG8z")); + "eUxldmVsGAQgASgFEhAKCGludGVncmFsGAUgASgDIjIKDUdhbWVTdGF0dXNS", + "ZXESDgoGc3RhdHVzGAEgASgFEhEKCXRpbWVzdGFtcBgCIAEoAyJGCg5HYW1l", + "U3RhdHVzUmVzcBIPCgdzdWNjZXNzGAEgASgIEhAKCGJhdHRsZUlkGAIgASgD", + "EhEKCXRpbWVzdGFtcBgDIAEoAyJYChNVc2VySW50ZWdyYWxDaGFuZ2VkEh8K", + "BHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmNoYW5nZRgCIAEo", + "AxIQCghpbnRlZ3JhbBgDIAEoAyI3ChVDaGFuZ2VVc2VySW50ZWdyYWxSZXES", + "DgoGdXNlcklkGAEgASgDEg4KBmNoYW5nZRgCIAEoAyJlChZDaGFuZ2VVc2Vy", + "SW50ZWdyYWxSZXNwEgwKBGNvZGUYASABKAUSCwoDbXNnGAIgASgJEg4KBnVz", + "ZXJJZBgDIAEoAxIOCgZjaGFuZ2UYBCABKAMSEAoIaW50ZWdyYWwYBSABKAMi", + "dAoKQ2hlY2tJbk1zZxIMCgRjb2RlGAEgASgFEgsKA21zZxgCIAEoCRIfCgR1", + "c2VyGAMgASgLMhEucGIuY29tbW9uLlBiVXNlchIWCg5pbnRlZ3JhbENoYW5n", + "ZRgEIAEoAxISCgppc0NyaXRpY2FsGAUgASgIImEKC0dpZnRQYWNrTXNnEgwK", + "BGNvZGUYASABKAUSCwoDbXNnGAIgASgJEh8KBHVzZXIYAyABKAsyES5wYi5j", + "b21tb24uUGJVc2VyEhYKDmludGVncmFsQ2hhbmdlGAQgASgDIqwBCgxVc2Vy", + "UXVlcnlNc2cSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISLgoE", + "cmFuaxgCIAMoCzIgLnBiLmNvbW1vbi5Vc2VyUXVlcnlNc2cuUmFua0l0ZW0S", + "EAoIdGl0bGVJZHMYAyADKAMaOQoIUmFua0l0ZW0SEAoIcmFua1R5cGUYASAB", + "KAUSDQoFc2NvcmUYAiABKAMSDAoEcmFuaxgDIAEoBSI+CgpEYW5tYWt1TXNn", + "Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg8KB2NvbnRlbnQY", + "AiABKAkieAoHR2lmdE1zZxIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBi", + "VXNlchIOCgZnaWZ0SWQYAiABKAMSCwoDbnVtGAMgASgDEhAKCGdpZnROYW1l", + "GAQgASgJEg0KBXByaWNlGAUgASgDEg4KBmlzUGFpZBgGIAEoCCKdAQoNUmV3", + "YXJkUG9vbE1zZxITCgt3ZWxmYXJlUG9vbBgBIAEoAxIQCghiYXR0bGVJZBgC", + "IAEoAxISCgppbml0UmV3YXJkGAMgASgDEhIKCmdpZnRSZXdhcmQYBCABKAMS", + "FAoMYmF0dGxlUmV3YXJkGAUgASgDEhMKC290aGVyUmV3YXJkGAYgASgDEhIK", + "CmFsbFJld2FyZHMYCiABKANCHVobZGNnL2dhbWUvcGIvY29tbW9uO3BiQ29t", + "bW9uYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.PbUser), global::Pb.Common.PbUser.Parser, new[]{ "UId", "Uname", "Avatar", "NobilityLevel", "Integral" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GameStatusReq), global::Pb.Common.GameStatusReq.Parser, new[]{ "Status", "Timestamp" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GameStatusResp), global::Pb.Common.GameStatusResp.Parser, new[]{ "Success", "BattleId", "Timestamp" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserIntegralChanged), global::Pb.Common.UserIntegralChanged.Parser, new[]{ "User", "Change", "Integral" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralReq), global::Pb.Common.ChangeUserIntegralReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralResp), global::Pb.Common.ChangeUserIntegralResp.Parser, new[]{ "Success", "Msg", "UserId", "Change", "Integral" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "User", "Success", "Msg", "IntegralChange", "IsCritical" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.StarterPackMsg), global::Pb.Common.StarterPackMsg.Parser, new[]{ "User", "Success", "Msg", "IntegralChange" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg), global::Pb.Common.UserQueryMsg.Parser, new[]{ "User" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralResp), global::Pb.Common.ChangeUserIntegralResp.Parser, new[]{ "Code", "Msg", "UserId", "Change", "Integral" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange", "IsCritical" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftPackMsg), global::Pb.Common.GiftPackMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg), global::Pb.Common.UserQueryMsg.Parser, new[]{ "User", "Rank", "TitleIds" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg.Types.RankItem), global::Pb.Common.UserQueryMsg.Types.RankItem.Parser, new[]{ "RankType", "Score", "Rank" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.DanmakuMsg), global::Pb.Common.DanmakuMsg.Parser, new[]{ "User", "Content" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftMsg), global::Pb.Common.GiftMsg.Parser, new[]{ "User", "GiftId", "Num", "GiftName", "Price", "IsPaid" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftMsg), global::Pb.Common.GiftMsg.Parser, new[]{ "User", "GiftId", "Num", "GiftName", "Price", "IsPaid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.RewardPoolMsg), global::Pb.Common.RewardPoolMsg.Parser, new[]{ "WelfarePool", "BattleId", "InitReward", "GiftReward", "BattleReward", "OtherReward", "AllRewards" }, null, null, null, null) })); } #endregion @@ -418,18 +430,18 @@ namespace Pb.Common { } /// - /// UserIntegralChanged 用户积分变更 push -> user.integral.change + /// GameStatusReq 游戏状态控制 game.status /// - public sealed partial class UserIntegralChanged : pb::IMessage + public sealed partial class GameStatusReq : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserIntegralChanged()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameStatusReq()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -445,7 +457,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserIntegralChanged() { + public GameStatusReq() { OnConstruction(); } @@ -453,79 +465,65 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserIntegralChanged(UserIntegralChanged other) : this() { - user_ = other.user_ != null ? other.user_.Clone() : null; - change_ = other.change_; - integral_ = other.integral_; + public GameStatusReq(GameStatusReq other) : this() { + status_ = other.status_; + timestamp_ = other.timestamp_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserIntegralChanged Clone() { - return new UserIntegralChanged(this); - } - - /// Field number for the "user" field. - public const int UserFieldNumber = 1; - private global::Pb.Common.PbUser user_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Common.PbUser User { - get { return user_; } - set { - user_ = value; - } + public GameStatusReq Clone() { + return new GameStatusReq(this); } - /// Field number for the "change" field. - public const int ChangeFieldNumber = 2; - private long change_; + /// Field number for the "status" field. + public const int StatusFieldNumber = 1; + private int status_; /// - /// 变更量 + /// 1开始新战局 2结束战局 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Change { - get { return change_; } + public int Status { + get { return status_; } set { - change_ = value; + status_ = value; } } - /// Field number for the "integral" field. - public const int IntegralFieldNumber = 3; - private long integral_; + /// Field number for the "timestamp" field. + public const int TimestampFieldNumber = 2; + private long timestamp_; /// - /// 现有量 + /// 时间戳 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Integral { - get { return integral_; } + public long Timestamp { + get { return timestamp_; } set { - integral_ = value; + timestamp_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserIntegralChanged); + return Equals(other as GameStatusReq); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(UserIntegralChanged other) { + public bool Equals(GameStatusReq other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(User, other.User)) return false; - if (Change != other.Change) return false; - if (Integral != other.Integral) return false; + if (Status != other.Status) return false; + if (Timestamp != other.Timestamp) return false; return Equals(_unknownFields, other._unknownFields); } @@ -533,9 +531,8 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (user_ != null) hash ^= User.GetHashCode(); - if (Change != 0L) hash ^= Change.GetHashCode(); - if (Integral != 0L) hash ^= Integral.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); + if (Timestamp != 0L) hash ^= Timestamp.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -554,17 +551,13 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); + if (Status != 0) { + output.WriteRawTag(8); + output.WriteInt32(Status); } - if (Change != 0L) { + if (Timestamp != 0L) { output.WriteRawTag(16); - output.WriteInt64(Change); - } - if (Integral != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Integral); + output.WriteInt64(Timestamp); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -576,17 +569,13 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); + if (Status != 0) { + output.WriteRawTag(8); + output.WriteInt32(Status); } - if (Change != 0L) { + if (Timestamp != 0L) { output.WriteRawTag(16); - output.WriteInt64(Change); - } - if (Integral != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Integral); + output.WriteInt64(Timestamp); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -598,14 +587,11 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (user_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); - } - if (Change != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); } - if (Integral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); + if (Timestamp != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -615,21 +601,15 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(UserIntegralChanged other) { + public void MergeFrom(GameStatusReq other) { if (other == null) { return; } - if (other.user_ != null) { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - User.MergeFrom(other.User); - } - if (other.Change != 0L) { - Change = other.Change; + if (other.Status != 0) { + Status = other.Status; } - if (other.Integral != 0L) { - Integral = other.Integral; + if (other.Timestamp != 0L) { + Timestamp = other.Timestamp; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -646,19 +626,12 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + Status = input.ReadInt32(); break; } case 16: { - Change = input.ReadInt64(); - break; - } - case 24: { - Integral = input.ReadInt64(); + Timestamp = input.ReadInt64(); break; } } @@ -676,19 +649,12 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + Status = input.ReadInt32(); break; } case 16: { - Change = input.ReadInt64(); - break; - } - case 24: { - Integral = input.ReadInt64(); + Timestamp = input.ReadInt64(); break; } } @@ -699,18 +665,18 @@ namespace Pb.Common { } /// - /// ChangeUserIntegral 更新用户积分 request -> user.integral.change + /// GameStatusResp 游戏状态控制返回值 /// - public sealed partial class ChangeUserIntegralReq : pb::IMessage + public sealed partial class GameStatusResp : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserIntegralReq()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GameStatusResp()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -726,7 +692,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralReq() { + public GameStatusResp() { OnConstruction(); } @@ -734,65 +700,79 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralReq(ChangeUserIntegralReq other) : this() { - userId_ = other.userId_; - change_ = other.change_; + public GameStatusResp(GameStatusResp other) : this() { + success_ = other.success_; + battleId_ = other.battleId_; + timestamp_ = other.timestamp_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralReq Clone() { - return new ChangeUserIntegralReq(this); + public GameStatusResp Clone() { + return new GameStatusResp(this); } - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 1; - private long userId_; + /// Field number for the "success" field. + public const int SuccessFieldNumber = 1; + private bool success_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } + set { + success_ = value; + } + } + + /// Field number for the "battleId" field. + public const int BattleIdFieldNumber = 2; + private long battleId_; /// - /// 用户ID + /// 战局ID | 上一场战局ID(结束时) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long UserId { - get { return userId_; } + public long BattleId { + get { return battleId_; } set { - userId_ = value; + battleId_ = value; } } - /// Field number for the "change" field. - public const int ChangeFieldNumber = 2; - private long change_; + /// Field number for the "timestamp" field. + public const int TimestampFieldNumber = 3; + private long timestamp_; /// - /// 更新积分量,负数为消耗,正数为增加 + /// 时间戳 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Change { - get { return change_; } + public long Timestamp { + get { return timestamp_; } set { - change_ = value; + timestamp_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeUserIntegralReq); + return Equals(other as GameStatusResp); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ChangeUserIntegralReq other) { + public bool Equals(GameStatusResp other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (UserId != other.UserId) return false; - if (Change != other.Change) return false; + if (Success != other.Success) return false; + if (BattleId != other.BattleId) return false; + if (Timestamp != other.Timestamp) return false; return Equals(_unknownFields, other._unknownFields); } @@ -800,8 +780,9 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (UserId != 0L) hash ^= UserId.GetHashCode(); - if (Change != 0L) hash ^= Change.GetHashCode(); + if (Success != false) hash ^= Success.GetHashCode(); + if (BattleId != 0L) hash ^= BattleId.GetHashCode(); + if (Timestamp != 0L) hash ^= Timestamp.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -820,13 +801,17 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (UserId != 0L) { + if (Success != false) { output.WriteRawTag(8); - output.WriteInt64(UserId); + output.WriteBool(Success); } - if (Change != 0L) { + if (BattleId != 0L) { output.WriteRawTag(16); - output.WriteInt64(Change); + output.WriteInt64(BattleId); + } + if (Timestamp != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Timestamp); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -838,13 +823,17 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (UserId != 0L) { + if (Success != false) { output.WriteRawTag(8); - output.WriteInt64(UserId); + output.WriteBool(Success); } - if (Change != 0L) { + if (BattleId != 0L) { output.WriteRawTag(16); - output.WriteInt64(Change); + output.WriteInt64(BattleId); + } + if (Timestamp != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Timestamp); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -856,11 +845,14 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (UserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + if (Success != false) { + size += 1 + 1; } - if (Change != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); + if (BattleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleId); + } + if (Timestamp != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Timestamp); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -870,15 +862,18 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(ChangeUserIntegralReq other) { + public void MergeFrom(GameStatusResp other) { if (other == null) { return; } - if (other.UserId != 0L) { - UserId = other.UserId; + if (other.Success != false) { + Success = other.Success; } - if (other.Change != 0L) { - Change = other.Change; + if (other.BattleId != 0L) { + BattleId = other.BattleId; + } + if (other.Timestamp != 0L) { + Timestamp = other.Timestamp; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -896,11 +891,15 @@ namespace Pb.Common { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - UserId = input.ReadInt64(); + Success = input.ReadBool(); break; } case 16: { - Change = input.ReadInt64(); + BattleId = input.ReadInt64(); + break; + } + case 24: { + Timestamp = input.ReadInt64(); break; } } @@ -919,11 +918,15 @@ namespace Pb.Common { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - UserId = input.ReadInt64(); + Success = input.ReadBool(); break; } case 16: { - Change = input.ReadInt64(); + BattleId = input.ReadInt64(); + break; + } + case 24: { + Timestamp = input.ReadInt64(); break; } } @@ -934,18 +937,18 @@ namespace Pb.Common { } /// - /// ChangeUserIntegralResp 用户积分更新返回 + /// UserIntegralChanged 用户积分变更 push -> user.integral.change /// - public sealed partial class ChangeUserIntegralResp : pb::IMessage + public sealed partial class UserIntegralChanged : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserIntegralResp()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserIntegralChanged()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -961,7 +964,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralResp() { + public UserIntegralChanged() { OnConstruction(); } @@ -969,10 +972,8 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralResp(ChangeUserIntegralResp other) : this() { - success_ = other.success_; - msg_ = other.msg_; - userId_ = other.userId_; + public UserIntegralChanged(UserIntegralChanged other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; change_ = other.change_; integral_ = other.integral_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -980,105 +981,978 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralResp Clone() { - return new ChangeUserIntegralResp(this); + public UserIntegralChanged Clone() { + return new UserIntegralChanged(this); } - /// Field number for the "success" field. - public const int SuccessFieldNumber = 1; - private bool success_; - /// - /// 是否更新成功 - /// + /// Field number for the "user" field. + public const int UserFieldNumber = 1; + private global::Pb.Common.PbUser user_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Success { - get { return success_; } + public global::Pb.Common.PbUser User { + get { return user_; } set { - success_ = value; + user_ = value; } } - /// Field number for the "msg" field. - public const int MsgFieldNumber = 2; - private string msg_ = ""; + /// Field number for the "change" field. + public const int ChangeFieldNumber = 2; + private long change_; /// - /// 消息 + /// 变更量 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Msg { - get { return msg_; } + public long Change { + get { return change_; } set { - msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + change_ = value; } } - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 3; - private long userId_; + /// Field number for the "integral" field. + public const int IntegralFieldNumber = 3; + private long integral_; /// - /// 用户ID + /// 现有量 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long UserId { - get { return userId_; } + public long Integral { + get { return integral_; } set { - userId_ = value; + integral_ = value; } } - /// Field number for the "change" field. - public const int ChangeFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserIntegralChanged); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserIntegralChanged other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (Change != other.Change) return false; + if (Integral != other.Integral) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (user_ != null) hash ^= User.GetHashCode(); + if (Change != 0L) hash ^= Change.GetHashCode(); + if (Integral != 0L) hash ^= Integral.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (Change != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Change); + } + if (Integral != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Integral); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (Change != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Change); + } + if (Integral != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Integral); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + if (Change != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); + } + if (Integral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserIntegralChanged other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.Change != 0L) { + Change = other.Change; + } + if (other.Integral != 0L) { + Integral = other.Integral; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 16: { + Change = input.ReadInt64(); + break; + } + case 24: { + Integral = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 16: { + Change = input.ReadInt64(); + break; + } + case 24: { + Integral = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// ChangeUserIntegral 更新用户积分 request -> user.integral.change + /// + public sealed partial class ChangeUserIntegralReq : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserIntegralReq()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUserIntegralReq() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUserIntegralReq(ChangeUserIntegralReq other) : this() { + userId_ = other.userId_; + change_ = other.change_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUserIntegralReq Clone() { + return new ChangeUserIntegralReq(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private long userId_; + /// + /// 用户ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "change" field. + public const int ChangeFieldNumber = 2; private long change_; /// - /// 本次更新积分量 + /// 更新积分量,负数为消耗,正数为增加 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Change { + get { return change_; } + set { + change_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeUserIntegralReq); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeUserIntegralReq other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (Change != other.Change) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (Change != 0L) hash ^= Change.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (Change != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Change); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (Change != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Change); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (Change != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeUserIntegralReq other) { + if (other == null) { + return; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + if (other.Change != 0L) { + Change = other.Change; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 16: { + Change = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 16: { + Change = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// ChangeUserIntegralResp 用户积分更新返回 + /// + public sealed partial class ChangeUserIntegralResp : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserIntegralResp()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUserIntegralResp() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUserIntegralResp(ChangeUserIntegralResp other) : this() { + code_ = other.code_; + msg_ = other.msg_; + userId_ = other.userId_; + change_ = other.change_; + integral_ = other.integral_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeUserIntegralResp Clone() { + return new ChangeUserIntegralResp(this); + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private int code_; + /// + /// code, 200表示成功,其余根据对照表 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "msg" field. + public const int MsgFieldNumber = 2; + private string msg_ = ""; + /// + /// 消息 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Msg { + get { return msg_; } + set { + msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 3; + private long userId_; + /// + /// 用户ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "change" field. + public const int ChangeFieldNumber = 4; + private long change_; + /// + /// 本次更新积分量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Change { + get { return change_; } + set { + change_ = value; + } + } + + /// Field number for the "integral" field. + public const int IntegralFieldNumber = 5; + private long integral_; + /// + /// 当前剩余积分 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Integral { + get { return integral_; } + set { + integral_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeUserIntegralResp); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeUserIntegralResp other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Code != other.Code) return false; + if (Msg != other.Msg) return false; + if (UserId != other.UserId) return false; + if (Change != other.Change) return false; + if (Integral != other.Integral) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Code != 0) hash ^= Code.GetHashCode(); + if (Msg.Length != 0) hash ^= Msg.GetHashCode(); + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (Change != 0L) hash ^= Change.GetHashCode(); + if (Integral != 0L) hash ^= Integral.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } + if (Msg.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Msg); + } + if (UserId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(UserId); + } + if (Change != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Change); + } + if (Integral != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Integral); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } + if (Msg.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Msg); + } + if (UserId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(UserId); + } + if (Change != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Change); + } + if (Integral != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Integral); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); + } + if (Msg.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg); + } + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (Change != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); + } + if (Integral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeUserIntegralResp other) { + if (other == null) { + return; + } + if (other.Code != 0) { + Code = other.Code; + } + if (other.Msg.Length != 0) { + Msg = other.Msg; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + if (other.Change != 0L) { + Change = other.Change; + } + if (other.Integral != 0L) { + Integral = other.Integral; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Code = input.ReadInt32(); + break; + } + case 18: { + Msg = input.ReadString(); + break; + } + case 24: { + UserId = input.ReadInt64(); + break; + } + case 32: { + Change = input.ReadInt64(); + break; + } + case 40: { + Integral = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Code = input.ReadInt32(); + break; + } + case 18: { + Msg = input.ReadString(); + break; + } + case 24: { + UserId = input.ReadInt64(); + break; + } + case 32: { + Change = input.ReadInt64(); + break; + } + case 40: { + Integral = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// CheckInMsg 每日打卡 push -> user.checkIn + /// + public sealed partial class CheckInMsg : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CheckInMsg()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CheckInMsg() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CheckInMsg(CheckInMsg other) : this() { + code_ = other.code_; + msg_ = other.msg_; + user_ = other.user_ != null ? other.user_.Clone() : null; + integralChange_ = other.integralChange_; + isCritical_ = other.isCritical_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CheckInMsg Clone() { + return new CheckInMsg(this); + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private int code_; + /// + /// code, 200表示成功,其余根据对照表 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Change { - get { return change_; } + public int Code { + get { return code_; } set { - change_ = value; + code_ = value; } } - /// Field number for the "integral" field. - public const int IntegralFieldNumber = 5; - private long integral_; + /// Field number for the "msg" field. + public const int MsgFieldNumber = 2; + private string msg_ = ""; /// - /// 当前剩余积分 + /// 消息 [打卡成功,快乐玩耍吧! | 今天已打过卡了!] /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Integral { - get { return integral_; } + public string Msg { + get { return msg_; } set { - integral_ = value; + msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 3; + private global::Pb.Common.PbUser user_; + /// + /// 最新积分放置在user中 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.PbUser User { + get { return user_; } + set { + user_ = value; + } + } + + /// Field number for the "integralChange" field. + public const int IntegralChangeFieldNumber = 4; + private long integralChange_; + /// + /// 积分变动 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long IntegralChange { + get { return integralChange_; } + set { + integralChange_ = value; + } + } + + /// Field number for the "isCritical" field. + public const int IsCriticalFieldNumber = 5; + private bool isCritical_; + /// + /// 是否欧皇附体 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsCritical { + get { return isCritical_; } + set { + isCritical_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeUserIntegralResp); + return Equals(other as CheckInMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ChangeUserIntegralResp other) { + public bool Equals(CheckInMsg other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Success != other.Success) return false; + if (Code != other.Code) return false; if (Msg != other.Msg) return false; - if (UserId != other.UserId) return false; - if (Change != other.Change) return false; - if (Integral != other.Integral) return false; + if (!object.Equals(User, other.User)) return false; + if (IntegralChange != other.IntegralChange) return false; + if (IsCritical != other.IsCritical) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1086,11 +1960,11 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Success != false) hash ^= Success.GetHashCode(); + if (Code != 0) hash ^= Code.GetHashCode(); if (Msg.Length != 0) hash ^= Msg.GetHashCode(); - if (UserId != 0L) hash ^= UserId.GetHashCode(); - if (Change != 0L) hash ^= Change.GetHashCode(); - if (Integral != 0L) hash ^= Integral.GetHashCode(); + if (user_ != null) hash ^= User.GetHashCode(); + if (IntegralChange != 0L) hash ^= IntegralChange.GetHashCode(); + if (IsCritical != false) hash ^= IsCritical.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1109,25 +1983,25 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Success != false) { + if (Code != 0) { output.WriteRawTag(8); - output.WriteBool(Success); + output.WriteInt32(Code); } if (Msg.Length != 0) { output.WriteRawTag(18); output.WriteString(Msg); } - if (UserId != 0L) { - output.WriteRawTag(24); - output.WriteInt64(UserId); + if (user_ != null) { + output.WriteRawTag(26); + output.WriteMessage(User); } - if (Change != 0L) { + if (IntegralChange != 0L) { output.WriteRawTag(32); - output.WriteInt64(Change); + output.WriteInt64(IntegralChange); } - if (Integral != 0L) { + if (IsCritical != false) { output.WriteRawTag(40); - output.WriteInt64(Integral); + output.WriteBool(IsCritical); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1139,25 +2013,25 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Success != false) { + if (Code != 0) { output.WriteRawTag(8); - output.WriteBool(Success); + output.WriteInt32(Code); } if (Msg.Length != 0) { output.WriteRawTag(18); output.WriteString(Msg); } - if (UserId != 0L) { - output.WriteRawTag(24); - output.WriteInt64(UserId); + if (user_ != null) { + output.WriteRawTag(26); + output.WriteMessage(User); } - if (Change != 0L) { + if (IntegralChange != 0L) { output.WriteRawTag(32); - output.WriteInt64(Change); + output.WriteInt64(IntegralChange); } - if (Integral != 0L) { + if (IsCritical != false) { output.WriteRawTag(40); - output.WriteInt64(Integral); + output.WriteBool(IsCritical); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -1169,20 +2043,20 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Success != false) { - size += 1 + 1; + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); } if (Msg.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg); } - if (UserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - if (Change != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); + if (IntegralChange != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntegralChange); } - if (Integral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); + if (IsCritical != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1192,24 +2066,27 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(ChangeUserIntegralResp other) { + public void MergeFrom(CheckInMsg other) { if (other == null) { return; } - if (other.Success != false) { - Success = other.Success; + if (other.Code != 0) { + Code = other.Code; } if (other.Msg.Length != 0) { Msg = other.Msg; } - if (other.UserId != 0L) { - UserId = other.UserId; + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); } - if (other.Change != 0L) { - Change = other.Change; + if (other.IntegralChange != 0L) { + IntegralChange = other.IntegralChange; } - if (other.Integral != 0L) { - Integral = other.Integral; + if (other.IsCritical != false) { + IsCritical = other.IsCritical; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1227,23 +2104,26 @@ namespace Pb.Common { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Success = input.ReadBool(); + Code = input.ReadInt32(); break; } case 18: { Msg = input.ReadString(); break; } - case 24: { - UserId = input.ReadInt64(); + case 26: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); break; } case 32: { - Change = input.ReadInt64(); + IntegralChange = input.ReadInt64(); break; } case 40: { - Integral = input.ReadInt64(); + IsCritical = input.ReadBool(); break; } } @@ -1262,23 +2142,26 @@ namespace Pb.Common { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - Success = input.ReadBool(); + Code = input.ReadInt32(); break; } case 18: { Msg = input.ReadString(); break; } - case 24: { - UserId = input.ReadInt64(); + case 26: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); break; } case 32: { - Change = input.ReadInt64(); + IntegralChange = input.ReadInt64(); break; } case 40: { - Integral = input.ReadInt64(); + IsCritical = input.ReadBool(); break; } } @@ -1289,23 +2172,23 @@ namespace Pb.Common { } /// - /// CheckInMsg 每日打卡 push -> user.checkIn + /// GiftPackMsg 领取礼包消息 push -> user.giftPack 命令(新手礼包|福利|低保|其它礼包) /// - public sealed partial class CheckInMsg : pb::IMessage + public sealed partial class GiftPackMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CheckInMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GiftPackMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[4]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1316,7 +2199,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CheckInMsg() { + public GiftPackMsg() { OnConstruction(); } @@ -1324,63 +2207,59 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CheckInMsg(CheckInMsg other) : this() { - user_ = other.user_ != null ? other.user_.Clone() : null; - success_ = other.success_; + public GiftPackMsg(GiftPackMsg other) : this() { + code_ = other.code_; msg_ = other.msg_; + user_ = other.user_ != null ? other.user_.Clone() : null; integralChange_ = other.integralChange_; - isCritical_ = other.isCritical_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CheckInMsg Clone() { - return new CheckInMsg(this); + public GiftPackMsg Clone() { + return new GiftPackMsg(this); } - /// Field number for the "user" field. - public const int UserFieldNumber = 1; - private global::Pb.Common.PbUser user_; + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private int code_; /// - /// 最新积分放置在user中 + /// code, 200表示成功,其余根据对照表 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Common.PbUser User { - get { return user_; } + public int Code { + get { return code_; } set { - user_ = value; + code_ = value; } } - /// Field number for the "success" field. - public const int SuccessFieldNumber = 2; - private bool success_; + /// Field number for the "msg" field. + public const int MsgFieldNumber = 2; + private string msg_ = ""; /// - /// 打卡成功与否 + /// 领取消息: [成功无msg | 已经领过礼包了xxx ] /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Success { - get { return success_; } + public string Msg { + get { return msg_; } set { - success_ = value; + msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "msg" field. - public const int MsgFieldNumber = 3; - private string msg_ = ""; - /// - /// 打卡消息: [打卡成功,快乐玩耍吧! | 今天已打过卡了!] - /// + /// Field number for the "user" field. + public const int UserFieldNumber = 3; + private global::Pb.Common.PbUser user_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Msg { - get { return msg_; } + public global::Pb.Common.PbUser User { + get { return user_; } set { - msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + user_ = value; } } @@ -1399,41 +2278,25 @@ namespace Pb.Common { } } - /// Field number for the "isCritical" field. - public const int IsCriticalFieldNumber = 5; - private bool isCritical_; - /// - /// 是否发生了打卡积分奖励暴击 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool IsCritical { - get { return isCritical_; } - set { - isCritical_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as CheckInMsg); + return Equals(other as GiftPackMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(CheckInMsg other) { + public bool Equals(GiftPackMsg other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(User, other.User)) return false; - if (Success != other.Success) return false; + if (Code != other.Code) return false; if (Msg != other.Msg) return false; + if (!object.Equals(User, other.User)) return false; if (IntegralChange != other.IntegralChange) return false; - if (IsCritical != other.IsCritical) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1441,11 +2304,10 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (user_ != null) hash ^= User.GetHashCode(); - if (Success != false) hash ^= Success.GetHashCode(); + if (Code != 0) hash ^= Code.GetHashCode(); if (Msg.Length != 0) hash ^= Msg.GetHashCode(); + if (user_ != null) hash ^= User.GetHashCode(); if (IntegralChange != 0L) hash ^= IntegralChange.GetHashCode(); - if (IsCritical != false) hash ^= IsCritical.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1464,25 +2326,21 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); - } - if (Success != false) { - output.WriteRawTag(16); - output.WriteBool(Success); + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); } if (Msg.Length != 0) { - output.WriteRawTag(26); + output.WriteRawTag(18); output.WriteString(Msg); } - if (IntegralChange != 0L) { - output.WriteRawTag(32); - output.WriteInt64(IntegralChange); + if (user_ != null) { + output.WriteRawTag(26); + output.WriteMessage(User); } - if (IsCritical != false) { - output.WriteRawTag(40); - output.WriteBool(IsCritical); + if (IntegralChange != 0L) { + output.WriteRawTag(32); + output.WriteInt64(IntegralChange); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1494,26 +2352,22 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); - } - if (Success != false) { - output.WriteRawTag(16); - output.WriteBool(Success); + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); } if (Msg.Length != 0) { - output.WriteRawTag(26); + output.WriteRawTag(18); output.WriteString(Msg); } + if (user_ != null) { + output.WriteRawTag(26); + output.WriteMessage(User); + } if (IntegralChange != 0L) { output.WriteRawTag(32); output.WriteInt64(IntegralChange); } - if (IsCritical != false) { - output.WriteRawTag(40); - output.WriteBool(IsCritical); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1524,21 +2378,18 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (user_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); - } - if (Success != false) { - size += 1 + 1; + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); } if (Msg.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg); } + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } if (IntegralChange != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntegralChange); } - if (IsCritical != false) { - size += 1 + 1; - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1547,28 +2398,25 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(CheckInMsg other) { + public void MergeFrom(GiftPackMsg other) { if (other == null) { return; } + if (other.Code != 0) { + Code = other.Code; + } + if (other.Msg.Length != 0) { + Msg = other.Msg; + } if (other.user_ != null) { if (user_ == null) { User = new global::Pb.Common.PbUser(); } User.MergeFrom(other.User); } - if (other.Success != false) { - Success = other.Success; - } - if (other.Msg.Length != 0) { - Msg = other.Msg; - } if (other.IntegralChange != 0L) { IntegralChange = other.IntegralChange; } - if (other.IsCritical != false) { - IsCritical = other.IsCritical; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1584,29 +2432,25 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + Code = input.ReadInt32(); break; } - case 16: { - Success = input.ReadBool(); + case 18: { + Msg = input.ReadString(); break; } case 26: { - Msg = input.ReadString(); + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); break; } case 32: { IntegralChange = input.ReadInt64(); break; } - case 40: { - IsCritical = input.ReadBool(); - break; - } } } #endif @@ -1622,29 +2466,25 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + Code = input.ReadInt32(); break; } - case 16: { - Success = input.ReadBool(); + case 18: { + Msg = input.ReadString(); break; } case 26: { - Msg = input.ReadString(); + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); break; } case 32: { IntegralChange = input.ReadInt64(); break; } - case 40: { - IsCritical = input.ReadBool(); - break; - } } } } @@ -1653,23 +2493,23 @@ namespace Pb.Common { } /// - /// StarterPackMsg 新手礼包 push -> user.starterPack 命令(新手礼包) + /// QueryIntegralMsg 用户查询信息通知 push -> user.query /// - public sealed partial class StarterPackMsg : pb::IMessage + public sealed partial class UserQueryMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StarterPackMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserQueryMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[5]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1680,7 +2520,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StarterPackMsg() { + public UserQueryMsg() { OnConstruction(); } @@ -1688,23 +2528,25 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StarterPackMsg(StarterPackMsg other) : this() { + public UserQueryMsg(UserQueryMsg other) : this() { user_ = other.user_ != null ? other.user_.Clone() : null; - success_ = other.success_; - msg_ = other.msg_; - integralChange_ = other.integralChange_; + rank_ = other.rank_.Clone(); + titleIds_ = other.titleIds_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StarterPackMsg Clone() { - return new StarterPackMsg(this); + public UserQueryMsg Clone() { + return new UserQueryMsg(this); } /// Field number for the "user" field. public const int UserFieldNumber = 1; private global::Pb.Common.PbUser user_; + /// + /// 用户信息 + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Pb.Common.PbUser User { @@ -1714,60 +2556,43 @@ namespace Pb.Common { } } - /// Field number for the "success" field. - public const int SuccessFieldNumber = 2; - private bool success_; - /// - /// 领取成功与否 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Success { - get { return success_; } - set { - success_ = value; - } - } - - /// Field number for the "msg" field. - public const int MsgFieldNumber = 3; - private string msg_ = ""; + /// Field number for the "rank" field. + public const int RankFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_rank_codec + = pb::FieldCodec.ForMessage(18, global::Pb.Common.UserQueryMsg.Types.RankItem.Parser); + private readonly pbc::RepeatedField rank_ = new pbc::RepeatedField(); /// - /// 领取消息: [成功无msg | 已经领过礼包了] + /// 排行数据(多个榜) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Msg { - get { return msg_; } - set { - msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + public pbc::RepeatedField Rank { + get { return rank_; } } - /// Field number for the "integralChange" field. - public const int IntegralChangeFieldNumber = 4; - private long integralChange_; + /// Field number for the "titleIds" field. + public const int TitleIdsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_titleIds_codec + = pb::FieldCodec.ForInt64(26); + private readonly pbc::RepeatedField titleIds_ = new pbc::RepeatedField(); /// - /// 积分变动 + /// 称号ID列表,具体称号配置 给接口取 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long IntegralChange { - get { return integralChange_; } - set { - integralChange_ = value; - } + public pbc::RepeatedField TitleIds { + get { return titleIds_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as StarterPackMsg); + return Equals(other as UserQueryMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(StarterPackMsg other) { + public bool Equals(UserQueryMsg other) { if (ReferenceEquals(other, null)) { return false; } @@ -1775,9 +2600,8 @@ namespace Pb.Common { return true; } if (!object.Equals(User, other.User)) return false; - if (Success != other.Success) return false; - if (Msg != other.Msg) return false; - if (IntegralChange != other.IntegralChange) return false; + if(!rank_.Equals(other.rank_)) return false; + if(!titleIds_.Equals(other.titleIds_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1786,9 +2610,8 @@ namespace Pb.Common { public override int GetHashCode() { int hash = 1; if (user_ != null) hash ^= User.GetHashCode(); - if (Success != false) hash ^= Success.GetHashCode(); - if (Msg.Length != 0) hash ^= Msg.GetHashCode(); - if (IntegralChange != 0L) hash ^= IntegralChange.GetHashCode(); + hash ^= rank_.GetHashCode(); + hash ^= titleIds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1811,18 +2634,8 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (Success != false) { - output.WriteRawTag(16); - output.WriteBool(Success); - } - if (Msg.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Msg); - } - if (IntegralChange != 0L) { - output.WriteRawTag(32); - output.WriteInt64(IntegralChange); - } + rank_.WriteTo(output, _repeated_rank_codec); + titleIds_.WriteTo(output, _repeated_titleIds_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1837,18 +2650,8 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (Success != false) { - output.WriteRawTag(16); - output.WriteBool(Success); - } - if (Msg.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Msg); - } - if (IntegralChange != 0L) { - output.WriteRawTag(32); - output.WriteInt64(IntegralChange); - } + rank_.WriteTo(ref output, _repeated_rank_codec); + titleIds_.WriteTo(ref output, _repeated_titleIds_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1862,15 +2665,8 @@ namespace Pb.Common { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - if (Success != false) { - size += 1 + 1; - } - if (Msg.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg); - } - if (IntegralChange != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntegralChange); - } + size += rank_.CalculateSize(_repeated_rank_codec); + size += titleIds_.CalculateSize(_repeated_titleIds_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1879,7 +2675,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(StarterPackMsg other) { + public void MergeFrom(UserQueryMsg other) { if (other == null) { return; } @@ -1889,15 +2685,8 @@ namespace Pb.Common { } User.MergeFrom(other.User); } - if (other.Success != false) { - Success = other.Success; - } - if (other.Msg.Length != 0) { - Msg = other.Msg; - } - if (other.IntegralChange != 0L) { - IntegralChange = other.IntegralChange; - } + rank_.Add(other.rank_); + titleIds_.Add(other.titleIds_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1920,77 +2709,354 @@ namespace Pb.Common { input.ReadMessage(User); break; } - case 16: { - Success = input.ReadBool(); - break; + case 18: { + rank_.AddEntriesFrom(input, _repeated_rank_codec); + break; + } + case 26: + case 24: { + titleIds_.AddEntriesFrom(input, _repeated_titleIds_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 18: { + rank_.AddEntriesFrom(ref input, _repeated_rank_codec); + break; + } + case 26: + case 24: { + titleIds_.AddEntriesFrom(ref input, _repeated_titleIds_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the UserQueryMsg message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// RankItem 排行数据结构 + /// + public sealed partial class RankItem : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RankItem()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Common.UserQueryMsg.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RankItem() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RankItem(RankItem other) : this() { + rankType_ = other.rankType_; + score_ = other.score_; + rank_ = other.rank_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RankItem Clone() { + return new RankItem(this); + } + + /// Field number for the "rankType" field. + public const int RankTypeFieldNumber = 1; + private int rankType_; + /// + /// 排行榜类型 (与pbGameZhg.RankType一致) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RankType { + get { return rankType_; } + set { + rankType_ = value; + } + } + + /// Field number for the "score" field. + public const int ScoreFieldNumber = 2; + private long score_; + /// + /// 具体分数 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Score { + get { return score_; } + set { + score_ = value; + } + } + + /// Field number for the "rank" field. + public const int RankFieldNumber = 3; + private int rank_; + /// + /// 具体排名,不上榜为0 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Rank { + get { return rank_; } + set { + rank_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RankItem); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RankItem other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RankType != other.RankType) return false; + if (Score != other.Score) return false; + if (Rank != other.Rank) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RankType != 0) hash ^= RankType.GetHashCode(); + if (Score != 0L) hash ^= Score.GetHashCode(); + if (Rank != 0) hash ^= Rank.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RankType != 0) { + output.WriteRawTag(8); + output.WriteInt32(RankType); + } + if (Score != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Score); + } + if (Rank != 0) { + output.WriteRawTag(24); + output.WriteInt32(Rank); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RankType != 0) { + output.WriteRawTag(8); + output.WriteInt32(RankType); + } + if (Score != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Score); } - case 26: { - Msg = input.ReadString(); - break; + if (Rank != 0) { + output.WriteRawTag(24); + output.WriteInt32(Rank); } - case 32: { - IntegralChange = input.ReadInt64(); - break; + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } } - } - #endif - } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RankType != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RankType); + } + if (Score != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Score); + } + if (Rank != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Rank); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); - break; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RankItem other) { + if (other == null) { + return; } - case 16: { - Success = input.ReadBool(); - break; + if (other.RankType != 0) { + RankType = other.RankType; } - case 26: { - Msg = input.ReadString(); - break; + if (other.Score != 0L) { + Score = other.Score; } - case 32: { - IntegralChange = input.ReadInt64(); - break; + if (other.Rank != 0) { + Rank = other.Rank; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RankType = input.ReadInt32(); + break; + } + case 16: { + Score = input.ReadInt64(); + break; + } + case 24: { + Rank = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RankType = input.ReadInt32(); + break; + } + case 16: { + Score = input.ReadInt64(); + break; + } + case 24: { + Rank = input.ReadInt32(); + break; + } + } } } + #endif + } + } - #endif + #endregion } /// - /// QueryIntegralMsg 用户查询信息通知 push -> user.query + /// DanmakuMsg 普通弹幕消息 push -> live.danmaku /// - public sealed partial class UserQueryMsg : pb::IMessage + public sealed partial class DanmakuMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserQueryMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DanmakuMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[6]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2001,7 +3067,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserQueryMsg() { + public DanmakuMsg() { OnConstruction(); } @@ -2009,15 +3075,16 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserQueryMsg(UserQueryMsg other) : this() { + public DanmakuMsg(DanmakuMsg other) : this() { user_ = other.user_ != null ? other.user_.Clone() : null; + content_ = other.content_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserQueryMsg Clone() { - return new UserQueryMsg(this); + public DanmakuMsg Clone() { + return new DanmakuMsg(this); } /// Field number for the "user" field. @@ -2032,15 +3099,27 @@ namespace Pb.Common { } } + /// Field number for the "content" field. + public const int ContentFieldNumber = 2; + private string content_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Content { + get { return content_; } + set { + content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserQueryMsg); + return Equals(other as DanmakuMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(UserQueryMsg other) { + public bool Equals(DanmakuMsg other) { if (ReferenceEquals(other, null)) { return false; } @@ -2048,6 +3127,7 @@ namespace Pb.Common { return true; } if (!object.Equals(User, other.User)) return false; + if (Content != other.Content) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2056,6 +3136,7 @@ namespace Pb.Common { public override int GetHashCode() { int hash = 1; if (user_ != null) hash ^= User.GetHashCode(); + if (Content.Length != 0) hash ^= Content.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2078,6 +3159,10 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } + if (Content.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Content); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -2092,6 +3177,10 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } + if (Content.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Content); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -2105,6 +3194,9 @@ namespace Pb.Common { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } + if (Content.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Content); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2113,7 +3205,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(UserQueryMsg other) { + public void MergeFrom(DanmakuMsg other) { if (other == null) { return; } @@ -2123,6 +3215,9 @@ namespace Pb.Common { } User.MergeFrom(other.User); } + if (other.Content.Length != 0) { + Content = other.Content; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2145,6 +3240,10 @@ namespace Pb.Common { input.ReadMessage(User); break; } + case 18: { + Content = input.ReadString(); + break; + } } } #endif @@ -2167,6 +3266,10 @@ namespace Pb.Common { input.ReadMessage(User); break; } + case 18: { + Content = input.ReadString(); + break; + } } } } @@ -2175,23 +3278,23 @@ namespace Pb.Common { } /// - /// DanmakuMsg 普通弹幕消息 push -> live.danmaku + /// 赠送礼物 push -> live.gift.common | live.gift.nobility /// - public sealed partial class DanmakuMsg : pb::IMessage + public sealed partial class GiftMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DanmakuMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GiftMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2202,7 +3305,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DanmakuMsg() { + public GiftMsg() { OnConstruction(); } @@ -2210,16 +3313,20 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DanmakuMsg(DanmakuMsg other) : this() { + public GiftMsg(GiftMsg other) : this() { user_ = other.user_ != null ? other.user_.Clone() : null; - content_ = other.content_; + giftId_ = other.giftId_; + num_ = other.num_; + giftName_ = other.giftName_; + price_ = other.price_; + isPaid_ = other.isPaid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DanmakuMsg Clone() { - return new DanmakuMsg(this); + public GiftMsg Clone() { + return new GiftMsg(this); } /// Field number for the "user" field. @@ -2234,27 +3341,81 @@ namespace Pb.Common { } } - /// Field number for the "content" field. - public const int ContentFieldNumber = 2; - private string content_ = ""; + /// Field number for the "giftId" field. + public const int GiftIdFieldNumber = 2; + private long giftId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Content { - get { return content_; } + public long GiftId { + get { return giftId_; } set { - content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + giftId_ = value; + } + } + + /// Field number for the "num" field. + public const int NumFieldNumber = 3; + private long num_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Num { + get { return num_; } + set { + num_ = value; + } + } + + /// Field number for the "giftName" field. + public const int GiftNameFieldNumber = 4; + private string giftName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GiftName { + get { return giftName_; } + set { + giftName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "price" field. + public const int PriceFieldNumber = 5; + private long price_; + /// + /// 单价 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Price { + get { return price_; } + set { + price_ = value; + } + } + + /// Field number for the "isPaid" field. + public const int IsPaidFieldNumber = 6; + private bool isPaid_; + /// + /// 是否收费礼物 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsPaid { + get { return isPaid_; } + set { + isPaid_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DanmakuMsg); + return Equals(other as GiftMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(DanmakuMsg other) { + public bool Equals(GiftMsg other) { if (ReferenceEquals(other, null)) { return false; } @@ -2262,7 +3423,11 @@ namespace Pb.Common { return true; } if (!object.Equals(User, other.User)) return false; - if (Content != other.Content) return false; + if (GiftId != other.GiftId) return false; + if (Num != other.Num) return false; + if (GiftName != other.GiftName) return false; + if (Price != other.Price) return false; + if (IsPaid != other.IsPaid) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2271,7 +3436,11 @@ namespace Pb.Common { public override int GetHashCode() { int hash = 1; if (user_ != null) hash ^= User.GetHashCode(); - if (Content.Length != 0) hash ^= Content.GetHashCode(); + if (GiftId != 0L) hash ^= GiftId.GetHashCode(); + if (Num != 0L) hash ^= Num.GetHashCode(); + if (GiftName.Length != 0) hash ^= GiftName.GetHashCode(); + if (Price != 0L) hash ^= Price.GetHashCode(); + if (IsPaid != false) hash ^= IsPaid.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2294,9 +3463,25 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (Content.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Content); + if (GiftId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(GiftId); + } + if (Num != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Num); + } + if (GiftName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(GiftName); + } + if (Price != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Price); + } + if (IsPaid != false) { + output.WriteRawTag(48); + output.WriteBool(IsPaid); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -2312,9 +3497,25 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (Content.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Content); + if (GiftId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(GiftId); + } + if (Num != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Num); + } + if (GiftName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(GiftName); + } + if (Price != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Price); + } + if (IsPaid != false) { + output.WriteRawTag(48); + output.WriteBool(IsPaid); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -2329,8 +3530,20 @@ namespace Pb.Common { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - if (Content.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Content); + if (GiftId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(GiftId); + } + if (Num != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num); + } + if (GiftName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GiftName); + } + if (Price != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Price); + } + if (IsPaid != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -2340,7 +3553,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(DanmakuMsg other) { + public void MergeFrom(GiftMsg other) { if (other == null) { return; } @@ -2350,8 +3563,20 @@ namespace Pb.Common { } User.MergeFrom(other.User); } - if (other.Content.Length != 0) { - Content = other.Content; + if (other.GiftId != 0L) { + GiftId = other.GiftId; + } + if (other.Num != 0L) { + Num = other.Num; + } + if (other.GiftName.Length != 0) { + GiftName = other.GiftName; + } + if (other.Price != 0L) { + Price = other.Price; + } + if (other.IsPaid != false) { + IsPaid = other.IsPaid; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2375,8 +3600,24 @@ namespace Pb.Common { input.ReadMessage(User); break; } - case 18: { - Content = input.ReadString(); + case 16: { + GiftId = input.ReadInt64(); + break; + } + case 24: { + Num = input.ReadInt64(); + break; + } + case 34: { + GiftName = input.ReadString(); + break; + } + case 40: { + Price = input.ReadInt64(); + break; + } + case 48: { + IsPaid = input.ReadBool(); break; } } @@ -2401,8 +3642,24 @@ namespace Pb.Common { input.ReadMessage(User); break; } - case 18: { - Content = input.ReadString(); + case 16: { + GiftId = input.ReadInt64(); + break; + } + case 24: { + Num = input.ReadInt64(); + break; + } + case 34: { + GiftName = input.ReadString(); + break; + } + case 40: { + Price = input.ReadInt64(); + break; + } + case 48: { + IsPaid = input.ReadBool(); break; } } @@ -2413,23 +3670,23 @@ namespace Pb.Common { } /// - /// 赠送礼物 push -> live.gift + /// 奖池变动消息 push -> game.rewardPool /// - public sealed partial class GiftMsg : pb::IMessage + public sealed partial class RewardPoolMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GiftMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RewardPoolMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[8]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2440,7 +3697,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public GiftMsg() { + public RewardPoolMsg() { OnConstruction(); } @@ -2448,121 +3705,150 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public GiftMsg(GiftMsg other) : this() { - user_ = other.user_ != null ? other.user_.Clone() : null; - giftId_ = other.giftId_; - num_ = other.num_; - giftName_ = other.giftName_; - price_ = other.price_; - isPaid_ = other.isPaid_; + public RewardPoolMsg(RewardPoolMsg other) : this() { + welfarePool_ = other.welfarePool_; + battleId_ = other.battleId_; + initReward_ = other.initReward_; + giftReward_ = other.giftReward_; + battleReward_ = other.battleReward_; + otherReward_ = other.otherReward_; + allRewards_ = other.allRewards_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public GiftMsg Clone() { - return new GiftMsg(this); + public RewardPoolMsg Clone() { + return new RewardPoolMsg(this); } - /// Field number for the "user" field. - public const int UserFieldNumber = 1; - private global::Pb.Common.PbUser user_; + /// Field number for the "welfarePool" field. + public const int WelfarePoolFieldNumber = 1; + private long welfarePool_; + /// + /// 福利池,与战局无关 + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Common.PbUser User { - get { return user_; } + public long WelfarePool { + get { return welfarePool_; } set { - user_ = value; + welfarePool_ = value; } } - /// Field number for the "giftId" field. - public const int GiftIdFieldNumber = 2; - private long giftId_; + /// Field number for the "battleId" field. + public const int BattleIdFieldNumber = 2; + private long battleId_; + /// + /// 战局ID + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long GiftId { - get { return giftId_; } + public long BattleId { + get { return battleId_; } set { - giftId_ = value; + battleId_ = value; } } - /// Field number for the "num" field. - public const int NumFieldNumber = 3; - private long num_; + /// Field number for the "initReward" field. + public const int InitRewardFieldNumber = 3; + private long initReward_; + /// + /// 初始奖池 + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Num { - get { return num_; } + public long InitReward { + get { return initReward_; } set { - num_ = value; + initReward_ = value; } } - /// Field number for the "giftName" field. - public const int GiftNameFieldNumber = 4; - private string giftName_ = ""; + /// Field number for the "giftReward" field. + public const int GiftRewardFieldNumber = 4; + private long giftReward_; + /// + /// 礼物奖池 + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string GiftName { - get { return giftName_; } + public long GiftReward { + get { return giftReward_; } set { - giftName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + giftReward_ = value; } } - /// Field number for the "price" field. - public const int PriceFieldNumber = 5; - private long price_; + /// Field number for the "battleReward" field. + public const int BattleRewardFieldNumber = 5; + private long battleReward_; /// - /// 单价 + /// 战斗奖池 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Price { - get { return price_; } + public long BattleReward { + get { return battleReward_; } set { - price_ = value; + battleReward_ = value; } } - /// Field number for the "isPaid" field. - public const int IsPaidFieldNumber = 6; - private bool isPaid_; + /// Field number for the "otherReward" field. + public const int OtherRewardFieldNumber = 6; + private long otherReward_; /// - /// 是否收费礼物 + /// 其它奖池 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool IsPaid { - get { return isPaid_; } + public long OtherReward { + get { return otherReward_; } set { - isPaid_ = value; + otherReward_ = value; + } + } + + /// Field number for the "allRewards" field. + public const int AllRewardsFieldNumber = 10; + private long allRewards_; + /// + /// 所有奖池 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long AllRewards { + get { return allRewards_; } + set { + allRewards_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GiftMsg); + return Equals(other as RewardPoolMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(GiftMsg other) { + public bool Equals(RewardPoolMsg other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(User, other.User)) return false; - if (GiftId != other.GiftId) return false; - if (Num != other.Num) return false; - if (GiftName != other.GiftName) return false; - if (Price != other.Price) return false; - if (IsPaid != other.IsPaid) return false; + if (WelfarePool != other.WelfarePool) return false; + if (BattleId != other.BattleId) return false; + if (InitReward != other.InitReward) return false; + if (GiftReward != other.GiftReward) return false; + if (BattleReward != other.BattleReward) return false; + if (OtherReward != other.OtherReward) return false; + if (AllRewards != other.AllRewards) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2570,12 +3856,13 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (user_ != null) hash ^= User.GetHashCode(); - if (GiftId != 0L) hash ^= GiftId.GetHashCode(); - if (Num != 0L) hash ^= Num.GetHashCode(); - if (GiftName.Length != 0) hash ^= GiftName.GetHashCode(); - if (Price != 0L) hash ^= Price.GetHashCode(); - if (IsPaid != false) hash ^= IsPaid.GetHashCode(); + if (WelfarePool != 0L) hash ^= WelfarePool.GetHashCode(); + if (BattleId != 0L) hash ^= BattleId.GetHashCode(); + if (InitReward != 0L) hash ^= InitReward.GetHashCode(); + if (GiftReward != 0L) hash ^= GiftReward.GetHashCode(); + if (BattleReward != 0L) hash ^= BattleReward.GetHashCode(); + if (OtherReward != 0L) hash ^= OtherReward.GetHashCode(); + if (AllRewards != 0L) hash ^= AllRewards.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2594,29 +3881,33 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); + if (WelfarePool != 0L) { + output.WriteRawTag(8); + output.WriteInt64(WelfarePool); } - if (GiftId != 0L) { + if (BattleId != 0L) { output.WriteRawTag(16); - output.WriteInt64(GiftId); + output.WriteInt64(BattleId); } - if (Num != 0L) { + if (InitReward != 0L) { output.WriteRawTag(24); - output.WriteInt64(Num); + output.WriteInt64(InitReward); } - if (GiftName.Length != 0) { - output.WriteRawTag(34); - output.WriteString(GiftName); + if (GiftReward != 0L) { + output.WriteRawTag(32); + output.WriteInt64(GiftReward); } - if (Price != 0L) { + if (BattleReward != 0L) { output.WriteRawTag(40); - output.WriteInt64(Price); + output.WriteInt64(BattleReward); } - if (IsPaid != false) { + if (OtherReward != 0L) { output.WriteRawTag(48); - output.WriteBool(IsPaid); + output.WriteInt64(OtherReward); + } + if (AllRewards != 0L) { + output.WriteRawTag(80); + output.WriteInt64(AllRewards); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -2628,29 +3919,33 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); + if (WelfarePool != 0L) { + output.WriteRawTag(8); + output.WriteInt64(WelfarePool); } - if (GiftId != 0L) { + if (BattleId != 0L) { output.WriteRawTag(16); - output.WriteInt64(GiftId); + output.WriteInt64(BattleId); } - if (Num != 0L) { + if (InitReward != 0L) { output.WriteRawTag(24); - output.WriteInt64(Num); + output.WriteInt64(InitReward); } - if (GiftName.Length != 0) { - output.WriteRawTag(34); - output.WriteString(GiftName); + if (GiftReward != 0L) { + output.WriteRawTag(32); + output.WriteInt64(GiftReward); } - if (Price != 0L) { + if (BattleReward != 0L) { output.WriteRawTag(40); - output.WriteInt64(Price); + output.WriteInt64(BattleReward); } - if (IsPaid != false) { + if (OtherReward != 0L) { output.WriteRawTag(48); - output.WriteBool(IsPaid); + output.WriteInt64(OtherReward); + } + if (AllRewards != 0L) { + output.WriteRawTag(80); + output.WriteInt64(AllRewards); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -2662,23 +3957,26 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (user_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + if (WelfarePool != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(WelfarePool); } - if (GiftId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(GiftId); + if (BattleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleId); } - if (Num != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num); + if (InitReward != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(InitReward); } - if (GiftName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(GiftName); + if (GiftReward != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(GiftReward); } - if (Price != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Price); + if (BattleReward != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleReward); } - if (IsPaid != false) { - size += 1 + 1; + if (OtherReward != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(OtherReward); + } + if (AllRewards != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AllRewards); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -2688,30 +3986,30 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(GiftMsg other) { + public void MergeFrom(RewardPoolMsg other) { if (other == null) { return; } - if (other.user_ != null) { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - User.MergeFrom(other.User); + if (other.WelfarePool != 0L) { + WelfarePool = other.WelfarePool; } - if (other.GiftId != 0L) { - GiftId = other.GiftId; + if (other.BattleId != 0L) { + BattleId = other.BattleId; } - if (other.Num != 0L) { - Num = other.Num; + if (other.InitReward != 0L) { + InitReward = other.InitReward; } - if (other.GiftName.Length != 0) { - GiftName = other.GiftName; + if (other.GiftReward != 0L) { + GiftReward = other.GiftReward; } - if (other.Price != 0L) { - Price = other.Price; + if (other.BattleReward != 0L) { + BattleReward = other.BattleReward; } - if (other.IsPaid != false) { - IsPaid = other.IsPaid; + if (other.OtherReward != 0L) { + OtherReward = other.OtherReward; + } + if (other.AllRewards != 0L) { + AllRewards = other.AllRewards; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2728,31 +4026,32 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + WelfarePool = input.ReadInt64(); break; } case 16: { - GiftId = input.ReadInt64(); + BattleId = input.ReadInt64(); break; } case 24: { - Num = input.ReadInt64(); + InitReward = input.ReadInt64(); break; } - case 34: { - GiftName = input.ReadString(); + case 32: { + GiftReward = input.ReadInt64(); break; } case 40: { - Price = input.ReadInt64(); + BattleReward = input.ReadInt64(); break; } case 48: { - IsPaid = input.ReadBool(); + OtherReward = input.ReadInt64(); + break; + } + case 80: { + AllRewards = input.ReadInt64(); break; } } @@ -2770,31 +4069,32 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + WelfarePool = input.ReadInt64(); break; } case 16: { - GiftId = input.ReadInt64(); + BattleId = input.ReadInt64(); break; } case 24: { - Num = input.ReadInt64(); + InitReward = input.ReadInt64(); break; } - case 34: { - GiftName = input.ReadString(); + case 32: { + GiftReward = input.ReadInt64(); break; } case 40: { - Price = input.ReadInt64(); + BattleReward = input.ReadInt64(); break; } case 48: { - IsPaid = input.ReadBool(); + OtherReward = input.ReadInt64(); + break; + } + case 80: { + AllRewards = input.ReadInt64(); break; } } diff --git a/game/pb/common/common.pb.go b/game/pb/common/common.pb.go index 596be4e..aabf0ff 100644 --- a/game/pb/common/common.pb.go +++ b/game/pb/common/common.pb.go @@ -100,6 +100,126 @@ func (x *PbUser) GetIntegral() int64 { return 0 } +// GameStatusReq 游戏状态控制 game.status +type GameStatusReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 1开始新战局 2结束战局 + Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // 时间戳 +} + +func (x *GameStatusReq) Reset() { + *x = GameStatusReq{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameStatusReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameStatusReq) ProtoMessage() {} + +func (x *GameStatusReq) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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 GameStatusReq.ProtoReflect.Descriptor instead. +func (*GameStatusReq) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{1} +} + +func (x *GameStatusReq) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *GameStatusReq) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +// GameStatusResp 游戏状态控制返回值 +type GameStatusResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战局ID | 上一场战局ID(结束时) + Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // 时间戳 +} + +func (x *GameStatusResp) Reset() { + *x = GameStatusResp{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GameStatusResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GameStatusResp) ProtoMessage() {} + +func (x *GameStatusResp) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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 GameStatusResp.ProtoReflect.Descriptor instead. +func (*GameStatusResp) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{2} +} + +func (x *GameStatusResp) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *GameStatusResp) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + +func (x *GameStatusResp) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + // UserIntegralChanged 用户积分变更 push -> user.integral.change type UserIntegralChanged struct { state protoimpl.MessageState @@ -114,7 +234,7 @@ type UserIntegralChanged struct { func (x *UserIntegralChanged) Reset() { *x = UserIntegralChanged{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[1] + mi := &file_common_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -127,7 +247,7 @@ func (x *UserIntegralChanged) String() string { func (*UserIntegralChanged) ProtoMessage() {} func (x *UserIntegralChanged) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[1] + mi := &file_common_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -140,7 +260,7 @@ func (x *UserIntegralChanged) ProtoReflect() protoreflect.Message { // Deprecated: Use UserIntegralChanged.ProtoReflect.Descriptor instead. func (*UserIntegralChanged) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{1} + return file_common_common_proto_rawDescGZIP(), []int{3} } func (x *UserIntegralChanged) GetUser() *PbUser { @@ -177,7 +297,7 @@ type ChangeUserIntegralReq struct { func (x *ChangeUserIntegralReq) Reset() { *x = ChangeUserIntegralReq{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[2] + mi := &file_common_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -190,7 +310,7 @@ func (x *ChangeUserIntegralReq) String() string { func (*ChangeUserIntegralReq) ProtoMessage() {} func (x *ChangeUserIntegralReq) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[2] + mi := &file_common_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -203,7 +323,7 @@ func (x *ChangeUserIntegralReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeUserIntegralReq.ProtoReflect.Descriptor instead. func (*ChangeUserIntegralReq) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{2} + return file_common_common_proto_rawDescGZIP(), []int{4} } func (x *ChangeUserIntegralReq) GetUserId() int64 { @@ -226,7 +346,7 @@ type ChangeUserIntegralResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // 是否更新成功 + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // code, 200表示成功,其余根据对照表 Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID Change int64 `protobuf:"varint,4,opt,name=change,proto3" json:"change,omitempty"` // 本次更新积分量 @@ -236,7 +356,7 @@ type ChangeUserIntegralResp struct { func (x *ChangeUserIntegralResp) Reset() { *x = ChangeUserIntegralResp{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[3] + mi := &file_common_common_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -249,7 +369,7 @@ func (x *ChangeUserIntegralResp) String() string { func (*ChangeUserIntegralResp) ProtoMessage() {} func (x *ChangeUserIntegralResp) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[3] + mi := &file_common_common_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -262,14 +382,14 @@ func (x *ChangeUserIntegralResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeUserIntegralResp.ProtoReflect.Descriptor instead. func (*ChangeUserIntegralResp) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{3} + return file_common_common_proto_rawDescGZIP(), []int{5} } -func (x *ChangeUserIntegralResp) GetSuccess() bool { +func (x *ChangeUserIntegralResp) GetCode() int32 { if x != nil { - return x.Success + return x.Code } - return false + return 0 } func (x *ChangeUserIntegralResp) GetMsg() string { @@ -306,17 +426,17 @@ type CheckInMsg struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // 最新积分放置在user中 - Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // 打卡成功与否 - Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // 打卡消息: [打卡成功,快乐玩耍吧! | 今天已打过卡了!] + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // code, 200表示成功,其余根据对照表 + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 [打卡成功,快乐玩耍吧! | 今天已打过卡了!] + User *PbUser `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // 最新积分放置在user中 IntegralChange int64 `protobuf:"varint,4,opt,name=integralChange,proto3" json:"integralChange,omitempty"` // 积分变动 - IsCritical bool `protobuf:"varint,5,opt,name=isCritical,proto3" json:"isCritical,omitempty"` // 是否发生了打卡积分奖励暴击 + IsCritical bool `protobuf:"varint,5,opt,name=isCritical,proto3" json:"isCritical,omitempty"` // 是否欧皇附体 } func (x *CheckInMsg) Reset() { *x = CheckInMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[4] + mi := &file_common_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -329,7 +449,7 @@ func (x *CheckInMsg) String() string { func (*CheckInMsg) ProtoMessage() {} func (x *CheckInMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[4] + mi := &file_common_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -342,28 +462,28 @@ func (x *CheckInMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckInMsg.ProtoReflect.Descriptor instead. func (*CheckInMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{4} + return file_common_common_proto_rawDescGZIP(), []int{6} } -func (x *CheckInMsg) GetUser() *PbUser { +func (x *CheckInMsg) GetCode() int32 { if x != nil { - return x.User + return x.Code } - return nil + return 0 } -func (x *CheckInMsg) GetSuccess() bool { +func (x *CheckInMsg) GetMsg() string { if x != nil { - return x.Success + return x.Msg } - return false + return "" } -func (x *CheckInMsg) GetMsg() string { +func (x *CheckInMsg) GetUser() *PbUser { if x != nil { - return x.Msg + return x.User } - return "" + return nil } func (x *CheckInMsg) GetIntegralChange() int64 { @@ -380,35 +500,35 @@ func (x *CheckInMsg) GetIsCritical() bool { return false } -// StarterPackMsg 新手礼包 push -> user.starterPack 命令(新手礼包) -type StarterPackMsg struct { +// GiftPackMsg 领取礼包消息 push -> user.giftPack 命令(新手礼包|福利|低保|其它礼包) +type GiftPackMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // 领取成功与否 - Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` // 领取消息: [成功无msg | 已经领过礼包了] + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // code, 200表示成功,其余根据对照表 + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 领取消息: [成功无msg | 已经领过礼包了xxx ] + User *PbUser `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` IntegralChange int64 `protobuf:"varint,4,opt,name=integralChange,proto3" json:"integralChange,omitempty"` // 积分变动 } -func (x *StarterPackMsg) Reset() { - *x = StarterPackMsg{} +func (x *GiftPackMsg) Reset() { + *x = GiftPackMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[5] + mi := &file_common_common_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StarterPackMsg) String() string { +func (x *GiftPackMsg) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StarterPackMsg) ProtoMessage() {} +func (*GiftPackMsg) ProtoMessage() {} -func (x *StarterPackMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[5] +func (x *GiftPackMsg) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -419,33 +539,33 @@ func (x *StarterPackMsg) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StarterPackMsg.ProtoReflect.Descriptor instead. -func (*StarterPackMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{5} +// Deprecated: Use GiftPackMsg.ProtoReflect.Descriptor instead. +func (*GiftPackMsg) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{7} } -func (x *StarterPackMsg) GetUser() *PbUser { +func (x *GiftPackMsg) GetCode() int32 { if x != nil { - return x.User + return x.Code } - return nil + return 0 } -func (x *StarterPackMsg) GetSuccess() bool { +func (x *GiftPackMsg) GetMsg() string { if x != nil { - return x.Success + return x.Msg } - return false + return "" } -func (x *StarterPackMsg) GetMsg() string { +func (x *GiftPackMsg) GetUser() *PbUser { if x != nil { - return x.Msg + return x.User } - return "" + return nil } -func (x *StarterPackMsg) GetIntegralChange() int64 { +func (x *GiftPackMsg) GetIntegralChange() int64 { if x != nil { return x.IntegralChange } @@ -458,13 +578,15 @@ type UserQueryMsg struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // 用户信息 + Rank []*UserQueryMsg_RankItem `protobuf:"bytes,2,rep,name=rank,proto3" json:"rank,omitempty"` // 排行数据(多个榜) + TitleIds []int64 `protobuf:"varint,3,rep,packed,name=titleIds,proto3" json:"titleIds,omitempty"` // 称号ID列表,具体称号配置 给接口取 } func (x *UserQueryMsg) Reset() { *x = UserQueryMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[6] + mi := &file_common_common_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -477,7 +599,7 @@ func (x *UserQueryMsg) String() string { func (*UserQueryMsg) ProtoMessage() {} func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[6] + mi := &file_common_common_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -490,7 +612,7 @@ func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use UserQueryMsg.ProtoReflect.Descriptor instead. func (*UserQueryMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{6} + return file_common_common_proto_rawDescGZIP(), []int{8} } func (x *UserQueryMsg) GetUser() *PbUser { @@ -500,6 +622,20 @@ func (x *UserQueryMsg) GetUser() *PbUser { return nil } +func (x *UserQueryMsg) GetRank() []*UserQueryMsg_RankItem { + if x != nil { + return x.Rank + } + return nil +} + +func (x *UserQueryMsg) GetTitleIds() []int64 { + if x != nil { + return x.TitleIds + } + return nil +} + // DanmakuMsg 普通弹幕消息 push -> live.danmaku type DanmakuMsg struct { state protoimpl.MessageState @@ -513,7 +649,7 @@ type DanmakuMsg struct { func (x *DanmakuMsg) Reset() { *x = DanmakuMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[7] + mi := &file_common_common_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -526,7 +662,7 @@ func (x *DanmakuMsg) String() string { func (*DanmakuMsg) ProtoMessage() {} func (x *DanmakuMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[7] + mi := &file_common_common_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -539,7 +675,7 @@ func (x *DanmakuMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use DanmakuMsg.ProtoReflect.Descriptor instead. func (*DanmakuMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{7} + return file_common_common_proto_rawDescGZIP(), []int{9} } func (x *DanmakuMsg) GetUser() *PbUser { @@ -556,7 +692,7 @@ func (x *DanmakuMsg) GetContent() string { return "" } -// 赠送礼物 push -> live.gift +// 赠送礼物 push -> live.gift.common | live.gift.nobility type GiftMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -573,7 +709,7 @@ type GiftMsg struct { func (x *GiftMsg) Reset() { *x = GiftMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[8] + mi := &file_common_common_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -586,7 +722,7 @@ func (x *GiftMsg) String() string { func (*GiftMsg) ProtoMessage() {} func (x *GiftMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[8] + mi := &file_common_common_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -599,7 +735,7 @@ func (x *GiftMsg) ProtoReflect() protoreflect.Message { // Deprecated: Use GiftMsg.ProtoReflect.Descriptor instead. func (*GiftMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{8} + return file_common_common_proto_rawDescGZIP(), []int{10} } func (x *GiftMsg) GetUser() *PbUser { @@ -644,6 +780,166 @@ func (x *GiftMsg) GetIsPaid() bool { return false } +// 奖池变动消息 push -> game.rewardPool +type RewardPoolMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WelfarePool int64 `protobuf:"varint,1,opt,name=welfarePool,proto3" json:"welfarePool,omitempty"` // 福利池,与战局无关 + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战局ID + InitReward int64 `protobuf:"varint,3,opt,name=initReward,proto3" json:"initReward,omitempty"` // 初始奖池 + GiftReward int64 `protobuf:"varint,4,opt,name=giftReward,proto3" json:"giftReward,omitempty"` // 礼物奖池 + BattleReward int64 `protobuf:"varint,5,opt,name=battleReward,proto3" json:"battleReward,omitempty"` // 战斗奖池 + OtherReward int64 `protobuf:"varint,6,opt,name=otherReward,proto3" json:"otherReward,omitempty"` // 其它奖池 + AllRewards int64 `protobuf:"varint,10,opt,name=allRewards,proto3" json:"allRewards,omitempty"` // 所有奖池 +} + +func (x *RewardPoolMsg) Reset() { + *x = RewardPoolMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RewardPoolMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RewardPoolMsg) ProtoMessage() {} + +func (x *RewardPoolMsg) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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 RewardPoolMsg.ProtoReflect.Descriptor instead. +func (*RewardPoolMsg) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{11} +} + +func (x *RewardPoolMsg) GetWelfarePool() int64 { + if x != nil { + return x.WelfarePool + } + return 0 +} + +func (x *RewardPoolMsg) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + +func (x *RewardPoolMsg) GetInitReward() int64 { + if x != nil { + return x.InitReward + } + return 0 +} + +func (x *RewardPoolMsg) GetGiftReward() int64 { + if x != nil { + return x.GiftReward + } + return 0 +} + +func (x *RewardPoolMsg) GetBattleReward() int64 { + if x != nil { + return x.BattleReward + } + return 0 +} + +func (x *RewardPoolMsg) GetOtherReward() int64 { + if x != nil { + return x.OtherReward + } + return 0 +} + +func (x *RewardPoolMsg) GetAllRewards() int64 { + if x != nil { + return x.AllRewards + } + return 0 +} + +// RankItem 排行数据结构 +type UserQueryMsg_RankItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RankType int32 `protobuf:"varint,1,opt,name=rankType,proto3" json:"rankType,omitempty"` // 排行榜类型 (与pbGameZhg.RankType一致) + Score int64 `protobuf:"varint,2,opt,name=score,proto3" json:"score,omitempty"` // 具体分数 + Rank int32 `protobuf:"varint,3,opt,name=rank,proto3" json:"rank,omitempty"` // 具体排名,不上榜为0 +} + +func (x *UserQueryMsg_RankItem) Reset() { + *x = UserQueryMsg_RankItem{} + if protoimpl.UnsafeEnabled { + mi := &file_common_common_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserQueryMsg_RankItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserQueryMsg_RankItem) ProtoMessage() {} + +func (x *UserQueryMsg_RankItem) ProtoReflect() protoreflect.Message { + mi := &file_common_common_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 UserQueryMsg_RankItem.ProtoReflect.Descriptor instead. +func (*UserQueryMsg_RankItem) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{8, 0} +} + +func (x *UserQueryMsg_RankItem) GetRankType() int32 { + if x != nil { + return x.RankType + } + return 0 +} + +func (x *UserQueryMsg_RankItem) GetScore() int64 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *UserQueryMsg_RankItem) GetRank() int32 { + if x != nil { + return x.Rank + } + return 0 +} + var File_common_common_proto protoreflect.FileDescriptor var file_common_common_proto_rawDesc = []byte{ @@ -657,69 +953,104 @@ var file_common_common_proto_rawDesc = []byte{ 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x70, 0x0a, - 0x13, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, - 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x63, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, - 0x47, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, - 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0xa7, 0x01, 0x0a, 0x0a, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, - 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, - 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, - 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, - 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x8b, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, - 0x72, 0x50, 0x61, 0x63, 0x6b, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x22, 0x35, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x0a, 0x44, 0x61, - 0x6e, 0x6d, 0x61, 0x6b, 0x75, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x47, 0x69, - 0x66, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x45, 0x0a, + 0x0d, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0x64, 0x0a, 0x0e, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x70, 0x0a, 0x13, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x64, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x47, 0x0a, 0x15, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x22, 0xa1, 0x01, 0x0a, 0x0a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x4d, 0x73, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x26, + 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, + 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x47, 0x69, 0x66, 0x74, 0x50, + 0x61, 0x63, 0x6b, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x0c, + 0x55, 0x73, 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, + 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x73, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x49, 0x64, 0x73, 0x1a, 0x50, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, + 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x22, 0x4d, 0x0a, 0x0a, 0x44, 0x61, 0x6e, 0x6d, 0x61, + 0x6b, 0x75, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, - 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, - 0x66, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, - 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, - 0x42, 0x1d, 0x5a, 0x1b, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x70, 0x62, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x47, 0x69, 0x66, 0x74, 0x4d, + 0x73, 0x67, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x62, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, + 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, + 0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x22, 0xf3, 0x01, + 0x0a, 0x0d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x4d, 0x73, 0x67, 0x12, + 0x20, 0x0a, 0x0b, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x50, 0x6f, 0x6f, + 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, + 0x0a, 0x67, 0x69, 0x66, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x22, 0x0a, + 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x42, 0x1d, 0x5a, 0x1b, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, + 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x70, 0x62, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -734,30 +1065,35 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_common_common_proto_goTypes = []interface{}{ (*PbUser)(nil), // 0: pb.common.PbUser - (*UserIntegralChanged)(nil), // 1: pb.common.UserIntegralChanged - (*ChangeUserIntegralReq)(nil), // 2: pb.common.ChangeUserIntegralReq - (*ChangeUserIntegralResp)(nil), // 3: pb.common.ChangeUserIntegralResp - (*CheckInMsg)(nil), // 4: pb.common.CheckInMsg - (*StarterPackMsg)(nil), // 5: pb.common.StarterPackMsg - (*UserQueryMsg)(nil), // 6: pb.common.UserQueryMsg - (*DanmakuMsg)(nil), // 7: pb.common.DanmakuMsg - (*GiftMsg)(nil), // 8: pb.common.GiftMsg + (*GameStatusReq)(nil), // 1: pb.common.GameStatusReq + (*GameStatusResp)(nil), // 2: pb.common.GameStatusResp + (*UserIntegralChanged)(nil), // 3: pb.common.UserIntegralChanged + (*ChangeUserIntegralReq)(nil), // 4: pb.common.ChangeUserIntegralReq + (*ChangeUserIntegralResp)(nil), // 5: pb.common.ChangeUserIntegralResp + (*CheckInMsg)(nil), // 6: pb.common.CheckInMsg + (*GiftPackMsg)(nil), // 7: pb.common.GiftPackMsg + (*UserQueryMsg)(nil), // 8: pb.common.UserQueryMsg + (*DanmakuMsg)(nil), // 9: pb.common.DanmakuMsg + (*GiftMsg)(nil), // 10: pb.common.GiftMsg + (*RewardPoolMsg)(nil), // 11: pb.common.RewardPoolMsg + (*UserQueryMsg_RankItem)(nil), // 12: pb.common.UserQueryMsg.RankItem } var file_common_common_proto_depIdxs = []int32{ - 0, // 0: pb.common.UserIntegralChanged.user:type_name -> pb.common.PbUser - 0, // 1: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser - 0, // 2: pb.common.StarterPackMsg.user:type_name -> pb.common.PbUser - 0, // 3: pb.common.UserQueryMsg.user:type_name -> pb.common.PbUser - 0, // 4: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser - 0, // 5: pb.common.GiftMsg.user:type_name -> pb.common.PbUser - 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 + 0, // 0: pb.common.UserIntegralChanged.user:type_name -> pb.common.PbUser + 0, // 1: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser + 0, // 2: pb.common.GiftPackMsg.user:type_name -> pb.common.PbUser + 0, // 3: pb.common.UserQueryMsg.user:type_name -> pb.common.PbUser + 12, // 4: pb.common.UserQueryMsg.rank:type_name -> pb.common.UserQueryMsg.RankItem + 0, // 5: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser + 0, // 6: pb.common.GiftMsg.user:type_name -> pb.common.PbUser + 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_common_common_proto_init() } @@ -779,7 +1115,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserIntegralChanged); i { + switch v := v.(*GameStatusReq); i { case 0: return &v.state case 1: @@ -791,7 +1127,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeUserIntegralReq); i { + switch v := v.(*GameStatusResp); i { case 0: return &v.state case 1: @@ -803,7 +1139,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeUserIntegralResp); i { + switch v := v.(*UserIntegralChanged); i { case 0: return &v.state case 1: @@ -815,7 +1151,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckInMsg); i { + switch v := v.(*ChangeUserIntegralReq); i { case 0: return &v.state case 1: @@ -827,7 +1163,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StarterPackMsg); i { + switch v := v.(*ChangeUserIntegralResp); i { case 0: return &v.state case 1: @@ -839,7 +1175,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserQueryMsg); i { + switch v := v.(*CheckInMsg); i { case 0: return &v.state case 1: @@ -851,7 +1187,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DanmakuMsg); i { + switch v := v.(*GiftPackMsg); i { case 0: return &v.state case 1: @@ -863,6 +1199,30 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserQueryMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DanmakuMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GiftMsg); i { case 0: return &v.state @@ -874,6 +1234,30 @@ func file_common_common_proto_init() { return nil } } + file_common_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RewardPoolMsg); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_common_common_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserQueryMsg_RankItem); 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{ @@ -881,7 +1265,7 @@ func file_common_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_common_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/common/common.proto b/game/pb/common/common.proto index 7b330d4..8edfc3a 100644 --- a/game/pb/common/common.proto +++ b/game/pb/common/common.proto @@ -13,6 +13,19 @@ message PbUser { int64 integral = 5; // 用户当前积分 } +// GameStatusReq 游戏状态控制 game.status +message GameStatusReq { + int32 status = 1; // 1开始新战局 2结束战局 + int64 timestamp = 2; // 时间戳 +} + +// GameStatusResp 游戏状态控制返回值 +message GameStatusResp { + bool success = 1; + int64 battleId = 2; // 战局ID | 上一场战局ID(结束时) + int64 timestamp = 3; // 时间戳 +} + // UserIntegralChanged 用户积分变更 push -> user.integral.change message UserIntegralChanged { pb.common.PbUser user = 1; @@ -28,8 +41,9 @@ message ChangeUserIntegralReq { // ChangeUserIntegralResp 用户积分更新返回 message ChangeUserIntegralResp { - bool success = 1; // 是否更新成功 + int32 code = 1; // code, 200表示成功,其余根据对照表 string msg = 2; // 消息 + int64 userId = 3; // 用户ID int64 change = 4; // 本次更新积分量 int64 integral = 5; // 当前剩余积分 @@ -37,24 +51,33 @@ message ChangeUserIntegralResp { // CheckInMsg 每日打卡 push -> user.checkIn message CheckInMsg { - pb.common.PbUser user = 1; // 最新积分放置在user中 - bool success = 2; // 打卡成功与否 - string msg = 3; // 打卡消息: [打卡成功,快乐玩耍吧! | 今天已打过卡了!] + int32 code = 1; // code, 200表示成功,其余根据对照表 + string msg = 2; // 消息 [打卡成功,快乐玩耍吧! | 今天已打过卡了!] + pb.common.PbUser user = 3; // 最新积分放置在user中 int64 integralChange = 4; // 积分变动 - bool isCritical = 5; // 是否发生了打卡积分奖励暴击 + bool isCritical = 5; // 是否欧皇附体 } -// StarterPackMsg 新手礼包 push -> user.starterPack 命令(新手礼包) -message StarterPackMsg { - pb.common.PbUser user = 1; - bool success = 2; // 领取成功与否 - string msg = 3; // 领取消息: [成功无msg | 已经领过礼包了] +// GiftPackMsg 领取礼包消息 push -> user.giftPack 命令(新手礼包|福利|低保|其它礼包) +message GiftPackMsg { + int32 code = 1; // code, 200表示成功,其余根据对照表 + string msg = 2; // 领取消息: [成功无msg | 已经领过礼包了xxx ] + + pb.common.PbUser user = 3; int64 integralChange = 4; // 积分变动 } // QueryIntegralMsg 用户查询信息通知 push -> user.query message UserQueryMsg { - pb.common.PbUser user = 1; + // RankItem 排行数据结构 + message RankItem { + int32 rankType = 1; // 排行榜类型 (与pbGameZhg.RankType一致) + int64 score = 2; // 具体分数 + int32 rank = 3; // 具体排名,不上榜为0 + } + pb.common.PbUser user = 1; // 用户信息 + repeated RankItem rank = 2; // 排行数据(多个榜) + repeated int64 titleIds = 3; // 称号ID列表,具体称号配置 给接口取 } // DanmakuMsg 普通弹幕消息 push -> live.danmaku @@ -63,7 +86,7 @@ message DanmakuMsg { string content = 2; } -// 赠送礼物 push -> live.gift +// 赠送礼物 push -> live.gift.common | live.gift.nobility message GiftMsg{ pb.common.PbUser user = 1; int64 giftId = 2; @@ -71,4 +94,15 @@ message GiftMsg{ string giftName = 4; int64 price = 5; // 单价 bool isPaid = 6; // 是否收费礼物 +} + +// 奖池变动消息 push -> game.rewardPool +message RewardPoolMsg { + int64 welfarePool = 1; // 福利池,与战局无关 + int64 battleId = 2; // 战局ID + int64 initReward = 3; // 初始奖池 + int64 giftReward = 4; // 礼物奖池 + int64 battleReward = 5; // 战斗奖池 + int64 otherReward = 6; // 其它奖池 + int64 allRewards = 10; // 所有奖池 } \ No newline at end of file diff --git a/game/pb/game/zhg/Rank.cs b/game/pb/game/zhg/Rank.cs index 1dd8a5c..7d8de2b 100644 --- a/game/pb/game/zhg/Rank.cs +++ b/game/pb/game/zhg/Rank.cs @@ -876,7 +876,7 @@ namespace Pb.Game.Zhg { } /// - /// RankRvpSubmitResult 排行榜结算 push -> rank.submit 命令(排行榜结算) + /// RankRvpSubmitResult 排行榜结算结果通知 push -> rank.submit 命令(排行榜结算) /// public sealed partial class RankRvpSubmitResult : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE diff --git a/game/pb/game/zhg/Stat.cs b/game/pb/game/zhg/Stat.cs index 77b4470..406f6ff 100644 --- a/game/pb/game/zhg/Stat.cs +++ b/game/pb/game/zhg/Stat.cs @@ -27,29 +27,28 @@ namespace Pb.Game.Zhg { "CgpzdGF0LnByb3RvEgtwYi5nYW1lLnpoZyJACgtTdGF0UHZQS2lsbBILCgN1", "aWQYASABKAMSEQoJdGFyZ2V0VWlkGAIgASgDEhEKCWlzR2VuZXJhbBgDIAEo", "CCIuChFTdGF0UHZQRmlyc3RCbG9vZBILCgN1aWQYASABKAMSDAoEdHlwZRgC", - "IAEoBSLbAgoQU3RhdFB2UFJlcG9ydFJlcRIPCgd3aW5DYW1wGAEgASgFEjYK", - "B2dlbmVyYWwYAiABKAsyJS5wYi5nYW1lLnpoZy5TdGF0UHZQUmVwb3J0UmVx", - "LkdlbmVyYWwSNAoId2luSXRlbXMYCiADKAsyIi5wYi5nYW1lLnpoZy5TdGF0", - "UHZQUmVwb3J0UmVxLkl0ZW0SNQoJbG9zdEl0ZW1zGAsgAygLMiIucGIuZ2Ft", - "ZS56aGcuU3RhdFB2UFJlcG9ydFJlcS5JdGVtGmoKBEl0ZW0SCwoDdWlkGAEg", - "ASgDEg0KBXVuYW1lGAIgASgJEg4KBmRhbWFnZRgDIAEoAxIQCghkZURhbWFn", - "ZRgEIAEoAxIQCghraWxsVW5pdBgFIAEoAxISCgpkZUtpbGxVbml0GAYgASgD", - "GiUKB0dlbmVyYWwSCwoDdWlkGAEgASgDEg0KBXVuYW1lGAIgASgJIvMBChFT", - "dGF0UHZQUmVwb3J0UmVzcBI0CgdnZW5lcmFsGAEgASgLMiMucGIuZ2FtZS56", - "aGcuU3RhdFB2UFJlcG9ydFJlc3AuSXRlbRI1Cgh3aW5JdGVtcxgKIAMoCzIj", - "LnBiLmdhbWUuemhnLlN0YXRQdlBSZXBvcnRSZXNwLkl0ZW0SNgoJbG9zdEl0", - "ZW1zGAsgAygLMiMucGIuZ2FtZS56aGcuU3RhdFB2UFJlcG9ydFJlc3AuSXRl", - "bRo5CgRJdGVtEgsKA3VpZBgBIAEoAxINCgV1bmFtZRgCIAEoCRIVCg1hZGRv", - "bkludGVncmFsGAMgASgDQiBaHmRjZy9nYW1lL3BiL2dhbWUvemhnO3BiR2Ft", - "ZVpoZ2IGcHJvdG8z")); + "IAEoBSKOAgoQU3RhdFB2UFJlcG9ydFJlcRIPCgd3aW5DYW1wGAEgASgFEjQK", + "CHdpbkl0ZW1zGAogAygLMiIucGIuZ2FtZS56aGcuU3RhdFB2UFJlcG9ydFJl", + "cS5JdGVtEjUKCWxvc3RJdGVtcxgLIAMoCzIiLnBiLmdhbWUuemhnLlN0YXRQ", + "dlBSZXBvcnRSZXEuSXRlbRp8CgRJdGVtEgsKA3VpZBgBIAEoAxINCgV1bmFt", + "ZRgCIAEoCRIQCghwb3NpdGlvbhgDIAEoBRIOCgZkYW1hZ2UYBCABKAMSEAoI", + "ZGVEYW1hZ2UYBSABKAMSEAoIa2lsbFVuaXQYBiABKAMSEgoKZGVLaWxsVW5p", + "dBgHIAEoAyLQAgoRU3RhdFB2UFJlcG9ydFJlc3ASNQoId2luSXRlbXMYASAD", + "KAsyIy5wYi5nYW1lLnpoZy5TdGF0UHZQUmVwb3J0UmVzcC5JdGVtEjYKCWxv", + "c3RJdGVtcxgCIAMoCzIjLnBiLmdhbWUuemhnLlN0YXRQdlBSZXBvcnRSZXNw", + "Lkl0ZW0aywEKBEl0ZW0SCwoDdWlkGAEgASgDEg0KBXVuYW1lGAIgASgJEhAK", + "CHBvc2l0aW9uGAMgASgFEhcKD3JldHVybnNJbnRlZ3JhbBgEIAEoAxIaChJy", + "ZXdhcmRQb29sSW50ZWdyYWwYBSABKAMSFwoPZ2VuZXJhbEludGVncmFsGAYg", + "ASgDEhgKEG5vYmlsaXR5SW50ZWdyYWwYByABKAMSFgoOYmF0dGxlSW50ZWdy", + "YWwYCCABKAMSFQoNdG90YWxJbnRlZ3JhbBgKIAEoA0IgWh5kY2cvZ2FtZS9w", + "Yi9nYW1lL3poZztwYkdhbWVaaGdiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPKill), global::Pb.Game.Zhg.StatPvPKill.Parser, new[]{ "Uid", "TargetUid", "IsGeneral" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPFirstBlood), global::Pb.Game.Zhg.StatPvPFirstBlood.Parser, new[]{ "Uid", "Type" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq), global::Pb.Game.Zhg.StatPvPReportReq.Parser, new[]{ "WinCamp", "General", "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq.Types.Item), global::Pb.Game.Zhg.StatPvPReportReq.Types.Item.Parser, new[]{ "Uid", "Uname", "Damage", "DeDamage", "KillUnit", "DeKillUnit" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq.Types.General), global::Pb.Game.Zhg.StatPvPReportReq.Types.General.Parser, new[]{ "Uid", "Uname" }, null, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp), global::Pb.Game.Zhg.StatPvPReportResp.Parser, new[]{ "General", "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp.Types.Item), global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser, new[]{ "Uid", "Uname", "AddonIntegral" }, null, null, null, null)}) + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq), global::Pb.Game.Zhg.StatPvPReportReq.Parser, new[]{ "WinCamp", "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq.Types.Item), global::Pb.Game.Zhg.StatPvPReportReq.Types.Item.Parser, new[]{ "Uid", "Uname", "Position", "Damage", "DeDamage", "KillUnit", "DeKillUnit" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp), global::Pb.Game.Zhg.StatPvPReportResp.Parser, new[]{ "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp.Types.Item), global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser, new[]{ "Uid", "Uname", "Position", "ReturnsIntegral", "RewardPoolIntegral", "GeneralIntegral", "NobilityIntegral", "BattleIntegral", "TotalIntegral" }, null, null, null, null)}) })); } #endregion @@ -604,7 +603,6 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StatPvPReportReq(StatPvPReportReq other) : this() { winCamp_ = other.winCamp_; - general_ = other.general_ != null ? other.general_.Clone() : null; winItems_ = other.winItems_.Clone(); lostItems_ = other.lostItems_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -631,18 +629,6 @@ namespace Pb.Game.Zhg { } } - /// Field number for the "general" field. - public const int GeneralFieldNumber = 2; - private global::Pb.Game.Zhg.StatPvPReportReq.Types.General general_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Game.Zhg.StatPvPReportReq.Types.General General { - get { return general_; } - set { - general_ = value; - } - } - /// Field number for the "winItems" field. public const int WinItemsFieldNumber = 10; private static readonly pb::FieldCodec _repeated_winItems_codec @@ -687,7 +673,6 @@ namespace Pb.Game.Zhg { return true; } if (WinCamp != other.WinCamp) return false; - if (!object.Equals(General, other.General)) return false; if(!winItems_.Equals(other.winItems_)) return false; if(!lostItems_.Equals(other.lostItems_)) return false; return Equals(_unknownFields, other._unknownFields); @@ -698,7 +683,6 @@ namespace Pb.Game.Zhg { public override int GetHashCode() { int hash = 1; if (WinCamp != 0) hash ^= WinCamp.GetHashCode(); - if (general_ != null) hash ^= General.GetHashCode(); hash ^= winItems_.GetHashCode(); hash ^= lostItems_.GetHashCode(); if (_unknownFields != null) { @@ -723,10 +707,6 @@ namespace Pb.Game.Zhg { output.WriteRawTag(8); output.WriteInt32(WinCamp); } - if (general_ != null) { - output.WriteRawTag(18); - output.WriteMessage(General); - } winItems_.WriteTo(output, _repeated_winItems_codec); lostItems_.WriteTo(output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -743,10 +723,6 @@ namespace Pb.Game.Zhg { output.WriteRawTag(8); output.WriteInt32(WinCamp); } - if (general_ != null) { - output.WriteRawTag(18); - output.WriteMessage(General); - } winItems_.WriteTo(ref output, _repeated_winItems_codec); lostItems_.WriteTo(ref output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -762,9 +738,6 @@ namespace Pb.Game.Zhg { if (WinCamp != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinCamp); } - if (general_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(General); - } size += winItems_.CalculateSize(_repeated_winItems_codec); size += lostItems_.CalculateSize(_repeated_lostItems_codec); if (_unknownFields != null) { @@ -782,12 +755,6 @@ namespace Pb.Game.Zhg { if (other.WinCamp != 0) { WinCamp = other.WinCamp; } - if (other.general_ != null) { - if (general_ == null) { - General = new global::Pb.Game.Zhg.StatPvPReportReq.Types.General(); - } - General.MergeFrom(other.General); - } winItems_.Add(other.winItems_); lostItems_.Add(other.lostItems_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -809,13 +776,6 @@ namespace Pb.Game.Zhg { WinCamp = input.ReadInt32(); break; } - case 18: { - if (general_ == null) { - General = new global::Pb.Game.Zhg.StatPvPReportReq.Types.General(); - } - input.ReadMessage(General); - break; - } case 82: { winItems_.AddEntriesFrom(input, _repeated_winItems_codec); break; @@ -843,13 +803,6 @@ namespace Pb.Game.Zhg { WinCamp = input.ReadInt32(); break; } - case 18: { - if (general_ == null) { - General = new global::Pb.Game.Zhg.StatPvPReportReq.Types.General(); - } - input.ReadMessage(General); - break; - } case 82: { winItems_.AddEntriesFrom(ref input, _repeated_winItems_codec); break; @@ -904,6 +857,7 @@ namespace Pb.Game.Zhg { public Item(Item other) : this() { uid_ = other.uid_; uname_ = other.uname_; + position_ = other.position_; damage_ = other.damage_; deDamage_ = other.deDamage_; killUnit_ = other.killUnit_; @@ -947,8 +901,23 @@ namespace Pb.Game.Zhg { } } + /// Field number for the "position" field. + public const int PositionFieldNumber = 3; + private int position_; + /// + /// 名次(特指在某一方的名次) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Position { + get { return position_; } + set { + position_ = value; + } + } + /// Field number for the "damage" field. - public const int DamageFieldNumber = 3; + public const int DamageFieldNumber = 4; private long damage_; /// /// 伤害量 @@ -963,7 +932,7 @@ namespace Pb.Game.Zhg { } /// Field number for the "deDamage" field. - public const int DeDamageFieldNumber = 4; + public const int DeDamageFieldNumber = 5; private long deDamage_; /// /// 承受伤害 @@ -978,7 +947,7 @@ namespace Pb.Game.Zhg { } /// Field number for the "killUnit" field. - public const int KillUnitFieldNumber = 5; + public const int KillUnitFieldNumber = 6; private long killUnit_; /// /// 击杀单位数量 @@ -993,7 +962,7 @@ namespace Pb.Game.Zhg { } /// Field number for the "deKillUnit" field. - public const int DeKillUnitFieldNumber = 6; + public const int DeKillUnitFieldNumber = 7; private long deKillUnit_; /// /// 被杀单位数量 @@ -1024,6 +993,7 @@ namespace Pb.Game.Zhg { } if (Uid != other.Uid) return false; if (Uname != other.Uname) return false; + if (Position != other.Position) return false; if (Damage != other.Damage) return false; if (DeDamage != other.DeDamage) return false; if (KillUnit != other.KillUnit) return false; @@ -1037,6 +1007,7 @@ namespace Pb.Game.Zhg { int hash = 1; if (Uid != 0L) hash ^= Uid.GetHashCode(); if (Uname.Length != 0) hash ^= Uname.GetHashCode(); + if (Position != 0) hash ^= Position.GetHashCode(); if (Damage != 0L) hash ^= Damage.GetHashCode(); if (DeDamage != 0L) hash ^= DeDamage.GetHashCode(); if (KillUnit != 0L) hash ^= KillUnit.GetHashCode(); @@ -1067,20 +1038,24 @@ namespace Pb.Game.Zhg { output.WriteRawTag(18); output.WriteString(Uname); } - if (Damage != 0L) { + if (Position != 0) { output.WriteRawTag(24); + output.WriteInt32(Position); + } + if (Damage != 0L) { + output.WriteRawTag(32); output.WriteInt64(Damage); } if (DeDamage != 0L) { - output.WriteRawTag(32); + output.WriteRawTag(40); output.WriteInt64(DeDamage); } if (KillUnit != 0L) { - output.WriteRawTag(40); + output.WriteRawTag(48); output.WriteInt64(KillUnit); } if (DeKillUnit != 0L) { - output.WriteRawTag(48); + output.WriteRawTag(56); output.WriteInt64(DeKillUnit); } if (_unknownFields != null) { @@ -1101,20 +1076,24 @@ namespace Pb.Game.Zhg { output.WriteRawTag(18); output.WriteString(Uname); } - if (Damage != 0L) { + if (Position != 0) { output.WriteRawTag(24); + output.WriteInt32(Position); + } + if (Damage != 0L) { + output.WriteRawTag(32); output.WriteInt64(Damage); } if (DeDamage != 0L) { - output.WriteRawTag(32); + output.WriteRawTag(40); output.WriteInt64(DeDamage); } if (KillUnit != 0L) { - output.WriteRawTag(40); + output.WriteRawTag(48); output.WriteInt64(KillUnit); } if (DeKillUnit != 0L) { - output.WriteRawTag(48); + output.WriteRawTag(56); output.WriteInt64(DeKillUnit); } if (_unknownFields != null) { @@ -1133,6 +1112,9 @@ namespace Pb.Game.Zhg { if (Uname.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Uname); } + if (Position != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Position); + } if (Damage != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(Damage); } @@ -1163,6 +1145,9 @@ namespace Pb.Game.Zhg { if (other.Uname.Length != 0) { Uname = other.Uname; } + if (other.Position != 0) { + Position = other.Position; + } if (other.Damage != 0L) { Damage = other.Damage; } @@ -1199,18 +1184,22 @@ namespace Pb.Game.Zhg { break; } case 24: { - Damage = input.ReadInt64(); + Position = input.ReadInt32(); break; } case 32: { - DeDamage = input.ReadInt64(); + Damage = input.ReadInt64(); break; } case 40: { - KillUnit = input.ReadInt64(); + DeDamage = input.ReadInt64(); break; } case 48: { + KillUnit = input.ReadInt64(); + break; + } + case 56: { DeKillUnit = input.ReadInt64(); break; } @@ -1238,251 +1227,23 @@ namespace Pb.Game.Zhg { break; } case 24: { - Damage = input.ReadInt64(); + Position = input.ReadInt32(); break; } case 32: { - DeDamage = input.ReadInt64(); + Damage = input.ReadInt64(); break; } case 40: { - KillUnit = input.ReadInt64(); + DeDamage = input.ReadInt64(); break; } case 48: { - DeKillUnit = input.ReadInt64(); - break; - } - } - } - } - #endif - - } - - public sealed partial class General : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new General()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhg.StatPvPReportReq.Descriptor.NestedTypes[1]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public General() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public General(General other) : this() { - uid_ = other.uid_; - uname_ = other.uname_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public General Clone() { - return new General(this); - } - - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private long uid_; - /// - /// 名将UID - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Uid { - get { return uid_; } - set { - uid_ = value; - } - } - - /// Field number for the "uname" field. - public const int UnameFieldNumber = 2; - private string uname_ = ""; - /// - /// 名将用户名 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Uname { - get { return uname_; } - set { - uname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as General); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(General other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Uid != other.Uid) return false; - if (Uname != other.Uname) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (Uid != 0L) hash ^= Uid.GetHashCode(); - if (Uname.Length != 0) hash ^= Uname.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (Uid != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Uid); - } - if (Uname.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Uname); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Uid != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Uid); - } - if (Uname.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Uname); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Uid != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Uid); - } - if (Uname.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Uname); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(General other) { - if (other == null) { - return; - } - if (other.Uid != 0L) { - Uid = other.Uid; - } - if (other.Uname.Length != 0) { - Uname = other.Uname; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Uid = input.ReadInt64(); - break; - } - case 18: { - Uname = input.ReadString(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - Uid = input.ReadInt64(); + KillUnit = input.ReadInt64(); break; } - case 18: { - Uname = input.ReadString(); + case 56: { + DeKillUnit = input.ReadInt64(); break; } } @@ -1534,7 +1295,6 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StatPvPReportResp(StatPvPReportResp other) : this() { - general_ = other.general_ != null ? other.general_.Clone() : null; winItems_ = other.winItems_.Clone(); lostItems_ = other.lostItems_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -1546,25 +1306,10 @@ namespace Pb.Game.Zhg { return new StatPvPReportResp(this); } - /// Field number for the "general" field. - public const int GeneralFieldNumber = 1; - private global::Pb.Game.Zhg.StatPvPReportResp.Types.Item general_; - /// - /// 名将 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Game.Zhg.StatPvPReportResp.Types.Item General { - get { return general_; } - set { - general_ = value; - } - } - /// Field number for the "winItems" field. - public const int WinItemsFieldNumber = 10; + public const int WinItemsFieldNumber = 1; private static readonly pb::FieldCodec _repeated_winItems_codec - = pb::FieldCodec.ForMessage(82, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); + = pb::FieldCodec.ForMessage(10, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); private readonly pbc::RepeatedField winItems_ = new pbc::RepeatedField(); /// /// 获胜方数据 @@ -1576,9 +1321,9 @@ namespace Pb.Game.Zhg { } /// Field number for the "lostItems" field. - public const int LostItemsFieldNumber = 11; + public const int LostItemsFieldNumber = 2; private static readonly pb::FieldCodec _repeated_lostItems_codec - = pb::FieldCodec.ForMessage(90, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); + = pb::FieldCodec.ForMessage(18, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); private readonly pbc::RepeatedField lostItems_ = new pbc::RepeatedField(); /// /// 战败方数据 @@ -1604,7 +1349,6 @@ namespace Pb.Game.Zhg { if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(General, other.General)) return false; if(!winItems_.Equals(other.winItems_)) return false; if(!lostItems_.Equals(other.lostItems_)) return false; return Equals(_unknownFields, other._unknownFields); @@ -1614,7 +1358,6 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (general_ != null) hash ^= General.GetHashCode(); hash ^= winItems_.GetHashCode(); hash ^= lostItems_.GetHashCode(); if (_unknownFields != null) { @@ -1635,10 +1378,6 @@ namespace Pb.Game.Zhg { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (general_ != null) { - output.WriteRawTag(10); - output.WriteMessage(General); - } winItems_.WriteTo(output, _repeated_winItems_codec); lostItems_.WriteTo(output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -1651,10 +1390,6 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (general_ != null) { - output.WriteRawTag(10); - output.WriteMessage(General); - } winItems_.WriteTo(ref output, _repeated_winItems_codec); lostItems_.WriteTo(ref output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -1667,9 +1402,6 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (general_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(General); - } size += winItems_.CalculateSize(_repeated_winItems_codec); size += lostItems_.CalculateSize(_repeated_lostItems_codec); if (_unknownFields != null) { @@ -1684,12 +1416,6 @@ namespace Pb.Game.Zhg { if (other == null) { return; } - if (other.general_ != null) { - if (general_ == null) { - General = new global::Pb.Game.Zhg.StatPvPReportResp.Types.Item(); - } - General.MergeFrom(other.General); - } winItems_.Add(other.winItems_); lostItems_.Add(other.lostItems_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1708,17 +1434,10 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - if (general_ == null) { - General = new global::Pb.Game.Zhg.StatPvPReportResp.Types.Item(); - } - input.ReadMessage(General); - break; - } - case 82: { winItems_.AddEntriesFrom(input, _repeated_winItems_codec); break; } - case 90: { + case 18: { lostItems_.AddEntriesFrom(input, _repeated_lostItems_codec); break; } @@ -1738,17 +1457,10 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - if (general_ == null) { - General = new global::Pb.Game.Zhg.StatPvPReportResp.Types.Item(); - } - input.ReadMessage(General); - break; - } - case 82: { winItems_.AddEntriesFrom(ref input, _repeated_winItems_codec); break; } - case 90: { + case 18: { lostItems_.AddEntriesFrom(ref input, _repeated_lostItems_codec); break; } @@ -1798,7 +1510,13 @@ namespace Pb.Game.Zhg { public Item(Item other) : this() { uid_ = other.uid_; uname_ = other.uname_; - addonIntegral_ = other.addonIntegral_; + position_ = other.position_; + returnsIntegral_ = other.returnsIntegral_; + rewardPoolIntegral_ = other.rewardPoolIntegral_; + generalIntegral_ = other.generalIntegral_; + nobilityIntegral_ = other.nobilityIntegral_; + battleIntegral_ = other.battleIntegral_; + totalIntegral_ = other.totalIntegral_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1838,18 +1556,108 @@ namespace Pb.Game.Zhg { } } - /// Field number for the "addonIntegral" field. - public const int AddonIntegralFieldNumber = 3; - private long addonIntegral_; + /// Field number for the "position" field. + public const int PositionFieldNumber = 3; + private int position_; /// - /// 本次获取的积分 + /// 名次(特指在某一方的名次) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long AddonIntegral { - get { return addonIntegral_; } + public int Position { + get { return position_; } set { - addonIntegral_ = value; + position_ = value; + } + } + + /// Field number for the "returnsIntegral" field. + public const int ReturnsIntegralFieldNumber = 4; + private long returnsIntegral_; + /// + /// 回收的积分(获胜方才能回收,0不要展示) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ReturnsIntegral { + get { return returnsIntegral_; } + set { + returnsIntegral_ = value; + } + } + + /// Field number for the "rewardPoolIntegral" field. + public const int RewardPoolIntegralFieldNumber = 5; + private long rewardPoolIntegral_; + /// + /// 瓜分奖池分 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RewardPoolIntegral { + get { return rewardPoolIntegral_; } + set { + rewardPoolIntegral_ = value; + } + } + + /// Field number for the "generalIntegral" field. + public const int GeneralIntegralFieldNumber = 6; + private long generalIntegral_; + /// + /// 名将 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long GeneralIntegral { + get { return generalIntegral_; } + set { + generalIntegral_ = value; + } + } + + /// Field number for the "nobilityIntegral" field. + public const int NobilityIntegralFieldNumber = 7; + private long nobilityIntegral_; + /// + /// 舰长|总督|贵族 加成分 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NobilityIntegral { + get { return nobilityIntegral_; } + set { + nobilityIntegral_ = value; + } + } + + /// Field number for the "battleIntegral" field. + public const int BattleIntegralFieldNumber = 8; + private long battleIntegral_; + /// + /// 战斗结算奖励(普通) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BattleIntegral { + get { return battleIntegral_; } + set { + battleIntegral_ = value; + } + } + + /// Field number for the "totalIntegral" field. + public const int TotalIntegralFieldNumber = 10; + private long totalIntegral_; + /// + /// 总计加分 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TotalIntegral { + get { return totalIntegral_; } + set { + totalIntegral_ = value; } } @@ -1870,7 +1678,13 @@ namespace Pb.Game.Zhg { } if (Uid != other.Uid) return false; if (Uname != other.Uname) return false; - if (AddonIntegral != other.AddonIntegral) return false; + if (Position != other.Position) return false; + if (ReturnsIntegral != other.ReturnsIntegral) return false; + if (RewardPoolIntegral != other.RewardPoolIntegral) return false; + if (GeneralIntegral != other.GeneralIntegral) return false; + if (NobilityIntegral != other.NobilityIntegral) return false; + if (BattleIntegral != other.BattleIntegral) return false; + if (TotalIntegral != other.TotalIntegral) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1880,7 +1694,13 @@ namespace Pb.Game.Zhg { int hash = 1; if (Uid != 0L) hash ^= Uid.GetHashCode(); if (Uname.Length != 0) hash ^= Uname.GetHashCode(); - if (AddonIntegral != 0L) hash ^= AddonIntegral.GetHashCode(); + if (Position != 0) hash ^= Position.GetHashCode(); + if (ReturnsIntegral != 0L) hash ^= ReturnsIntegral.GetHashCode(); + if (RewardPoolIntegral != 0L) hash ^= RewardPoolIntegral.GetHashCode(); + if (GeneralIntegral != 0L) hash ^= GeneralIntegral.GetHashCode(); + if (NobilityIntegral != 0L) hash ^= NobilityIntegral.GetHashCode(); + if (BattleIntegral != 0L) hash ^= BattleIntegral.GetHashCode(); + if (TotalIntegral != 0L) hash ^= TotalIntegral.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1907,9 +1727,33 @@ namespace Pb.Game.Zhg { output.WriteRawTag(18); output.WriteString(Uname); } - if (AddonIntegral != 0L) { + if (Position != 0) { output.WriteRawTag(24); - output.WriteInt64(AddonIntegral); + output.WriteInt32(Position); + } + if (ReturnsIntegral != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ReturnsIntegral); + } + if (RewardPoolIntegral != 0L) { + output.WriteRawTag(40); + output.WriteInt64(RewardPoolIntegral); + } + if (GeneralIntegral != 0L) { + output.WriteRawTag(48); + output.WriteInt64(GeneralIntegral); + } + if (NobilityIntegral != 0L) { + output.WriteRawTag(56); + output.WriteInt64(NobilityIntegral); + } + if (BattleIntegral != 0L) { + output.WriteRawTag(64); + output.WriteInt64(BattleIntegral); + } + if (TotalIntegral != 0L) { + output.WriteRawTag(80); + output.WriteInt64(TotalIntegral); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1929,9 +1773,33 @@ namespace Pb.Game.Zhg { output.WriteRawTag(18); output.WriteString(Uname); } - if (AddonIntegral != 0L) { + if (Position != 0) { output.WriteRawTag(24); - output.WriteInt64(AddonIntegral); + output.WriteInt32(Position); + } + if (ReturnsIntegral != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ReturnsIntegral); + } + if (RewardPoolIntegral != 0L) { + output.WriteRawTag(40); + output.WriteInt64(RewardPoolIntegral); + } + if (GeneralIntegral != 0L) { + output.WriteRawTag(48); + output.WriteInt64(GeneralIntegral); + } + if (NobilityIntegral != 0L) { + output.WriteRawTag(56); + output.WriteInt64(NobilityIntegral); + } + if (BattleIntegral != 0L) { + output.WriteRawTag(64); + output.WriteInt64(BattleIntegral); + } + if (TotalIntegral != 0L) { + output.WriteRawTag(80); + output.WriteInt64(TotalIntegral); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -1949,8 +1817,26 @@ namespace Pb.Game.Zhg { if (Uname.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Uname); } - if (AddonIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(AddonIntegral); + if (Position != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Position); + } + if (ReturnsIntegral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ReturnsIntegral); + } + if (RewardPoolIntegral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RewardPoolIntegral); + } + if (GeneralIntegral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(GeneralIntegral); + } + if (NobilityIntegral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NobilityIntegral); + } + if (BattleIntegral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleIntegral); + } + if (TotalIntegral != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TotalIntegral); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1970,8 +1856,26 @@ namespace Pb.Game.Zhg { if (other.Uname.Length != 0) { Uname = other.Uname; } - if (other.AddonIntegral != 0L) { - AddonIntegral = other.AddonIntegral; + if (other.Position != 0) { + Position = other.Position; + } + if (other.ReturnsIntegral != 0L) { + ReturnsIntegral = other.ReturnsIntegral; + } + if (other.RewardPoolIntegral != 0L) { + RewardPoolIntegral = other.RewardPoolIntegral; + } + if (other.GeneralIntegral != 0L) { + GeneralIntegral = other.GeneralIntegral; + } + if (other.NobilityIntegral != 0L) { + NobilityIntegral = other.NobilityIntegral; + } + if (other.BattleIntegral != 0L) { + BattleIntegral = other.BattleIntegral; + } + if (other.TotalIntegral != 0L) { + TotalIntegral = other.TotalIntegral; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1997,7 +1901,31 @@ namespace Pb.Game.Zhg { break; } case 24: { - AddonIntegral = input.ReadInt64(); + Position = input.ReadInt32(); + break; + } + case 32: { + ReturnsIntegral = input.ReadInt64(); + break; + } + case 40: { + RewardPoolIntegral = input.ReadInt64(); + break; + } + case 48: { + GeneralIntegral = input.ReadInt64(); + break; + } + case 56: { + NobilityIntegral = input.ReadInt64(); + break; + } + case 64: { + BattleIntegral = input.ReadInt64(); + break; + } + case 80: { + TotalIntegral = input.ReadInt64(); break; } } @@ -2024,7 +1952,31 @@ namespace Pb.Game.Zhg { break; } case 24: { - AddonIntegral = input.ReadInt64(); + Position = input.ReadInt32(); + break; + } + case 32: { + ReturnsIntegral = input.ReadInt64(); + break; + } + case 40: { + RewardPoolIntegral = input.ReadInt64(); + break; + } + case 48: { + GeneralIntegral = input.ReadInt64(); + break; + } + case 56: { + NobilityIntegral = input.ReadInt64(); + break; + } + case 64: { + BattleIntegral = input.ReadInt64(); + break; + } + case 80: { + TotalIntegral = input.ReadInt64(); break; } } diff --git a/game/pb/game/zhg/rank.pb.go b/game/pb/game/zhg/rank.pb.go index 246ecb9..03b3e5e 100644 --- a/game/pb/game/zhg/rank.pb.go +++ b/game/pb/game/zhg/rank.pb.go @@ -211,7 +211,7 @@ func (x *RankPvpResp) GetItems() []*RankPvpResp_Item { return nil } -// RankRvpSubmitResult 排行榜结算 push -> rank.submit 命令(排行榜结算) +// RankRvpSubmitResult 排行榜结算结果通知 push -> rank.submit 命令(排行榜结算) type RankRvpSubmitResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/game/pb/game/zhg/rank.proto b/game/pb/game/zhg/rank.proto index f1b2191..385b3e1 100644 --- a/game/pb/game/zhg/rank.proto +++ b/game/pb/game/zhg/rank.proto @@ -38,7 +38,7 @@ message RankPvpResp { repeated Item items = 2; // rank数据 } -// RankRvpSubmitResult 排行榜结算 push -> rank.submit 命令(排行榜结算) +// RankRvpSubmitResult 排行榜结算结果通知 push -> rank.submit 命令(排行榜结算) message RankRvpSubmitResult { // Reward 具体奖励 message Reward { diff --git a/game/pb/game/zhg/stat.pb.go b/game/pb/game/zhg/stat.pb.go index 2fd0d40..6c8c071 100644 --- a/game/pb/game/zhg/stat.pb.go +++ b/game/pb/game/zhg/stat.pb.go @@ -146,10 +146,9 @@ type StatPvPReportReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 - General *StatPvPReportReq_General `protobuf:"bytes,2,opt,name=general,proto3" json:"general,omitempty"` - WinItems []*StatPvPReportReq_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 - LostItems []*StatPvPReportReq_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 + WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 + WinItems []*StatPvPReportReq_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 + LostItems []*StatPvPReportReq_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 } func (x *StatPvPReportReq) Reset() { @@ -191,13 +190,6 @@ func (x *StatPvPReportReq) GetWinCamp() int32 { return 0 } -func (x *StatPvPReportReq) GetGeneral() *StatPvPReportReq_General { - if x != nil { - return x.General - } - return nil -} - func (x *StatPvPReportReq) GetWinItems() []*StatPvPReportReq_Item { if x != nil { return x.WinItems @@ -218,9 +210,8 @@ type StatPvPReportResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - General *StatPvPReportResp_Item `protobuf:"bytes,1,opt,name=general,proto3" json:"general,omitempty"` // 名将 - WinItems []*StatPvPReportResp_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 - LostItems []*StatPvPReportResp_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 + WinItems []*StatPvPReportResp_Item `protobuf:"bytes,1,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 + LostItems []*StatPvPReportResp_Item `protobuf:"bytes,2,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 } func (x *StatPvPReportResp) Reset() { @@ -255,13 +246,6 @@ func (*StatPvPReportResp) Descriptor() ([]byte, []int) { return file_game_zhg_stat_proto_rawDescGZIP(), []int{3} } -func (x *StatPvPReportResp) GetGeneral() *StatPvPReportResp_Item { - if x != nil { - return x.General - } - return nil -} - func (x *StatPvPReportResp) GetWinItems() []*StatPvPReportResp_Item { if x != nil { return x.WinItems @@ -283,10 +267,11 @@ type StatPvPReportReq_Item struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - Damage int64 `protobuf:"varint,3,opt,name=damage,proto3" json:"damage,omitempty"` // 伤害量 - DeDamage int64 `protobuf:"varint,4,opt,name=deDamage,proto3" json:"deDamage,omitempty"` // 承受伤害 - KillUnit int64 `protobuf:"varint,5,opt,name=killUnit,proto3" json:"killUnit,omitempty"` // 击杀单位数量 - DeKillUnit int64 `protobuf:"varint,6,opt,name=deKillUnit,proto3" json:"deKillUnit,omitempty"` // 被杀单位数量 + Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) + Damage int64 `protobuf:"varint,4,opt,name=damage,proto3" json:"damage,omitempty"` // 伤害量 + DeDamage int64 `protobuf:"varint,5,opt,name=deDamage,proto3" json:"deDamage,omitempty"` // 承受伤害 + KillUnit int64 `protobuf:"varint,6,opt,name=killUnit,proto3" json:"killUnit,omitempty"` // 击杀单位数量 + DeKillUnit int64 `protobuf:"varint,7,opt,name=deKillUnit,proto3" json:"deKillUnit,omitempty"` // 被杀单位数量 } func (x *StatPvPReportReq_Item) Reset() { @@ -335,6 +320,13 @@ func (x *StatPvPReportReq_Item) GetUname() string { return "" } +func (x *StatPvPReportReq_Item) GetPosition() int32 { + if x != nil { + return x.Position + } + return 0 +} + func (x *StatPvPReportReq_Item) GetDamage() int64 { if x != nil { return x.Damage @@ -363,17 +355,24 @@ func (x *StatPvPReportReq_Item) GetDeKillUnit() int64 { return 0 } -type StatPvPReportReq_General struct { +type StatPvPReportResp_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 名将UID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 名将用户名 + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 + Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) + ReturnsIntegral int64 `protobuf:"varint,4,opt,name=returnsIntegral,proto3" json:"returnsIntegral,omitempty"` // 回收的积分(获胜方才能回收,0不要展示) + RewardPoolIntegral int64 `protobuf:"varint,5,opt,name=rewardPoolIntegral,proto3" json:"rewardPoolIntegral,omitempty"` // 瓜分奖池分 + GeneralIntegral int64 `protobuf:"varint,6,opt,name=generalIntegral,proto3" json:"generalIntegral,omitempty"` // 名将 + NobilityIntegral int64 `protobuf:"varint,7,opt,name=nobilityIntegral,proto3" json:"nobilityIntegral,omitempty"` // 舰长|总督|贵族 加成分 + BattleIntegral int64 `protobuf:"varint,8,opt,name=battleIntegral,proto3" json:"battleIntegral,omitempty"` // 战斗结算奖励(普通) + TotalIntegral int64 `protobuf:"varint,10,opt,name=totalIntegral,proto3" json:"totalIntegral,omitempty"` // 总计加分 } -func (x *StatPvPReportReq_General) Reset() { - *x = StatPvPReportReq_General{} +func (x *StatPvPReportResp_Item) Reset() { + *x = StatPvPReportResp_Item{} if protoimpl.UnsafeEnabled { mi := &file_game_zhg_stat_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -381,13 +380,13 @@ func (x *StatPvPReportReq_General) Reset() { } } -func (x *StatPvPReportReq_General) String() string { +func (x *StatPvPReportResp_Item) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatPvPReportReq_General) ProtoMessage() {} +func (*StatPvPReportResp_Item) ProtoMessage() {} -func (x *StatPvPReportReq_General) ProtoReflect() protoreflect.Message { +func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { mi := &file_game_zhg_stat_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -399,84 +398,70 @@ func (x *StatPvPReportReq_General) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatPvPReportReq_General.ProtoReflect.Descriptor instead. -func (*StatPvPReportReq_General) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{2, 1} +// Deprecated: Use StatPvPReportResp_Item.ProtoReflect.Descriptor instead. +func (*StatPvPReportResp_Item) Descriptor() ([]byte, []int) { + return file_game_zhg_stat_proto_rawDescGZIP(), []int{3, 0} } -func (x *StatPvPReportReq_General) GetUid() int64 { +func (x *StatPvPReportResp_Item) GetUid() int64 { if x != nil { return x.Uid } return 0 } -func (x *StatPvPReportReq_General) GetUname() string { +func (x *StatPvPReportResp_Item) GetUname() string { if x != nil { return x.Uname } return "" } -type StatPvPReportResp_Item struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - AddonIntegral int64 `protobuf:"varint,3,opt,name=addonIntegral,proto3" json:"addonIntegral,omitempty"` // 本次获取的积分 -} - -func (x *StatPvPReportResp_Item) Reset() { - *x = StatPvPReportResp_Item{} - if protoimpl.UnsafeEnabled { - mi := &file_game_zhg_stat_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *StatPvPReportResp_Item) GetPosition() int32 { + if x != nil { + return x.Position } + return 0 } -func (x *StatPvPReportResp_Item) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *StatPvPReportResp_Item) GetReturnsIntegral() int64 { + if x != nil { + return x.ReturnsIntegral + } + return 0 } -func (*StatPvPReportResp_Item) ProtoMessage() {} - -func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_game_zhg_stat_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *StatPvPReportResp_Item) GetRewardPoolIntegral() int64 { + if x != nil { + return x.RewardPoolIntegral } - return mi.MessageOf(x) + return 0 } -// Deprecated: Use StatPvPReportResp_Item.ProtoReflect.Descriptor instead. -func (*StatPvPReportResp_Item) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{3, 0} +func (x *StatPvPReportResp_Item) GetGeneralIntegral() int64 { + if x != nil { + return x.GeneralIntegral + } + return 0 } -func (x *StatPvPReportResp_Item) GetUid() int64 { +func (x *StatPvPReportResp_Item) GetNobilityIntegral() int64 { if x != nil { - return x.Uid + return x.NobilityIntegral } return 0 } -func (x *StatPvPReportResp_Item) GetUname() string { +func (x *StatPvPReportResp_Item) GetBattleIntegral() int64 { if x != nil { - return x.Uname + return x.BattleIntegral } - return "" + return 0 } -func (x *StatPvPReportResp_Item) GetAddonIntegral() int64 { +func (x *StatPvPReportResp_Item) GetTotalIntegral() int64 { if x != nil { - return x.AddonIntegral + return x.TotalIntegral } return 0 } @@ -495,57 +480,63 @@ var file_game_zhg_stat_proto_rawDesc = []byte{ 0x39, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xc3, 0x03, 0x0a, 0x10, 0x53, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xeb, 0x02, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x3f, 0x0a, 0x07, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x62, 0x2e, - 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x6c, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x08, 0x77, 0x69, - 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, + 0x52, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x08, 0x77, 0x69, 0x6e, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x62, + 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, + 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x6c, 0x6f, 0x73, + 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, - 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x09, 0x6c, 0x6f, - 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, - 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x9e, 0x01, 0x0a, - 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, - 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x1a, 0x31, 0x0a, - 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0xac, 0x02, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, - 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x07, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x3f, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, - 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x77, 0x69, - 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, - 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x67, - 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, - 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x54, 0x0a, 0x04, 0x49, 0x74, 0x65, - 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x64, 0x64, - 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x61, 0x64, 0x64, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, - 0x20, 0x5a, 0x1e, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x67, - 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, - 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0xba, 0x01, 0x0a, 0x04, + 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, + 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x4b, 0x69, + 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x64, 0x65, + 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x22, 0xe2, 0x03, 0x0a, 0x11, 0x53, 0x74, 0x61, + 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3f, + 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x41, 0x0a, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, + 0x6d, 0x73, 0x1a, 0xc8, 0x02, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, + 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x6f, + 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, + 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, + 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, + 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x20, 0x5a, + 0x1e, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, + 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -560,28 +551,25 @@ func file_game_zhg_stat_proto_rawDescGZIP() []byte { return file_game_zhg_stat_proto_rawDescData } -var file_game_zhg_stat_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_game_zhg_stat_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_game_zhg_stat_proto_goTypes = []interface{}{ - (*StatPvPKill)(nil), // 0: pb.game.zhg.StatPvPKill - (*StatPvPFirstBlood)(nil), // 1: pb.game.zhg.StatPvPFirstBlood - (*StatPvPReportReq)(nil), // 2: pb.game.zhg.StatPvPReportReq - (*StatPvPReportResp)(nil), // 3: pb.game.zhg.StatPvPReportResp - (*StatPvPReportReq_Item)(nil), // 4: pb.game.zhg.StatPvPReportReq.Item - (*StatPvPReportReq_General)(nil), // 5: pb.game.zhg.StatPvPReportReq.General - (*StatPvPReportResp_Item)(nil), // 6: pb.game.zhg.StatPvPReportResp.Item + (*StatPvPKill)(nil), // 0: pb.game.zhg.StatPvPKill + (*StatPvPFirstBlood)(nil), // 1: pb.game.zhg.StatPvPFirstBlood + (*StatPvPReportReq)(nil), // 2: pb.game.zhg.StatPvPReportReq + (*StatPvPReportResp)(nil), // 3: pb.game.zhg.StatPvPReportResp + (*StatPvPReportReq_Item)(nil), // 4: pb.game.zhg.StatPvPReportReq.Item + (*StatPvPReportResp_Item)(nil), // 5: pb.game.zhg.StatPvPReportResp.Item } var file_game_zhg_stat_proto_depIdxs = []int32{ - 5, // 0: pb.game.zhg.StatPvPReportReq.general:type_name -> pb.game.zhg.StatPvPReportReq.General - 4, // 1: pb.game.zhg.StatPvPReportReq.winItems:type_name -> pb.game.zhg.StatPvPReportReq.Item - 4, // 2: pb.game.zhg.StatPvPReportReq.lostItems:type_name -> pb.game.zhg.StatPvPReportReq.Item - 6, // 3: pb.game.zhg.StatPvPReportResp.general:type_name -> pb.game.zhg.StatPvPReportResp.Item - 6, // 4: pb.game.zhg.StatPvPReportResp.winItems:type_name -> pb.game.zhg.StatPvPReportResp.Item - 6, // 5: pb.game.zhg.StatPvPReportResp.lostItems:type_name -> pb.game.zhg.StatPvPReportResp.Item - 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 + 4, // 0: pb.game.zhg.StatPvPReportReq.winItems:type_name -> pb.game.zhg.StatPvPReportReq.Item + 4, // 1: pb.game.zhg.StatPvPReportReq.lostItems:type_name -> pb.game.zhg.StatPvPReportReq.Item + 5, // 2: pb.game.zhg.StatPvPReportResp.winItems:type_name -> pb.game.zhg.StatPvPReportResp.Item + 5, // 3: pb.game.zhg.StatPvPReportResp.lostItems:type_name -> pb.game.zhg.StatPvPReportResp.Item + 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_game_zhg_stat_proto_init() } @@ -651,18 +639,6 @@ func file_game_zhg_stat_proto_init() { } } file_game_zhg_stat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq_General); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_game_zhg_stat_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatPvPReportResp_Item); i { case 0: return &v.state @@ -681,7 +657,7 @@ func file_game_zhg_stat_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_zhg_stat_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/game/zhg/stat.proto b/game/pb/game/zhg/stat.proto index 6f3ce3a..cca2094 100644 --- a/game/pb/game/zhg/stat.proto +++ b/game/pb/game/zhg/stat.proto @@ -22,17 +22,13 @@ message StatPvPReportReq { message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 - int64 damage = 3; // 伤害量 - int64 deDamage = 4; // 承受伤害 - int64 killUnit = 5; // 击杀单位数量 - int64 deKillUnit = 6; // 被杀单位数量 - } - message General { - int64 uid = 1; // 名将UID - string uname = 2; // 名将用户名 + int32 position = 3; // 名次(特指在某一方的名次) + int64 damage = 4; // 伤害量 + int64 deDamage = 5; // 承受伤害 + int64 killUnit = 6; // 击杀单位数量 + int64 deKillUnit = 7; // 被杀单位数量 } int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 - General general = 2; repeated Item winItems = 10; // 获胜方数据 repeated Item lostItems = 11; // 战败方数据 } @@ -42,9 +38,14 @@ message StatPvPReportResp { message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 - int64 addonIntegral = 3; // 本次获取的积分 + int32 position = 3; // 名次(特指在某一方的名次) + int64 returnsIntegral = 4; // 回收的积分(获胜方才能回收,0不要展示) + int64 rewardPoolIntegral = 5; // 瓜分奖池分 + int64 generalIntegral = 6; // 名将 + int64 nobilityIntegral = 7; // 舰长|总督|贵族 加成分 + int64 battleIntegral = 8; // 战斗结算奖励(普通) + int64 totalIntegral = 10; // 总计加分 } - Item general = 1; // 名将 - repeated Item winItems = 10; // 获胜方数据 - repeated Item lostItems = 11; // 战败方数据 + repeated Item winItems = 1; // 获胜方数据 + repeated Item lostItems = 2; // 战败方数据 } \ No newline at end of file diff --git a/game/pb/mq/mq.pb.go b/game/pb/mq/mq.pb.go index 51d4b2b..c13287f 100644 --- a/game/pb/mq/mq.pb.go +++ b/game/pb/mq/mq.pb.go @@ -72,6 +72,133 @@ func (Platform) EnumDescriptor() ([]byte, []int) { return file_mq_mq_proto_rawDescGZIP(), []int{0} } +type MqGuardBuy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` + LiveRoomId int64 `protobuf:"varint,2,opt,name=liveRoomId,proto3" json:"liveRoomId,omitempty"` + Uid int64 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` + Uname string `protobuf:"bytes,4,opt,name=uname,proto3" json:"uname,omitempty"` + GuardLevel int32 `protobuf:"varint,5,opt,name=guardLevel,proto3" json:"guardLevel,omitempty"` + Num int32 `protobuf:"varint,6,opt,name=num,proto3" json:"num,omitempty"` + Price int64 `protobuf:"varint,7,opt,name=price,proto3" json:"price,omitempty"` + GiftId int64 `protobuf:"varint,8,opt,name=giftId,proto3" json:"giftId,omitempty"` + GiftName string `protobuf:"bytes,9,opt,name=giftName,proto3" json:"giftName,omitempty"` + StartTime int64 `protobuf:"varint,10,opt,name=startTime,proto3" json:"startTime,omitempty"` + EndTime int64 `protobuf:"varint,11,opt,name=endTime,proto3" json:"endTime,omitempty"` +} + +func (x *MqGuardBuy) Reset() { + *x = MqGuardBuy{} + if protoimpl.UnsafeEnabled { + mi := &file_mq_mq_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MqGuardBuy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MqGuardBuy) ProtoMessage() {} + +func (x *MqGuardBuy) ProtoReflect() protoreflect.Message { + mi := &file_mq_mq_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 MqGuardBuy.ProtoReflect.Descriptor instead. +func (*MqGuardBuy) Descriptor() ([]byte, []int) { + return file_mq_mq_proto_rawDescGZIP(), []int{0} +} + +func (x *MqGuardBuy) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *MqGuardBuy) GetLiveRoomId() int64 { + if x != nil { + return x.LiveRoomId + } + return 0 +} + +func (x *MqGuardBuy) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *MqGuardBuy) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *MqGuardBuy) GetGuardLevel() int32 { + if x != nil { + return x.GuardLevel + } + return 0 +} + +func (x *MqGuardBuy) GetNum() int32 { + if x != nil { + return x.Num + } + return 0 +} + +func (x *MqGuardBuy) GetPrice() int64 { + if x != nil { + return x.Price + } + return 0 +} + +func (x *MqGuardBuy) GetGiftId() int64 { + if x != nil { + return x.GiftId + } + return 0 +} + +func (x *MqGuardBuy) GetGiftName() string { + if x != nil { + return x.GiftName + } + return "" +} + +func (x *MqGuardBuy) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *MqGuardBuy) GetEndTime() int64 { + if x != nil { + return x.EndTime + } + return 0 +} + type MqDanmaku struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -88,7 +215,7 @@ type MqDanmaku struct { func (x *MqDanmaku) Reset() { *x = MqDanmaku{} if protoimpl.UnsafeEnabled { - mi := &file_mq_mq_proto_msgTypes[0] + mi := &file_mq_mq_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +228,7 @@ func (x *MqDanmaku) String() string { func (*MqDanmaku) ProtoMessage() {} func (x *MqDanmaku) ProtoReflect() protoreflect.Message { - mi := &file_mq_mq_proto_msgTypes[0] + mi := &file_mq_mq_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,7 +241,7 @@ func (x *MqDanmaku) ProtoReflect() protoreflect.Message { // Deprecated: Use MqDanmaku.ProtoReflect.Descriptor instead. func (*MqDanmaku) Descriptor() ([]byte, []int) { - return file_mq_mq_proto_rawDescGZIP(), []int{0} + return file_mq_mq_proto_rawDescGZIP(), []int{1} } func (x *MqDanmaku) GetPlatform() string { @@ -178,7 +305,7 @@ type MqGift struct { func (x *MqGift) Reset() { *x = MqGift{} if protoimpl.UnsafeEnabled { - mi := &file_mq_mq_proto_msgTypes[1] + mi := &file_mq_mq_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -191,7 +318,7 @@ func (x *MqGift) String() string { func (*MqGift) ProtoMessage() {} func (x *MqGift) ProtoReflect() protoreflect.Message { - mi := &file_mq_mq_proto_msgTypes[1] + mi := &file_mq_mq_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -204,7 +331,7 @@ func (x *MqGift) ProtoReflect() protoreflect.Message { // Deprecated: Use MqGift.ProtoReflect.Descriptor instead. func (*MqGift) Descriptor() ([]byte, []int) { - return file_mq_mq_proto_rawDescGZIP(), []int{1} + return file_mq_mq_proto_rawDescGZIP(), []int{2} } func (x *MqGift) GetPlatform() string { @@ -270,41 +397,169 @@ func (x *MqGift) GetIsPaid() bool { return false } +type MqRewardPool struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WelfarePool int64 `protobuf:"varint,1,opt,name=welfarePool,proto3" json:"welfarePool,omitempty"` // 福利池,与战局无关 + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战局ID + InitReward int64 `protobuf:"varint,3,opt,name=initReward,proto3" json:"initReward,omitempty"` // 初始奖池 + GiftReward int64 `protobuf:"varint,4,opt,name=giftReward,proto3" json:"giftReward,omitempty"` // 礼物奖池 + BattleReward int64 `protobuf:"varint,5,opt,name=battleReward,proto3" json:"battleReward,omitempty"` // 战斗奖池 + OtherReward int64 `protobuf:"varint,6,opt,name=otherReward,proto3" json:"otherReward,omitempty"` // 其它奖池 + AllRewards int64 `protobuf:"varint,10,opt,name=allRewards,proto3" json:"allRewards,omitempty"` // 所有奖池 +} + +func (x *MqRewardPool) Reset() { + *x = MqRewardPool{} + if protoimpl.UnsafeEnabled { + mi := &file_mq_mq_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MqRewardPool) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MqRewardPool) ProtoMessage() {} + +func (x *MqRewardPool) ProtoReflect() protoreflect.Message { + mi := &file_mq_mq_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 MqRewardPool.ProtoReflect.Descriptor instead. +func (*MqRewardPool) Descriptor() ([]byte, []int) { + return file_mq_mq_proto_rawDescGZIP(), []int{3} +} + +func (x *MqRewardPool) GetWelfarePool() int64 { + if x != nil { + return x.WelfarePool + } + return 0 +} + +func (x *MqRewardPool) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + +func (x *MqRewardPool) GetInitReward() int64 { + if x != nil { + return x.InitReward + } + return 0 +} + +func (x *MqRewardPool) GetGiftReward() int64 { + if x != nil { + return x.GiftReward + } + return 0 +} + +func (x *MqRewardPool) GetBattleReward() int64 { + if x != nil { + return x.BattleReward + } + return 0 +} + +func (x *MqRewardPool) GetOtherReward() int64 { + if x != nil { + return x.OtherReward + } + return 0 +} + +func (x *MqRewardPool) GetAllRewards() int64 { + if x != nil { + return x.AllRewards + } + return 0 +} + var File_mq_mq_proto protoreflect.FileDescriptor var file_mq_mq_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x6d, 0x71, 0x2f, 0x6d, 0x71, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, - 0x62, 0x2e, 0x6d, 0x71, 0x22, 0xa5, 0x01, 0x0a, 0x09, 0x4d, 0x71, 0x44, 0x61, 0x6e, 0x6d, 0x61, - 0x6b, 0x75, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, - 0x0a, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xe0, 0x01, 0x0a, - 0x06, 0x4d, 0x71, 0x47, 0x69, 0x66, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x49, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, - 0x6d, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x67, - 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, - 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, - 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x2a, - 0x39, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0c, 0x0a, 0x08, 0x62, - 0x69, 0x6c, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x68, 0x75, 0x79, - 0x61, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x64, 0x6f, 0x75, 0x79, 0x75, 0x10, 0x02, 0x12, 0x0a, - 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x79, 0x69, 0x6e, 0x10, 0x03, 0x42, 0x15, 0x5a, 0x13, 0x64, 0x63, - 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x6d, 0x71, 0x3b, 0x70, 0x62, 0x4d, - 0x71, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0a, 0x0b, 0x6d, 0x71, 0x2f, 0x6d, 0x71, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, + 0x62, 0x22, 0xa4, 0x02, 0x0a, 0x0a, 0x4d, 0x71, 0x47, 0x75, 0x61, 0x72, 0x64, 0x42, 0x75, 0x79, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, + 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x75, 0x61, 0x72, 0x64, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, + 0x66, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xa5, 0x01, 0x0a, 0x09, 0x4d, 0x71, 0x44, + 0x61, 0x6e, 0x6d, 0x61, 0x6b, 0x75, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, 0x6f, 0x6f, 0x6d, + 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0xe0, 0x01, 0x0a, 0x06, 0x4d, 0x71, 0x47, 0x69, 0x66, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x69, 0x76, 0x65, 0x52, + 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x69, 0x76, + 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, + 0x61, 0x69, 0x64, 0x22, 0xf2, 0x01, 0x0a, 0x0c, 0x4d, 0x71, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x50, + 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x77, 0x65, 0x6c, 0x66, 0x61, + 0x72, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x67, 0x69, 0x66, 0x74, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x74, 0x68, + 0x65, 0x72, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2a, 0x39, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0c, 0x0a, 0x08, 0x62, 0x69, 0x6c, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x68, 0x75, 0x79, 0x61, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x64, 0x6f, 0x75, 0x79, 0x75, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x79, 0x69, + 0x6e, 0x10, 0x03, 0x42, 0x07, 0x5a, 0x05, 0x2f, 0x70, 0x62, 0x4d, 0x71, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -320,11 +575,13 @@ func file_mq_mq_proto_rawDescGZIP() []byte { } var file_mq_mq_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_mq_mq_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_mq_mq_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_mq_mq_proto_goTypes = []interface{}{ - (Platform)(0), // 0: pb.mq.Platform - (*MqDanmaku)(nil), // 1: pb.mq.MqDanmaku - (*MqGift)(nil), // 2: pb.mq.MqGift + (Platform)(0), // 0: pb.Platform + (*MqGuardBuy)(nil), // 1: pb.MqGuardBuy + (*MqDanmaku)(nil), // 2: pb.MqDanmaku + (*MqGift)(nil), // 3: pb.MqGift + (*MqRewardPool)(nil), // 4: pb.MqRewardPool } var file_mq_mq_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -341,7 +598,7 @@ func file_mq_mq_proto_init() { } if !protoimpl.UnsafeEnabled { file_mq_mq_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MqDanmaku); i { + switch v := v.(*MqGuardBuy); i { case 0: return &v.state case 1: @@ -353,6 +610,18 @@ func file_mq_mq_proto_init() { } } file_mq_mq_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MqDanmaku); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mq_mq_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MqGift); i { case 0: return &v.state @@ -364,6 +633,18 @@ func file_mq_mq_proto_init() { return nil } } + file_mq_mq_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MqRewardPool); 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{ @@ -371,7 +652,7 @@ func file_mq_mq_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mq_mq_proto_rawDesc, NumEnums: 1, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/mq/mq.proto b/game/pb/mq/mq.proto index c4f65c4..cd52905 100644 --- a/game/pb/mq/mq.proto +++ b/game/pb/mq/mq.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package pb.mq; +package pb; -option go_package = "dcg/game/pb/mq;pbMq"; +option go_package = "/pbMq"; enum Platform { bilibili = 0; // B站 @@ -11,6 +11,20 @@ enum Platform { douyin = 3; // 抖音 } +message MqGuardBuy { + string platform = 1; + int64 liveRoomId = 2; + int64 uid = 3; + string uname = 4; + int32 guardLevel = 5; + int32 num = 6; + int64 price = 7; + int64 giftId = 8; + string giftName = 9; + int64 startTime = 10; + int64 endTime = 11; +} + message MqDanmaku { string platform = 1; int64 liveRoomId = 2; @@ -30,4 +44,14 @@ message MqGift { string giftName = 7; int64 price = 8; bool isPaid = 9; +} + +message MqRewardPool { + int64 welfarePool = 1; // 福利池,与战局无关 + int64 battleId = 2; // 战局ID + int64 initReward = 3; // 初始奖池 + int64 giftReward = 4; // 礼物奖池 + int64 battleReward = 5; // 战斗奖池 + int64 otherReward = 6; // 其它奖池 + int64 allRewards = 10; // 所有奖池 } \ No newline at end of file diff --git a/go.mod b/go.mod index e20329e..6ba6658 100644 --- a/go.mod +++ b/go.mod @@ -7,16 +7,17 @@ require ( git.noahlan.cn/northlan/ntools-go/kafka v1.0.1 git.noahlan.cn/northlan/ntools-go/logger v1.0.1 git.noahlan.cn/northlan/ntools-go/stringn v1.1.0 + git.noahlan.cn/northlan/ntools-go/uuid v1.0.0 github.com/Shopify/sarama v1.32.0 github.com/golang/protobuf v1.5.2 github.com/gookit/config/v2 v2.1.0 + github.com/pkg/errors v0.9.1 github.com/zeromicro/go-zero v1.3.2 google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 ) require ( - git.noahlan.cn/northlan/ntools-go/uuid v1.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/coreos/go-semver v0.3.0 // indirect diff --git a/go.sum b/go.sum index 35456c1..99b69dc 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,6 @@ git.noahlan.cn/northlan/ntools-go/kafka v1.0.1 h1:SDUwYRzksZ3Vcu7PTZxk+TEMF2f3gB git.noahlan.cn/northlan/ntools-go/kafka v1.0.1/go.mod h1:RxX9JSUIr3Gbk+cvUwE5k+i08AgIK3TA9ayDJCMn2n8= git.noahlan.cn/northlan/ntools-go/logger v1.0.1 h1:+08dMbsKGECM1B7H8GqwtRzGqOl5yrNNbJYo9tFoMf0= git.noahlan.cn/northlan/ntools-go/logger v1.0.1/go.mod h1:QQwgylABV9P8MFGvXKlujJO5NV0MP0JUPzqQt3I0Y+w= -git.noahlan.cn/northlan/ntools-go/stringn v1.0.0 h1:kQlk6JkJSX2JRsxtji6Ht1f3FfwdJiFEJ52k0ehjR8s= -git.noahlan.cn/northlan/ntools-go/stringn v1.0.0/go.mod h1:71TA+fLLhTNGsZvX4Fd/YbV6UeYiliW5hxK+3a9wKko= git.noahlan.cn/northlan/ntools-go/stringn v1.1.0 h1:wcV/1RAUxEX17CDBPs9HmgY+HFtTX0jJoM6n9Q4Nj70= git.noahlan.cn/northlan/ntools-go/stringn v1.1.0/go.mod h1:71TA+fLLhTNGsZvX4Fd/YbV6UeYiliW5hxK+3a9wKko= git.noahlan.cn/northlan/ntools-go/uuid v1.0.0 h1:C0PazSzG3+e/Hfh2C6Qf8R46sNZmZKTOcWS990yUmrE=