refactor: 重构,新增游戏管理器,房间管理器,数据管理器。

main
NorthLan 2 years ago
parent 75881dfbb0
commit 0368a2da91

File diff suppressed because it is too large Load Diff

@ -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);
}

@ -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",

@ -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...)
}

@ -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", "开炮" ]

@ -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 // 直播间对应模式(临时)

@ -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,
})
}

@ -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)
}

@ -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)
}

@ -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
}

@ -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
}

@ -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,
})
}

@ -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,

@ -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",
})
}

@ -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,

@ -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,
})

@ -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
}

@ -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()
}

@ -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
}

@ -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 房间内分发消息

@ -0,0 +1,7 @@
package manager
const (
RoomKey = "ROOM"
LiveRoomIdKey = "LIVE_ROOM_ID"
DataKey = "DATA"
)

@ -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)
}

@ -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
}

@ -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
}

File diff suppressed because it is too large Load Diff

@ -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,
},

@ -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; //
}

@ -876,7 +876,7 @@ namespace Pb.Game.Zhg {
}
/// <summary>
/// RankRvpSubmitResult 排行榜结算 push -> rank.submit 命令(排行榜结算)
/// RankRvpSubmitResult 排行榜结算结果通知 push -> rank.submit 命令(排行榜结算)
/// </summary>
public sealed partial class RankRvpSubmitResult : pb::IMessage<RankRvpSubmitResult>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE

File diff suppressed because it is too large Load Diff

@ -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

@ -38,7 +38,7 @@ message RankPvpResp {
repeated Item items = 2; // rank
}
// RankRvpSubmitResult push -> rank.submit ()
// RankRvpSubmitResult push -> rank.submit ()
message RankRvpSubmitResult {
// Reward
message Reward {

@ -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,
},

@ -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; //
}

@ -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,
},

@ -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; //
}

@ -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

@ -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=

Loading…
Cancel
Save