diff --git a/app/user_center/etc/user_center.yaml b/app/user_center/etc/user_center.yaml new file mode 100644 index 0000000..6be3c1b --- /dev/null +++ b/app/user_center/etc/user_center.yaml @@ -0,0 +1,6 @@ +Name: usercenter.rpc +ListenOn: 127.0.0.1:8080 +Etcd: + Hosts: + - 127.0.0.1:2379 + Key: usercenter.rpc diff --git a/app/user_center/internal/config/config.go b/app/user_center/internal/config/config.go new file mode 100644 index 0000000..c1f85b9 --- /dev/null +++ b/app/user_center/internal/config/config.go @@ -0,0 +1,7 @@ +package config + +import "github.com/zeromicro/go-zero/zrpc" + +type Config struct { + zrpc.RpcServerConf +} diff --git a/app/user_center/internal/logic/buy_elite_logic.go b/app/user_center/internal/logic/buy_elite_logic.go new file mode 100644 index 0000000..dcab7c7 --- /dev/null +++ b/app/user_center/internal/logic/buy_elite_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type BuyEliteLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewBuyEliteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BuyEliteLogic { + return &BuyEliteLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *BuyEliteLogic) BuyElite(in *pb.EliteReq) (*pb.BuyEliteResp, error) { + // todo: add your logic here and delete this line + + return &pb.BuyEliteResp{}, nil +} diff --git a/app/user_center/internal/logic/buy_title_logic.go b/app/user_center/internal/logic/buy_title_logic.go new file mode 100644 index 0000000..13a33ce --- /dev/null +++ b/app/user_center/internal/logic/buy_title_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type BuyTitleLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewBuyTitleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *BuyTitleLogic { + return &BuyTitleLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *BuyTitleLogic) BuyTitle(in *pb.TitleReq) (*pb.BuyTitleResp, error) { + // todo: add your logic here and delete this line + + return &pb.BuyTitleResp{}, nil +} diff --git a/app/user_center/internal/logic/change_coin_logic.go b/app/user_center/internal/logic/change_coin_logic.go new file mode 100644 index 0000000..0d0b725 --- /dev/null +++ b/app/user_center/internal/logic/change_coin_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ChangeCoinLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewChangeCoinLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChangeCoinLogic { + return &ChangeCoinLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// changeCoin 新增或扣减用户弹币 +func (l *ChangeCoinLogic) ChangeCoin(in *pb.ChangeCoinReq) (*pb.Empty, error) { + // todo: add your logic here and delete this line + + return &pb.Empty{}, nil +} diff --git a/app/user_center/internal/logic/change_elite_logic.go b/app/user_center/internal/logic/change_elite_logic.go new file mode 100644 index 0000000..c5998dd --- /dev/null +++ b/app/user_center/internal/logic/change_elite_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ChangeEliteLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewChangeEliteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChangeEliteLogic { + return &ChangeEliteLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ChangeEliteLogic) ChangeElite(in *pb.EliteReq) (*pb.ChangeEliteResp, error) { + // todo: add your logic here and delete this line + + return &pb.ChangeEliteResp{}, nil +} diff --git a/app/user_center/internal/logic/change_title_logic.go b/app/user_center/internal/logic/change_title_logic.go new file mode 100644 index 0000000..13dd667 --- /dev/null +++ b/app/user_center/internal/logic/change_title_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type ChangeTitleLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewChangeTitleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChangeTitleLogic { + return &ChangeTitleLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *ChangeTitleLogic) ChangeTitle(in *pb.TitleReq) (*pb.ChangeTitleResp, error) { + // todo: add your logic here and delete this line + + return &pb.ChangeTitleResp{}, nil +} diff --git a/app/user_center/internal/logic/draw_gift_pack_logic.go b/app/user_center/internal/logic/draw_gift_pack_logic.go new file mode 100644 index 0000000..723d1cc --- /dev/null +++ b/app/user_center/internal/logic/draw_gift_pack_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type DrawGiftPackLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewDrawGiftPackLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DrawGiftPackLogic { + return &DrawGiftPackLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *DrawGiftPackLogic) DrawGiftPack(in *pb.DrawGiftPackReq) (*pb.DrawGiftPackResp, error) { + // todo: add your logic here and delete this line + + return &pb.DrawGiftPackResp{}, nil +} diff --git a/app/user_center/internal/logic/get_user_coin_logic.go b/app/user_center/internal/logic/get_user_coin_logic.go new file mode 100644 index 0000000..7f1d936 --- /dev/null +++ b/app/user_center/internal/logic/get_user_coin_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetUserCoinLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetUserCoinLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserCoinLogic { + return &GetUserCoinLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// getUserCoin 获取用户弹币 +func (l *GetUserCoinLogic) GetUserCoin(in *pb.UserIdReq) (*pb.GetUserCoinResp, error) { + // todo: add your logic here and delete this line + + return &pb.GetUserCoinResp{}, nil +} diff --git a/app/user_center/internal/logic/get_user_details_logic.go b/app/user_center/internal/logic/get_user_details_logic.go new file mode 100644 index 0000000..9dbdca3 --- /dev/null +++ b/app/user_center/internal/logic/get_user_details_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetUserDetailsLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetUserDetailsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserDetailsLogic { + return &GetUserDetailsLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// getUserDetails 获取用户详细信息 +func (l *GetUserDetailsLogic) GetUserDetails(in *pb.UserIdReq) (*pb.UserDetailsResp, error) { + // todo: add your logic here and delete this line + + return &pb.UserDetailsResp{}, nil +} diff --git a/app/user_center/internal/logic/get_user_id_by_p_uid_logic.go b/app/user_center/internal/logic/get_user_id_by_p_uid_logic.go new file mode 100644 index 0000000..bd87085 --- /dev/null +++ b/app/user_center/internal/logic/get_user_id_by_p_uid_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetUserIdByPUidLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetUserIdByPUidLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserIdByPUidLogic { + return &GetUserIdByPUidLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// getUserIdByPUid 通过平台用户id获取系统用户ID +func (l *GetUserIdByPUidLogic) GetUserIdByPUid(in *pb.PlatformUserReq) (*pb.UserIdResp, error) { + // todo: add your logic here and delete this line + + return &pb.UserIdResp{}, nil +} diff --git a/app/user_center/internal/logic/give_elite_logic.go b/app/user_center/internal/logic/give_elite_logic.go new file mode 100644 index 0000000..4196536 --- /dev/null +++ b/app/user_center/internal/logic/give_elite_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GiveEliteLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGiveEliteLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GiveEliteLogic { + return &GiveEliteLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GiveEliteLogic) GiveElite(in *pb.GiveEliteReq) (*pb.BuyEliteResp, error) { + // todo: add your logic here and delete this line + + return &pb.BuyEliteResp{}, nil +} diff --git a/app/user_center/internal/logic/give_title_logic.go b/app/user_center/internal/logic/give_title_logic.go new file mode 100644 index 0000000..d4361d9 --- /dev/null +++ b/app/user_center/internal/logic/give_title_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GiveTitleLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGiveTitleLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GiveTitleLogic { + return &GiveTitleLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *GiveTitleLogic) GiveTitle(in *pb.GiveTitleReq) (*pb.BuyTitleResp, error) { + // todo: add your logic here and delete this line + + return &pb.BuyTitleResp{}, nil +} diff --git a/app/user_center/internal/logic/rank_pvp_logic.go b/app/user_center/internal/logic/rank_pvp_logic.go new file mode 100644 index 0000000..6a68e3a --- /dev/null +++ b/app/user_center/internal/logic/rank_pvp_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type RankPvpLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewRankPvpLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RankPvpLogic { + return &RankPvpLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// rankPvp pvp排行 +func (l *RankPvpLogic) RankPvp(in *pb.RankPvpReq) (*pb.RankPvpResp, error) { + // todo: add your logic here and delete this line + + return &pb.RankPvpResp{}, nil +} diff --git a/app/user_center/internal/logic/rank_pvp_submit_logic.go b/app/user_center/internal/logic/rank_pvp_submit_logic.go new file mode 100644 index 0000000..8d4d51e --- /dev/null +++ b/app/user_center/internal/logic/rank_pvp_submit_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type RankPvpSubmitLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewRankPvpSubmitLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RankPvpSubmitLogic { + return &RankPvpSubmitLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *RankPvpSubmitLogic) RankPvpSubmit(in *pb.RankPvpSubmitReq) (*pb.RankPvpSubmitResp, error) { + // todo: add your logic here and delete this line + + return &pb.RankPvpSubmitResp{}, nil +} diff --git a/app/user_center/internal/logic/retrieve_platform_user_logic.go b/app/user_center/internal/logic/retrieve_platform_user_logic.go new file mode 100644 index 0000000..7e1b43d --- /dev/null +++ b/app/user_center/internal/logic/retrieve_platform_user_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type RetrievePlatformUserLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewRetrievePlatformUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RetrievePlatformUserLogic { + return &RetrievePlatformUserLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// retrievePlatformUser 新增或获取用户 +func (l *RetrievePlatformUserLogic) RetrievePlatformUser(in *pb.PlatformUserReq) (*pb.PlatformUserResp, error) { + // todo: add your logic here and delete this line + + return &pb.PlatformUserResp{}, nil +} diff --git a/app/user_center/internal/logic/stat_pvp_report_logic.go b/app/user_center/internal/logic/stat_pvp_report_logic.go new file mode 100644 index 0000000..8b5c705 --- /dev/null +++ b/app/user_center/internal/logic/stat_pvp_report_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type StatPvpReportLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewStatPvpReportLogic(ctx context.Context, svcCtx *svc.ServiceContext) *StatPvpReportLogic { + return &StatPvpReportLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *StatPvpReportLogic) StatPvpReport(in *pb.StatPvPReportReq) (*pb.StatPvPReportResp, error) { + // todo: add your logic here and delete this line + + return &pb.StatPvPReportResp{}, nil +} diff --git a/app/user_center/internal/logic/transfer_user_coin_logic.go b/app/user_center/internal/logic/transfer_user_coin_logic.go new file mode 100644 index 0000000..4207190 --- /dev/null +++ b/app/user_center/internal/logic/transfer_user_coin_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type TransferUserCoinLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewTransferUserCoinLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TransferUserCoinLogic { + return &TransferUserCoinLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// transferUserCoin 转移用户弹币 +func (l *TransferUserCoinLogic) TransferUserCoin(in *pb.TransferUserCoinReq) (*pb.TransferUserCoinResp, error) { + // todo: add your logic here and delete this line + + return &pb.TransferUserCoinResp{}, nil +} diff --git a/app/user_center/internal/logic/user_buy_nobility_logic.go b/app/user_center/internal/logic/user_buy_nobility_logic.go new file mode 100644 index 0000000..825775a --- /dev/null +++ b/app/user_center/internal/logic/user_buy_nobility_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UserBuyNobilityLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUserBuyNobilityLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserBuyNobilityLogic { + return &UserBuyNobilityLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UserBuyNobilityLogic) UserBuyNobility(in *pb.UserBuyNobilityReq) (*pb.Empty, error) { + // todo: add your logic here and delete this line + + return &pb.Empty{}, nil +} diff --git a/app/user_center/internal/logic/user_check_in_logic.go b/app/user_center/internal/logic/user_check_in_logic.go new file mode 100644 index 0000000..ad62fbb --- /dev/null +++ b/app/user_center/internal/logic/user_check_in_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UserCheckInLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUserCheckInLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserCheckInLogic { + return &UserCheckInLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// UserCheckIn 用户签到|打卡 +func (l *UserCheckInLogic) UserCheckIn(in *pb.UserIdReq) (*pb.UserCheckInResp, error) { + // todo: add your logic here and delete this line + + return &pb.UserCheckInResp{}, nil +} diff --git a/app/user_center/internal/logic/user_rank_pvp_logic.go b/app/user_center/internal/logic/user_rank_pvp_logic.go new file mode 100644 index 0000000..7b8709a --- /dev/null +++ b/app/user_center/internal/logic/user_rank_pvp_logic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UserRankPvpLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUserRankPvpLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserRankPvpLogic { + return &UserRankPvpLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UserRankPvpLogic) UserRankPvp(in *pb.UserRankReq) (*pb.UserRankResp, error) { + // todo: add your logic here and delete this line + + return &pb.UserRankResp{}, nil +} diff --git a/app/user_center/internal/logic/user_send_gift_logic.go b/app/user_center/internal/logic/user_send_gift_logic.go new file mode 100644 index 0000000..20e873e --- /dev/null +++ b/app/user_center/internal/logic/user_send_gift_logic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UserSendGiftLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUserSendGiftLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserSendGiftLogic { + return &UserSendGiftLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// UserSendGift 用户赠送礼物 +func (l *UserSendGiftLogic) UserSendGift(in *pb.UserSendGiftReq) (*pb.Empty, error) { + // todo: add your logic here and delete this line + + return &pb.Empty{}, nil +} diff --git a/app/user_center/internal/server/user_center_server.go b/app/user_center/internal/server/user_center_server.go new file mode 100644 index 0000000..8202f86 --- /dev/null +++ b/app/user_center/internal/server/user_center_server.go @@ -0,0 +1,132 @@ +// Code generated by goctl. DO NOT EDIT! +// Source: user_center.proto + +package server + +import ( + "context" + + "dcg/app/user_center/internal/logic" + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" +) + +type UserCenterServer struct { + svcCtx *svc.ServiceContext + pb.UnimplementedUserCenterServer +} + +func NewUserCenterServer(svcCtx *svc.ServiceContext) *UserCenterServer { + return &UserCenterServer{ + svcCtx: svcCtx, + } +} + +// retrievePlatformUser 新增或获取用户 +func (s *UserCenterServer) RetrievePlatformUser(ctx context.Context, in *pb.PlatformUserReq) (*pb.PlatformUserResp, error) { + l := logic.NewRetrievePlatformUserLogic(ctx, s.svcCtx) + return l.RetrievePlatformUser(in) +} + +// getUserDetails 获取用户详细信息 +func (s *UserCenterServer) GetUserDetails(ctx context.Context, in *pb.UserIdReq) (*pb.UserDetailsResp, error) { + l := logic.NewGetUserDetailsLogic(ctx, s.svcCtx) + return l.GetUserDetails(in) +} + +// getUserIdByPUid 通过平台用户id获取系统用户ID +func (s *UserCenterServer) GetUserIdByPUid(ctx context.Context, in *pb.PlatformUserReq) (*pb.UserIdResp, error) { + l := logic.NewGetUserIdByPUidLogic(ctx, s.svcCtx) + return l.GetUserIdByPUid(in) +} + +// UserCheckIn 用户签到|打卡 +func (s *UserCenterServer) UserCheckIn(ctx context.Context, in *pb.UserIdReq) (*pb.UserCheckInResp, error) { + l := logic.NewUserCheckInLogic(ctx, s.svcCtx) + return l.UserCheckIn(in) +} + +// changeCoin 新增或扣减用户弹币 +func (s *UserCenterServer) ChangeCoin(ctx context.Context, in *pb.ChangeCoinReq) (*pb.Empty, error) { + l := logic.NewChangeCoinLogic(ctx, s.svcCtx) + return l.ChangeCoin(in) +} + +// getUserCoin 获取用户弹币 +func (s *UserCenterServer) GetUserCoin(ctx context.Context, in *pb.UserIdReq) (*pb.GetUserCoinResp, error) { + l := logic.NewGetUserCoinLogic(ctx, s.svcCtx) + return l.GetUserCoin(in) +} + +// transferUserCoin 转移用户弹币 +func (s *UserCenterServer) TransferUserCoin(ctx context.Context, in *pb.TransferUserCoinReq) (*pb.TransferUserCoinResp, error) { + l := logic.NewTransferUserCoinLogic(ctx, s.svcCtx) + return l.TransferUserCoin(in) +} + +// UserSendGift 用户赠送礼物 +func (s *UserCenterServer) UserSendGift(ctx context.Context, in *pb.UserSendGiftReq) (*pb.Empty, error) { + l := logic.NewUserSendGiftLogic(ctx, s.svcCtx) + return l.UserSendGift(in) +} + +func (s *UserCenterServer) UserBuyNobility(ctx context.Context, in *pb.UserBuyNobilityReq) (*pb.Empty, error) { + l := logic.NewUserBuyNobilityLogic(ctx, s.svcCtx) + return l.UserBuyNobility(in) +} + +func (s *UserCenterServer) StatPvpReport(ctx context.Context, in *pb.StatPvPReportReq) (*pb.StatPvPReportResp, error) { + l := logic.NewStatPvpReportLogic(ctx, s.svcCtx) + return l.StatPvpReport(in) +} + +func (s *UserCenterServer) DrawGiftPack(ctx context.Context, in *pb.DrawGiftPackReq) (*pb.DrawGiftPackResp, error) { + l := logic.NewDrawGiftPackLogic(ctx, s.svcCtx) + return l.DrawGiftPack(in) +} + +// rankPvp pvp排行 +func (s *UserCenterServer) RankPvp(ctx context.Context, in *pb.RankPvpReq) (*pb.RankPvpResp, error) { + l := logic.NewRankPvpLogic(ctx, s.svcCtx) + return l.RankPvp(in) +} + +func (s *UserCenterServer) RankPvpSubmit(ctx context.Context, in *pb.RankPvpSubmitReq) (*pb.RankPvpSubmitResp, error) { + l := logic.NewRankPvpSubmitLogic(ctx, s.svcCtx) + return l.RankPvpSubmit(in) +} + +func (s *UserCenterServer) UserRankPvp(ctx context.Context, in *pb.UserRankReq) (*pb.UserRankResp, error) { + l := logic.NewUserRankPvpLogic(ctx, s.svcCtx) + return l.UserRankPvp(in) +} + +func (s *UserCenterServer) GiveElite(ctx context.Context, in *pb.GiveEliteReq) (*pb.BuyEliteResp, error) { + l := logic.NewGiveEliteLogic(ctx, s.svcCtx) + return l.GiveElite(in) +} + +func (s *UserCenterServer) BuyElite(ctx context.Context, in *pb.EliteReq) (*pb.BuyEliteResp, error) { + l := logic.NewBuyEliteLogic(ctx, s.svcCtx) + return l.BuyElite(in) +} + +func (s *UserCenterServer) GiveTitle(ctx context.Context, in *pb.GiveTitleReq) (*pb.BuyTitleResp, error) { + l := logic.NewGiveTitleLogic(ctx, s.svcCtx) + return l.GiveTitle(in) +} + +func (s *UserCenterServer) BuyTitle(ctx context.Context, in *pb.TitleReq) (*pb.BuyTitleResp, error) { + l := logic.NewBuyTitleLogic(ctx, s.svcCtx) + return l.BuyTitle(in) +} + +func (s *UserCenterServer) ChangeElite(ctx context.Context, in *pb.EliteReq) (*pb.ChangeEliteResp, error) { + l := logic.NewChangeEliteLogic(ctx, s.svcCtx) + return l.ChangeElite(in) +} + +func (s *UserCenterServer) ChangeTitle(ctx context.Context, in *pb.TitleReq) (*pb.ChangeTitleResp, error) { + l := logic.NewChangeTitleLogic(ctx, s.svcCtx) + return l.ChangeTitle(in) +} diff --git a/app/user_center/internal/svc/service_context.go b/app/user_center/internal/svc/service_context.go new file mode 100644 index 0000000..e714852 --- /dev/null +++ b/app/user_center/internal/svc/service_context.go @@ -0,0 +1,13 @@ +package svc + +import "dcg/app/user_center/internal/config" + +type ServiceContext struct { + Config config.Config +} + +func NewServiceContext(c config.Config) *ServiceContext { + return &ServiceContext{ + Config: c, + } +} diff --git a/app/user_center/pb/generate.go b/app/user_center/pb/generate.go index 12c2758..f8abf65 100644 --- a/app/user_center/pb/generate.go +++ b/app/user_center/pb/generate.go @@ -1,3 +1,3 @@ package pb -//go:generate goctl rpc protoc user_center.proto --style=go_zero --go_out=../ --go-grpc_out=../ --zrpc_out=../ +//go:generate goctl rpc protoc user_center.proto --proto_path=. --proto_path=../../../game/pb/ --style=go_zero --go_out=../ --go-grpc_out=../ --zrpc_out=../ diff --git a/app/user_center/pb/user_center.pb.go b/app/user_center/pb/user_center.pb.go index 556bd71..87d0cd2 100644 --- a/app/user_center/pb/user_center.pb.go +++ b/app/user_center/pb/user_center.pb.go @@ -7,6 +7,7 @@ package pb import ( + vars "dcg/game/pb/vars" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,55 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type IntegralType int32 - -const ( - IntegralType_Battle IntegralType = 0 // 战斗 - IntegralType_Gift IntegralType = 1 // 礼物 - IntegralType_Other IntegralType = 10 // 其它积分 -) - -// Enum value maps for IntegralType. -var ( - IntegralType_name = map[int32]string{ - 0: "Battle", - 1: "Gift", - 10: "Other", - } - IntegralType_value = map[string]int32{ - "Battle": 0, - "Gift": 1, - "Other": 10, - } -) - -func (x IntegralType) Enum() *IntegralType { - p := new(IntegralType) - *p = x - return p -} - -func (x IntegralType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (IntegralType) Descriptor() protoreflect.EnumDescriptor { - return file_user_center_proto_enumTypes[0].Descriptor() -} - -func (IntegralType) Type() protoreflect.EnumType { - return &file_user_center_proto_enumTypes[0] -} - -func (x IntegralType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use IntegralType.Descriptor instead. -func (IntegralType) EnumDescriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{0} -} - type GiftType int32 const ( @@ -99,11 +51,11 @@ func (x GiftType) String() string { } func (GiftType) Descriptor() protoreflect.EnumDescriptor { - return file_user_center_proto_enumTypes[1].Descriptor() + return file_user_center_proto_enumTypes[0].Descriptor() } func (GiftType) Type() protoreflect.EnumType { - return &file_user_center_proto_enumTypes[1] + return &file_user_center_proto_enumTypes[0] } func (x GiftType) Number() protoreflect.EnumNumber { @@ -112,108 +64,18 @@ func (x GiftType) Number() protoreflect.EnumNumber { // Deprecated: Use GiftType.Descriptor instead. func (GiftType) EnumDescriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{1} -} - -////////////////////// rank -type RankType int32 - -const ( - RankType_Unknown RankType = 0 - RankType_Damage RankType = 1 // 伤害榜 - RankType_DeDamage RankType = 2 // 受伤榜 - RankType_General RankType = 3 // 名将榜 - RankType_DeGeneral RankType = 4 // 落马榜 - RankType_KillUnit RankType = 5 // 小兵击杀 - RankType_DeKillUnit RankType = 6 // 小兵被杀 - RankType_KillPlayer RankType = 7 // 击杀玩家 - RankType_DeKillPlayer RankType = 8 // 被杀榜 - RankType_Win RankType = 9 // 获胜榜 - RankType_Lost RankType = 10 // 战败榜 - RankType_FirstBlood RankType = 11 // 一血榜 - RankType_DeFirstBlood RankType = 12 // 被拿一血榜 -) - -// Enum value maps for RankType. -var ( - RankType_name = map[int32]string{ - 0: "Unknown", - 1: "Damage", - 2: "DeDamage", - 3: "General", - 4: "DeGeneral", - 5: "KillUnit", - 6: "DeKillUnit", - 7: "KillPlayer", - 8: "DeKillPlayer", - 9: "Win", - 10: "Lost", - 11: "FirstBlood", - 12: "DeFirstBlood", - } - RankType_value = map[string]int32{ - "Unknown": 0, - "Damage": 1, - "DeDamage": 2, - "General": 3, - "DeGeneral": 4, - "KillUnit": 5, - "DeKillUnit": 6, - "KillPlayer": 7, - "DeKillPlayer": 8, - "Win": 9, - "Lost": 10, - "FirstBlood": 11, - "DeFirstBlood": 12, - } -) - -func (x RankType) Enum() *RankType { - p := new(RankType) - *p = x - return p -} - -func (x RankType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RankType) Descriptor() protoreflect.EnumDescriptor { - return file_user_center_proto_enumTypes[2].Descriptor() -} - -func (RankType) Type() protoreflect.EnumType { - return &file_user_center_proto_enumTypes[2] -} - -func (x RankType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RankType.Descriptor instead. -func (RankType) EnumDescriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{2} + return file_user_center_proto_rawDescGZIP(), []int{0} } // model -type User struct { +type Empty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - // platform - Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"` - PUid string `protobuf:"bytes,4,opt,name=pUid,proto3" json:"pUid,omitempty"` - PUname string `protobuf:"bytes,5,opt,name=pUname,proto3" json:"pUname,omitempty"` - PAvatar string `protobuf:"bytes,6,opt,name=pAvatar,proto3" json:"pAvatar,omitempty"` - NobilityLevel int32 `protobuf:"varint,7,opt,name=nobilityLevel,proto3" json:"nobilityLevel,omitempty"` // 贵族等级 - Integral int64 `protobuf:"varint,8,opt,name=integral,proto3" json:"integral,omitempty"` // 用户积分(充值) } -func (x *User) Reset() { - *x = User{} +func (x *Empty) Reset() { + *x = Empty{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -221,13 +83,13 @@ func (x *User) Reset() { } } -func (x *User) String() string { +func (x *Empty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*User) ProtoMessage() {} +func (*Empty) ProtoMessage() {} -func (x *User) ProtoReflect() protoreflect.Message { +func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -239,75 +101,22 @@ func (x *User) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use User.ProtoReflect.Descriptor instead. -func (*User) Descriptor() ([]byte, []int) { +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{0} } -func (x *User) GetId() int64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *User) GetUsername() string { - if x != nil { - return x.Username - } - return "" -} - -func (x *User) GetPlatform() string { - if x != nil { - return x.Platform - } - return "" -} - -func (x *User) GetPUid() string { - if x != nil { - return x.PUid - } - return "" -} - -func (x *User) GetPUname() string { - if x != nil { - return x.PUname - } - return "" -} - -func (x *User) GetPAvatar() string { - if x != nil { - return x.PAvatar - } - return "" -} - -func (x *User) GetNobilityLevel() int32 { - if x != nil { - return x.NobilityLevel - } - return 0 -} - -func (x *User) GetIntegral() int64 { - if x != nil { - return x.Integral - } - return 0 -} - -type Empty struct { +type Response struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // code + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // msg } -func (x *Empty) Reset() { - *x = Empty{} +func (x *Response) Reset() { + *x = Response{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -315,13 +124,13 @@ func (x *Empty) Reset() { } } -func (x *Empty) String() string { +func (x *Response) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Empty) ProtoMessage() {} +func (*Response) ProtoMessage() {} -func (x *Empty) ProtoReflect() protoreflect.Message { +func (x *Response) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -333,11 +142,25 @@ func (x *Empty) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Empty.ProtoReflect.Descriptor instead. -func (*Empty) Descriptor() ([]byte, []int) { +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{1} } +func (x *Response) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *Response) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + // req type PlatformUserReq struct { state protoimpl.MessageState @@ -399,7 +222,12 @@ type PlatformUserResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // platform + Platform string `protobuf:"bytes,3,opt,name=platform,proto3" json:"platform,omitempty"` + PUid string `protobuf:"bytes,4,opt,name=pUid,proto3" json:"pUid,omitempty"` + PUname string `protobuf:"bytes,5,opt,name=pUname,proto3" json:"pUname,omitempty"` + PAvatar string `protobuf:"bytes,6,opt,name=pAvatar,proto3" json:"pAvatar,omitempty"` } func (x *PlatformUserResp) Reset() { @@ -434,24 +262,58 @@ func (*PlatformUserResp) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{3} } -func (x *PlatformUserResp) GetUser() *User { +func (x *PlatformUserResp) GetId() int64 { if x != nil { - return x.User + return x.Id } - return nil + return 0 } -// 用户ID请求 -type UserIdReq struct { +func (x *PlatformUserResp) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +func (x *PlatformUserResp) GetPUid() string { + if x != nil { + return x.PUid + } + return "" +} + +func (x *PlatformUserResp) GetPUname() string { + if x != nil { + return x.PUname + } + return "" +} + +func (x *PlatformUserResp) GetPAvatar() string { + if x != nil { + return x.PAvatar + } + return "" +} + +// 用户详细信息返回 +type UserDetailsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID + NobilityLevel int32 `protobuf:"varint,2,opt,name=nobilityLevel,proto3" json:"nobilityLevel,omitempty"` // 贵族等级 + Coin int64 `protobuf:"varint,3,opt,name=coin,proto3" json:"coin,omitempty"` // 金币 + CurrentTitle *UserDetailsResp_TitleItem `protobuf:"bytes,4,opt,name=currentTitle,proto3" json:"currentTitle,omitempty"` // 当前佩戴的称号ID + CurrentElite *UserDetailsResp_EliteItem `protobuf:"bytes,5,opt,name=currentElite,proto3" json:"currentElite,omitempty"` // 当前使用的精英单位ID + Titles []*UserDetailsResp_TitleItem `protobuf:"bytes,6,rep,name=titles,proto3" json:"titles,omitempty"` // 拥有的称号列表 + Elites []*UserDetailsResp_EliteItem `protobuf:"bytes,7,rep,name=elites,proto3" json:"elites,omitempty"` // 拥有的精英单位列表 } -func (x *UserIdReq) Reset() { - *x = UserIdReq{} +func (x *UserDetailsResp) Reset() { + *x = UserDetailsResp{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -459,13 +321,13 @@ func (x *UserIdReq) Reset() { } } -func (x *UserIdReq) String() string { +func (x *UserDetailsResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserIdReq) ProtoMessage() {} +func (*UserDetailsResp) ProtoMessage() {} -func (x *UserIdReq) ProtoReflect() protoreflect.Message { +func (x *UserDetailsResp) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -477,20 +339,62 @@ func (x *UserIdReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserIdReq.ProtoReflect.Descriptor instead. -func (*UserIdReq) Descriptor() ([]byte, []int) { +// Deprecated: Use UserDetailsResp.ProtoReflect.Descriptor instead. +func (*UserDetailsResp) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{4} } -func (x *UserIdReq) GetUserId() int64 { +func (x *UserDetailsResp) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -// 用户ID回复 -type UserIdResp struct { +func (x *UserDetailsResp) GetNobilityLevel() int32 { + if x != nil { + return x.NobilityLevel + } + return 0 +} + +func (x *UserDetailsResp) GetCoin() int64 { + if x != nil { + return x.Coin + } + return 0 +} + +func (x *UserDetailsResp) GetCurrentTitle() *UserDetailsResp_TitleItem { + if x != nil { + return x.CurrentTitle + } + return nil +} + +func (x *UserDetailsResp) GetCurrentElite() *UserDetailsResp_EliteItem { + if x != nil { + return x.CurrentElite + } + return nil +} + +func (x *UserDetailsResp) GetTitles() []*UserDetailsResp_TitleItem { + if x != nil { + return x.Titles + } + return nil +} + +func (x *UserDetailsResp) GetElites() []*UserDetailsResp_EliteItem { + if x != nil { + return x.Elites + } + return nil +} + +// 用户ID请求 +type UserIdReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -498,8 +402,8 @@ type UserIdResp struct { UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` } -func (x *UserIdResp) Reset() { - *x = UserIdResp{} +func (x *UserIdReq) Reset() { + *x = UserIdReq{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -507,13 +411,13 @@ func (x *UserIdResp) Reset() { } } -func (x *UserIdResp) String() string { +func (x *UserIdReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserIdResp) ProtoMessage() {} +func (*UserIdReq) ProtoMessage() {} -func (x *UserIdResp) ProtoReflect() protoreflect.Message { +func (x *UserIdReq) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -525,32 +429,29 @@ func (x *UserIdResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserIdResp.ProtoReflect.Descriptor instead. -func (*UserIdResp) Descriptor() ([]byte, []int) { +// Deprecated: Use UserIdReq.ProtoReflect.Descriptor instead. +func (*UserIdReq) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{5} } -func (x *UserIdResp) GetUserId() int64 { +func (x *UserIdReq) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -// 变更积分请求 -type ChangeIntegralReq struct { +// 用户ID回复 +type UserIdResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID - BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID(RPC内部) - Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"` // 变更数量 - IntegralType IntegralType `protobuf:"varint,4,opt,name=integralType,proto3,enum=pb.IntegralType" json:"integralType,omitempty"` // 积分类型 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` } -func (x *ChangeIntegralReq) Reset() { - *x = ChangeIntegralReq{} +func (x *UserIdResp) Reset() { + *x = UserIdResp{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -558,13 +459,13 @@ func (x *ChangeIntegralReq) Reset() { } } -func (x *ChangeIntegralReq) String() string { +func (x *UserIdResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeIntegralReq) ProtoMessage() {} +func (*UserIdResp) ProtoMessage() {} -func (x *ChangeIntegralReq) ProtoReflect() protoreflect.Message { +func (x *UserIdResp) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -576,52 +477,29 @@ func (x *ChangeIntegralReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeIntegralReq.ProtoReflect.Descriptor instead. -func (*ChangeIntegralReq) Descriptor() ([]byte, []int) { +// Deprecated: Use UserIdResp.ProtoReflect.Descriptor instead. +func (*UserIdResp) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{6} } -func (x *ChangeIntegralReq) GetUserId() int64 { +func (x *UserIdResp) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -func (x *ChangeIntegralReq) GetBattleId() int64 { - if x != nil { - return x.BattleId - } - return 0 -} - -func (x *ChangeIntegralReq) GetChange() int64 { - if x != nil { - return x.Change - } - return 0 -} - -func (x *ChangeIntegralReq) GetIntegralType() IntegralType { - if x != nil { - return x.IntegralType - } - return IntegralType_Battle -} - -// 变更积分回复 -type ChangeIntegralResp struct { +type GetUserCoinResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID - Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 本次变更积分数量,负数为扣减 - Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral,omitempty"` // 用户当前总积分 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + Current int64 `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"` // 当前量 } -func (x *ChangeIntegralResp) Reset() { - *x = ChangeIntegralResp{} +func (x *GetUserCoinResp) Reset() { + *x = GetUserCoinResp{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -629,13 +507,13 @@ func (x *ChangeIntegralResp) Reset() { } } -func (x *ChangeIntegralResp) String() string { +func (x *GetUserCoinResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeIntegralResp) ProtoMessage() {} +func (*GetUserCoinResp) ProtoMessage() {} -func (x *ChangeIntegralResp) ProtoReflect() protoreflect.Message { +func (x *GetUserCoinResp) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -647,44 +525,39 @@ func (x *ChangeIntegralResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeIntegralResp.ProtoReflect.Descriptor instead. -func (*ChangeIntegralResp) Descriptor() ([]byte, []int) { +// Deprecated: Use GetUserCoinResp.ProtoReflect.Descriptor instead. +func (*GetUserCoinResp) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{7} } -func (x *ChangeIntegralResp) GetUserId() int64 { +func (x *GetUserCoinResp) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -func (x *ChangeIntegralResp) GetChange() int64 { +func (x *GetUserCoinResp) GetCurrent() int64 { if x != nil { - return x.Change + return x.Current } return 0 } -func (x *ChangeIntegralResp) GetIntegral() int64 { - if x != nil { - return x.Integral - } - return 0 -} - -// 用户积分回复 -type UserIntegralResp struct { +// 变更弹币请求 +type ChangeCoinReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID - Integral int64 `protobuf:"varint,2,opt,name=integral,proto3" json:"integral,omitempty"` // 用户当前总积分 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战局ID + Change int64 `protobuf:"varint,3,opt,name=change,proto3" json:"change,omitempty"` // 变更数量 + Reason vars.UserCoinChangedReason `protobuf:"varint,4,opt,name=reason,proto3,enum=pb.vars.UserCoinChangedReason" json:"reason,omitempty"` // 原因 } -func (x *UserIntegralResp) Reset() { - *x = UserIntegralResp{} +func (x *ChangeCoinReq) Reset() { + *x = ChangeCoinReq{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -692,13 +565,13 @@ func (x *UserIntegralResp) Reset() { } } -func (x *UserIntegralResp) String() string { +func (x *ChangeCoinReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserIntegralResp) ProtoMessage() {} +func (*ChangeCoinReq) ProtoMessage() {} -func (x *UserIntegralResp) ProtoReflect() protoreflect.Message { +func (x *ChangeCoinReq) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -710,40 +583,52 @@ func (x *UserIntegralResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserIntegralResp.ProtoReflect.Descriptor instead. -func (*UserIntegralResp) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeCoinReq.ProtoReflect.Descriptor instead. +func (*ChangeCoinReq) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{8} } -func (x *UserIntegralResp) GetUserId() int64 { +func (x *ChangeCoinReq) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -func (x *UserIntegralResp) GetIntegral() int64 { +func (x *ChangeCoinReq) GetBattleId() int64 { if x != nil { - return x.Integral + return x.BattleId } return 0 } -// 用户打卡(签到)回复 -type UserCheckInResp struct { +func (x *ChangeCoinReq) GetChange() int64 { + if x != nil { + return x.Change + } + return 0 +} + +func (x *ChangeCoinReq) GetReason() vars.UserCoinChangedReason { + if x != nil { + return x.Reason + } + return vars.UserCoinChangedReason(0) +} + +// 转移用户弹币 +type TransferUserCoinReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 - IntegralChange int64 `protobuf:"varint,3,opt,name=integralChange,proto3" json:"integralChange,omitempty"` // 积分变动量 - Integral int64 `protobuf:"varint,4,opt,name=integral,proto3" json:"integral,omitempty"` // 变动后的积分量 - IsCritical bool `protobuf:"varint,5,opt,name=isCritical,proto3" json:"isCritical,omitempty"` // 是否发生了暴击奖励 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 源用户ID + TargetUserId int64 `protobuf:"varint,2,opt,name=targetUserId,proto3" json:"targetUserId,omitempty"` // 目标用户 + Transfer int64 `protobuf:"varint,3,opt,name=transfer,proto3" json:"transfer,omitempty"` // 待转移量 } -func (x *UserCheckInResp) Reset() { - *x = UserCheckInResp{} +func (x *TransferUserCoinReq) Reset() { + *x = TransferUserCoinReq{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -751,13 +636,13 @@ func (x *UserCheckInResp) Reset() { } } -func (x *UserCheckInResp) String() string { +func (x *TransferUserCoinReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserCheckInResp) ProtoMessage() {} +func (*TransferUserCoinReq) ProtoMessage() {} -func (x *UserCheckInResp) ProtoReflect() protoreflect.Message { +func (x *TransferUserCoinReq) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -769,59 +654,50 @@ func (x *UserCheckInResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserCheckInResp.ProtoReflect.Descriptor instead. -func (*UserCheckInResp) Descriptor() ([]byte, []int) { +// Deprecated: Use TransferUserCoinReq.ProtoReflect.Descriptor instead. +func (*TransferUserCoinReq) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{9} } -func (x *UserCheckInResp) GetCode() int32 { +func (x *TransferUserCoinReq) GetUserId() int64 { if x != nil { - return x.Code + return x.UserId } return 0 } -func (x *UserCheckInResp) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *UserCheckInResp) GetIntegralChange() int64 { +func (x *TransferUserCoinReq) GetTargetUserId() int64 { if x != nil { - return x.IntegralChange + return x.TargetUserId } return 0 } -func (x *UserCheckInResp) GetIntegral() int64 { +func (x *TransferUserCoinReq) GetTransfer() int64 { if x != nil { - return x.Integral + return x.Transfer } return 0 } -func (x *UserCheckInResp) GetIsCritical() bool { - if x != nil { - return x.IsCritical - } - return false -} - -// 转移用户积分 -type TransferUserIntegralReq struct { +// 转移用户弹币 回复 +type TransferUserCoinResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 源用户ID - TargetUserId int64 `protobuf:"varint,2,opt,name=targetUserId,proto3" json:"targetUserId,omitempty"` // 目标用户 - Transfer int64 `protobuf:"varint,3,opt,name=transfer,proto3" json:"transfer,omitempty"` // 待转移量 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + TargetUserId int64 `protobuf:"varint,4,opt,name=targetUserId,proto3" json:"targetUserId,omitempty"` + TargetUname string `protobuf:"bytes,5,opt,name=targetUname,proto3" json:"targetUname,omitempty"` + TargetAvatar string `protobuf:"bytes,6,opt,name=targetAvatar,proto3" json:"targetAvatar,omitempty"` + UserCoin int64 `protobuf:"varint,10,opt,name=userCoin,proto3" json:"userCoin,omitempty"` // 源用户剩余 + TargetUserCoin int64 `protobuf:"varint,11,opt,name=targetUserCoin,proto3" json:"targetUserCoin,omitempty"` // 目标用户剩余 } -func (x *TransferUserIntegralReq) Reset() { - *x = TransferUserIntegralReq{} +func (x *TransferUserCoinResp) Reset() { + *x = TransferUserCoinResp{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -829,13 +705,13 @@ func (x *TransferUserIntegralReq) Reset() { } } -func (x *TransferUserIntegralReq) String() string { +func (x *TransferUserCoinResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TransferUserIntegralReq) ProtoMessage() {} +func (*TransferUserCoinResp) ProtoMessage() {} -func (x *TransferUserIntegralReq) ProtoReflect() protoreflect.Message { +func (x *TransferUserCoinResp) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -847,51 +723,80 @@ func (x *TransferUserIntegralReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TransferUserIntegralReq.ProtoReflect.Descriptor instead. -func (*TransferUserIntegralReq) Descriptor() ([]byte, []int) { +// Deprecated: Use TransferUserCoinResp.ProtoReflect.Descriptor instead. +func (*TransferUserCoinResp) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{10} } -func (x *TransferUserIntegralReq) GetUserId() int64 { +func (x *TransferUserCoinResp) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -func (x *TransferUserIntegralReq) GetTargetUserId() int64 { +func (x *TransferUserCoinResp) GetUname() string { + if x != nil { + return x.Uname + } + return "" +} + +func (x *TransferUserCoinResp) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *TransferUserCoinResp) GetTargetUserId() int64 { if x != nil { return x.TargetUserId } return 0 } -func (x *TransferUserIntegralReq) GetTransfer() int64 { +func (x *TransferUserCoinResp) GetTargetUname() string { if x != nil { - return x.Transfer + return x.TargetUname + } + return "" +} + +func (x *TransferUserCoinResp) GetTargetAvatar() string { + if x != nil { + return x.TargetAvatar + } + return "" +} + +func (x *TransferUserCoinResp) GetUserCoin() int64 { + if x != nil { + return x.UserCoin + } + return 0 +} + +func (x *TransferUserCoinResp) GetTargetUserCoin() int64 { + if x != nil { + return x.TargetUserCoin } return 0 } -type TransferUserIntegralResp struct { +// 用户打卡(签到)回复 +type UserCheckInResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 - UserId int64 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"` - Uname string `protobuf:"bytes,4,opt,name=uname,proto3" json:"uname,omitempty"` - Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` - TargetUserId int64 `protobuf:"varint,6,opt,name=targetUserId,proto3" json:"targetUserId,omitempty"` - TargetUname string `protobuf:"bytes,7,opt,name=targetUname,proto3" json:"targetUname,omitempty"` - TargetAvatar string `protobuf:"bytes,8,opt,name=targetAvatar,proto3" json:"targetAvatar,omitempty"` - UserIntegral int64 `protobuf:"varint,10,opt,name=userIntegral,proto3" json:"userIntegral,omitempty"` // 源用户积分剩余 - TargetUserIntegral int64 `protobuf:"varint,11,opt,name=targetUserIntegral,proto3" json:"targetUserIntegral,omitempty"` // 目标用户积分剩余 + CoinChange int64 `protobuf:"varint,1,opt,name=coinChange,proto3" json:"coinChange,omitempty"` // 弹币变更量 + CurrentCoin int64 `protobuf:"varint,2,opt,name=currentCoin,proto3" json:"currentCoin,omitempty"` // 现有弹币量 + IsCritical bool `protobuf:"varint,3,opt,name=isCritical,proto3" json:"isCritical,omitempty"` // 是否发生了暴击奖励 } -func (x *TransferUserIntegralResp) Reset() { - *x = TransferUserIntegralResp{} +func (x *UserCheckInResp) Reset() { + *x = UserCheckInResp{} if protoimpl.UnsafeEnabled { mi := &file_user_center_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -899,13 +804,13 @@ func (x *TransferUserIntegralResp) Reset() { } } -func (x *TransferUserIntegralResp) String() string { +func (x *UserCheckInResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TransferUserIntegralResp) ProtoMessage() {} +func (*UserCheckInResp) ProtoMessage() {} -func (x *TransferUserIntegralResp) ProtoReflect() protoreflect.Message { +func (x *UserCheckInResp) ProtoReflect() protoreflect.Message { mi := &file_user_center_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -917,79 +822,30 @@ func (x *TransferUserIntegralResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TransferUserIntegralResp.ProtoReflect.Descriptor instead. -func (*TransferUserIntegralResp) Descriptor() ([]byte, []int) { +// Deprecated: Use UserCheckInResp.ProtoReflect.Descriptor instead. +func (*UserCheckInResp) Descriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{11} } -func (x *TransferUserIntegralResp) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *TransferUserIntegralResp) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *TransferUserIntegralResp) GetUserId() int64 { +func (x *UserCheckInResp) GetCoinChange() int64 { if x != nil { - return x.UserId - } - return 0 -} - -func (x *TransferUserIntegralResp) GetUname() string { - if x != nil { - return x.Uname - } - return "" -} - -func (x *TransferUserIntegralResp) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - -func (x *TransferUserIntegralResp) GetTargetUserId() int64 { - if x != nil { - return x.TargetUserId + return x.CoinChange } return 0 } -func (x *TransferUserIntegralResp) GetTargetUname() string { - if x != nil { - return x.TargetUname - } - return "" -} - -func (x *TransferUserIntegralResp) GetTargetAvatar() string { - if x != nil { - return x.TargetAvatar - } - return "" -} - -func (x *TransferUserIntegralResp) GetUserIntegral() int64 { +func (x *UserCheckInResp) GetCurrentCoin() int64 { if x != nil { - return x.UserIntegral + return x.CurrentCoin } return 0 } -func (x *TransferUserIntegralResp) GetTargetUserIntegral() int64 { +func (x *UserCheckInResp) GetIsCritical() bool { if x != nil { - return x.TargetUserIntegral + return x.IsCritical } - return 0 + return false } // 用户送礼请求 @@ -1112,54 +968,6 @@ func (x *UserSendGiftReq) GetBattleId() int64 { return 0 } -// 用户送礼回复 -type UserSendGiftResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Integral *ChangeIntegralResp `protobuf:"bytes,10,opt,name=integral,proto3" json:"integral,omitempty"` // 积分变动 -} - -func (x *UserSendGiftResp) Reset() { - *x = UserSendGiftResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserSendGiftResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserSendGiftResp) ProtoMessage() {} - -func (x *UserSendGiftResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserSendGiftResp.ProtoReflect.Descriptor instead. -func (*UserSendGiftResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{13} -} - -func (x *UserSendGiftResp) GetIntegral() *ChangeIntegralResp { - if x != nil { - return x.Integral - } - return nil -} - // 用户购买舰长请求 type UserBuyNobilityReq struct { state protoimpl.MessageState @@ -1183,7 +991,7 @@ type UserBuyNobilityReq struct { func (x *UserBuyNobilityReq) Reset() { *x = UserBuyNobilityReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[14] + mi := &file_user_center_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1196,7 +1004,7 @@ func (x *UserBuyNobilityReq) String() string { func (*UserBuyNobilityReq) ProtoMessage() {} func (x *UserBuyNobilityReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[14] + mi := &file_user_center_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1209,7 +1017,7 @@ func (x *UserBuyNobilityReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserBuyNobilityReq.ProtoReflect.Descriptor instead. func (*UserBuyNobilityReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{14} + return file_user_center_proto_rawDescGZIP(), []int{13} } func (x *UserBuyNobilityReq) GetPlatform() string { @@ -1296,32 +1104,35 @@ func (x *UserBuyNobilityReq) GetEndTime() int64 { return 0 } -// 用户购买舰长回复 -type UserBuyNobilityResp struct { +// 通知-PvP战报 statistics.pvp.report +type StatPvPReportReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Integral *ChangeIntegralResp `protobuf:"bytes,10,opt,name=integral,proto3" json:"integral,omitempty"` // 积分变动 + WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID + WinItems []*StatPvPReportReq_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 + LostItems []*StatPvPReportReq_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 } -func (x *UserBuyNobilityResp) Reset() { - *x = UserBuyNobilityResp{} +func (x *StatPvPReportReq) Reset() { + *x = StatPvPReportReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[15] + mi := &file_user_center_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UserBuyNobilityResp) String() string { +func (x *StatPvPReportReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserBuyNobilityResp) ProtoMessage() {} +func (*StatPvPReportReq) ProtoMessage() {} -func (x *UserBuyNobilityResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[15] +func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1332,46 +1143,68 @@ func (x *UserBuyNobilityResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserBuyNobilityResp.ProtoReflect.Descriptor instead. -func (*UserBuyNobilityResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{15} +// Deprecated: Use StatPvPReportReq.ProtoReflect.Descriptor instead. +func (*StatPvPReportReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{14} } -func (x *UserBuyNobilityResp) GetIntegral() *ChangeIntegralResp { +func (x *StatPvPReportReq) GetWinCamp() int32 { + if x != nil { + return x.WinCamp + } + return 0 +} + +func (x *StatPvPReportReq) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + +func (x *StatPvPReportReq) GetWinItems() []*StatPvPReportReq_Item { + if x != nil { + return x.WinItems + } + return nil +} + +func (x *StatPvPReportReq) GetLostItems() []*StatPvPReportReq_Item { if x != nil { - return x.Integral + return x.LostItems } return nil } -// 通知-PvP杀兵营(人) statistics.pvp.kill -type StatPvPKillReq struct { +// 通知-PvP战报 回复 +type StatPvPReportResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - TargetUid int64 `protobuf:"varint,2,opt,name=targetUid,proto3" json:"targetUid,omitempty"` // 目标用户 - IsGeneral bool `protobuf:"varint,3,opt,name=isGeneral,proto3" json:"isGeneral,omitempty"` // targetUid是否名将 + WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID + WinItems []*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"` // 战败方数据 } -func (x *StatPvPKillReq) Reset() { - *x = StatPvPKillReq{} +func (x *StatPvPReportResp) Reset() { + *x = StatPvPReportResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[16] + mi := &file_user_center_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatPvPKillReq) String() string { +func (x *StatPvPReportResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatPvPKillReq) ProtoMessage() {} +func (*StatPvPReportResp) ProtoMessage() {} -func (x *StatPvPKillReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[16] +func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1382,244 +1215,67 @@ func (x *StatPvPKillReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StatPvPKillReq.ProtoReflect.Descriptor instead. -func (*StatPvPKillReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{16} +// Deprecated: Use StatPvPReportResp.ProtoReflect.Descriptor instead. +func (*StatPvPReportResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{15} } -func (x *StatPvPKillReq) GetUid() int64 { +func (x *StatPvPReportResp) GetWinCamp() int32 { if x != nil { - return x.Uid + return x.WinCamp } return 0 } -func (x *StatPvPKillReq) GetTargetUid() int64 { +func (x *StatPvPReportResp) GetBattleId() int64 { if x != nil { - return x.TargetUid + return x.BattleId } return 0 } -func (x *StatPvPKillReq) GetIsGeneral() bool { +func (x *StatPvPReportResp) GetWinItems() []*StatPvPReportResp_Item { if x != nil { - return x.IsGeneral + return x.WinItems } - return false + return nil +} + +func (x *StatPvPReportResp) GetLostItems() []*StatPvPReportResp_Item { + if x != nil { + return x.LostItems + } + return nil } -// 通知-PvP一血 statistics.pvp.first -type StatPvPFirstBloodReq struct { +type GiftPackItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` // 1-拿到一血 2-被破一血 + PackType string `protobuf:"bytes,1,opt,name=packType,proto3" json:"packType,omitempty"` // 礼包类型 starter:新手礼包 + PackName string `protobuf:"bytes,2,opt,name=packName,proto3" json:"packName,omitempty"` // 礼包名称 + Coin int64 `protobuf:"varint,3,opt,name=coin,proto3" json:"coin,omitempty"` // 获取的弹币 + Title []string `protobuf:"bytes,4,rep,name=title,proto3" json:"title,omitempty"` // 获取的称号 } -func (x *StatPvPFirstBloodReq) Reset() { - *x = StatPvPFirstBloodReq{} +func (x *GiftPackItem) Reset() { + *x = GiftPackItem{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[17] + mi := &file_user_center_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *StatPvPFirstBloodReq) String() string { +func (x *GiftPackItem) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StatPvPFirstBloodReq) ProtoMessage() {} +func (*GiftPackItem) ProtoMessage() {} -func (x *StatPvPFirstBloodReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[17] - 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 StatPvPFirstBloodReq.ProtoReflect.Descriptor instead. -func (*StatPvPFirstBloodReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{17} -} - -func (x *StatPvPFirstBloodReq) GetUid() int64 { - if x != nil { - return x.Uid - } - return 0 -} - -func (x *StatPvPFirstBloodReq) GetType() int32 { - if x != nil { - return x.Type - } - return 0 -} - -// 通知-PvP战报 statistics.pvp.report -type StatPvPReportReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 - BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID - WinItems []*StatPvPReportReq_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 - LostItems []*StatPvPReportReq_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 -} - -func (x *StatPvPReportReq) Reset() { - *x = StatPvPReportReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatPvPReportReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatPvPReportReq) ProtoMessage() {} - -func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatPvPReportReq.ProtoReflect.Descriptor instead. -func (*StatPvPReportReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{18} -} - -func (x *StatPvPReportReq) GetWinCamp() int32 { - if x != nil { - return x.WinCamp - } - return 0 -} - -func (x *StatPvPReportReq) GetBattleId() int64 { - if x != nil { - return x.BattleId - } - return 0 -} - -func (x *StatPvPReportReq) GetWinItems() []*StatPvPReportReq_Item { - if x != nil { - return x.WinItems - } - return nil -} - -func (x *StatPvPReportReq) GetLostItems() []*StatPvPReportReq_Item { - if x != nil { - return x.LostItems - } - return nil -} - -// 通知-PvP战报 回复 -type StatPvPReportResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - WinItems []*StatPvPReportResp_Item `protobuf:"bytes,1,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 - LostItems []*StatPvPReportResp_Item `protobuf:"bytes,2,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 -} - -func (x *StatPvPReportResp) Reset() { - *x = StatPvPReportResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatPvPReportResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatPvPReportResp) ProtoMessage() {} - -func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatPvPReportResp.ProtoReflect.Descriptor instead. -func (*StatPvPReportResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{19} -} - -func (x *StatPvPReportResp) GetWinItems() []*StatPvPReportResp_Item { - if x != nil { - return x.WinItems - } - return nil -} - -func (x *StatPvPReportResp) GetLostItems() []*StatPvPReportResp_Item { - if x != nil { - return x.LostItems - } - return nil -} - -type GiftPackItem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PackType string `protobuf:"bytes,1,opt,name=packType,proto3" json:"packType,omitempty"` // 礼包类型 starter:新手礼包 - PackName string `protobuf:"bytes,2,opt,name=packName,proto3" json:"packName,omitempty"` // 礼包名称 - Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral,omitempty"` // 获取的积分 - Title []string `protobuf:"bytes,4,rep,name=title,proto3" json:"title,omitempty"` // 获取的称号 -} - -func (x *GiftPackItem) Reset() { - *x = GiftPackItem{} - if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GiftPackItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GiftPackItem) ProtoMessage() {} - -func (x *GiftPackItem) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[20] +func (x *GiftPackItem) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1632,7 +1288,7 @@ func (x *GiftPackItem) ProtoReflect() protoreflect.Message { // Deprecated: Use GiftPackItem.ProtoReflect.Descriptor instead. func (*GiftPackItem) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{20} + return file_user_center_proto_rawDescGZIP(), []int{16} } func (x *GiftPackItem) GetPackType() string { @@ -1649,9 +1305,9 @@ func (x *GiftPackItem) GetPackName() string { return "" } -func (x *GiftPackItem) GetIntegral() int64 { +func (x *GiftPackItem) GetCoin() int64 { if x != nil { - return x.Integral + return x.Coin } return 0 } @@ -1677,7 +1333,7 @@ type DrawGiftPackReq struct { func (x *DrawGiftPackReq) Reset() { *x = DrawGiftPackReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[21] + mi := &file_user_center_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1690,7 +1346,7 @@ func (x *DrawGiftPackReq) String() string { func (*DrawGiftPackReq) ProtoMessage() {} func (x *DrawGiftPackReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[21] + mi := &file_user_center_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1703,7 +1359,7 @@ func (x *DrawGiftPackReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DrawGiftPackReq.ProtoReflect.Descriptor instead. func (*DrawGiftPackReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{21} + return file_user_center_proto_rawDescGZIP(), []int{17} } func (x *DrawGiftPackReq) GetUid() int64 { @@ -1734,15 +1390,13 @@ type DrawGiftPackResp struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` - Code int32 `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` // 领取结果 200:成功 201100:已经领取过 201101:已领取完 - Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` // 消息 [领取成功|已经领取过|该用户已领取(当日|每周|每月)完所有礼包] Item *GiftPackItem `protobuf:"bytes,10,opt,name=item,proto3" json:"item,omitempty"` } func (x *DrawGiftPackResp) Reset() { *x = DrawGiftPackResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[22] + mi := &file_user_center_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1755,7 +1409,7 @@ func (x *DrawGiftPackResp) String() string { func (*DrawGiftPackResp) ProtoMessage() {} func (x *DrawGiftPackResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[22] + mi := &file_user_center_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1768,7 +1422,7 @@ func (x *DrawGiftPackResp) ProtoReflect() protoreflect.Message { // Deprecated: Use DrawGiftPackResp.ProtoReflect.Descriptor instead. func (*DrawGiftPackResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{22} + return file_user_center_proto_rawDescGZIP(), []int{18} } func (x *DrawGiftPackResp) GetUid() int64 { @@ -1785,20 +1439,6 @@ func (x *DrawGiftPackResp) GetUname() string { return "" } -func (x *DrawGiftPackResp) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *DrawGiftPackResp) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - func (x *DrawGiftPackResp) GetItem() *GiftPackItem { if x != nil { return x.Item @@ -1820,7 +1460,7 @@ type IncreaseWelfareReq struct { func (x *IncreaseWelfareReq) Reset() { *x = IncreaseWelfareReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[23] + mi := &file_user_center_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1833,7 +1473,7 @@ func (x *IncreaseWelfareReq) String() string { func (*IncreaseWelfareReq) ProtoMessage() {} func (x *IncreaseWelfareReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[23] + mi := &file_user_center_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1846,7 +1486,7 @@ func (x *IncreaseWelfareReq) ProtoReflect() protoreflect.Message { // Deprecated: Use IncreaseWelfareReq.ProtoReflect.Descriptor instead. func (*IncreaseWelfareReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{23} + return file_user_center_proto_rawDescGZIP(), []int{19} } func (x *IncreaseWelfareReq) GetUid() int64 { @@ -1875,14 +1515,14 @@ type RankPvpReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // rank类型 - TopN int32 `protobuf:"varint,2,opt,name=topN,proto3" json:"topN,omitempty"` // TopN + Type vars.RankType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.vars.RankType" json:"type,omitempty"` // rank类型 + TopN int32 `protobuf:"varint,2,opt,name=topN,proto3" json:"topN,omitempty"` // TopN } func (x *RankPvpReq) Reset() { *x = RankPvpReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[24] + mi := &file_user_center_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1895,7 +1535,7 @@ func (x *RankPvpReq) String() string { func (*RankPvpReq) ProtoMessage() {} func (x *RankPvpReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[24] + mi := &file_user_center_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1908,14 +1548,14 @@ func (x *RankPvpReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpReq.ProtoReflect.Descriptor instead. func (*RankPvpReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{24} + return file_user_center_proto_rawDescGZIP(), []int{20} } -func (x *RankPvpReq) GetType() int32 { +func (x *RankPvpReq) GetType() vars.RankType { if x != nil { return x.Type } - return 0 + return vars.RankType(0) } func (x *RankPvpReq) GetTopN() int32 { @@ -1930,14 +1570,14 @@ type RankPvpResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // rank类型 - Items []*RankPvpResp_Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // rank数据 + Type vars.RankType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.vars.RankType" json:"type,omitempty"` // rank类型 + Items []*RankPvpResp_Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // rank数据 } func (x *RankPvpResp) Reset() { *x = RankPvpResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[25] + mi := &file_user_center_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1950,7 +1590,7 @@ func (x *RankPvpResp) String() string { func (*RankPvpResp) ProtoMessage() {} func (x *RankPvpResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[25] + mi := &file_user_center_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1963,14 +1603,14 @@ func (x *RankPvpResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpResp.ProtoReflect.Descriptor instead. func (*RankPvpResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{25} + return file_user_center_proto_rawDescGZIP(), []int{21} } -func (x *RankPvpResp) GetType() int32 { +func (x *RankPvpResp) GetType() vars.RankType { if x != nil { return x.Type } - return 0 + return vars.RankType(0) } func (x *RankPvpResp) GetItems() []*RankPvpResp_Item { @@ -1986,14 +1626,14 @@ type RankPvpSubmitReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RankType int32 `protobuf:"varint,1,opt,name=rankType,proto3" json:"rankType,omitempty"` // 待结算的排行榜类型 - AllRankType bool `protobuf:"varint,2,opt,name=allRankType,proto3" json:"allRankType,omitempty"` // 是否直接结算所有排行类型 + RankType vars.RankType `protobuf:"varint,1,opt,name=rankType,proto3,enum=pb.vars.RankType" json:"rankType,omitempty"` // 待结算的排行榜类型 + AllRankType bool `protobuf:"varint,2,opt,name=allRankType,proto3" json:"allRankType,omitempty"` // 是否直接结算所有排行类型 } func (x *RankPvpSubmitReq) Reset() { *x = RankPvpSubmitReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[26] + mi := &file_user_center_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2006,7 +1646,7 @@ func (x *RankPvpSubmitReq) String() string { func (*RankPvpSubmitReq) ProtoMessage() {} func (x *RankPvpSubmitReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[26] + mi := &file_user_center_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2019,14 +1659,14 @@ func (x *RankPvpSubmitReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitReq.ProtoReflect.Descriptor instead. func (*RankPvpSubmitReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{26} + return file_user_center_proto_rawDescGZIP(), []int{22} } -func (x *RankPvpSubmitReq) GetRankType() int32 { +func (x *RankPvpSubmitReq) GetRankType() vars.RankType { if x != nil { return x.RankType } - return 0 + return vars.RankType(0) } func (x *RankPvpSubmitReq) GetAllRankType() bool { @@ -2047,7 +1687,7 @@ type RankPvpSubmitResp struct { func (x *RankPvpSubmitResp) Reset() { *x = RankPvpSubmitResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[27] + mi := &file_user_center_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2060,7 +1700,7 @@ func (x *RankPvpSubmitResp) String() string { func (*RankPvpSubmitResp) ProtoMessage() {} func (x *RankPvpSubmitResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[27] + mi := &file_user_center_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2073,45 +1713,685 @@ func (x *RankPvpSubmitResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitResp.ProtoReflect.Descriptor instead. func (*RankPvpSubmitResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{27} + return file_user_center_proto_rawDescGZIP(), []int{23} } func (x *RankPvpSubmitResp) GetItems() []*RankPvpSubmitResp_Item { if x != nil { return x.Items } - return nil + return nil +} + +// UserRankReq 查询用户自己的排行 +type UserRankReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // 用户名 + RankType vars.RankType `protobuf:"varint,3,opt,name=rankType,proto3,enum=pb.vars.RankType" json:"rankType,omitempty"` // 排行榜类型 + AllRankType bool `protobuf:"varint,4,opt,name=allRankType,proto3" json:"allRankType,omitempty"` // 直接查询所有排行类型 +} + +func (x *UserRankReq) Reset() { + *x = UserRankReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserRankReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserRankReq) ProtoMessage() {} + +func (x *UserRankReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserRankReq.ProtoReflect.Descriptor instead. +func (*UserRankReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{24} +} + +func (x *UserRankReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *UserRankReq) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UserRankReq) GetRankType() vars.RankType { + if x != nil { + return x.RankType + } + return vars.RankType(0) +} + +func (x *UserRankReq) GetAllRankType() bool { + if x != nil { + return x.AllRankType + } + return false +} + +type UserRankResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*UserRankResp_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *UserRankResp) Reset() { + *x = UserRankResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserRankResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserRankResp) ProtoMessage() {} + +func (x *UserRankResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserRankResp.ProtoReflect.Descriptor instead. +func (*UserRankResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{25} +} + +func (x *UserRankResp) GetItems() []*UserRankResp_Item { + if x != nil { + return x.Items + } + return nil +} + +/////////////////////////// zhg +type EliteReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // ID + Sort int32 `protobuf:"varint,2,opt,name=sort,proto3" json:"sort,omitempty"` // 序号 +} + +func (x *EliteReq) Reset() { + *x = EliteReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EliteReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EliteReq) ProtoMessage() {} + +func (x *EliteReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EliteReq.ProtoReflect.Descriptor instead. +func (*EliteReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{26} +} + +func (x *EliteReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *EliteReq) GetSort() int32 { + if x != nil { + return x.Sort + } + return 0 +} + +type GiveEliteReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // ID + EliteId int64 `protobuf:"varint,2,opt,name=eliteId,proto3" json:"eliteId,omitempty"` // 精英单位ID + Duration int32 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` // 赠送时长(天) + Forever bool `protobuf:"varint,4,opt,name=forever,proto3" json:"forever,omitempty"` // 永久赠送 +} + +func (x *GiveEliteReq) Reset() { + *x = GiveEliteReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GiveEliteReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GiveEliteReq) ProtoMessage() {} + +func (x *GiveEliteReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GiveEliteReq.ProtoReflect.Descriptor instead. +func (*GiveEliteReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{27} +} + +func (x *GiveEliteReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GiveEliteReq) GetEliteId() int64 { + if x != nil { + return x.EliteId + } + return 0 +} + +func (x *GiveEliteReq) GetDuration() int32 { + if x != nil { + return x.Duration + } + return 0 +} + +func (x *GiveEliteReq) GetForever() bool { + if x != nil { + return x.Forever + } + return false +} + +type BuyEliteResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // ID + EliteId int64 `protobuf:"varint,2,opt,name=eliteId,proto3" json:"eliteId,omitempty"` // 精英单位ID + Cost int64 `protobuf:"varint,3,opt,name=cost,proto3" json:"cost,omitempty"` // 花费 + Duration int32 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` // 持续时间 单位(day) +} + +func (x *BuyEliteResp) Reset() { + *x = BuyEliteResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuyEliteResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuyEliteResp) ProtoMessage() {} + +func (x *BuyEliteResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuyEliteResp.ProtoReflect.Descriptor instead. +func (*BuyEliteResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{28} +} + +func (x *BuyEliteResp) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *BuyEliteResp) GetEliteId() int64 { + if x != nil { + return x.EliteId + } + return 0 +} + +func (x *BuyEliteResp) GetCost() int64 { + if x != nil { + return x.Cost + } + return 0 +} + +func (x *BuyEliteResp) GetDuration() int32 { + if x != nil { + return x.Duration + } + return 0 +} + +type GiveTitleReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // ID + TitleId int64 `protobuf:"varint,2,opt,name=titleId,proto3" json:"titleId,omitempty"` // 精英单位ID + Duration int32 `protobuf:"varint,3,opt,name=duration,proto3" json:"duration,omitempty"` // 赠送时长(天) + Forever bool `protobuf:"varint,4,opt,name=forever,proto3" json:"forever,omitempty"` // 永久赠送 +} + +func (x *GiveTitleReq) Reset() { + *x = GiveTitleReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GiveTitleReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GiveTitleReq) ProtoMessage() {} + +func (x *GiveTitleReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GiveTitleReq.ProtoReflect.Descriptor instead. +func (*GiveTitleReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{29} +} + +func (x *GiveTitleReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *GiveTitleReq) GetTitleId() int64 { + if x != nil { + return x.TitleId + } + return 0 +} + +func (x *GiveTitleReq) GetDuration() int32 { + if x != nil { + return x.Duration + } + return 0 +} + +func (x *GiveTitleReq) GetForever() bool { + if x != nil { + return x.Forever + } + return false +} + +type BuyTitleResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // ID + TitleId int64 `protobuf:"varint,2,opt,name=titleId,proto3" json:"titleId,omitempty"` // 称号ID + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 称号名 + Cost int64 `protobuf:"varint,4,opt,name=cost,proto3" json:"cost,omitempty"` // 花费 + Duration int32 `protobuf:"varint,5,opt,name=duration,proto3" json:"duration,omitempty"` // 持续时间 单位(day) +} + +func (x *BuyTitleResp) Reset() { + *x = BuyTitleResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuyTitleResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuyTitleResp) ProtoMessage() {} + +func (x *BuyTitleResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuyTitleResp.ProtoReflect.Descriptor instead. +func (*BuyTitleResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{30} +} + +func (x *BuyTitleResp) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *BuyTitleResp) GetTitleId() int64 { + if x != nil { + return x.TitleId + } + return 0 +} + +func (x *BuyTitleResp) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BuyTitleResp) GetCost() int64 { + if x != nil { + return x.Cost + } + return 0 +} + +func (x *BuyTitleResp) GetDuration() int32 { + if x != nil { + return x.Duration + } + return 0 +} + +type ChangeEliteResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + EliteId int64 `protobuf:"varint,2,opt,name=eliteId,proto3" json:"eliteId,omitempty"` +} + +func (x *ChangeEliteResp) Reset() { + *x = ChangeEliteResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeEliteResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeEliteResp) ProtoMessage() {} + +func (x *ChangeEliteResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeEliteResp.ProtoReflect.Descriptor instead. +func (*ChangeEliteResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{31} +} + +func (x *ChangeEliteResp) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *ChangeEliteResp) GetEliteId() int64 { + if x != nil { + return x.EliteId + } + return 0 +} + +type TitleReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // ID + Sort int32 `protobuf:"varint,2,opt,name=sort,proto3" json:"sort,omitempty"` // 序号 +} + +func (x *TitleReq) Reset() { + *x = TitleReq{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TitleReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TitleReq) ProtoMessage() {} + +func (x *TitleReq) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TitleReq.ProtoReflect.Descriptor instead. +func (*TitleReq) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{32} +} + +func (x *TitleReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *TitleReq) GetSort() int32 { + if x != nil { + return x.Sort + } + return 0 +} + +type ChangeTitleResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + TitleId int64 `protobuf:"varint,2,opt,name=titleId,proto3" json:"titleId,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ChangeTitleResp) Reset() { + *x = ChangeTitleResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeTitleResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeTitleResp) ProtoMessage() {} + +func (x *ChangeTitleResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeTitleResp.ProtoReflect.Descriptor instead. +func (*ChangeTitleResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{33} +} + +func (x *ChangeTitleResp) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *ChangeTitleResp) GetTitleId() int64 { + if x != nil { + return x.TitleId + } + return 0 +} + +func (x *ChangeTitleResp) GetName() string { + if x != nil { + return x.Name + } + return "" } -// UserRankReq 查询用户自己的排行 -type UserRankReq struct { +// TitleItem 称号 +type UserDetailsResp_TitleItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 系统用户ID - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // 用户名 - RankType int32 `protobuf:"varint,3,opt,name=rankType,proto3" json:"rankType,omitempty"` // 排行榜类型 - AllRankType bool `protobuf:"varint,4,opt,name=allRankType,proto3" json:"allRankType,omitempty"` // 直接查询所有排行类型 + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 名 + Sort int32 `protobuf:"varint,3,opt,name=sort,proto3" json:"sort,omitempty"` // 排序号 + Remain int32 `protobuf:"varint,4,opt,name=remain,proto3" json:"remain,omitempty"` // 剩余时长(单位:小时) } -func (x *UserRankReq) Reset() { - *x = UserRankReq{} +func (x *UserDetailsResp_TitleItem) Reset() { + *x = UserDetailsResp_TitleItem{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[28] + mi := &file_user_center_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UserRankReq) String() string { +func (x *UserDetailsResp_TitleItem) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserRankReq) ProtoMessage() {} +func (*UserDetailsResp_TitleItem) ProtoMessage() {} -func (x *UserRankReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[28] +func (x *UserDetailsResp_TitleItem) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2122,64 +2402,67 @@ func (x *UserRankReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserRankReq.ProtoReflect.Descriptor instead. -func (*UserRankReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{28} +// Deprecated: Use UserDetailsResp_TitleItem.ProtoReflect.Descriptor instead. +func (*UserDetailsResp_TitleItem) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{4, 0} } -func (x *UserRankReq) GetUserId() int64 { +func (x *UserDetailsResp_TitleItem) GetId() int64 { if x != nil { - return x.UserId + return x.Id } return 0 } -func (x *UserRankReq) GetUsername() string { +func (x *UserDetailsResp_TitleItem) GetName() string { if x != nil { - return x.Username + return x.Name } return "" } -func (x *UserRankReq) GetRankType() int32 { +func (x *UserDetailsResp_TitleItem) GetSort() int32 { if x != nil { - return x.RankType + return x.Sort } return 0 } -func (x *UserRankReq) GetAllRankType() bool { +func (x *UserDetailsResp_TitleItem) GetRemain() int32 { if x != nil { - return x.AllRankType + return x.Remain } - return false + return 0 } -type UserRankResp struct { +// 精英单位 +type UserDetailsResp_EliteItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Items []*UserRankResp_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID 1000(普通x) 1001(弓骑兵) 1002(牧师) + Sort int32 `protobuf:"varint,2,opt,name=sort,proto3" json:"sort,omitempty"` // 排序号 + Remain int32 `protobuf:"varint,3,opt,name=remain,proto3" json:"remain,omitempty"` // 剩余时长(单位:天)-1无限制 } -func (x *UserRankResp) Reset() { - *x = UserRankResp{} +func (x *UserDetailsResp_EliteItem) Reset() { + *x = UserDetailsResp_EliteItem{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[29] + mi := &file_user_center_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UserRankResp) String() string { +func (x *UserDetailsResp_EliteItem) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserRankResp) ProtoMessage() {} +func (*UserDetailsResp_EliteItem) ProtoMessage() {} -func (x *UserRankResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[29] +func (x *UserDetailsResp_EliteItem) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2190,16 +2473,30 @@ func (x *UserRankResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserRankResp.ProtoReflect.Descriptor instead. -func (*UserRankResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{29} +// Deprecated: Use UserDetailsResp_EliteItem.ProtoReflect.Descriptor instead. +func (*UserDetailsResp_EliteItem) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{4, 1} } -func (x *UserRankResp) GetItems() []*UserRankResp_Item { +func (x *UserDetailsResp_EliteItem) GetId() int64 { if x != nil { - return x.Items + return x.Id } - return nil + return 0 +} + +func (x *UserDetailsResp_EliteItem) GetSort() int32 { + if x != nil { + return x.Sort + } + return 0 +} + +func (x *UserDetailsResp_EliteItem) GetRemain() int32 { + if x != nil { + return x.Remain + } + return 0 } type StatPvPReportReq_Item struct { @@ -2207,19 +2504,23 @@ type StatPvPReportReq_Item struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) - Damage int64 `protobuf:"varint,4,opt,name=damage,proto3" json:"damage,omitempty"` // 伤害量 - DeDamage int64 `protobuf:"varint,5,opt,name=deDamage,proto3" json:"deDamage,omitempty"` // 承受伤害 - KillUnit int64 `protobuf:"varint,6,opt,name=killUnit,proto3" json:"killUnit,omitempty"` // 击杀单位数量 - DeKillUnit int64 `protobuf:"varint,7,opt,name=deKillUnit,proto3" json:"deKillUnit,omitempty"` // 被杀单位数量 + 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"` // 被杀单位数量 + FirstBlood bool `protobuf:"varint,7,opt,name=firstBlood,proto3" json:"firstBlood,omitempty"` // 拿到一血 + DeFirstBlood bool `protobuf:"varint,8,opt,name=deFirstBlood,proto3" json:"deFirstBlood,omitempty"` // 被拿一血 + KillPlayer int64 `protobuf:"varint,9,opt,name=killPlayer,proto3" json:"killPlayer,omitempty"` // 击杀玩家数 + DeKillPlayer bool `protobuf:"varint,10,opt,name=deKillPlayer,proto3" json:"deKillPlayer,omitempty"` // 是否被击杀 + IsGeneral bool `protobuf:"varint,11,opt,name=isGeneral,proto3" json:"isGeneral,omitempty"` // 是否上一把名将? } func (x *StatPvPReportReq_Item) Reset() { *x = StatPvPReportReq_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[30] + mi := &file_user_center_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2232,7 +2533,7 @@ func (x *StatPvPReportReq_Item) String() string { func (*StatPvPReportReq_Item) ProtoMessage() {} func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[30] + mi := &file_user_center_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2245,7 +2546,7 @@ func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportReq_Item.ProtoReflect.Descriptor instead. func (*StatPvPReportReq_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{18, 0} + return file_user_center_proto_rawDescGZIP(), []int{14, 0} } func (x *StatPvPReportReq_Item) GetUid() int64 { @@ -2262,13 +2563,6 @@ 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 @@ -2297,26 +2591,56 @@ func (x *StatPvPReportReq_Item) GetDeKillUnit() int64 { return 0 } +func (x *StatPvPReportReq_Item) GetFirstBlood() bool { + if x != nil { + return x.FirstBlood + } + return false +} + +func (x *StatPvPReportReq_Item) GetDeFirstBlood() bool { + if x != nil { + return x.DeFirstBlood + } + return false +} + +func (x *StatPvPReportReq_Item) GetKillPlayer() int64 { + if x != nil { + return x.KillPlayer + } + return 0 +} + +func (x *StatPvPReportReq_Item) GetDeKillPlayer() bool { + if x != nil { + return x.DeKillPlayer + } + return false +} + +func (x *StatPvPReportReq_Item) GetIsGeneral() bool { + if x != nil { + return x.IsGeneral + } + return false +} + type StatPvPReportResp_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) - ReturnsIntegral int64 `protobuf:"varint,4,opt,name=returnsIntegral,proto3" json:"returnsIntegral,omitempty"` // 回收的积分(获胜方才能回收,0不要展示) - RewardPoolIntegral int64 `protobuf:"varint,5,opt,name=rewardPoolIntegral,proto3" json:"rewardPoolIntegral,omitempty"` // 瓜分奖池分 - GeneralIntegral int64 `protobuf:"varint,6,opt,name=generalIntegral,proto3" json:"generalIntegral,omitempty"` // 名将 - NobilityIntegral int64 `protobuf:"varint,7,opt,name=nobilityIntegral,proto3" json:"nobilityIntegral,omitempty"` // 舰长|总督|贵族 加成分 - BattleIntegral int64 `protobuf:"varint,8,opt,name=battleIntegral,proto3" json:"battleIntegral,omitempty"` // 战斗结算奖励(普通) - TotalIntegral int64 `protobuf:"varint,10,opt,name=totalIntegral,proto3" json:"totalIntegral,omitempty"` // 总计加分 + 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"` // 名次(特指在某一方的名次) + Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"` // 评分(一位小数) } func (x *StatPvPReportResp_Item) Reset() { *x = StatPvPReportResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[31] + mi := &file_user_center_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2329,7 +2653,7 @@ func (x *StatPvPReportResp_Item) String() string { func (*StatPvPReportResp_Item) ProtoMessage() {} func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[31] + mi := &file_user_center_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2342,7 +2666,7 @@ func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportResp_Item.ProtoReflect.Descriptor instead. func (*StatPvPReportResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{19, 0} + return file_user_center_proto_rawDescGZIP(), []int{15, 0} } func (x *StatPvPReportResp_Item) GetUid() int64 { @@ -2366,44 +2690,9 @@ func (x *StatPvPReportResp_Item) GetPosition() int32 { return 0 } -func (x *StatPvPReportResp_Item) GetReturnsIntegral() int64 { - if x != nil { - return x.ReturnsIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetRewardPoolIntegral() int64 { +func (x *StatPvPReportResp_Item) GetScore() float32 { if x != nil { - return x.RewardPoolIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetGeneralIntegral() int64 { - if x != nil { - return x.GeneralIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetNobilityIntegral() int64 { - if x != nil { - return x.NobilityIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetBattleIntegral() int64 { - if x != nil { - return x.BattleIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetTotalIntegral() int64 { - if x != nil { - return x.TotalIntegral + return x.Score } return 0 } @@ -2422,7 +2711,7 @@ type RankPvpResp_Item struct { func (x *RankPvpResp_Item) Reset() { *x = RankPvpResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[32] + mi := &file_user_center_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2435,7 +2724,7 @@ func (x *RankPvpResp_Item) String() string { func (*RankPvpResp_Item) ProtoMessage() {} func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[32] + mi := &file_user_center_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2448,7 +2737,7 @@ func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpResp_Item.ProtoReflect.Descriptor instead. func (*RankPvpResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{25, 0} + return file_user_center_proto_rawDescGZIP(), []int{21, 0} } func (x *RankPvpResp_Item) GetUid() int64 { @@ -2487,7 +2776,7 @@ type RankPvpSubmitResp_Result struct { UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` - Integral int64 `protobuf:"varint,4,opt,name=integral,proto3" json:"integral,omitempty"` // 获取到的积分数 + Coin int64 `protobuf:"varint,4,opt,name=coin,proto3" json:"coin,omitempty"` // 获取到的积分数 Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` // 获取到的称号 TitleDuration int64 `protobuf:"varint,6,opt,name=titleDuration,proto3" json:"titleDuration,omitempty"` // 称号持续时间(单位: 秒,负数为无限长) } @@ -2495,7 +2784,7 @@ type RankPvpSubmitResp_Result struct { func (x *RankPvpSubmitResp_Result) Reset() { *x = RankPvpSubmitResp_Result{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[33] + mi := &file_user_center_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2508,7 +2797,7 @@ func (x *RankPvpSubmitResp_Result) String() string { func (*RankPvpSubmitResp_Result) ProtoMessage() {} func (x *RankPvpSubmitResp_Result) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[33] + mi := &file_user_center_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2521,7 +2810,7 @@ func (x *RankPvpSubmitResp_Result) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitResp_Result.ProtoReflect.Descriptor instead. func (*RankPvpSubmitResp_Result) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{27, 0} + return file_user_center_proto_rawDescGZIP(), []int{23, 0} } func (x *RankPvpSubmitResp_Result) GetUserId() int64 { @@ -2545,9 +2834,9 @@ func (x *RankPvpSubmitResp_Result) GetAvatar() string { return "" } -func (x *RankPvpSubmitResp_Result) GetIntegral() int64 { +func (x *RankPvpSubmitResp_Result) GetCoin() int64 { if x != nil { - return x.Integral + return x.Coin } return 0 } @@ -2571,14 +2860,14 @@ type RankPvpSubmitResp_Item struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RankType int32 `protobuf:"varint,1,opt,name=rankType,proto3" json:"rankType,omitempty"` // 排行榜类型 - Results []*RankPvpSubmitResp_Result `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // 上榜玩家? + RankType vars.RankType `protobuf:"varint,1,opt,name=rankType,proto3,enum=pb.vars.RankType" json:"rankType,omitempty"` // 排行榜类型 + Results []*RankPvpSubmitResp_Result `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"` // 上榜玩家? } func (x *RankPvpSubmitResp_Item) Reset() { *x = RankPvpSubmitResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[34] + mi := &file_user_center_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2591,7 +2880,7 @@ func (x *RankPvpSubmitResp_Item) String() string { func (*RankPvpSubmitResp_Item) ProtoMessage() {} func (x *RankPvpSubmitResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[34] + mi := &file_user_center_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2604,14 +2893,14 @@ func (x *RankPvpSubmitResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitResp_Item.ProtoReflect.Descriptor instead. func (*RankPvpSubmitResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{27, 1} + return file_user_center_proto_rawDescGZIP(), []int{23, 1} } -func (x *RankPvpSubmitResp_Item) GetRankType() int32 { +func (x *RankPvpSubmitResp_Item) GetRankType() vars.RankType { if x != nil { return x.RankType } - return 0 + return vars.RankType(0) } func (x *RankPvpSubmitResp_Item) GetResults() []*RankPvpSubmitResp_Result { @@ -2626,15 +2915,15 @@ type UserRankResp_Item struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RankType int32 `protobuf:"varint,1,opt,name=rankType,proto3" json:"rankType,omitempty"` // 排行类型 - Pos int32 `protobuf:"varint,2,opt,name=pos,proto3" json:"pos,omitempty"` // 名次 - Score int64 `protobuf:"varint,3,opt,name=score,proto3" json:"score,omitempty"` // 分数 + RankType vars.RankType `protobuf:"varint,1,opt,name=rankType,proto3,enum=pb.vars.RankType" json:"rankType,omitempty"` // 排行类型 + Pos int32 `protobuf:"varint,2,opt,name=pos,proto3" json:"pos,omitempty"` // 名次 + Score int64 `protobuf:"varint,3,opt,name=score,proto3" json:"score,omitempty"` // 分数 } func (x *UserRankResp_Item) Reset() { *x = UserRankResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[35] + mi := &file_user_center_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2647,7 +2936,7 @@ func (x *UserRankResp_Item) String() string { func (*UserRankResp_Item) ProtoMessage() {} func (x *UserRankResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[35] + mi := &file_user_center_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2660,14 +2949,14 @@ func (x *UserRankResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use UserRankResp_Item.ProtoReflect.Descriptor instead. func (*UserRankResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{29, 0} + return file_user_center_proto_rawDescGZIP(), []int{25, 0} } -func (x *UserRankResp_Item) GetRankType() int32 { +func (x *UserRankResp_Item) GetRankType() vars.RankType { if x != nil { return x.RankType } - return 0 + return vars.RankType(0) } func (x *UserRankResp_Item) GetPos() int32 { @@ -2688,146 +2977,142 @@ var File_user_center_proto protoreflect.FileDescriptor var file_user_center_proto_rawDesc = []byte{ 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xd6, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x55, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x55, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x24, - 0x0a, 0x0d, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x07, 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, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x0a, 0x0f, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x22, 0x30, 0x0a, 0x10, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x1c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, - 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x23, - 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 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, 0x22, 0x24, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x30, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x22, 0x41, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x55, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x55, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0xfd, 0x03, + 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x95, 0x01, 0x0a, 0x11, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, + 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6e, 0x6f, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0d, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, + 0x6f, 0x69, 0x6e, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, + 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x54, + 0x69, 0x74, 0x6c, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0c, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x54, + 0x69, 0x74, 0x6c, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x73, + 0x12, 0x35, 0x0a, 0x06, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x06, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x73, 0x1a, 0x5b, 0x0a, 0x09, 0x54, 0x69, 0x74, 0x6c, 0x65, + 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, + 0x6d, 0x61, 0x69, 0x6e, 0x1a, 0x47, 0x0a, 0x09, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x74, 0x65, + 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x23, 0x0a, + 0x09, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 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, 0x22, 0x24, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x93, 0x01, + 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x34, 0x0a, 0x0c, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x60, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x9b, 0x01, 0x0a, 0x0f, - 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, - 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, - 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x71, 0x0a, 0x17, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x22, 0xc4, 0x02, 0x0a, - 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, - 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x61, 0x72, - 0x67, 0x65, 0x74, 0x55, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, - 0x22, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x22, 0x81, 0x02, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, - 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x55, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e, - 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, - 0xba, 0x02, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, - 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, - 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, - 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, - 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x13, - 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x32, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x5e, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x50, - 0x76, 0x50, 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, - 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x22, 0x3c, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x50, - 0x76, 0x50, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xf5, 0x02, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x62, + 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x22, 0x8a, 0x02, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 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, 0x61, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, + 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x55, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x22, + 0x73, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, + 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, + 0x69, 0x63, 0x61, 0x6c, 0x22, 0x81, 0x02, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, + 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x70, 0x55, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x69, 0x66, 0x74, + 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, 0x74, 0x49, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x6e, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, + 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x61, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xba, 0x02, 0x0a, 0x12, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x55, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x55, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, + 0x69, 0x66, 0x74, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x67, 0x69, 0x66, + 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, + 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xff, 0x03, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, @@ -2839,211 +3124,251 @@ var file_user_center_proto_rawDesc = []byte{ 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, - 0x1a, 0xba, 0x01, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, + 0x1a, 0xc4, 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, 0x16, 0x0a, - 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, - 0x61, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x6b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x22, 0xd0, 0x03, - 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, + 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, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, + 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6b, 0x69, 0x6c, 0x6c, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x4b, + 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x22, 0x9d, 0x02, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, + 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, + 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x6c, - 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, - 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0xc8, 0x02, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x49, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x72, 0x65, 0x74, - 0x75, 0x72, 0x6e, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x12, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x28, 0x0a, 0x0f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x49, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x10, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, - 0x22, 0x78, 0x0a, 0x0c, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x49, 0x74, 0x65, 0x6d, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x0f, 0x44, 0x72, - 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x60, 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, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, - 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x56, 0x0a, 0x12, 0x49, 0x6e, - 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x57, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x6c, 0x66, - 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, - 0x72, 0x65, 0x22, 0x34, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x22, 0xab, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x6e, - 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, - 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, - 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x50, 0x0a, 0x10, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, - 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, - 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, - 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, 0x6c, - 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x52, 0x61, 0x6e, - 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, - 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x1a, 0xac, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, - 0x5a, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, - 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x7f, 0x0a, 0x0b, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 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, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x70, 0x0a, 0x0c, 0x47, 0x69, 0x66, 0x74, 0x50, + 0x61, 0x63, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, + 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x0f, 0x44, 0x72, 0x61, + 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x60, 0x0a, 0x10, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x04, + 0x69, 0x74, 0x65, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, + 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x22, 0x56, 0x0a, 0x12, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x57, 0x65, + 0x6c, 0x66, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x22, 0x47, 0x0a, 0x0a, 0x52, 0x61, + 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, + 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, + 0x6f, 0x70, 0x4e, 0x22, 0xbe, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x22, 0x63, 0x0a, 0x10, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, + 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, + 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, + 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, + 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xdb, 0x02, 0x0a, 0x11, 0x52, 0x61, + 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x30, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x1a, 0xa4, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x6d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x36, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, + 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, + 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x87, 0x01, 0x0a, + 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, - 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x4a, 0x0a, 0x04, 0x49, 0x74, - 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x2a, 0x2f, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x69, 0x66, 0x74, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x4f, 0x74, 0x68, 0x65, 0x72, 0x10, 0x0a, 0x2a, 0x28, 0x0a, 0x08, 0x47, 0x69, 0x66, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x10, 0x00, - 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x10, - 0x01, 0x2a, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, - 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, 0x44, 0x61, 0x6d, - 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, - 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, - 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x05, 0x12, - 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, 0x10, 0x06, 0x12, - 0x0e, 0x0a, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x07, 0x12, - 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, - 0x08, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, - 0x73, 0x74, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, - 0x6f, 0x64, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, - 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0c, 0x32, 0xb8, 0x07, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, - 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, - 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, - 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x79, 0x50, 0x55, 0x69, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, - 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x3f, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x75, 0x73, 0x65, - 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x14, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, - 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x39, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, - 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, - 0x74, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, - 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0f, 0x75, 0x73, - 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, - 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, - 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, - 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x4b, 0x69, 0x6c, 0x6c, 0x12, 0x12, 0x2e, - 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x4b, 0x69, 0x6c, 0x6c, 0x52, 0x65, - 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x11, - 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, - 0x64, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x46, 0x69, - 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, - 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, - 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, - 0x50, 0x61, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, - 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x34, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x57, 0x65, 0x6c, 0x66, 0x61, - 0x72, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, - 0x57, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, - 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, - 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x3c, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, - 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x30, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0f, - 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x1a, - 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x49, 0x74, + 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, + 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x70, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x36, 0x0a, 0x08, 0x45, 0x6c, 0x69, + 0x74, 0x65, 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, 0x12, 0x0a, + 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, + 0x74, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 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, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, + 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, + 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x22, 0x70, 0x0a, 0x0c, 0x42, 0x75, 0x79, + 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, + 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x0c, 0x47, + 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 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, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, + 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0f, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, + 0x36, 0x0a, 0x08, 0x54, 0x69, 0x74, 0x6c, 0x65, 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, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x57, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x2a, 0x28, 0x0a, 0x08, 0x47, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x75, 0x62, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x10, 0x01, 0x32, 0xaf, 0x08, 0x0a, 0x0a, 0x75, + 0x73, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x14, 0x72, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x76, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0e, + 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0d, + 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, + 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, + 0x79, 0x50, 0x55, 0x69, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x75, 0x73, + 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x70, 0x62, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x09, + 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x67, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x10, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, + 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, + 0x69, 0x66, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, + 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, + 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x74, 0x61, + 0x74, 0x50, 0x76, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, + 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x77, 0x47, + 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, + 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0e, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, + 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, + 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, + 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, + 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, + 0x75, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0f, 0x2e, 0x70, 0x62, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, + 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, + 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x47, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, + 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x2a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, + 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, + 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, + 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, + 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, + 0x62, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, + 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, + 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, + 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3058,100 +3383,121 @@ func file_user_center_proto_rawDescGZIP() []byte { return file_user_center_proto_rawDescData } -var file_user_center_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_user_center_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_user_center_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_user_center_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_user_center_proto_goTypes = []interface{}{ - (IntegralType)(0), // 0: pb.IntegralType - (GiftType)(0), // 1: pb.GiftType - (RankType)(0), // 2: pb.RankType - (*User)(nil), // 3: pb.User - (*Empty)(nil), // 4: pb.Empty - (*PlatformUserReq)(nil), // 5: pb.PlatformUserReq - (*PlatformUserResp)(nil), // 6: pb.PlatformUserResp - (*UserIdReq)(nil), // 7: pb.UserIdReq - (*UserIdResp)(nil), // 8: pb.UserIdResp - (*ChangeIntegralReq)(nil), // 9: pb.ChangeIntegralReq - (*ChangeIntegralResp)(nil), // 10: pb.ChangeIntegralResp - (*UserIntegralResp)(nil), // 11: pb.UserIntegralResp - (*UserCheckInResp)(nil), // 12: pb.UserCheckInResp - (*TransferUserIntegralReq)(nil), // 13: pb.TransferUserIntegralReq - (*TransferUserIntegralResp)(nil), // 14: pb.TransferUserIntegralResp - (*UserSendGiftReq)(nil), // 15: pb.UserSendGiftReq - (*UserSendGiftResp)(nil), // 16: pb.UserSendGiftResp - (*UserBuyNobilityReq)(nil), // 17: pb.UserBuyNobilityReq - (*UserBuyNobilityResp)(nil), // 18: pb.UserBuyNobilityResp - (*StatPvPKillReq)(nil), // 19: pb.StatPvPKillReq - (*StatPvPFirstBloodReq)(nil), // 20: pb.StatPvPFirstBloodReq - (*StatPvPReportReq)(nil), // 21: pb.StatPvPReportReq - (*StatPvPReportResp)(nil), // 22: pb.StatPvPReportResp - (*GiftPackItem)(nil), // 23: pb.GiftPackItem - (*DrawGiftPackReq)(nil), // 24: pb.DrawGiftPackReq - (*DrawGiftPackResp)(nil), // 25: pb.DrawGiftPackResp - (*IncreaseWelfareReq)(nil), // 26: pb.IncreaseWelfareReq - (*RankPvpReq)(nil), // 27: pb.RankPvpReq - (*RankPvpResp)(nil), // 28: pb.RankPvpResp - (*RankPvpSubmitReq)(nil), // 29: pb.RankPvpSubmitReq - (*RankPvpSubmitResp)(nil), // 30: pb.RankPvpSubmitResp - (*UserRankReq)(nil), // 31: pb.UserRankReq - (*UserRankResp)(nil), // 32: pb.UserRankResp - (*StatPvPReportReq_Item)(nil), // 33: pb.StatPvPReportReq.Item - (*StatPvPReportResp_Item)(nil), // 34: pb.StatPvPReportResp.Item - (*RankPvpResp_Item)(nil), // 35: pb.RankPvpResp.Item - (*RankPvpSubmitResp_Result)(nil), // 36: pb.RankPvpSubmitResp.Result - (*RankPvpSubmitResp_Item)(nil), // 37: pb.RankPvpSubmitResp.Item - (*UserRankResp_Item)(nil), // 38: pb.UserRankResp.Item + (GiftType)(0), // 0: pb.GiftType + (*Empty)(nil), // 1: pb.Empty + (*Response)(nil), // 2: pb.Response + (*PlatformUserReq)(nil), // 3: pb.PlatformUserReq + (*PlatformUserResp)(nil), // 4: pb.PlatformUserResp + (*UserDetailsResp)(nil), // 5: pb.UserDetailsResp + (*UserIdReq)(nil), // 6: pb.UserIdReq + (*UserIdResp)(nil), // 7: pb.UserIdResp + (*GetUserCoinResp)(nil), // 8: pb.GetUserCoinResp + (*ChangeCoinReq)(nil), // 9: pb.ChangeCoinReq + (*TransferUserCoinReq)(nil), // 10: pb.TransferUserCoinReq + (*TransferUserCoinResp)(nil), // 11: pb.TransferUserCoinResp + (*UserCheckInResp)(nil), // 12: pb.UserCheckInResp + (*UserSendGiftReq)(nil), // 13: pb.UserSendGiftReq + (*UserBuyNobilityReq)(nil), // 14: pb.UserBuyNobilityReq + (*StatPvPReportReq)(nil), // 15: pb.StatPvPReportReq + (*StatPvPReportResp)(nil), // 16: pb.StatPvPReportResp + (*GiftPackItem)(nil), // 17: pb.GiftPackItem + (*DrawGiftPackReq)(nil), // 18: pb.DrawGiftPackReq + (*DrawGiftPackResp)(nil), // 19: pb.DrawGiftPackResp + (*IncreaseWelfareReq)(nil), // 20: pb.IncreaseWelfareReq + (*RankPvpReq)(nil), // 21: pb.RankPvpReq + (*RankPvpResp)(nil), // 22: pb.RankPvpResp + (*RankPvpSubmitReq)(nil), // 23: pb.RankPvpSubmitReq + (*RankPvpSubmitResp)(nil), // 24: pb.RankPvpSubmitResp + (*UserRankReq)(nil), // 25: pb.UserRankReq + (*UserRankResp)(nil), // 26: pb.UserRankResp + (*EliteReq)(nil), // 27: pb.EliteReq + (*GiveEliteReq)(nil), // 28: pb.GiveEliteReq + (*BuyEliteResp)(nil), // 29: pb.BuyEliteResp + (*GiveTitleReq)(nil), // 30: pb.GiveTitleReq + (*BuyTitleResp)(nil), // 31: pb.BuyTitleResp + (*ChangeEliteResp)(nil), // 32: pb.ChangeEliteResp + (*TitleReq)(nil), // 33: pb.TitleReq + (*ChangeTitleResp)(nil), // 34: pb.ChangeTitleResp + (*UserDetailsResp_TitleItem)(nil), // 35: pb.UserDetailsResp.TitleItem + (*UserDetailsResp_EliteItem)(nil), // 36: pb.UserDetailsResp.EliteItem + (*StatPvPReportReq_Item)(nil), // 37: pb.StatPvPReportReq.Item + (*StatPvPReportResp_Item)(nil), // 38: pb.StatPvPReportResp.Item + (*RankPvpResp_Item)(nil), // 39: pb.RankPvpResp.Item + (*RankPvpSubmitResp_Result)(nil), // 40: pb.RankPvpSubmitResp.Result + (*RankPvpSubmitResp_Item)(nil), // 41: pb.RankPvpSubmitResp.Item + (*UserRankResp_Item)(nil), // 42: pb.UserRankResp.Item + (vars.UserCoinChangedReason)(0), // 43: pb.vars.UserCoinChangedReason + (vars.RankType)(0), // 44: pb.vars.RankType } var file_user_center_proto_depIdxs = []int32{ - 3, // 0: pb.PlatformUserResp.user:type_name -> pb.User - 0, // 1: pb.ChangeIntegralReq.integralType:type_name -> pb.IntegralType - 10, // 2: pb.UserSendGiftResp.integral:type_name -> pb.ChangeIntegralResp - 10, // 3: pb.UserBuyNobilityResp.integral:type_name -> pb.ChangeIntegralResp - 33, // 4: pb.StatPvPReportReq.winItems:type_name -> pb.StatPvPReportReq.Item - 33, // 5: pb.StatPvPReportReq.lostItems:type_name -> pb.StatPvPReportReq.Item - 34, // 6: pb.StatPvPReportResp.winItems:type_name -> pb.StatPvPReportResp.Item - 34, // 7: pb.StatPvPReportResp.lostItems:type_name -> pb.StatPvPReportResp.Item - 23, // 8: pb.DrawGiftPackResp.item:type_name -> pb.GiftPackItem - 35, // 9: pb.RankPvpResp.items:type_name -> pb.RankPvpResp.Item - 37, // 10: pb.RankPvpSubmitResp.items:type_name -> pb.RankPvpSubmitResp.Item - 38, // 11: pb.UserRankResp.items:type_name -> pb.UserRankResp.Item - 36, // 12: pb.RankPvpSubmitResp.Item.results:type_name -> pb.RankPvpSubmitResp.Result - 5, // 13: pb.userCenter.retrievePlatformUser:input_type -> pb.PlatformUserReq - 5, // 14: pb.userCenter.getUserIdByPUid:input_type -> pb.PlatformUserReq - 9, // 15: pb.userCenter.changeIntegral:input_type -> pb.ChangeIntegralReq - 7, // 16: pb.userCenter.getUserIntegral:input_type -> pb.UserIdReq - 7, // 17: pb.userCenter.userCheckIn:input_type -> pb.UserIdReq - 13, // 18: pb.userCenter.transferUserIntegral:input_type -> pb.TransferUserIntegralReq - 15, // 19: pb.userCenter.userSendGift:input_type -> pb.UserSendGiftReq - 17, // 20: pb.userCenter.userBuyNobility:input_type -> pb.UserBuyNobilityReq - 19, // 21: pb.userCenter.statPvpKill:input_type -> pb.StatPvPKillReq - 20, // 22: pb.userCenter.statPvpFirstBlood:input_type -> pb.StatPvPFirstBloodReq - 21, // 23: pb.userCenter.statPvpReport:input_type -> pb.StatPvPReportReq - 24, // 24: pb.userCenter.drawGiftPack:input_type -> pb.DrawGiftPackReq - 26, // 25: pb.userCenter.increaseWelfare:input_type -> pb.IncreaseWelfareReq - 27, // 26: pb.userCenter.rankPvp:input_type -> pb.RankPvpReq - 29, // 27: pb.userCenter.rankPvpSubmit:input_type -> pb.RankPvpSubmitReq - 31, // 28: pb.userCenter.userRankPvp:input_type -> pb.UserRankReq - 6, // 29: pb.userCenter.retrievePlatformUser:output_type -> pb.PlatformUserResp - 8, // 30: pb.userCenter.getUserIdByPUid:output_type -> pb.UserIdResp - 10, // 31: pb.userCenter.changeIntegral:output_type -> pb.ChangeIntegralResp - 11, // 32: pb.userCenter.getUserIntegral:output_type -> pb.UserIntegralResp - 12, // 33: pb.userCenter.userCheckIn:output_type -> pb.UserCheckInResp - 14, // 34: pb.userCenter.transferUserIntegral:output_type -> pb.TransferUserIntegralResp - 16, // 35: pb.userCenter.userSendGift:output_type -> pb.UserSendGiftResp - 18, // 36: pb.userCenter.userBuyNobility:output_type -> pb.UserBuyNobilityResp - 4, // 37: pb.userCenter.statPvpKill:output_type -> pb.Empty - 4, // 38: pb.userCenter.statPvpFirstBlood:output_type -> pb.Empty - 22, // 39: pb.userCenter.statPvpReport:output_type -> pb.StatPvPReportResp - 25, // 40: pb.userCenter.drawGiftPack:output_type -> pb.DrawGiftPackResp - 4, // 41: pb.userCenter.increaseWelfare:output_type -> pb.Empty - 28, // 42: pb.userCenter.rankPvp:output_type -> pb.RankPvpResp - 30, // 43: pb.userCenter.rankPvpSubmit:output_type -> pb.RankPvpSubmitResp - 32, // 44: pb.userCenter.userRankPvp:output_type -> pb.UserRankResp - 29, // [29:45] is the sub-list for method output_type - 13, // [13:29] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 35, // 0: pb.UserDetailsResp.currentTitle:type_name -> pb.UserDetailsResp.TitleItem + 36, // 1: pb.UserDetailsResp.currentElite:type_name -> pb.UserDetailsResp.EliteItem + 35, // 2: pb.UserDetailsResp.titles:type_name -> pb.UserDetailsResp.TitleItem + 36, // 3: pb.UserDetailsResp.elites:type_name -> pb.UserDetailsResp.EliteItem + 43, // 4: pb.ChangeCoinReq.reason:type_name -> pb.vars.UserCoinChangedReason + 37, // 5: pb.StatPvPReportReq.winItems:type_name -> pb.StatPvPReportReq.Item + 37, // 6: pb.StatPvPReportReq.lostItems:type_name -> pb.StatPvPReportReq.Item + 38, // 7: pb.StatPvPReportResp.winItems:type_name -> pb.StatPvPReportResp.Item + 38, // 8: pb.StatPvPReportResp.lostItems:type_name -> pb.StatPvPReportResp.Item + 17, // 9: pb.DrawGiftPackResp.item:type_name -> pb.GiftPackItem + 44, // 10: pb.RankPvpReq.type:type_name -> pb.vars.RankType + 44, // 11: pb.RankPvpResp.type:type_name -> pb.vars.RankType + 39, // 12: pb.RankPvpResp.items:type_name -> pb.RankPvpResp.Item + 44, // 13: pb.RankPvpSubmitReq.rankType:type_name -> pb.vars.RankType + 41, // 14: pb.RankPvpSubmitResp.items:type_name -> pb.RankPvpSubmitResp.Item + 44, // 15: pb.UserRankReq.rankType:type_name -> pb.vars.RankType + 42, // 16: pb.UserRankResp.items:type_name -> pb.UserRankResp.Item + 44, // 17: pb.RankPvpSubmitResp.Item.rankType:type_name -> pb.vars.RankType + 40, // 18: pb.RankPvpSubmitResp.Item.results:type_name -> pb.RankPvpSubmitResp.Result + 44, // 19: pb.UserRankResp.Item.rankType:type_name -> pb.vars.RankType + 3, // 20: pb.userCenter.retrievePlatformUser:input_type -> pb.PlatformUserReq + 6, // 21: pb.userCenter.getUserDetails:input_type -> pb.UserIdReq + 3, // 22: pb.userCenter.getUserIdByPUid:input_type -> pb.PlatformUserReq + 6, // 23: pb.userCenter.userCheckIn:input_type -> pb.UserIdReq + 9, // 24: pb.userCenter.changeCoin:input_type -> pb.ChangeCoinReq + 6, // 25: pb.userCenter.getUserCoin:input_type -> pb.UserIdReq + 10, // 26: pb.userCenter.transferUserCoin:input_type -> pb.TransferUserCoinReq + 13, // 27: pb.userCenter.userSendGift:input_type -> pb.UserSendGiftReq + 14, // 28: pb.userCenter.userBuyNobility:input_type -> pb.UserBuyNobilityReq + 15, // 29: pb.userCenter.statPvpReport:input_type -> pb.StatPvPReportReq + 18, // 30: pb.userCenter.drawGiftPack:input_type -> pb.DrawGiftPackReq + 21, // 31: pb.userCenter.rankPvp:input_type -> pb.RankPvpReq + 23, // 32: pb.userCenter.rankPvpSubmit:input_type -> pb.RankPvpSubmitReq + 25, // 33: pb.userCenter.userRankPvp:input_type -> pb.UserRankReq + 28, // 34: pb.userCenter.giveElite:input_type -> pb.GiveEliteReq + 27, // 35: pb.userCenter.buyElite:input_type -> pb.EliteReq + 30, // 36: pb.userCenter.giveTitle:input_type -> pb.GiveTitleReq + 33, // 37: pb.userCenter.buyTitle:input_type -> pb.TitleReq + 27, // 38: pb.userCenter.changeElite:input_type -> pb.EliteReq + 33, // 39: pb.userCenter.changeTitle:input_type -> pb.TitleReq + 4, // 40: pb.userCenter.retrievePlatformUser:output_type -> pb.PlatformUserResp + 5, // 41: pb.userCenter.getUserDetails:output_type -> pb.UserDetailsResp + 7, // 42: pb.userCenter.getUserIdByPUid:output_type -> pb.UserIdResp + 12, // 43: pb.userCenter.userCheckIn:output_type -> pb.UserCheckInResp + 1, // 44: pb.userCenter.changeCoin:output_type -> pb.Empty + 8, // 45: pb.userCenter.getUserCoin:output_type -> pb.GetUserCoinResp + 11, // 46: pb.userCenter.transferUserCoin:output_type -> pb.TransferUserCoinResp + 1, // 47: pb.userCenter.userSendGift:output_type -> pb.Empty + 1, // 48: pb.userCenter.userBuyNobility:output_type -> pb.Empty + 16, // 49: pb.userCenter.statPvpReport:output_type -> pb.StatPvPReportResp + 19, // 50: pb.userCenter.drawGiftPack:output_type -> pb.DrawGiftPackResp + 22, // 51: pb.userCenter.rankPvp:output_type -> pb.RankPvpResp + 24, // 52: pb.userCenter.rankPvpSubmit:output_type -> pb.RankPvpSubmitResp + 26, // 53: pb.userCenter.userRankPvp:output_type -> pb.UserRankResp + 29, // 54: pb.userCenter.giveElite:output_type -> pb.BuyEliteResp + 29, // 55: pb.userCenter.buyElite:output_type -> pb.BuyEliteResp + 31, // 56: pb.userCenter.giveTitle:output_type -> pb.BuyTitleResp + 31, // 57: pb.userCenter.buyTitle:output_type -> pb.BuyTitleResp + 32, // 58: pb.userCenter.changeElite:output_type -> pb.ChangeEliteResp + 34, // 59: pb.userCenter.changeTitle:output_type -> pb.ChangeTitleResp + 40, // [40:60] is the sub-list for method output_type + 20, // [20:40] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_user_center_proto_init() } @@ -3161,7 +3507,7 @@ func file_user_center_proto_init() { } if !protoimpl.UnsafeEnabled { file_user_center_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*User); i { + switch v := v.(*Empty); i { case 0: return &v.state case 1: @@ -3173,7 +3519,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { + switch v := v.(*Response); i { case 0: return &v.state case 1: @@ -3209,7 +3555,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserIdReq); i { + switch v := v.(*UserDetailsResp); i { case 0: return &v.state case 1: @@ -3221,7 +3567,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserIdResp); i { + switch v := v.(*UserIdReq); i { case 0: return &v.state case 1: @@ -3233,7 +3579,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeIntegralReq); i { + switch v := v.(*UserIdResp); i { case 0: return &v.state case 1: @@ -3245,7 +3591,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeIntegralResp); i { + switch v := v.(*GetUserCoinResp); i { case 0: return &v.state case 1: @@ -3257,7 +3603,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserIntegralResp); i { + switch v := v.(*ChangeCoinReq); i { case 0: return &v.state case 1: @@ -3269,7 +3615,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserCheckInResp); i { + switch v := v.(*TransferUserCoinReq); i { case 0: return &v.state case 1: @@ -3281,7 +3627,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferUserIntegralReq); i { + switch v := v.(*TransferUserCoinResp); i { case 0: return &v.state case 1: @@ -3293,7 +3639,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferUserIntegralResp); i { + switch v := v.(*UserCheckInResp); i { case 0: return &v.state case 1: @@ -3317,7 +3663,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserSendGiftResp); i { + switch v := v.(*UserBuyNobilityReq); i { case 0: return &v.state case 1: @@ -3329,7 +3675,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserBuyNobilityReq); i { + switch v := v.(*StatPvPReportReq); i { case 0: return &v.state case 1: @@ -3341,7 +3687,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserBuyNobilityResp); i { + switch v := v.(*StatPvPReportResp); i { case 0: return &v.state case 1: @@ -3353,7 +3699,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPKillReq); i { + switch v := v.(*GiftPackItem); i { case 0: return &v.state case 1: @@ -3365,7 +3711,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPFirstBloodReq); i { + switch v := v.(*DrawGiftPackReq); i { case 0: return &v.state case 1: @@ -3377,7 +3723,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq); i { + switch v := v.(*DrawGiftPackResp); i { case 0: return &v.state case 1: @@ -3389,7 +3735,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportResp); i { + switch v := v.(*IncreaseWelfareReq); i { case 0: return &v.state case 1: @@ -3401,7 +3747,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GiftPackItem); i { + switch v := v.(*RankPvpReq); i { case 0: return &v.state case 1: @@ -3413,7 +3759,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DrawGiftPackReq); i { + switch v := v.(*RankPvpResp); i { case 0: return &v.state case 1: @@ -3425,7 +3771,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DrawGiftPackResp); i { + switch v := v.(*RankPvpSubmitReq); i { case 0: return &v.state case 1: @@ -3437,7 +3783,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IncreaseWelfareReq); i { + switch v := v.(*RankPvpSubmitResp); i { case 0: return &v.state case 1: @@ -3449,7 +3795,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpReq); i { + switch v := v.(*UserRankReq); i { case 0: return &v.state case 1: @@ -3461,7 +3807,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpResp); i { + switch v := v.(*UserRankResp); i { case 0: return &v.state case 1: @@ -3473,7 +3819,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitReq); i { + switch v := v.(*EliteReq); i { case 0: return &v.state case 1: @@ -3485,7 +3831,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitResp); i { + switch v := v.(*GiveEliteReq); i { case 0: return &v.state case 1: @@ -3497,7 +3843,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRankReq); i { + switch v := v.(*BuyEliteResp); i { case 0: return &v.state case 1: @@ -3509,7 +3855,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRankResp); i { + switch v := v.(*GiveTitleReq); i { case 0: return &v.state case 1: @@ -3521,7 +3867,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq_Item); i { + switch v := v.(*BuyTitleResp); i { case 0: return &v.state case 1: @@ -3533,7 +3879,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportResp_Item); i { + switch v := v.(*ChangeEliteResp); i { case 0: return &v.state case 1: @@ -3545,7 +3891,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpResp_Item); i { + switch v := v.(*TitleReq); i { case 0: return &v.state case 1: @@ -3557,7 +3903,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitResp_Result); i { + switch v := v.(*ChangeTitleResp); i { case 0: return &v.state case 1: @@ -3569,7 +3915,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitResp_Item); i { + switch v := v.(*UserDetailsResp_TitleItem); i { case 0: return &v.state case 1: @@ -3581,6 +3927,78 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UserDetailsResp_EliteItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatPvPReportReq_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StatPvPReportResp_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpResp_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitResp_Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitResp_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserRankResp_Item); i { case 0: return &v.state @@ -3598,8 +4016,8 @@ func file_user_center_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_center_proto_rawDesc, - NumEnums: 3, - NumMessages: 36, + NumEnums: 1, + NumMessages: 42, NumExtensions: 0, NumServices: 1, }, diff --git a/app/user_center/pb/user_center.proto b/app/user_center/pb/user_center.proto index 6e80cb2..584c9f8 100644 --- a/app/user_center/pb/user_center.proto +++ b/app/user_center/pb/user_center.proto @@ -2,31 +2,57 @@ syntax = "proto3"; package pb; +import "vars/vars.proto"; + option go_package = "./pb"; // model -message User { +message Empty {} + +message Response { + int32 code = 1; // code + string msg = 2; // msg +} + +// req +message PlatformUserReq { + string platform = 1; + string pUid = 2; +} + +message PlatformUserResp { int64 id = 1; - string username = 2; // platform string platform = 3; string pUid = 4; string pUname = 5; string pAvatar = 6; - int32 nobilityLevel = 7; // 贵族等级 - int64 integral = 8; // 用户积分(充值) } -message Empty {} +// 用户详细信息返回 +message UserDetailsResp { + // TitleItem 称号 + message TitleItem { + int64 id = 1; // ID + string name = 2; // 名 + int32 sort = 3; // 排序号 + int32 remain = 4; // 剩余时长(单位:小时) + } + // 精英单位 + message EliteItem { + int64 id = 1; // ID 1000(普通x) 1001(弓骑兵) 1002(牧师) + int32 sort = 2; // 排序号 + int32 remain = 3; // 剩余时长(单位:天)-1无限制 + } -// req -message PlatformUserReq { - string platform = 1; - string pUid = 2; -} + int64 userId = 1; // 系统用户ID + int32 nobilityLevel = 2; // 贵族等级 + int64 coin = 3; // 金币 -message PlatformUserResp { - User user = 1; + TitleItem currentTitle = 4; // 当前佩戴的称号ID + EliteItem currentElite = 5; // 当前使用的精英单位ID + repeated TitleItem titles = 6; // 拥有的称号列表 + repeated EliteItem elites = 7; // 拥有的精英单位列表 } // 用户ID请求 @@ -39,63 +65,45 @@ message UserIdResp { int64 userId = 1; } -enum IntegralType { - Battle = 0; // 战斗 - Gift = 1; // 礼物 - Other = 10; // 其它积分 +message GetUserCoinResp { + int64 userId = 1; + int64 current = 2; // 当前量 } -// 变更积分请求 -message ChangeIntegralReq { +// 变更弹币请求 +message ChangeCoinReq { int64 userId = 1; // 系统用户ID - int64 battleId = 2; // 战斗ID(RPC内部) + int64 battleId = 2; // 战局ID int64 change = 3; // 变更数量 - IntegralType integralType = 4; // 积分类型 -} - -// 变更积分回复 -message ChangeIntegralResp { - int64 userId = 1; // 系统用户ID - int64 change = 2; // 本次变更积分数量,负数为扣减 - int64 integral = 3; // 用户当前总积分 -} - -// 用户积分回复 -message UserIntegralResp { - int64 userId = 1; // 用户ID - int64 integral = 2; // 用户当前总积分 -} - -// 用户打卡(签到)回复 -message UserCheckInResp { - int32 code = 1; - string msg = 2; // 消息 - int64 integralChange = 3; // 积分变动量 - int64 integral = 4; // 变动后的积分量 - bool isCritical = 5; // 是否发生了暴击奖励 + pb.vars.UserCoinChangedReason reason = 4; // 原因 } -// 转移用户积分 -message TransferUserIntegralReq { +// 转移用户弹币 +message TransferUserCoinReq { int64 userId = 1; // 源用户ID int64 targetUserId = 2; // 目标用户 int64 transfer = 3; // 待转移量 } -message TransferUserIntegralResp { - int32 code = 1; - string msg = 2; // 消息 +// 转移用户弹币 回复 +message TransferUserCoinResp { + int64 userId = 1; + string uname = 2; + string avatar = 3; - int64 userId = 3; - string uname = 4; - string avatar = 5; + int64 targetUserId = 4; + string targetUname = 5; + string targetAvatar = 6; - int64 targetUserId = 6; - string targetUname = 7; - string targetAvatar = 8; + int64 userCoin = 10; // 源用户剩余 + int64 targetUserCoin = 11; // 目标用户剩余 +} - int64 userIntegral = 10; // 源用户积分剩余 - int64 targetUserIntegral = 11; // 目标用户积分剩余 +// 用户打卡(签到)回复 +message UserCheckInResp { + int64 coinChange = 1; // 弹币变更量 + int64 currentCoin = 2; // 现有弹币量 + bool isCritical = 3; // 是否发生了暴击奖励 } // 用户送礼请求 @@ -112,11 +120,6 @@ message UserSendGiftReq { int64 battleId = 10; // 战局ID } -// 用户送礼回复 -message UserSendGiftResp { - ChangeIntegralResp integral = 10; // 积分变动 -} - // 用户购买舰长请求 message UserBuyNobilityReq { string platform = 1; // 平台 @@ -134,34 +137,20 @@ message UserBuyNobilityReq { int64 endTime = 12; // 结束时间 } -// 用户购买舰长回复 -message UserBuyNobilityResp { - ChangeIntegralResp integral = 10; // 积分变动 -} - -// 通知-PvP杀兵营(人) statistics.pvp.kill -message StatPvPKillReq { - int64 uid = 1; // 用户ID - int64 targetUid = 2; // 目标用户 - bool isGeneral = 3; // targetUid是否名将 -} - -// 通知-PvP一血 statistics.pvp.first -message StatPvPFirstBloodReq { - int64 uid = 1; // 用户ID - int32 type = 2; // 1-拿到一血 2-被破一血 -} - // 通知-PvP战报 statistics.pvp.report message StatPvPReportReq { message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 - int32 position = 3; // 名次(特指在某一方的名次) - int64 damage = 4; // 伤害量 - int64 deDamage = 5; // 承受伤害 - int64 killUnit = 6; // 击杀单位数量 - int64 deKillUnit = 7; // 被杀单位数量 + int64 damage = 3; // 伤害量 + int64 deDamage = 4; // 承受伤害 + int64 killUnit = 5; // 击杀单位数量 + int64 deKillUnit = 6; // 被杀单位数量 + bool firstBlood = 7; // 拿到一血 + bool deFirstBlood = 8; // 被拿一血 + int64 killPlayer = 9; // 击杀玩家数 + bool deKillPlayer = 10; // 是否被击杀 + bool isGeneral = 11; // 是否上一把名将? } int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 int64 battleId = 2; // 战斗ID @@ -175,15 +164,12 @@ message StatPvPReportResp { int64 uid = 1; // 用户ID string uname = 2; // 用户名 int32 position = 3; // 名次(特指在某一方的名次) - int64 returnsIntegral = 4; // 回收的积分(获胜方才能回收,0不要展示) - int64 rewardPoolIntegral = 5; // 瓜分奖池分 - int64 generalIntegral = 6; // 名将 - int64 nobilityIntegral = 7; // 舰长|总督|贵族 加成分 - int64 battleIntegral = 8; // 战斗结算奖励(普通) - int64 totalIntegral = 10; // 总计加分 + float score = 4; // 评分(一位小数) } - repeated Item winItems = 1; // 获胜方数据 - repeated Item lostItems = 2; // 战败方数据 + int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 + int64 battleId = 2; // 战斗ID + repeated Item winItems = 10; // 获胜方数据 + repeated Item lostItems = 11; // 战败方数据 } //////////////////// 礼包 @@ -196,7 +182,7 @@ enum GiftType { message GiftPackItem { string packType = 1; // 礼包类型 starter:新手礼包 string packName = 2; // 礼包名称 - int64 integral = 3; // 获取的积分 + int64 coin = 3; // 获取的弹币 repeated string title = 4; // 获取的称号 } @@ -210,8 +196,7 @@ message DrawGiftPackReq { message DrawGiftPackResp { int64 uid = 1; string uname = 2; - int32 code = 3; // 领取结果 200:成功 201100:已经领取过 201101:已领取完 - string msg = 4; // 消息 [领取成功|已经领取过|该用户已领取(当日|每周|每月)完所有礼包] + GiftPackItem item = 10; } @@ -225,24 +210,9 @@ message IncreaseWelfareReq { } ////////////////////// 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; // 被拿一血榜 -} message RankPvpReq { - int32 type = 1; // rank类型 + pb.vars.RankType type = 1; // rank类型 int32 topN = 2; // TopN } @@ -253,13 +223,13 @@ message RankPvpResp { int64 score = 3; string avatar = 4; } - int32 type = 1; // rank类型 + pb.vars.RankType type = 1; // rank类型 repeated Item items = 2; // rank数据 } // RankPvpSubmitReq 手动排行榜结算 message RankPvpSubmitReq { - int32 rankType = 1; // 待结算的排行榜类型 + pb.vars.RankType rankType = 1; // 待结算的排行榜类型 bool allRankType = 2; // 是否直接结算所有排行类型 } @@ -268,12 +238,12 @@ message RankPvpSubmitResp { int64 userId = 1; string username = 2; string avatar = 3; - int64 integral = 4; // 获取到的积分数 + int64 coin = 4; // 获取到的积分数 string title = 5; // 获取到的称号 int64 titleDuration = 6; // 称号持续时间(单位: 秒,负数为无限长) } message Item { - int32 rankType = 1; // 排行榜类型 + pb.vars.RankType rankType = 1; // 排行榜类型 repeated Result results = 2; // 上榜玩家? } @@ -284,48 +254,100 @@ message RankPvpSubmitResp { message UserRankReq { int64 userId = 1; // 系统用户ID string username = 2; // 用户名 - int32 rankType = 3; // 排行榜类型 + pb.vars.RankType rankType = 3; // 排行榜类型 bool allRankType = 4; // 直接查询所有排行类型 } message UserRankResp { message Item { - int32 rankType = 1; // 排行类型 + pb.vars.RankType rankType = 1; // 排行类型 int32 pos = 2; // 名次 int64 score = 3; // 分数 } repeated Item items = 1; } +/////////////////////////// zhg +message EliteReq { + int64 userId = 1; // ID + int32 sort = 2; // 序号 +} + +message GiveEliteReq { + int64 userId = 1; // ID + int64 eliteId = 2; // 精英单位ID + int32 duration = 3; // 赠送时长(天) + bool forever = 4; // 永久赠送 +} + +message BuyEliteResp { + int64 userId = 1; // ID + int64 eliteId = 2; // 精英单位ID + int64 cost = 3; // 花费 + int32 duration = 4; // 持续时间 单位(day) +} + +message GiveTitleReq { + int64 userId = 1; // ID + int64 titleId = 2; // 精英单位ID + int32 duration = 3; // 赠送时长(天) + bool forever = 4; // 永久赠送 +} + +message BuyTitleResp { + int64 userId = 1; // ID + int64 titleId = 2; // 称号ID + string name = 3; // 称号名 + int64 cost = 4; // 花费 + int32 duration = 5; // 持续时间 单位(day) +} + +message ChangeEliteResp { + int64 userId = 1; + int64 eliteId = 2; +} + +message TitleReq { + int64 userId = 1; // ID + int32 sort = 2; // 序号 +} + +message ChangeTitleResp { + int64 userId = 1; + int64 titleId = 2; + string name = 3; +} + + service userCenter { /// @ZeroGroup: platform_user // retrievePlatformUser 新增或获取用户 rpc retrievePlatformUser(PlatformUserReq) returns (PlatformUserResp); + //getUserDetails 获取用户详细信息 + rpc getUserDetails(UserIdReq) returns (UserDetailsResp); // getUserIdByPUid 通过平台用户id获取系统用户ID rpc getUserIdByPUid(PlatformUserReq) returns (UserIdResp); - - /// @ZeroGroup: integral - - //ChangeIntegral 新增用户积分 - rpc changeIntegral(ChangeIntegralReq) returns (ChangeIntegralResp); - //GetUserIntegral 获取用户积分 - rpc getUserIntegral(UserIdReq) returns (UserIntegralResp); //UserCheckIn 用户签到|打卡 rpc userCheckIn(UserIdReq) returns (UserCheckInResp); - //TransferUserIntegral 转移积分 - rpc transferUserIntegral(TransferUserIntegralReq) returns (TransferUserIntegralResp); + + /// @ZeroGroup: coin + + //changeCoin 新增或扣减用户弹币 + rpc changeCoin(ChangeCoinReq) returns (Empty); + //getUserCoin 获取用户弹币 + rpc getUserCoin(UserIdReq) returns (GetUserCoinResp); + //transferUserCoin 转移用户弹币 + rpc transferUserCoin(TransferUserCoinReq) returns (TransferUserCoinResp); /// @ZeroGroup: gift // UserSendGift 用户赠送礼物 - rpc userSendGift(UserSendGiftReq) returns(UserSendGiftResp); - rpc userBuyNobility(UserBuyNobilityReq) returns(UserBuyNobilityResp); + rpc userSendGift(UserSendGiftReq) returns(Empty); + rpc userBuyNobility(UserBuyNobilityReq) returns(Empty); /// @ZeroGroup: statistics - rpc statPvpKill(StatPvPKillReq) returns (Empty); - rpc statPvpFirstBlood(StatPvPFirstBloodReq) returns (Empty); rpc statPvpReport(StatPvPReportReq) returns (StatPvPReportResp); /// @ZeroGroup: giftPack @@ -334,7 +356,7 @@ service userCenter { /// @ZeroGroup: drawPool - rpc increaseWelfare(IncreaseWelfareReq) returns (Empty); + // rpc increaseWelfare(IncreaseWelfareReq) returns (Empty); /// @ZeroGroup: rank @@ -342,4 +364,13 @@ service userCenter { rpc rankPvp(RankPvpReq) returns(RankPvpResp); rpc rankPvpSubmit(RankPvpSubmitReq) returns(RankPvpSubmitResp); rpc userRankPvp(UserRankReq) returns (UserRankResp); + + /// @ZeroGroup: zhg + + rpc giveElite(GiveEliteReq) returns(BuyEliteResp); + rpc buyElite(EliteReq) returns(BuyEliteResp); + rpc giveTitle(GiveTitleReq) returns(BuyTitleResp); + rpc buyTitle(TitleReq) returns(BuyTitleResp); + rpc changeElite(EliteReq) returns(ChangeEliteResp); + rpc changeTitle(TitleReq) returns(ChangeTitleResp); } \ No newline at end of file diff --git a/app/user_center/pb/user_center_grpc.pb.go b/app/user_center/pb/user_center_grpc.pb.go index 3db7050..ea6f48d 100644 --- a/app/user_center/pb/user_center_grpc.pb.go +++ b/app/user_center/pb/user_center_grpc.pb.go @@ -24,28 +24,33 @@ const _ = grpc.SupportPackageIsVersion7 type UserCenterClient interface { // retrievePlatformUser 新增或获取用户 RetrievePlatformUser(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*PlatformUserResp, error) + //getUserDetails 获取用户详细信息 + GetUserDetails(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserDetailsResp, error) // getUserIdByPUid 通过平台用户id获取系统用户ID GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error) - //ChangeIntegral 新增用户积分 - ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error) - //GetUserIntegral 获取用户积分 - 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) + //changeCoin 新增或扣减用户弹币 + ChangeCoin(ctx context.Context, in *ChangeCoinReq, opts ...grpc.CallOption) (*Empty, error) + //getUserCoin 获取用户弹币 + GetUserCoin(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*GetUserCoinResp, error) + //transferUserCoin 转移用户弹币 + TransferUserCoin(ctx context.Context, in *TransferUserCoinReq, opts ...grpc.CallOption) (*TransferUserCoinResp, 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) + UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*Empty, error) + UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, 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) + GiveElite(ctx context.Context, in *GiveEliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) + BuyElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) + GiveTitle(ctx context.Context, in *GiveTitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) + BuyTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) + ChangeElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*ChangeEliteResp, error) + ChangeTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*ChangeTitleResp, error) } type userCenterClient struct { @@ -65,27 +70,18 @@ func (c *userCenterClient) RetrievePlatformUser(ctx context.Context, in *Platfor return out, nil } -func (c *userCenterClient) GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error) { - out := new(UserIdResp) - err := c.cc.Invoke(ctx, "/pb.userCenter/getUserIdByPUid", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -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...) +func (c *userCenterClient) GetUserDetails(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserDetailsResp, error) { + out := new(UserDetailsResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/getUserDetails", in, out, opts...) if err != nil { return nil, err } return out, nil } -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...) +func (c *userCenterClient) GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error) { + out := new(UserIdResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/getUserIdByPUid", in, out, opts...) if err != nil { return nil, err } @@ -101,45 +97,45 @@ func (c *userCenterClient) UserCheckIn(ctx context.Context, in *UserIdReq, opts 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...) +func (c *userCenterClient) ChangeCoin(ctx context.Context, in *ChangeCoinReq, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/pb.userCenter/changeCoin", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *userCenterClient) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) { - out := new(UserSendGiftResp) - err := c.cc.Invoke(ctx, "/pb.userCenter/userSendGift", in, out, opts...) +func (c *userCenterClient) GetUserCoin(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*GetUserCoinResp, error) { + out := new(GetUserCoinResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/getUserCoin", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *userCenterClient) UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error) { - out := new(UserBuyNobilityResp) - err := c.cc.Invoke(ctx, "/pb.userCenter/userBuyNobility", in, out, opts...) +func (c *userCenterClient) TransferUserCoin(ctx context.Context, in *TransferUserCoinReq, opts ...grpc.CallOption) (*TransferUserCoinResp, error) { + out := new(TransferUserCoinResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/transferUserCoin", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *userCenterClient) StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error) { +func (c *userCenterClient) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) - err := c.cc.Invoke(ctx, "/pb.userCenter/statPvpKill", in, out, opts...) + err := c.cc.Invoke(ctx, "/pb.userCenter/userSendGift", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *userCenterClient) StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error) { +func (c *userCenterClient) UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) - err := c.cc.Invoke(ctx, "/pb.userCenter/statPvpFirstBlood", in, out, opts...) + err := c.cc.Invoke(ctx, "/pb.userCenter/userBuyNobility", in, out, opts...) if err != nil { return nil, err } @@ -164,15 +160,6 @@ func (c *userCenterClient) DrawGiftPack(ctx context.Context, in *DrawGiftPackReq 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...) @@ -200,34 +187,93 @@ func (c *userCenterClient) UserRankPvp(ctx context.Context, in *UserRankReq, opt return out, nil } +func (c *userCenterClient) GiveElite(ctx context.Context, in *GiveEliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) { + out := new(BuyEliteResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/giveElite", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) BuyElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) { + out := new(BuyEliteResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/buyElite", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) GiveTitle(ctx context.Context, in *GiveTitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) { + out := new(BuyTitleResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/giveTitle", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) BuyTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) { + out := new(BuyTitleResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/buyTitle", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) ChangeElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*ChangeEliteResp, error) { + out := new(ChangeEliteResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/changeElite", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userCenterClient) ChangeTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*ChangeTitleResp, error) { + out := new(ChangeTitleResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/changeTitle", 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 type UserCenterServer interface { // retrievePlatformUser 新增或获取用户 RetrievePlatformUser(context.Context, *PlatformUserReq) (*PlatformUserResp, error) + //getUserDetails 获取用户详细信息 + GetUserDetails(context.Context, *UserIdReq) (*UserDetailsResp, error) // getUserIdByPUid 通过平台用户id获取系统用户ID GetUserIdByPUid(context.Context, *PlatformUserReq) (*UserIdResp, error) - //ChangeIntegral 新增用户积分 - ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error) - //GetUserIntegral 获取用户积分 - GetUserIntegral(context.Context, *UserIdReq) (*UserIntegralResp, error) //UserCheckIn 用户签到|打卡 UserCheckIn(context.Context, *UserIdReq) (*UserCheckInResp, error) - //TransferUserIntegral 转移积分 - TransferUserIntegral(context.Context, *TransferUserIntegralReq) (*TransferUserIntegralResp, error) + //changeCoin 新增或扣减用户弹币 + ChangeCoin(context.Context, *ChangeCoinReq) (*Empty, error) + //getUserCoin 获取用户弹币 + GetUserCoin(context.Context, *UserIdReq) (*GetUserCoinResp, error) + //transferUserCoin 转移用户弹币 + TransferUserCoin(context.Context, *TransferUserCoinReq) (*TransferUserCoinResp, 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) + UserSendGift(context.Context, *UserSendGiftReq) (*Empty, error) + UserBuyNobility(context.Context, *UserBuyNobilityReq) (*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) + GiveElite(context.Context, *GiveEliteReq) (*BuyEliteResp, error) + BuyElite(context.Context, *EliteReq) (*BuyEliteResp, error) + GiveTitle(context.Context, *GiveTitleReq) (*BuyTitleResp, error) + BuyTitle(context.Context, *TitleReq) (*BuyTitleResp, error) + ChangeElite(context.Context, *EliteReq) (*ChangeEliteResp, error) + ChangeTitle(context.Context, *TitleReq) (*ChangeTitleResp, error) mustEmbedUnimplementedUserCenterServer() } @@ -238,32 +284,29 @@ type UnimplementedUserCenterServer struct { func (UnimplementedUserCenterServer) RetrievePlatformUser(context.Context, *PlatformUserReq) (*PlatformUserResp, error) { return nil, status.Errorf(codes.Unimplemented, "method RetrievePlatformUser not implemented") } +func (UnimplementedUserCenterServer) GetUserDetails(context.Context, *UserIdReq) (*UserDetailsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserDetails not implemented") +} func (UnimplementedUserCenterServer) GetUserIdByPUid(context.Context, *PlatformUserReq) (*UserIdResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUserIdByPUid not implemented") } -func (UnimplementedUserCenterServer) ChangeIntegral(context.Context, *ChangeIntegralReq) (*ChangeIntegralResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangeIntegral not implemented") -} -func (UnimplementedUserCenterServer) GetUserIntegral(context.Context, *UserIdReq) (*UserIntegralResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserIntegral not implemented") -} 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) ChangeCoin(context.Context, *ChangeCoinReq) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeCoin not implemented") } -func (UnimplementedUserCenterServer) UserSendGift(context.Context, *UserSendGiftReq) (*UserSendGiftResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserSendGift not implemented") +func (UnimplementedUserCenterServer) GetUserCoin(context.Context, *UserIdReq) (*GetUserCoinResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserCoin not implemented") } -func (UnimplementedUserCenterServer) UserBuyNobility(context.Context, *UserBuyNobilityReq) (*UserBuyNobilityResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserBuyNobility not implemented") +func (UnimplementedUserCenterServer) TransferUserCoin(context.Context, *TransferUserCoinReq) (*TransferUserCoinResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferUserCoin not implemented") } -func (UnimplementedUserCenterServer) StatPvpKill(context.Context, *StatPvPKillReq) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method StatPvpKill not implemented") +func (UnimplementedUserCenterServer) UserSendGift(context.Context, *UserSendGiftReq) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserSendGift not implemented") } -func (UnimplementedUserCenterServer) StatPvpFirstBlood(context.Context, *StatPvPFirstBloodReq) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method StatPvpFirstBlood not implemented") +func (UnimplementedUserCenterServer) UserBuyNobility(context.Context, *UserBuyNobilityReq) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserBuyNobility not implemented") } func (UnimplementedUserCenterServer) StatPvpReport(context.Context, *StatPvPReportReq) (*StatPvPReportResp, error) { return nil, status.Errorf(codes.Unimplemented, "method StatPvpReport not implemented") @@ -271,9 +314,6 @@ func (UnimplementedUserCenterServer) StatPvpReport(context.Context, *StatPvPRepo 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") } @@ -283,6 +323,24 @@ func (UnimplementedUserCenterServer) RankPvpSubmit(context.Context, *RankPvpSubm func (UnimplementedUserCenterServer) UserRankPvp(context.Context, *UserRankReq) (*UserRankResp, error) { return nil, status.Errorf(codes.Unimplemented, "method UserRankPvp not implemented") } +func (UnimplementedUserCenterServer) GiveElite(context.Context, *GiveEliteReq) (*BuyEliteResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GiveElite not implemented") +} +func (UnimplementedUserCenterServer) BuyElite(context.Context, *EliteReq) (*BuyEliteResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method BuyElite not implemented") +} +func (UnimplementedUserCenterServer) GiveTitle(context.Context, *GiveTitleReq) (*BuyTitleResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GiveTitle not implemented") +} +func (UnimplementedUserCenterServer) BuyTitle(context.Context, *TitleReq) (*BuyTitleResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method BuyTitle not implemented") +} +func (UnimplementedUserCenterServer) ChangeElite(context.Context, *EliteReq) (*ChangeEliteResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeElite not implemented") +} +func (UnimplementedUserCenterServer) ChangeTitle(context.Context, *TitleReq) (*ChangeTitleResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeTitle not implemented") +} func (UnimplementedUserCenterServer) mustEmbedUnimplementedUserCenterServer() {} // UnsafeUserCenterServer may be embedded to opt out of forward compatibility for this service. @@ -314,6 +372,24 @@ func _UserCenter_RetrievePlatformUser_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _UserCenter_GetUserDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserIdReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).GetUserDetails(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/getUserDetails", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).GetUserDetails(ctx, req.(*UserIdReq)) + } + return interceptor(ctx, in, info, handler) +} + func _UserCenter_GetUserIdByPUid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PlatformUserReq) if err := dec(in); err != nil { @@ -332,74 +408,74 @@ func _UserCenter_GetUserIdByPUid_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _UserCenter_ChangeIntegral_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangeIntegralReq) +func _UserCenter_UserCheckIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserIdReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).ChangeIntegral(ctx, in) + return srv.(UserCenterServer).UserCheckIn(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/changeIntegral", + FullMethod: "/pb.userCenter/userCheckIn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).ChangeIntegral(ctx, req.(*ChangeIntegralReq)) + return srv.(UserCenterServer).UserCheckIn(ctx, req.(*UserIdReq)) } return interceptor(ctx, in, info, handler) } -func _UserCenter_GetUserIntegral_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserIdReq) +func _UserCenter_ChangeCoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeCoinReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).GetUserIntegral(ctx, in) + return srv.(UserCenterServer).ChangeCoin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/getUserIntegral", + FullMethod: "/pb.userCenter/changeCoin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).GetUserIntegral(ctx, req.(*UserIdReq)) + return srv.(UserCenterServer).ChangeCoin(ctx, req.(*ChangeCoinReq)) } return interceptor(ctx, in, info, handler) } -func _UserCenter_UserCheckIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _UserCenter_GetUserCoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UserIdReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).UserCheckIn(ctx, in) + return srv.(UserCenterServer).GetUserCoin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/userCheckIn", + FullMethod: "/pb.userCenter/getUserCoin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).UserCheckIn(ctx, req.(*UserIdReq)) + return srv.(UserCenterServer).GetUserCoin(ctx, req.(*UserIdReq)) } 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) +func _UserCenter_TransferUserCoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransferUserCoinReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).TransferUserIntegral(ctx, in) + return srv.(UserCenterServer).TransferUserCoin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/transferUserIntegral", + FullMethod: "/pb.userCenter/transferUserCoin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).TransferUserIntegral(ctx, req.(*TransferUserIntegralReq)) + return srv.(UserCenterServer).TransferUserCoin(ctx, req.(*TransferUserCoinReq)) } return interceptor(ctx, in, info, handler) } @@ -440,146 +516,200 @@ func _UserCenter_UserBuyNobility_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _UserCenter_StatPvpKill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatPvPKillReq) +func _UserCenter_StatPvpReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatPvPReportReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).StatPvpKill(ctx, in) + return srv.(UserCenterServer).StatPvpReport(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/statPvpKill", + FullMethod: "/pb.userCenter/statPvpReport", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).StatPvpKill(ctx, req.(*StatPvPKillReq)) + return srv.(UserCenterServer).StatPvpReport(ctx, req.(*StatPvPReportReq)) } return interceptor(ctx, in, info, handler) } -func _UserCenter_StatPvpFirstBlood_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatPvPFirstBloodReq) +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).StatPvpFirstBlood(ctx, in) + return srv.(UserCenterServer).DrawGiftPack(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/statPvpFirstBlood", + FullMethod: "/pb.userCenter/drawGiftPack", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).StatPvpFirstBlood(ctx, req.(*StatPvPFirstBloodReq)) + return srv.(UserCenterServer).DrawGiftPack(ctx, req.(*DrawGiftPackReq)) } return interceptor(ctx, in, info, handler) } -func _UserCenter_StatPvpReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatPvPReportReq) +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 { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).StatPvpReport(ctx, in) + return srv.(UserCenterServer).RankPvp(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/statPvpReport", + FullMethod: "/pb.userCenter/rankPvp", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).StatPvpReport(ctx, req.(*StatPvPReportReq)) + return srv.(UserCenterServer).RankPvp(ctx, req.(*RankPvpReq)) } 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) +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).DrawGiftPack(ctx, in) + return srv.(UserCenterServer).RankPvpSubmit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/drawGiftPack", + FullMethod: "/pb.userCenter/rankPvpSubmit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).DrawGiftPack(ctx, req.(*DrawGiftPackReq)) + return srv.(UserCenterServer).RankPvpSubmit(ctx, req.(*RankPvpSubmitReq)) } 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) +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).IncreaseWelfare(ctx, in) + return srv.(UserCenterServer).UserRankPvp(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/increaseWelfare", + FullMethod: "/pb.userCenter/userRankPvp", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).IncreaseWelfare(ctx, req.(*IncreaseWelfareReq)) + return srv.(UserCenterServer).UserRankPvp(ctx, req.(*UserRankReq)) } 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) +func _UserCenter_GiveElite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GiveEliteReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).RankPvp(ctx, in) + return srv.(UserCenterServer).GiveElite(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/rankPvp", + FullMethod: "/pb.userCenter/giveElite", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).RankPvp(ctx, req.(*RankPvpReq)) + return srv.(UserCenterServer).GiveElite(ctx, req.(*GiveEliteReq)) } 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) +func _UserCenter_BuyElite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EliteReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).RankPvpSubmit(ctx, in) + return srv.(UserCenterServer).BuyElite(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/rankPvpSubmit", + FullMethod: "/pb.userCenter/buyElite", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).RankPvpSubmit(ctx, req.(*RankPvpSubmitReq)) + return srv.(UserCenterServer).BuyElite(ctx, req.(*EliteReq)) } 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) +func _UserCenter_GiveTitle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GiveTitleReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserCenterServer).UserRankPvp(ctx, in) + return srv.(UserCenterServer).GiveTitle(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.userCenter/userRankPvp", + FullMethod: "/pb.userCenter/giveTitle", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserCenterServer).UserRankPvp(ctx, req.(*UserRankReq)) + return srv.(UserCenterServer).GiveTitle(ctx, req.(*GiveTitleReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserCenter_BuyTitle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TitleReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).BuyTitle(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/buyTitle", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).BuyTitle(ctx, req.(*TitleReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserCenter_ChangeElite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EliteReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).ChangeElite(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/changeElite", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).ChangeElite(ctx, req.(*EliteReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserCenter_ChangeTitle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TitleReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserCenterServer).ChangeTitle(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/changeTitle", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).ChangeTitle(ctx, req.(*TitleReq)) } return interceptor(ctx, in, info, handler) } @@ -595,25 +725,29 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{ MethodName: "retrievePlatformUser", Handler: _UserCenter_RetrievePlatformUser_Handler, }, + { + MethodName: "getUserDetails", + Handler: _UserCenter_GetUserDetails_Handler, + }, { MethodName: "getUserIdByPUid", Handler: _UserCenter_GetUserIdByPUid_Handler, }, { - MethodName: "changeIntegral", - Handler: _UserCenter_ChangeIntegral_Handler, + MethodName: "userCheckIn", + Handler: _UserCenter_UserCheckIn_Handler, }, { - MethodName: "getUserIntegral", - Handler: _UserCenter_GetUserIntegral_Handler, + MethodName: "changeCoin", + Handler: _UserCenter_ChangeCoin_Handler, }, { - MethodName: "userCheckIn", - Handler: _UserCenter_UserCheckIn_Handler, + MethodName: "getUserCoin", + Handler: _UserCenter_GetUserCoin_Handler, }, { - MethodName: "transferUserIntegral", - Handler: _UserCenter_TransferUserIntegral_Handler, + MethodName: "transferUserCoin", + Handler: _UserCenter_TransferUserCoin_Handler, }, { MethodName: "userSendGift", @@ -623,14 +757,6 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{ MethodName: "userBuyNobility", Handler: _UserCenter_UserBuyNobility_Handler, }, - { - MethodName: "statPvpKill", - Handler: _UserCenter_StatPvpKill_Handler, - }, - { - MethodName: "statPvpFirstBlood", - Handler: _UserCenter_StatPvpFirstBlood_Handler, - }, { MethodName: "statPvpReport", Handler: _UserCenter_StatPvpReport_Handler, @@ -639,10 +765,6 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{ MethodName: "drawGiftPack", Handler: _UserCenter_DrawGiftPack_Handler, }, - { - MethodName: "increaseWelfare", - Handler: _UserCenter_IncreaseWelfare_Handler, - }, { MethodName: "rankPvp", Handler: _UserCenter_RankPvp_Handler, @@ -655,6 +777,30 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{ MethodName: "userRankPvp", Handler: _UserCenter_UserRankPvp_Handler, }, + { + MethodName: "giveElite", + Handler: _UserCenter_GiveElite_Handler, + }, + { + MethodName: "buyElite", + Handler: _UserCenter_BuyElite_Handler, + }, + { + MethodName: "giveTitle", + Handler: _UserCenter_GiveTitle_Handler, + }, + { + MethodName: "buyTitle", + Handler: _UserCenter_BuyTitle_Handler, + }, + { + MethodName: "changeElite", + Handler: _UserCenter_ChangeElite_Handler, + }, + { + MethodName: "changeTitle", + Handler: _UserCenter_ChangeTitle_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "user_center.proto", diff --git a/app/user_center/user_center.go b/app/user_center/user_center.go new file mode 100644 index 0000000..defc1aa --- /dev/null +++ b/app/user_center/user_center.go @@ -0,0 +1,40 @@ +package main + +import ( + "flag" + "fmt" + + "dcg/app/user_center/internal/config" + "dcg/app/user_center/internal/server" + "dcg/app/user_center/internal/svc" + "dcg/app/user_center/pb" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" +) + +var configFile = flag.String("f", "etc/user_center.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + ctx := svc.NewServiceContext(c) + svr := server.NewUserCenterServer(ctx) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + pb.RegisterUserCenterServer(grpcServer, svr) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + defer s.Stop() + + fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/app/user_center/usercenter/user_center.go b/app/user_center/usercenter/user_center.go index 24c706a..19a1413 100644 --- a/app/user_center/usercenter/user_center.go +++ b/app/user_center/usercenter/user_center.go @@ -13,68 +13,79 @@ 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_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 - UserCheckInResp = pb.UserCheckInResp - 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 + BuyEliteResp = pb.BuyEliteResp + BuyTitleResp = pb.BuyTitleResp + ChangeCoinReq = pb.ChangeCoinReq + ChangeEliteResp = pb.ChangeEliteResp + ChangeTitleResp = pb.ChangeTitleResp + DrawGiftPackReq = pb.DrawGiftPackReq + DrawGiftPackResp = pb.DrawGiftPackResp + EliteReq = pb.EliteReq + Empty = pb.Empty + GetUserCoinResp = pb.GetUserCoinResp + GiftPackItem = pb.GiftPackItem + GiveEliteReq = pb.GiveEliteReq + GiveTitleReq = pb.GiveTitleReq + 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 + Response = pb.Response + StatPvPReportReq = pb.StatPvPReportReq + StatPvPReportReq_Item = pb.StatPvPReportReq_Item + StatPvPReportResp = pb.StatPvPReportResp + StatPvPReportResp_Item = pb.StatPvPReportResp_Item + TitleReq = pb.TitleReq + TransferUserCoinReq = pb.TransferUserCoinReq + TransferUserCoinResp = pb.TransferUserCoinResp + UserBuyNobilityReq = pb.UserBuyNobilityReq + UserCheckInResp = pb.UserCheckInResp + UserDetailsResp = pb.UserDetailsResp + UserDetailsResp_EliteItem = pb.UserDetailsResp_EliteItem + UserDetailsResp_TitleItem = pb.UserDetailsResp_TitleItem + UserIdReq = pb.UserIdReq + UserIdResp = pb.UserIdResp + UserRankReq = pb.UserRankReq + UserRankResp = pb.UserRankResp + UserRankResp_Item = pb.UserRankResp_Item + UserSendGiftReq = pb.UserSendGiftReq UserCenter interface { // retrievePlatformUser 新增或获取用户 RetrievePlatformUser(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*PlatformUserResp, error) + // getUserDetails 获取用户详细信息 + GetUserDetails(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserDetailsResp, error) // getUserIdByPUid 通过平台用户id获取系统用户ID GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error) - // ChangeIntegral 新增用户积分 - ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error) - // GetUserIntegral 获取用户积分 - 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) + // changeCoin 新增或扣减用户弹币 + ChangeCoin(ctx context.Context, in *ChangeCoinReq, opts ...grpc.CallOption) (*Empty, error) + // getUserCoin 获取用户弹币 + GetUserCoin(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*GetUserCoinResp, error) + // transferUserCoin 转移用户弹币 + TransferUserCoin(ctx context.Context, in *TransferUserCoinReq, opts ...grpc.CallOption) (*TransferUserCoinResp, 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) + UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*Empty, error) + UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, 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) + GiveElite(ctx context.Context, in *GiveEliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) + BuyElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) + GiveTitle(ctx context.Context, in *GiveTitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) + BuyTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) + ChangeElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*ChangeEliteResp, error) + ChangeTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*ChangeTitleResp, error) } defaultUserCenter struct { @@ -94,22 +105,16 @@ func (m *defaultUserCenter) RetrievePlatformUser(ctx context.Context, in *Platfo return client.RetrievePlatformUser(ctx, in, opts...) } -// getUserIdByPUid 通过平台用户id获取系统用户ID -func (m *defaultUserCenter) GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error) { +// getUserDetails 获取用户详细信息 +func (m *defaultUserCenter) GetUserDetails(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserDetailsResp, error) { client := pb.NewUserCenterClient(m.cli.Conn()) - return client.GetUserIdByPUid(ctx, in, opts...) + return client.GetUserDetails(ctx, in, opts...) } -// ChangeIntegral 新增用户积分 -func (m *defaultUserCenter) ChangeIntegral(ctx context.Context, in *ChangeIntegralReq, opts ...grpc.CallOption) (*ChangeIntegralResp, error) { - client := pb.NewUserCenterClient(m.cli.Conn()) - return client.ChangeIntegral(ctx, in, opts...) -} - -// GetUserIntegral 获取用户积分 -func (m *defaultUserCenter) GetUserIntegral(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserIntegralResp, error) { +// getUserIdByPUid 通过平台用户id获取系统用户ID +func (m *defaultUserCenter) GetUserIdByPUid(ctx context.Context, in *PlatformUserReq, opts ...grpc.CallOption) (*UserIdResp, error) { client := pb.NewUserCenterClient(m.cli.Conn()) - return client.GetUserIntegral(ctx, in, opts...) + return client.GetUserIdByPUid(ctx, in, opts...) } // UserCheckIn 用户签到|打卡 @@ -118,31 +123,33 @@ 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) { +// changeCoin 新增或扣减用户弹币 +func (m *defaultUserCenter) ChangeCoin(ctx context.Context, in *ChangeCoinReq, opts ...grpc.CallOption) (*Empty, error) { client := pb.NewUserCenterClient(m.cli.Conn()) - return client.TransferUserIntegral(ctx, in, opts...) + return client.ChangeCoin(ctx, in, opts...) } -// UserSendGift 用户赠送礼物 -func (m *defaultUserCenter) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*UserSendGiftResp, error) { +// getUserCoin 获取用户弹币 +func (m *defaultUserCenter) GetUserCoin(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*GetUserCoinResp, error) { client := pb.NewUserCenterClient(m.cli.Conn()) - return client.UserSendGift(ctx, in, opts...) + return client.GetUserCoin(ctx, in, opts...) } -func (m *defaultUserCenter) UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*UserBuyNobilityResp, error) { +// transferUserCoin 转移用户弹币 +func (m *defaultUserCenter) TransferUserCoin(ctx context.Context, in *TransferUserCoinReq, opts ...grpc.CallOption) (*TransferUserCoinResp, error) { client := pb.NewUserCenterClient(m.cli.Conn()) - return client.UserBuyNobility(ctx, in, opts...) + return client.TransferUserCoin(ctx, in, opts...) } -func (m *defaultUserCenter) StatPvpKill(ctx context.Context, in *StatPvPKillReq, opts ...grpc.CallOption) (*Empty, error) { +// UserSendGift 用户赠送礼物 +func (m *defaultUserCenter) UserSendGift(ctx context.Context, in *UserSendGiftReq, opts ...grpc.CallOption) (*Empty, error) { client := pb.NewUserCenterClient(m.cli.Conn()) - return client.StatPvpKill(ctx, in, opts...) + return client.UserSendGift(ctx, in, opts...) } -func (m *defaultUserCenter) StatPvpFirstBlood(ctx context.Context, in *StatPvPFirstBloodReq, opts ...grpc.CallOption) (*Empty, error) { +func (m *defaultUserCenter) UserBuyNobility(ctx context.Context, in *UserBuyNobilityReq, opts ...grpc.CallOption) (*Empty, error) { client := pb.NewUserCenterClient(m.cli.Conn()) - return client.StatPvpFirstBlood(ctx, in, opts...) + return client.UserBuyNobility(ctx, in, opts...) } func (m *defaultUserCenter) StatPvpReport(ctx context.Context, in *StatPvPReportReq, opts ...grpc.CallOption) (*StatPvPReportResp, error) { @@ -155,11 +162,6 @@ func (m *defaultUserCenter) DrawGiftPack(ctx context.Context, in *DrawGiftPackRe 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()) @@ -175,3 +177,33 @@ func (m *defaultUserCenter) UserRankPvp(ctx context.Context, in *UserRankReq, op client := pb.NewUserCenterClient(m.cli.Conn()) return client.UserRankPvp(ctx, in, opts...) } + +func (m *defaultUserCenter) GiveElite(ctx context.Context, in *GiveEliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.GiveElite(ctx, in, opts...) +} + +func (m *defaultUserCenter) BuyElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*BuyEliteResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.BuyElite(ctx, in, opts...) +} + +func (m *defaultUserCenter) GiveTitle(ctx context.Context, in *GiveTitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.GiveTitle(ctx, in, opts...) +} + +func (m *defaultUserCenter) BuyTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*BuyTitleResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.BuyTitle(ctx, in, opts...) +} + +func (m *defaultUserCenter) ChangeElite(ctx context.Context, in *EliteReq, opts ...grpc.CallOption) (*ChangeEliteResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.ChangeElite(ctx, in, opts...) +} + +func (m *defaultUserCenter) ChangeTitle(ctx context.Context, in *TitleReq, opts ...grpc.CallOption) (*ChangeTitleResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.ChangeTitle(ctx, in, opts...) +} diff --git a/config-dev.yml b/config-dev.yml index e381cf0..24285c2 100644 --- a/config-dev.yml +++ b/config-dev.yml @@ -23,81 +23,84 @@ Kafka: Addr: [ "127.0.0.1:9093" ] Topic: "rewardPool-dev" ConsumerGroup: "rewardPoolConsumerG-dev" + UserCoin: + Addr: [ "127.0.0.1:9093" ] + Topic: "notify-user-coin-dev" + ConsumerGroup: "notifyUserCoinConsumerG-dev" Game: - ModeDict: - 8722013: 0 - Common: - # 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 + # 1元=10 Coin (1元40个步兵) + CoinFoodRatio: 4 + OutbreakCount: 2 + OutbreakBaseCost: 5 OutbreakCostDict: - 1: 220 # 步兵 - 2: 260 # 骑兵 - 3: 240 # 弓箭手 - 4: 220 # 法师 + 1: 4 # 步兵 + 2: 9 # 骑兵 + 3: 5 # 弓箭手 + 4: 3 # 法师 Zhghz: - Commands: [ "j", "加入", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "w", "我在哪", "m1", "m2", "m3", "m4", "f", "开炮" ] Zhgfb: - Commands: [ ] Zhgzd: - Commands: [ "j", "加入", "加入游戏", "w", "我在哪", "s", "s1", "s2", "s3", "s4", "c1", "c2", "c3", "c4", "r1", "r2", "r3", "r4", "p0", "p1", "p2", "p3", "p4", "p5" ] + MaxStrategicPoints: 100 + StrategicRecoverSpeed: 5 CommandUnitDict: - 1: "001" - 2: "003" - 3: "004" - 4: "006" + 1: "0001" + 2: "0004" + 3: "0003" + 4: "0006" CommandCostDict: s: - Common: 1 + Common: 0 Units: - "001": 2 - "003": 3 - "004": 3 - "006": 2 + "0001": 30 + "0003": 35 + "0004": 30 + "0006": 30 c: - Common: 1 + Common: 5 r: - Common: 1 + Common: 10 p: - Common: 1 + Common: 10 + m: + Common: 5 DispatchCountDict: - "001": 5 - "003": 5 - "004": 3 - "006": 3 + "0001": 5 + "0003": 5 + "0004": 2 + "0006": 5 GiftEffect: StrategicMaximal: # 这个好诶 10电池 1元 - GiftIds: [ 30758,30971,31213,31478] - Addon: 2 + GiftIds: [ 30758,30971,31213,31478 ] + Addon: 10 Limit: 5 StrategicRecover: # 打call 5电池 0.5元 GiftIds: [ 31278,31037,31212,31485 ] - Addon: 1 + Addon: 3 Duration: 5 Limit: 10 SupportSkill: # 辣条随机 免费 - - GiftIds: [1] - SkillIds: ["S0001", "S0002", "S0003", "S0005"] + - GiftIds: [ 1 ] + SkillIds: [ "S0001", "S0001", "S0002","S0002", "S0003", "S0005" ] # 小花花 - 火墙 1电池 0.1元 - - GiftIds: [31036, 31476] - SkillIds: ["S0001"] + - GiftIds: [ 31036, 31476 ] + SkillIds: [ "S0001" ] # 牛哇牛哇 - 雷击 1电池 0.1元 - - GiftIds: [31225, 31214, 31039, 31202, 31477] - SkillIds: ["S0003"] + - GiftIds: [ 31225, 31214, 31039, 31202, 31477 ] + SkillIds: [ "S0003" ] # i了i了 - 箭雨 1电池 0.1元 - GiftIds: [ 31060, 31216 ] SkillIds: [ "S0002" ] + SuperSkill: + # 干杯 超级技能 + GiftIds: [30606, 31049, 31251, 31116] Log: Console: Level: debug - Format: console + Format: console- File: Enabled: false Level: info diff --git a/config/Config.go b/config/config.go similarity index 62% rename from config/Config.go rename to config/config.go index 8b4296d..1697941 100644 --- a/config/Config.go +++ b/config/config.go @@ -3,8 +3,9 @@ package config import ( "fmt" "git.noahlan.cn/northlan/ntools-go/logger" - c "github.com/gookit/config/v2" - "github.com/gookit/config/v2/yaml" + "github.com/knadh/koanf" + "github.com/knadh/koanf/parsers/yaml" + "github.com/knadh/koanf/providers/file" "github.com/zeromicro/go-zero/zrpc" ) @@ -33,31 +34,26 @@ type ( Gift Kafka // 赠送礼物 GuardBuy Kafka // TODO 购买贵族 改名 RewardPool Kafka // 奖池消息 + UserCoin Kafka // 用户金币变动消息 } Game struct { - ModeDict map[int64]int32 // 直播间对应模式(临时) - // 通用模式 - Common struct { - Commands []string - } // Zhg 指挥官PvP模式 Zhg struct { - Commands []string // 指令集 + CoinFoodRatio float32 // 硬币到粮草的转换系数(乘) OutbreakCount int64 // 每次暴兵数量 - OutbreakBaseCost int64 // 默认每次暴兵消耗积分(不限兵种) - OutbreakCostDict map[int]int64 // 暴兵消耗积分表 + OutbreakBaseCost int64 // 默认每次暴兵消耗(不限兵种) + OutbreakCostDict map[int]int64 // 暴兵消耗表 } // Zhghz 指挥官海战模式 Zhghz struct { - Commands []string } // Zhgfb 指挥官副本模式 Zhgfb struct { - Commands []string } // Zhgzd 指挥官阵地模式 Zhgzd struct { - Commands []string // 指令集 + MaxStrategicPoints int32 // 最大战略点数 + StrategicRecoverSpeed int32 // 每秒回复战略点数 // CommandUnitDict 命令单位ID字典 CommandUnitDict map[string]string @@ -91,6 +87,10 @@ type ( GiftIds []int64 // 对应礼物ID列表 (每次匹配一个) SkillIds []string // 技能ID列表 } + // SuperSkill + SuperSkill struct { + GiftIds []int64 // 对应礼物ID列表 + } } } } @@ -100,18 +100,46 @@ type ( } ) +var k = koanf.New(".") + func Init(filepath string) { - var err error - c.AddDriver(yaml.Driver) + f := file.Provider(filepath) + err := f.Watch(func(event interface{}, err error) { + if err != nil { + fmt.Printf("配置文件热重载失败: %v\n", err) + return + } + k = koanf.New(".") + err = loadAndUnmarshal(f) - err = c.LoadFiles(filepath) + if err != nil { + fmt.Printf("配置文件热重载失败: %v\n", err) + return + } + fmt.Printf("重载配置文件: %+v\n", Config) + }) if err != nil { panic(err) } - err = c.BindStruct("", &Config) + mustLoadAndUnmarshal(f) + + fmt.Printf("%+v\n", Config) +} + +func loadAndUnmarshal(f *file.File) (err error) { + err = k.Load(f, yaml.Parser()) if err != nil { - panic(err) + return + } + err = k.UnmarshalWithConf("", &Config, koanf.UnmarshalConf{Tag: "c"}) + if err != nil { + return } + return +} - fmt.Printf("%+v\n", Config) +func mustLoadAndUnmarshal(f *file.File) { + if err := loadAndUnmarshal(f); err != nil { + panic(err) + } } diff --git a/game/live_logic/common_handler.go b/game/live_logic/common_handler.go index 1a25b66..d0261ea 100644 --- a/game/live_logic/common_handler.go +++ b/game/live_logic/common_handler.go @@ -2,12 +2,13 @@ package live_logic import ( "dcg/app/user_center/usercenter" - "dcg/config" "dcg/game/manager" + "dcg/game/pb" pbCommon "dcg/game/pb/common" pbMq "dcg/game/pb/mq" "dcg/game/svc" "dcg/pkg/cmd" + "dcg/pkg/grpcx" "git.noahlan.cn/northlan/ntools-go/logger" "strconv" ) @@ -19,62 +20,38 @@ type commonGameLogic struct { func NewCommonLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { resp := &commonGameLogic{ - svcCtx: svcCtx, - LiveGameLogic: NewLiveGameLogic(-1, cmd.NewCMDParser(true, config.Config.Game.Common.Commands...)), + svcCtx: svcCtx, + LiveGameLogic: NewLiveGameLogic(-1, cmd.NewCMDParser(cmd.Pattern{ + Prefix: "打卡", + Alias: []string{"签到"}, + ContentMaxLen: 0, + })), } // 通用指令处理器 - resp.RegisterCMDHandler(resp.handleQuery, "q", "查询") - resp.RegisterCMDHandler(resp.handleCheckIn, "打卡", "签到") + 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) { +func (h *commonGameLogic) handleCheckIn(roomId int64, _ []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } respMsg := &pbCommon.CheckInMsg{User: user} // RPC - 签到 - resp, err := h.svcCtx.UserCenterRpc.UserCheckIn(h.svcCtx.Ctx, &usercenter.UserIdReq{UserId: user.UId}) + resp, err := h.svcCtx.UserCenterRpc.UserCheckIn(h.svcCtx.Ctx, &usercenter.UserIdReq{UserId: user.UserId}) if err != nil { - respMsg.Msg = "打卡失败,UP主有罪。" + respMsg.Code, respMsg.Msg, _ = grpcx.WrapGrpcErr(err) } else { - user.Integral = resp.Integral - respMsg.Code = resp.Code - respMsg.Msg = resp.Msg - respMsg.IntegralChange = resp.IntegralChange + respMsg.Code = 200 + respMsg.Msg = "打卡成功" + respMsg.CoinChange = resp.CoinChange respMsg.IsCritical = resp.IsCritical } - room.Broadcast("user.checkIn", respMsg) -} - -func (h *commonGameLogic) handleQuery(roomId int64, _ string, user *pbCommon.PbUser) { - room, err := manager.GameManager.RoomByLiveRoomId(roomId) - if err != nil { - return - } - 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.Broadcast("user.query", &pbCommon.UserQueryMsg{ - User: user, - Rank: rank, - TitleIds: []int64{}, - }) + room.Broadcast(pb.PushCheckIn, respMsg) } func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { @@ -83,7 +60,7 @@ func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift * return } // 1. 发送通用礼物消息 - room.Broadcast("live.gift.common", &pbCommon.GiftMsg{ + room.Broadcast(pb.PushGift, &pbCommon.GiftMsg{ User: user, GiftId: gift.GiftId, Num: gift.Num, @@ -94,7 +71,7 @@ func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift * // 2. RPC 记录送礼,积分变动 req := &usercenter.UserSendGiftReq{ Platform: gift.Platform, - UserId: user.UId, + UserId: user.UserId, PUid: strconv.FormatInt(gift.Uid, 10), RoomId: strconv.FormatInt(roomId, 10), GiftId: gift.GiftId, @@ -104,17 +81,11 @@ func (h *commonGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift * IsPaid: gift.IsPaid, BattleId: manager.GameManager.BattleIdByLiveRoomId(roomId), } - giftResp, err := h.svcCtx.UserCenterRpc.UserSendGift(h.svcCtx.Ctx, req) + _, err = h.svcCtx.UserCenterRpc.UserSendGift(h.svcCtx.Ctx, req) if err != nil { logger.SLog.Info("rpc 用户送礼记录失败,积分变动不通知了...") return } - user.Integral = giftResp.Integral.Integral // 更新最新积分 - room.Broadcast("user.integral.change", &pbCommon.UserIntegralChanged{ - User: user, - Change: giftResp.Integral.Change, - Integral: giftResp.Integral.Integral, - }) } func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, msg *pbMq.MqGuardBuy) { @@ -123,7 +94,7 @@ func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, ms return } // 1. 发送通用礼物消息 - room.Broadcast("live.gift.nobility", &pbCommon.GiftMsg{ + room.Broadcast(pb.PushGiftNobility, &pbCommon.GiftMsg{ User: user, GiftId: msg.GiftId, Num: int64(msg.Num), @@ -132,9 +103,9 @@ func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, ms IsPaid: true, }) // 2. rpc - nobilityResp, err := h.svcCtx.UserCenterRpc.UserBuyNobility(h.svcCtx.Ctx, &usercenter.UserBuyNobilityReq{ + _, err = h.svcCtx.UserCenterRpc.UserBuyNobility(h.svcCtx.Ctx, &usercenter.UserBuyNobilityReq{ Platform: msg.Platform, - UserId: user.UId, + UserId: user.UserId, PUid: strconv.FormatInt(msg.Uid, 10), BattleId: manager.GameManager.BattleIdByLiveRoomId(roomId), RoomId: strconv.FormatInt(roomId, 10), @@ -150,10 +121,10 @@ func (h *commonGameLogic) handleNobility(roomId int64, user *pbCommon.PbUser, ms logger.SLog.Info("rpc 购买舰长记录失败,积分变动不通知了...") return } - user.Integral = nobilityResp.Integral.Integral // 更新最新积分 - room.Broadcast("user.integral.change", &pbCommon.UserIntegralChanged{ - User: user, - Change: nobilityResp.Integral.Change, - Integral: nobilityResp.Integral.Integral, - }) + //user.Integral = nobilityResp.Integral.Integral // 更新最新积分 + //room.Broadcast("user.integral.change", &pbCommon.UserIntegralChanged{ + // User: user, + // Change: nobilityResp.Integral.Change, + // Integral: nobilityResp.Integral.Integral, + //}) } diff --git a/game/live_logic/logic.go b/game/live_logic/logic.go index 2c46d8a..845db51 100644 --- a/game/live_logic/logic.go +++ b/game/live_logic/logic.go @@ -2,6 +2,7 @@ package live_logic import ( "dcg/game/manager" + "dcg/game/pb" pbCommon "dcg/game/pb/common" pbMq "dcg/game/pb/mq" pbRoom "dcg/game/pb/room" @@ -19,7 +20,7 @@ type ( GiftHandler GiftHandlerFunc // 礼物处理 NobilityHandler NobilityHandlerFunc // 贵族购买处理 } - CMDHandlerFunc func(roomId int64, cmd string, user *pbCommon.PbUser) + CMDHandlerFunc func(roomId int64, content []rune, user *pbCommon.PbUser) GiftHandlerFunc func(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) NobilityHandlerFunc func(roomId int64, user *pbCommon.PbUser, nobility *pbMq.MqGuardBuy) @@ -67,8 +68,8 @@ func (l *LiveGameLogic) RegisterNobilityHandler(h NobilityHandlerFunc) { func (l *LiveGameLogic) HandleDanmaku(pushCommonMsg bool, user *pbCommon.PbUser, dm *pbMq.MqDanmaku) { cmdStruct := l.CmdParser.Parse(dm.Content) if cmdStruct.IsCMD { - for _, c := range cmdStruct.Arr { - l.handleCMD(dm.LiveRoomId, c, user) + for _, m := range cmdStruct.Matches { + l.handleCMD(dm.LiveRoomId, m.Prefix, m.Content, user) } } else if pushCommonMsg { room, err := manager.GameManager.RoomByLiveRoomId(dm.LiveRoomId) @@ -76,16 +77,16 @@ func (l *LiveGameLogic) HandleDanmaku(pushCommonMsg bool, user *pbCommon.PbUser, return } // 发送正常的非命令弹幕消息 - room.Broadcast("live.danmaku", &pbCommon.DanmakuMsg{ + room.Broadcast(pb.PushDanmaku, &pbCommon.DanmakuMsg{ User: user, Content: dm.Content, }) } } -func (l *LiveGameLogic) handleCMD(roomId int64, cmd string, user *pbCommon.PbUser) { - if h, ok := l.CmdHandlerMapper[cmd]; ok { - h(roomId, cmd, user) +func (l *LiveGameLogic) handleCMD(roomId int64, prefix string, content []rune, user *pbCommon.PbUser) { + if h, ok := l.CmdHandlerMapper[prefix]; ok { + h(roomId, content, user) } } diff --git a/game/live_logic/zhg_handler.go b/game/live_logic/zhg_handler.go index 8aa9e47..47aeeb2 100644 --- a/game/live_logic/zhg_handler.go +++ b/game/live_logic/zhg_handler.go @@ -1,14 +1,20 @@ package live_logic import ( + "dcg/app/user_center/usercenter" "dcg/config" "dcg/game/manager" + "dcg/game/pb" pbCommon "dcg/game/pb/common" pbGameZhg "dcg/game/pb/game/zhg" pbMq "dcg/game/pb/mq" pbRoom "dcg/game/pb/room" + pbVars "dcg/game/pb/vars" "dcg/game/svc" "dcg/pkg/cmd" + "dcg/pkg/grpcx" + "git.noahlan.cn/northlan/ntools-go/logger" + "github.com/shopspring/decimal" "strconv" ) @@ -19,120 +25,387 @@ type ZhgGameLogic struct { func NewZhgLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { resp := &ZhgGameLogic{ - svcCtx: svcCtx, - LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHG, cmd.NewCMDParser(false, config.Config.Game.Zhg.Commands...)), + svcCtx: svcCtx, + LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHG, cmd.NewCMDParser( + cmd.Pattern{ + Prefix: "q", + Alias: []string{"查询"}, + ContentMaxLen: 0, + }, + cmd.Pattern{ + Prefix: "j", + Alias: []string{"加入", "加入游戏"}, + ContentMaxLen: 0, + }, cmd.Pattern{ + Prefix: "c", + Alias: []string{"换兵"}, + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "w", + Alias: []string{"我在哪"}, + ContentMaxLen: 0, + }, cmd.Pattern{ + Prefix: "s", + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "m", + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "r", + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "bq", + Alias: []string{"购买粮草", "买粮草"}, + ContentMaxLen: 4, + }, cmd.Pattern{ + Prefix: "bw", + Alias: []string{"购买精英", "买精英"}, + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "zw", + Alias: []string{"装备精英"}, + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "zz", + Alias: []string{"使用称号"}, + ContentMaxLen: 1, + }, + )), } - resp.RegisterCMDHandler(resp.handleJoinGame, "j", "加入", "加入游戏") + resp.RegisterCMDHandler(resp.handleQuery, "q") + resp.RegisterCMDHandler(resp.handleJoinGame, "j") + resp.RegisterCMDHandler(resp.handleCreateUnit, "c") + resp.RegisterCMDHandler(resp.handleWai, "w") resp.RegisterCMDHandler(resp.handleOutbreak, "s") - resp.RegisterCMDHandler(resp.handleOutbreakIntegral, "s1", "s2", "s3", "s4") - resp.RegisterCMDHandler(resp.handleWai, "w", "我在哪") - resp.RegisterCMDHandler(resp.handleCreateUnit, "c1", "c2", "c3", "c4") - resp.RegisterCMDHandler(resp.handleMove, "m1", "m2", "m3") - resp.RegisterCMDHandler(resp.handleMode, "r1", "r2", "r3") + resp.RegisterCMDHandler(resp.handleMove, "m") + resp.RegisterCMDHandler(resp.handleMode, "r") + // + resp.RegisterCMDHandler(resp.handleBuyFood, "bq") + resp.RegisterCMDHandler(resp.handleBuyElite, "bw") + resp.RegisterCMDHandler(resp.handleChangeElite, "zw") + resp.RegisterCMDHandler(resp.handleChangeTitle, "zz") // gift resp.RegisterGiftHandler(resp.handleGift) return resp.LiveGameLogic } -func (h *ZhgGameLogic) handleJoinGame(roomId int64, _ string, user *pbCommon.PbUser) { +func (h *ZhgGameLogic) handleQuery(roomId int64, _ []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.join", &pbGameZhg.JoinGame{User: user}) + logger.SLog.Debugf("用户 [%s] 查询", user.Username) + + resp := &pbGameZhg.UserQueryMsg{ + User: user, + } + // details + if details, err := h.svcCtx.UserCenterRpc.GetUserDetails(h.svcCtx.Ctx, &usercenter.UserIdReq{UserId: user.UserId}); err == nil { + resp.Coin = details.Coin + resp.CurrentTitle = &pbCommon.TitleItem{ + Id: details.CurrentTitle.Id, + Name: details.CurrentTitle.Name, + Sort: details.CurrentTitle.Sort, + Remain: details.CurrentTitle.Remain, + } + resp.CurrentElite = &pbGameZhg.EliteItem{ + Id: details.CurrentElite.Id, + Sort: details.CurrentElite.Sort, + Remain: details.CurrentElite.Remain, + } + resp.Titles = make([]*pbCommon.TitleItem, 0, len(details.Titles)) + for _, item := range details.Titles { + resp.Titles = append(resp.Titles, &pbCommon.TitleItem{ + Id: item.Id, + Name: item.Name, + Sort: item.Sort, + Remain: item.Remain, + }) + } + resp.Elites = make([]*pbGameZhg.EliteItem, 0, len(details.Elites)) + for _, item := range details.Elites { + resp.Elites = append(resp.Elites, &pbGameZhg.EliteItem{ + Id: item.Id, + Sort: item.Sort, + Remain: item.Remain, + }) + } + } + + // rank + if rpcRank, err := h.svcCtx.UserCenterRpc.UserRankPvp(h.svcCtx.Ctx, &usercenter.UserRankReq{ + UserId: user.UserId, + Username: user.Username, + AllRankType: true, + }); err == nil { + resp.Rank = make([]*pbGameZhg.UserQueryMsg_RankItem, 0, len(rpcRank.Items)) + for _, item := range rpcRank.Items { + resp.Rank = append(resp.Rank, &pbGameZhg.UserQueryMsg_RankItem{ + RankType: int32(item.RankType), + Score: item.Score, + Rank: item.Pos, + }) + } + } + room.Broadcast(pb.PushUserQuery, resp) } -func (h *ZhgGameLogic) handleOutbreak(roomId int64, _ string, user *pbCommon.PbUser) { +func (h *ZhgGameLogic) handleJoinGame(roomId int64, _ []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.outbreak", &pbGameZhg.Outbreak{User: user}) + + logger.SLog.Debugf("用户 [%s] 加入游戏", user.Username) + + details, err := h.svcCtx.UserCenterRpc.GetUserDetails(h.svcCtx.Ctx, &usercenter.UserIdReq{ + UserId: user.UserId, + }) + if err != nil { + return + } + + room.Broadcast(pb.PushZhgJoinGame, &pbGameZhg.JoinGame{ + User: user, + NobilityLevel: details.NobilityLevel, + Coin: details.Coin, + CurrentTitle: &pbCommon.TitleItem{ + Id: details.CurrentTitle.Id, + Name: details.CurrentTitle.Name, + Sort: details.CurrentTitle.Sort, + Remain: details.CurrentTitle.Remain, + }, + CurrentElite: &pbGameZhg.EliteItem{ + Id: details.CurrentElite.Id, + Sort: details.CurrentElite.Sort, + Remain: details.CurrentElite.Remain, + }, + }) } -func (h *ZhgGameLogic) handleOutbreakIntegral(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhgGameLogic) handleOutbreak(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - cmdRune := []rune(cmd) - if len(cmdRune) < 2 { + + if len(content) == 0 { + logger.SLog.Debugf("用户 [%s] 普通暴兵", user.Username) + room.Broadcast(pb.PushZhgOutbreak, &pbGameZhg.Outbreak{User: user}) + } else { + h.handleOutbreakFood(room, content, user) + } +} + +func (h *ZhgGameLogic) handleOutbreakFood(room *manager.Room, content []rune, user *pbCommon.PbUser) { + if len(content) < 1 { return } - var unitTypeInt int - unitTypeInt, _ = strconv.Atoi(string(cmdRune[1])) - zhgCfg := config.Config.Game.Zhg + logger.SLog.Debugf("用户 [%s] 粮草暴兵", user.Username) - // 根据unitType计算 消耗积分 - costIntegral, ok := zhgCfg.OutbreakCostDict[unitTypeInt] - if !ok { - costIntegral = zhgCfg.OutbreakBaseCost + unitTypeStr := string(content[0]) + unitType, err := strconv.Atoi(unitTypeStr) + if err != nil { + return + } + zhgCfg := config.Config.Game.Zhg + var cost int64 + if unitCost, ok := zhgCfg.OutbreakCostDict[unitType]; ok { + cost = unitCost + } else { + cost = zhgCfg.OutbreakBaseCost } - room.Broadcast("game.outbreak.integral", &pbGameZhg.OutbreakIntegral{ - User: user, - UnitType: string(cmdRune[1]), - Count: int32(zhgCfg.OutbreakCount), - CostIntegral: -costIntegral, + room.Broadcast(pb.PushZhgOutbreakFood, &pbGameZhg.OutbreakFood{ + User: user, + UnitType: unitTypeStr, + Count: int32(zhgCfg.OutbreakCount), + Cost: cost, }) } -func (h *ZhgGameLogic) handleCreateUnit(roomId int64, cmd string, user *pbCommon.PbUser) { - if len(cmd) < 2 { +func (h *ZhgGameLogic) handleCreateUnit(roomId int64, content []rune, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { return } - unit := cmd[1] + logger.SLog.Debugf("用户 [%s] 切换单位", user.Username) + + if len(content) < 1 { + return + } + room.Broadcast(pb.PushZhgCreateUnit, &pbGameZhg.CreateUnit{ + User: user, + Unit: string(content[0]), + }) +} + +func (h *ZhgGameLogic) handleMove(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.createUnit", &pbGameZhg.CreateUnit{ + logger.SLog.Debugf("用户 [%s] 切换路线", user.Username) + + if len(content) < 1 { + return + } + room.Broadcast(pb.PushZhgMove, &pbGameZhg.Move{ User: user, - Unit: string(unit), + Line: string(content[0]), }) } -func (h *ZhgGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUser) { - if len(cmd) < 2 { +func (h *ZhgGameLogic) handleWai(roomId int64, _ []rune, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { return } - line := cmd[1] + logger.SLog.Debugf("用户 [%s] 我在哪", user.Username) + + room.Broadcast(pb.PushZhgWhere, &pbGameZhg.Wai{User: user}) +} + +func (h *ZhgGameLogic) handleMode(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.move", &pbGameZhg.Move{ + + logger.SLog.Debugf("用户 [%s] 兵营模式", user.Username) + + if len(content) < 1 { + return + } + + room.Broadcast(pb.PushZhgMode, &pbGameZhg.BuildingMode{ User: user, - Line: string(line), + Mode: string(content[0]), + }) +} + +func (h *ZhgGameLogic) handleBuyFood(roomId int64, content []rune, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { + return + } + if len(content) == 0 { + return + } + + cost, err := strconv.ParseInt(string(content), 10, 0) + if err != nil { + return + } + zhgCfg := config.Config.Game.Zhg + food := decimal.NewFromInt(cost).Mul(decimal.NewFromFloat32(zhgCfg.CoinFoodRatio)).Round(0).IntPart() + + logger.SLog.Debugf("用户 [%s] 买粮草 花费[%d] 买到[%d]", user.Username, cost, food) + room.Broadcast(pb.PushZhgBuyFood, &pbGameZhg.BuyBattleFood{ + UserId: user.UserId, + Cost: cost, + Food: food, }) } -func (h *ZhgGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) { +func (h *ZhgGameLogic) handleBuyElite(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.wai", &pbGameZhg.Wai{User: user}) + if len(content) == 0 { + return + } + + eliteSort, err := strconv.ParseInt(string(content[0]), 10, 0) + + resp := &pbCommon.UserBuyGoodsMsg{ + User: user, + Goods: pbVars.Goods_Elite, + } + + rpcResp, err := h.svcCtx.UserCenterRpc.BuyElite(h.svcCtx.Ctx, &usercenter.EliteReq{ + UserId: user.UserId, + Sort: int32(eliteSort), + }) + if err != nil { + // rpc错误 + resp.Code, _, _ = grpcx.WrapGrpcErr(err) + logger.SLog.Error("兑换精英单位时发生RPC错误", err) + } else { + resp.Code = 200 + resp.GoodsId = rpcResp.EliteId + resp.Count = 1 + resp.Cost = rpcResp.Cost + resp.Duration = rpcResp.Duration + } + logger.SLog.Debugf("用户 [%s] 买精英单位 花费[%d] 买到[%d]", user.Username, resp.Cost, resp.GoodsId) + room.Broadcast(pb.PushBuyGoods, resp) } -func (h *ZhgGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbUser) { - if len(cmd) < 2 { +func (h *ZhgGameLogic) handleChangeElite(roomId int64, content []rune, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { return } - line := cmd[1] + if len(content) == 0 { + return + } + eliteSort, err := strconv.ParseInt(string(content[0]), 10, 0) + + resp := &pbGameZhg.ChangeElite{ + User: user, + EliteId: 0, + } + + rpcResp, err := h.svcCtx.UserCenterRpc.ChangeElite(h.svcCtx.Ctx, &usercenter.EliteReq{ + UserId: user.UserId, + Sort: int32(eliteSort), + }) + if err != nil { + resp.Code, _, _ = grpcx.WrapGrpcErr(err) + logger.SLog.Error("切换精英单位时发生RPC错误", err) + } else { + resp.Code = 200 + resp.EliteId = rpcResp.EliteId + } + logger.SLog.Debugf("用户 [%s] 切换精英单位到 %d", user.Username, resp.EliteId) + room.Broadcast(pb.PushZhgChangeElite, resp) +} + +func (h *ZhgGameLogic) handleChangeTitle(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.mode", &pbGameZhg.BuildingMode{ + if len(content) == 0 { + return + } + titleSort, err := strconv.ParseInt(string(content[0]), 10, 0) + + resp := &pbGameZhg.ChangeTitle{ User: user, - Mode: string(line), + } + + rpcResp, err := h.svcCtx.UserCenterRpc.ChangeTitle(h.svcCtx.Ctx, &usercenter.TitleReq{ + UserId: user.UserId, + Sort: int32(titleSort), }) + if err != nil { + resp.Code, _, _ = grpcx.WrapGrpcErr(err) + logger.SLog.Error("切换称号时发生RPC错误", err) + } else { + resp.Code = 200 + resp.TitleId = rpcResp.TitleId + resp.Name = rpcResp.Name + } + logger.SLog.Debugf("用户 [%s] 切换称号到 %s", user.Username, resp.Name) + room.Broadcast(pb.PushZhgChangeTitle, resp) } func (h *ZhgGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *pbMq.MqGift) { diff --git a/game/live_logic/zhghz_handler.go b/game/live_logic/zhghz_handler.go index 64bdc23..587709e 100644 --- a/game/live_logic/zhghz_handler.go +++ b/game/live_logic/zhghz_handler.go @@ -1,7 +1,6 @@ package live_logic import ( - "dcg/config" "dcg/game/manager" pbCommon "dcg/game/pb/common" pbGameZhghz "dcg/game/pb/game/zhghz" @@ -23,27 +22,48 @@ type ( func NewZhghzLiveGameLogic() *ZhghzGameLogic { resp := &ZhghzGameLogic{ - LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHGHZ, cmd.NewCMDParser(false, config.Config.Game.Zhghz.Commands...)), - giftLogics: make(map[string]GiftLogic), + giftLogics: make(map[string]GiftLogic), + LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHGHZ, cmd.NewCMDParser(cmd.Pattern{ + Prefix: "j", + Alias: nil, + ContentMaxLen: 0, + }, cmd.Pattern{ + Prefix: "t", + Alias: nil, + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "m", + Alias: nil, + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "f", + Alias: nil, + ContentMaxLen: 0, + }, cmd.Pattern{ + Prefix: "w", + Alias: []string{"我在哪"}, + ContentMaxLen: 0, + })), } - resp.RegisterCMDHandler(resp.handleJoinGame, "j", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8") - resp.RegisterCMDHandler(resp.handleMove, "m1", "m2", "m3", "m4") + resp.RegisterCMDHandler(resp.handleJoinGame, "j") + resp.RegisterCMDHandler(resp.handleJoinGame, "t") + resp.RegisterCMDHandler(resp.handleMove, "m") resp.RegisterCMDHandler(resp.handleShoot, "f") - resp.RegisterCMDHandler(resp.handleWai, "w", "我在哪") + resp.RegisterCMDHandler(resp.handleWai, "w") // gift | game.chargeShield | game.giftShoot resp.RegisterGiftHandler(resp.handleGift) return resp } -func (h *ZhghzGameLogic) handleJoinGame(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhghzGameLogic) handleJoinGame(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } var team int32 - if len(cmd) >= 2 { - v, _ := strconv.Atoi(string(cmd[1])) + if len(content) > 0 { + v, _ := strconv.Atoi(string(content[0])) team = int32(v) } room.Broadcast("game.join", &pbGameZhghz.JoinGame{ @@ -52,16 +72,16 @@ func (h *ZhghzGameLogic) handleJoinGame(roomId int64, cmd string, user *pbCommon }) } -func (h *ZhghzGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhghzGameLogic) handleMove(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - if len(cmd) < 2 { + if len(content) < 1 { return } - v, _ := strconv.Atoi(string(cmd[1])) + v, _ := strconv.Atoi(string(content[0])) room.Broadcast("game.move", &pbGameZhghz.Move{ User: user, @@ -69,7 +89,7 @@ func (h *ZhghzGameLogic) handleMove(roomId int64, cmd string, user *pbCommon.PbU }) } -func (h *ZhghzGameLogic) handleShoot(roomId int64, _ string, user *pbCommon.PbUser) { +func (h *ZhghzGameLogic) handleShoot(roomId int64, _ []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return @@ -79,7 +99,7 @@ func (h *ZhghzGameLogic) handleShoot(roomId int64, _ string, user *pbCommon.PbUs }) } -func (h *ZhghzGameLogic) handleWai(roomId int64, _ string, user *pbCommon.PbUser) { +func (h *ZhghzGameLogic) handleWai(roomId int64, _ []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return diff --git a/game/live_logic/zhgzd_handler.go b/game/live_logic/zhgzd_handler.go index a27cbca..0130bbd 100644 --- a/game/live_logic/zhgzd_handler.go +++ b/game/live_logic/zhgzd_handler.go @@ -3,12 +3,14 @@ package live_logic import ( "dcg/config" "dcg/game/manager" + "dcg/game/pb" pbCommon "dcg/game/pb/common" pbGameZhgzd "dcg/game/pb/game/zhgzd" pbMq "dcg/game/pb/mq" pbRoom "dcg/game/pb/room" "dcg/game/svc" "dcg/pkg/cmd" + "git.noahlan.cn/northlan/ntools-go/logger" "math/rand" "time" ) @@ -20,69 +22,120 @@ type ZhgzdGameLogic struct { func NewZhgzdLiveGameLogic(svcCtx *svc.ServiceContext) *LiveGameLogic { resp := &ZhgzdGameLogic{ - svcCtx: svcCtx, - LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHGZD, cmd.NewCMDParser(false, config.Config.Game.Zhgzd.Commands...)), + svcCtx: svcCtx, + LiveGameLogic: NewLiveGameLogic(pbRoom.GameType_ZHGZD, cmd.NewCMDParser( + cmd.Pattern{ + Prefix: "j", + Alias: []string{"加入", "加入游戏"}, + ContentMaxLen: 0, + }, cmd.Pattern{ + Prefix: "c", + Alias: []string{"换兵"}, + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "w", + Alias: []string{"我在哪"}, + ContentMaxLen: 0, + }, cmd.Pattern{ + Prefix: "s", + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "m", + ContentMaxLen: 1, + }, cmd.Pattern{ + Prefix: "r", + ContentMaxLen: 1, + }, + )), } - resp.RegisterCMDHandler(resp.handleJoinGame, "j", "加入", "加入游戏") - resp.RegisterCMDHandler(resp.handleDispatch, "s1", "s2", "s3", "s4") - resp.RegisterCMDHandler(resp.handleChangeUnit, "c1", "c2", "c3", "c4") + resp.RegisterCMDHandler(resp.handleJoinGame, "j") + resp.RegisterCMDHandler(resp.handleDispatch, "s") resp.RegisterCMDHandler(resp.handleOutbreak, "s") - resp.RegisterCMDHandler(resp.handlePosition, "p0", "p1", "p2", "p3", "p4", "p5") - resp.RegisterCMDHandler(resp.handleWhere, "w", "我在哪") - resp.RegisterCMDHandler(resp.handleMode, "r1", "r2", "r3", "r4") + resp.RegisterCMDHandler(resp.handleChangeUnit, "c") + resp.RegisterCMDHandler(resp.handlePosition, "p") + resp.RegisterCMDHandler(resp.handleMove, "m") + resp.RegisterCMDHandler(resp.handleWhere, "w") + resp.RegisterCMDHandler(resp.handleMode, "r") // gift resp.RegisterGiftHandler(resp.handleGift) return resp.LiveGameLogic } -func (h *ZhgzdGameLogic) handleJoinGame(roomId int64, _ string, user *pbCommon.PbUser) { +func (h *ZhgzdGameLogic) handleJoinGame(roomId int64, _ []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.join", &pbGameZhgzd.JoinGame{User: user}) + logger.SLog.Debugf("用户 [%s] 加入游戏", user.Username) + room.Broadcast(pb.PushZhgzdJoinGame, &pbGameZhgzd.JoinGame{User: user}) } -func (h *ZhgzdGameLogic) handleDispatch(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhgzdGameLogic) handleDispatch(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - cmdRune := []rune(cmd) - if len(cmdRune) < 2 { + if len(content) == 0 { + h.handleOutbreak(roomId, content, user) + } else { + + const cmdType = "s" + unitType := string(content[0]) + + cfg := config.Config.Game.Zhgzd + unitId := cfg.CommandUnitDict[unitType] + count := cfg.DispatchCountDict[unitId] + var costSp int32 + if costCfg, ok := cfg.CommandCostDict[cmdType]; ok { + costSp = costCfg.Units[unitId] + } + + logger.SLog.Debugf("用户 [%s] 战略出兵 %s x %d cost:%d", user.Username, unitId, count, costSp) + + room.Broadcast(pb.PushZhgzdDispatch, &pbGameZhgzd.DispatchUnit{ + User: user, + CostSp: costSp, + Id: unitId, + Count: count, + }) + } +} + +func (h *ZhgzdGameLogic) handleOutbreak(roomId int64, content []rune, user *pbCommon.PbUser) { + room, err := manager.GameManager.RoomByLiveRoomId(roomId) + if err != nil { return } - cmdType := string(cmdRune[0]) - unitType := string(cmdRune[1]) + if len(content) == 0 { + return + } + const cmdType = "s" cfg := config.Config.Game.Zhgzd - unitId := cfg.CommandUnitDict[unitType] - count := cfg.DispatchCountDict[unitType] var costSp int32 if costCfg, ok := cfg.CommandCostDict[cmdType]; ok { - costSp = costCfg.Units[unitType] + costSp = costCfg.Common } - room.Broadcast("game.unit.dispatch", &pbGameZhgzd.DispatchUnit{ + logger.SLog.Debugf("用户 [%s] 征召模式暴兵 cost:%d", user.Username, costSp) + + room.Broadcast(pb.PushZhgzdOutbreak, &pbGameZhgzd.Outbreak{ User: user, CostSp: costSp, - Id: unitId, - Count: count, }) } -func (h *ZhgzdGameLogic) handleChangeUnit(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhgzdGameLogic) handleChangeUnit(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - cmdRune := []rune(cmd) - if len(cmdRune) < 2 { + if len(content) == 0 { return } - cmdType := string(cmdRune[0]) - unitType := string(cmdRune[1]) + const cmdType = "c" + unitType := string(content[0]) cfg := config.Config.Game.Zhgzd unitId := cfg.CommandUnitDict[unitType] @@ -91,23 +144,25 @@ func (h *ZhgzdGameLogic) handleChangeUnit(roomId int64, cmd string, user *pbComm costSp = costCfg.Common } - room.Broadcast("game.unit.change", &pbGameZhgzd.ChangeUnit{ + logger.SLog.Debugf("用户 [%s] 更改生产单位 %s cost:%d", user.Username, unitId, costSp) + + room.Broadcast(pb.PushZhgzdChangeUnit, &pbGameZhgzd.ChangeUnit{ User: user, CostSp: costSp, Id: unitId, }) } -func (h *ZhgzdGameLogic) handleOutbreak(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhgzdGameLogic) handlePosition(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - cmdRune := []rune(cmd) - if len(cmdRune) < 1 { + + if len(content) == 0 { return } - cmdType := string(cmdRune[0]) + const cmdType = "p" cfg := config.Config.Game.Zhgzd var costSp int32 @@ -115,47 +170,65 @@ func (h *ZhgzdGameLogic) handleOutbreak(roomId int64, cmd string, user *pbCommon costSp = costCfg.Common } - room.Broadcast("game.outbreak", &pbGameZhgzd.Outbreak{ - User: user, - CostSp: costSp, + pos := string(content[0]) + + logger.SLog.Debugf("用户 [%s] 移动位置到 %s cost:%d", user.Username, pos, costSp) + + room.Broadcast(pb.PushZhgzdPosition, &pbGameZhgzd.Position{ + User: user, + Position: pos, + CostSp: costSp, }) } -func (h *ZhgzdGameLogic) handlePosition(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhgzdGameLogic) handleMove(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - if len(cmd) < 2 { + if len(content) == 0 { return } - pos := cmd[1] + const cmdType = "m" - room.Broadcast("game.pos", &pbGameZhgzd.Position{ - User: user, - Position: string(pos), + cfg := config.Config.Game.Zhgzd + var costSp int32 + if costCfg, ok := cfg.CommandCostDict[cmdType]; ok { + costSp = costCfg.Common + } + + line := string(content[0]) + + logger.SLog.Debugf("用户 [%s] 选择出兵路线 %s cost:%d", user.Username, line, costSp) + + room.Broadcast(pb.PushZhgzdMove, &pbGameZhgzd.ChangeLine{ + User: user, + CostSp: costSp, + Line: line, }) } -func (h *ZhgzdGameLogic) handleWhere(roomId int64, _ string, user *pbCommon.PbUser) { +func (h *ZhgzdGameLogic) handleWhere(roomId int64, _ []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - room.Broadcast("game.where", &pbGameZhgzd.Where{User: user}) + + logger.SLog.Debugf("用户 [%s] 查询位置", user.Username) + + room.Broadcast(pb.PushZhgzdWhere, &pbGameZhgzd.Where{User: user}) } -func (h *ZhgzdGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbUser) { +func (h *ZhgzdGameLogic) handleMode(roomId int64, content []rune, user *pbCommon.PbUser) { room, err := manager.GameManager.RoomByLiveRoomId(roomId) if err != nil { return } - cmdRune := []rune(cmd) - if len(cmdRune) < 1 { + if len(content) == 0 { return } - cmdType := string(cmdRune[0]) + const cmdType = "r" cfg := config.Config.Game.Zhgzd var costSp int32 @@ -163,9 +236,13 @@ func (h *ZhgzdGameLogic) handleMode(roomId int64, cmd string, user *pbCommon.PbU costSp = costCfg.Common } - room.Broadcast("game.mode", &pbGameZhgzd.PlayerMode{ + mode := string(content[0]) + + logger.SLog.Debugf("用户 [%s] 切换玩家模式 %s cost:%d", user.Username, mode, costSp) + + room.Broadcast(pb.PushZhgzdMode, &pbGameZhgzd.PlayerMode{ User: user, - Mode: string(cmdRune[1]), + Mode: mode, CostSp: costSp, }) } @@ -177,14 +254,19 @@ func (h *ZhgzdGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *p } cfg := config.Config.Game.Zhgzd.GiftEffect + logger.SLog.Debugf("用户 [%s] 赠送礼物 %s x %d", user.Username, gift.GiftName, gift.Num) + // 战略点回复速度 for _, id := range cfg.StrategicRecover.GiftIds { if gift.GiftId == id { - room.Broadcast("game.sp", &pbGameZhgzd.StrategicPoint{ - User: user, - AddSpeed: cfg.StrategicRecover.Addon, - AddSpeedDuration: cfg.StrategicRecover.Duration, - }) + for i := 0; i < int(gift.Num); i++ { + logger.SLog.Debugf("用户 [%s] 战略点恢复速度提高 %d x%ds", user.Username, cfg.StrategicRecover.Addon, cfg.StrategicRecover.Duration) + room.Broadcast("game.sp", &pbGameZhgzd.StrategicPoint{ + User: user, + AddSpeed: cfg.StrategicRecover.Addon, + AddSpeedDuration: cfg.StrategicRecover.Duration, + }) + } break } } @@ -192,30 +274,50 @@ func (h *ZhgzdGameLogic) handleGift(roomId int64, user *pbCommon.PbUser, gift *p // 战略点上限 for _, id := range cfg.StrategicMaximal.GiftIds { if gift.GiftId == id { - room.Broadcast("game.sp", &pbGameZhgzd.StrategicPoint{ - User: user, - AddLimit: cfg.StrategicMaximal.Addon, - }) + for i := 0; i < int(gift.Num); i++ { + logger.SLog.Debugf("用户 [%s] 战略点上限提高 %d", user.Username, cfg.StrategicMaximal.Addon) + room.Broadcast("game.sp", &pbGameZhgzd.StrategicPoint{ + User: user, + AddLimit: cfg.StrategicMaximal.Addon, + }) + } break } } // 支援技能 + rand.Seed(time.Now().UnixNano()) for _, sCfg := range cfg.SupportSkill { for _, id := range sCfg.GiftIds { if gift.GiftId == id && len(sCfg.SkillIds) > 0 { - // skill 随机 - tmpSkill := sCfg.SkillIds[0] - if len(sCfg.SkillIds) > 1 { - rand.Seed(time.Now().UnixNano()) - tmpSkill = sCfg.SkillIds[rand.Intn(len(sCfg.SkillIds))] + for i := 0; i < int(gift.Num); i++ { + // skill 随机 + tmpSkill := sCfg.SkillIds[0] + if len(sCfg.SkillIds) > 1 { + randomInt := rand.Intn(len(sCfg.SkillIds)) + tmpSkill = sCfg.SkillIds[randomInt] + //logger.SLog.Debugf("礼物随机值 %d, ID: %s", randomInt, tmpSkill) + } + room.Broadcast("game.support", &pbGameZhgzd.SupportSkill{ + User: user, + Id: tmpSkill, + }) } - room.Broadcast("game.support", &pbGameZhgzd.SupportSkill{ + break + } + } + } + + // 超级技能 + for _, id := range cfg.SuperSkill.GiftIds { + if gift.GiftId == id { + for i := 0; i < int(gift.Num); i++ { + logger.SLog.Debugf("用户 [%s] 释放超级技能", user.Username) + room.Broadcast("game.superSkill", &pbGameZhgzd.SuperSkill{ User: user, - Id: tmpSkill, }) - break } + break } } } diff --git a/game/logic/init.go b/game/logic/init.go index f7f19c5..dcbf92d 100644 --- a/game/logic/init.go +++ b/game/logic/init.go @@ -41,11 +41,11 @@ func Init(svcCtx *svc.ServiceContext) { return strings.ToLower(s) })) - userIntegral := user.NewUserIntegral(svcCtx) - services.Register(userIntegral, - component.WithName(userIntegral.CMD()), + userCoin := user.NewUserCoin(svcCtx) + services.Register(userCoin, + component.WithName(userCoin.CMD()), component.WithNameFunc(func(s string) string { - return userIntegral.Prefix() + "." + strings.ToLower(s) + return userCoin.Prefix() + "." + strings.ToLower(s) })) gameStatus := game_status.NewGameStatus(svcCtx) diff --git a/game/logic/user/user_coin.go b/game/logic/user/user_coin.go new file mode 100644 index 0000000..b273861 --- /dev/null +++ b/game/logic/user/user_coin.go @@ -0,0 +1,61 @@ +package user + +import ( + "dcg/app/user_center/usercenter" + "dcg/game/manager" + pbCommon "dcg/game/pb/common" + "dcg/game/svc" + "dcg/pkg/grpcx" + "git.noahlan.cn/northlan/ngs/component" + "git.noahlan.cn/northlan/ngs/session" +) + +type UserCoinLogic struct { + component.Base + svcCtx *svc.ServiceContext +} + +func NewUserCoin(svcCtx *svc.ServiceContext) *UserCoinLogic { + return &UserCoinLogic{ + svcCtx: svcCtx, + } +} + +func (p *UserCoinLogic) Init() { +} + +func (p *UserCoinLogic) Shutdown() { +} + +func (p *UserCoinLogic) CMD() string { + return "user" +} + +func (p *UserCoinLogic) Prefix() string { + return "coin" +} + +// Change 更新弹币 +func (p *UserCoinLogic) Change(s *session.Session, msg *pbCommon.ChangeUserCoinReq) error { + _, err := p.svcCtx.UserCenterRpc.ChangeCoin(p.svcCtx.Ctx, &usercenter.ChangeCoinReq{ + UserId: msg.UserId, + BattleId: manager.GameManager.BattleIdBySession(s), + Change: msg.Change, + Reason: msg.Reason, + }) + if err != nil { + code, m, _ := grpcx.WrapGrpcErr(err) + + return s.Response(&pbCommon.ChangeUserCoinResp{ + Code: code, + Msg: m, + UserId: msg.UserId, + }) + } + return s.Response(&pbCommon.ChangeUserCoinResp{ + Code: 200, + Msg: "成功", + UserId: msg.UserId, + Change: msg.Change, + }) +} diff --git a/game/logic/user/user_integral.go b/game/logic/user/user_integral.go deleted file mode 100644 index 61677cf..0000000 --- a/game/logic/user/user_integral.go +++ /dev/null @@ -1,64 +0,0 @@ -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 UserLogic struct { - component.Base - svcCtx *svc.ServiceContext -} - -func NewUserIntegral(svcCtx *svc.ServiceContext) *UserLogic { - return &UserLogic{ - svcCtx: svcCtx, - } -} - -func (p *UserLogic) Init() { -} - -func (p *UserLogic) Shutdown() { -} - -func (p *UserLogic) CMD() string { - return "user" -} - -func (p *UserLogic) Prefix() string { - return "integral" -} - -// Change 更新积分 -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, - BattleId: manager.GameManager.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{ - Code: int32(gStatus.Code()), - Msg: gStatus.Message(), - }) - } - return s.Response(&pbCommon.ChangeUserIntegralResp{ - Code: 200, - Msg: "成功", - UserId: msg.UserId, - Change: msg.Change, - Integral: integral.Integral, - }) -} diff --git a/game/logic/zhg/statistics/stat_pvp.go b/game/logic/zhg/statistics/stat_pvp.go index beee58f..91ba8bf 100644 --- a/game/logic/zhg/statistics/stat_pvp.go +++ b/game/logic/zhg/statistics/stat_pvp.go @@ -34,55 +34,38 @@ func (p *PvP) Init() { func (p *PvP) Shutdown() { } -// Kill 击杀玩家 -func (p *PvP) Kill(s *session.Session, msg *pbGameZhg.StatPvPKill) error { - _, err := p.svcCtx.UserCenterRpc.StatPvpKill(p.svcCtx.Ctx, &usercenter.StatPvPKillReq{ - Uid: msg.Uid, - TargetUid: msg.TargetUid, - IsGeneral: msg.IsGeneral, - }) - if err != nil { - return err - } - return nil -} - -// First 一血 -func (p *PvP) First(s *session.Session, msg *pbGameZhg.StatPvPFirstBlood) error { - _, err := p.svcCtx.UserCenterRpc.StatPvpFirstBlood(p.svcCtx.Ctx, &usercenter.StatPvPFirstBloodReq{ - Uid: msg.Uid, - Type: msg.Type, - }) - if err != nil { - return err - } - return nil -} - // Report 战报 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, + Uid: item.Uid, + Uname: item.Uname, + Damage: item.Damage, + DeDamage: item.DeDamage, + KillUnit: item.KillUnit, + DeKillUnit: item.DeKillUnit, + FirstBlood: item.FirstBlood, + DeFirstBlood: item.DeFirstBlood, + KillPlayer: item.KillPlayer, + DeKillPlayer: item.DeKillPlayer, + IsGeneral: item.IsGeneral, }) } 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, + Uid: item.Uid, + Uname: item.Uname, + Damage: item.Damage, + DeDamage: item.DeDamage, + KillUnit: item.KillUnit, + DeKillUnit: item.DeKillUnit, + FirstBlood: item.FirstBlood, + DeFirstBlood: item.DeFirstBlood, + KillPlayer: item.KillPlayer, + DeKillPlayer: item.DeKillPlayer, + IsGeneral: item.IsGeneral, }) } // 战局ID @@ -99,28 +82,18 @@ 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, - Position: item.Position, - ReturnsIntegral: item.ReturnsIntegral, - RewardPoolIntegral: item.RewardPoolIntegral, - GeneralIntegral: item.GeneralIntegral, - NobilityIntegral: item.NobilityIntegral, - BattleIntegral: item.BattleIntegral, - TotalIntegral: item.TotalIntegral, + Uid: item.Uid, + Uname: item.Uname, + Position: item.Position, + Score: item.Score, }) } for _, item := range resp.LostItems { lostItemsResp = append(lostItemsResp, &pbGameZhg.StatPvPReportResp_Item{ - 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, + Uid: item.Uid, + Uname: item.Uname, + Position: item.Position, + Score: item.Score, }) } diff --git a/game/manager/manager.go b/game/manager/manager.go index 33039aa..96a1536 100644 --- a/game/manager/manager.go +++ b/game/manager/manager.go @@ -34,22 +34,31 @@ func newGameManager(svcCtx *svc.ServiceContext) *gameManager { func (m *gameManager) JoinRoom(s *session.Session, gameType pbRoom.GameType, liveRoomId int64) error { room := m.RoomManager.RetrieveRoomByType(gameType) - var exists bool + var exists *session.Session room.PeekMembers(func(_ int64, s *session.Session) bool { data, err := m.DataManager.SessionData(s) if err != nil { return true } if data.LiveRoomId() == liveRoomId { - exists = true + + exists = s return false } return true }) - if !exists { + if exists != nil { + // 将原有session从房间移除 + err := room.Leave(exists) + if err == nil { + exists = nil + } + } + if exists != nil { + return errors.New(fmt.Sprintf("session [%v] 已在房间 [%d] 中,不能再次加入", s, room.ID())) + } else { return room.Add(s) } - return errors.New(fmt.Sprintf("session [%v] 已在房间 [%d] 中,不能再次加入", s, room.ID())) } // SessionByDataFilter 通过 session数据过滤器 获取session,data @@ -66,6 +75,10 @@ func (m *gameManager) SessionByDataFilter(filter DataFilter) (room *Room, sess * } return true }) + if err == nil && room == nil { + err = errors.New("未找到相关客户端实例") + return + } return } @@ -74,7 +87,7 @@ func (m *gameManager) RoomByLiveRoomId(liveRoomId int64) (*Room, error) { return data.LiveRoomId() == liveRoomId }) if err != nil { - return nil, errors.New(fmt.Sprintf("未找到直播间 [%s] 对应游戏房间", liveRoomId)) + return nil, errors.New(fmt.Sprintf("未找到直播间 [%d] 对应游戏房间", liveRoomId)) } return room, nil } diff --git a/game/msg_transfer/coin_transfer.go b/game/msg_transfer/coin_transfer.go new file mode 100644 index 0000000..528e848 --- /dev/null +++ b/game/msg_transfer/coin_transfer.go @@ -0,0 +1,73 @@ +package msg_transfer + +import ( + "dcg/config" + "dcg/game/manager" + "dcg/game/pb" + 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 CoinTransferHandler struct { + svcCtx *svc.ServiceContext + msgHandle map[string]kafkaMsgHandlerFunc + ConsumerGroup *kafka.ConsumerGroup +} + +func (h *CoinTransferHandler) Init(svcCtx *svc.ServiceContext) { + h.svcCtx = svcCtx + cfg := config.Config.Kafka.UserCoin + 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 *CoinTransferHandler) handleTopic(data []byte, _ string) { + // msg proto + var msgFromMq pbMq.MqUserCoinChanged + err := proto.Unmarshal(data, &msgFromMq) + if err != nil { + logger.SLog.Error("unmarshal msg err", err) + return + } + manager.GameManager.Broadcast(pb.PushCoinChanged, &pbCommon.UserCoinChangedMsg{ + User: &pbCommon.PbUser{ + UserId: msgFromMq.UserId, + Username: msgFromMq.Username, + Avatar: msgFromMq.Avatar, + }, + Reason: msgFromMq.Reason, + Change: msgFromMq.Change, + Current: msgFromMq.Current, + }) +} + +func (CoinTransferHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } +func (CoinTransferHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } +func (h *CoinTransferHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error { + for msg := range claim.Messages() { + //logger.SLog.Infow("kafka get info to mysql", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value)) + if hFunc, ok := h.msgHandle[msg.Topic]; ok { + hFunc(msg.Value, string(msg.Key)) + } + sess.MarkMessage(msg, "") + } + return nil +} diff --git a/game/msg_transfer/gift_to_push.go b/game/msg_transfer/gift_to_push.go index 3d722b7..8b6bce5 100644 --- a/game/msg_transfer/gift_to_push.go +++ b/game/msg_transfer/gift_to_push.go @@ -58,11 +58,9 @@ func (h *GiftToPushHandler) handleGift(data []byte, _ string) { return } pbUser := &pbCommon.PbUser{ - UId: rpcUser.User.Id, - Uname: msgFromMq.Uname, - Avatar: rpcUser.User.PAvatar, - NobilityLevel: rpcUser.User.NobilityLevel, - Integral: rpcUser.User.Integral, + UserId: rpcUser.Id, + Username: msgFromMq.Uname, + Avatar: rpcUser.PAvatar, } logger.SLog.Debugf("队列礼物消息: %s 投喂 %s 价值 %d", msgFromMq.Uname, msgFromMq.GiftName, msgFromMq.Price*msgFromMq.Num) diff --git a/game/msg_transfer/init.go b/game/msg_transfer/init.go index b76ed2e..ed13684 100644 --- a/game/msg_transfer/init.go +++ b/game/msg_transfer/init.go @@ -8,19 +8,24 @@ var ( danmakuMsgToPush MsgToPushHandler giftMsgToPush GiftToPushHandler nobilityTransfer NobilityTransferHandler - rewardTransfer RewardTransferHandler + //rewardTransfer RewardTransferHandler + coinTransfer CoinTransferHandler ) func Init(svc *svc.ServiceContext) { danmakuMsgToPush.Init(svc) giftMsgToPush.Init(svc) nobilityTransfer.Init(svc) - rewardTransfer.Init(svc) + //rewardTransfer.Init(svc) + coinTransfer.Init(svc) + + run() } -func Run() { +func run() { go danmakuMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&danmakuMsgToPush) go giftMsgToPush.ConsumerGroup.RegisterHandlerAndConsumer(&giftMsgToPush) go nobilityTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&nobilityTransfer) - go rewardTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&rewardTransfer) + //go rewardTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&rewardTransfer) + go coinTransfer.ConsumerGroup.RegisterHandlerAndConsumer(&coinTransfer) } diff --git a/game/msg_transfer/msg_to_push.go b/game/msg_transfer/msg_to_push.go index c417c26..0133e4a 100644 --- a/game/msg_transfer/msg_to_push.go +++ b/game/msg_transfer/msg_to_push.go @@ -60,13 +60,13 @@ func (h *MsgToPushHandler) handleDanmaku(data []byte, _ string) { return } pbUser := &pbCommon.PbUser{ - UId: rpcUser.User.Id, - Uname: msgFromMq.Uname, - Avatar: rpcUser.User.PAvatar, - NobilityLevel: rpcUser.User.NobilityLevel, - Integral: rpcUser.User.Integral, + UserId: rpcUser.Id, + Username: msgFromMq.Uname, + Avatar: rpcUser.PAvatar, } + logger.SLog.Debugf("用户 [%s] 发送弹幕 [%s]", pbUser.Username, msgFromMq.Content) + // 游戏命令逻辑处理 live_logic.LiveManager.HandleDanmaku(pbUser, &msgFromMq) } diff --git a/game/msg_transfer/nobility_transfer.go b/game/msg_transfer/nobility_transfer.go index 5f26ea9..ac98442 100644 --- a/game/msg_transfer/nobility_transfer.go +++ b/game/msg_transfer/nobility_transfer.go @@ -58,11 +58,9 @@ func (h *NobilityTransferHandler) handleTopic(data []byte, _ string) { return } pbUser := &pbCommon.PbUser{ - UId: rpcUser.User.Id, - Uname: msgFromMq.Uname, - Avatar: rpcUser.User.PAvatar, - NobilityLevel: rpcUser.User.NobilityLevel, - Integral: rpcUser.User.Integral, + UserId: rpcUser.Id, + Username: msgFromMq.Uname, + Avatar: rpcUser.PAvatar, } logger.SLog.Debugf("队列舰长消息: %s 送出 %sx%d 价值 %d", msgFromMq.Uname, msgFromMq.GiftName, msgFromMq.Num, msgFromMq.Price*int64(msgFromMq.Num)) diff --git a/game/msg_transfer/reward_transfer.go b/game/msg_transfer/reward_transfer.go index b016a90..e9028ec 100644 --- a/game/msg_transfer/reward_transfer.go +++ b/game/msg_transfer/reward_transfer.go @@ -1,75 +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" - "google.golang.org/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 - } - room, err := manager.GameManager.RoomByBattleId(msgFromMq.BattleId) - if err != nil { - return - } - room.Broadcast("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 -} +// +//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" +// "google.golang.org/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 +// } +// room, err := manager.GameManager.RoomByBattleId(msgFromMq.BattleId) +// if err != nil { +// return +// } +// room.Broadcast("game.rewardPool", &pbCommon.RewardPoolMsg{ +// WelfarePool: msgFromMq.WelfarePool, +// BattleId: msgFromMq.BattleId, +// InitReward: msgFromMq.InitReward, +// GiftReward: msgFromMq.GiftReward, +// BattleReward: msgFromMq.BattleReward, +// OtherReward: msgFromMq.OtherReward, +// AllRewards: msgFromMq.AllRewards, +// }) +//} +// +//func (RewardTransferHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } +//func (RewardTransferHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } +//func (h *RewardTransferHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error { +// for msg := range claim.Messages() { +// //logger.SLog.Infow("kafka get info to mysql", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value)) +// if hFunc, ok := h.msgHandle[msg.Topic]; ok { +// hFunc(msg.Value, string(msg.Key)) +// } +// sess.MarkMessage(msg, "") +// } +// return nil +//} diff --git a/game/pb/common/Common.cs b/game/pb/common/Common.cs index 1ef47d2..dea0899 100644 --- a/game/pb/common/Common.cs +++ b/game/pb/common/Common.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: common.proto +// source: common/common.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Common { - /// Holder for reflection information generated from common.proto + /// Holder for reflection information generated from common/common.proto public static partial class CommonReflection { #region Descriptor - /// File descriptor for common.proto + /// File descriptor for common/common.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,58 +24,49 @@ namespace Pb.Common { static CommonReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cgxjb21tb24ucHJvdG8SCXBiLmNvbW1vbiJdCgZQYlVzZXISCwoDdUlkGAEg", - "ASgDEg0KBXVuYW1lGAIgASgJEg4KBmF2YXRhchgDIAEoCRIVCg1ub2JpbGl0", - "eUxldmVsGAQgASgFEhAKCGludGVncmFsGAUgASgDIjIKDUdhbWVTdGF0dXNS", - "ZXESDgoGc3RhdHVzGAEgASgFEhEKCXRpbWVzdGFtcBgCIAEoAyJGCg5HYW1l", - "U3RhdHVzUmVzcBIPCgdzdWNjZXNzGAEgASgIEhAKCGJhdHRsZUlkGAIgASgD", - "EhEKCXRpbWVzdGFtcBgDIAEoAyJYChNVc2VySW50ZWdyYWxDaGFuZ2VkEh8K", - "BHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmNoYW5nZRgCIAEo", - "AxIQCghpbnRlZ3JhbBgDIAEoAyI3ChVDaGFuZ2VVc2VySW50ZWdyYWxSZXES", - "DgoGdXNlcklkGAEgASgDEg4KBmNoYW5nZRgCIAEoAyJlChZDaGFuZ2VVc2Vy", - "SW50ZWdyYWxSZXNwEgwKBGNvZGUYASABKAUSCwoDbXNnGAIgASgJEg4KBnVz", - "ZXJJZBgDIAEoAxIOCgZjaGFuZ2UYBCABKAMSEAoIaW50ZWdyYWwYBSABKAMi", - "VgoSVXNlckNvaW5DaGFuZ2VkTXNnEh8KBHVzZXIYASABKAsyES5wYi5jb21t", - "b24uUGJVc2VyEg4KBmNoYW5nZRgCIAEoAxIPCgdjdXJyZW50GAMgASgDIjMK", - "EUNoYW5nZVVzZXJDb2luUmVxEg4KBnVzZXJJZBgBIAEoAxIOCgZjaGFuZ2UY", - "AiABKAMiYAoSQ2hhbmdlVXNlckNvaW5SZXNwEgwKBGNvZGUYASABKAUSCwoD", - "bXNnGAIgASgJEg4KBnVzZXJJZBgDIAEoAxIOCgZjaGFuZ2UYBCABKAMSDwoH", - "Y3VycmVudBgFIAEoAyJ0CgpDaGVja0luTXNnEgwKBGNvZGUYASABKAUSCwoD", - "bXNnGAIgASgJEh8KBHVzZXIYAyABKAsyES5wYi5jb21tb24uUGJVc2VyEhYK", - "DmludGVncmFsQ2hhbmdlGAQgASgDEhIKCmlzQ3JpdGljYWwYBSABKAgiYQoL", - "R2lmdFBhY2tNc2cSDAoEY29kZRgBIAEoBRILCgNtc2cYAiABKAkSHwoEdXNl", - "chgDIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISFgoOaW50ZWdyYWxDaGFuZ2UY", - "BCABKAMirAEKDFVzZXJRdWVyeU1zZxIfCgR1c2VyGAEgASgLMhEucGIuY29t", - "bW9uLlBiVXNlchIuCgRyYW5rGAIgAygLMiAucGIuY29tbW9uLlVzZXJRdWVy", - "eU1zZy5SYW5rSXRlbRIQCgh0aXRsZUlkcxgDIAMoAxo5CghSYW5rSXRlbRIQ", - "CghyYW5rVHlwZRgBIAEoBRINCgVzY29yZRgCIAEoAxIMCgRyYW5rGAMgASgF", - "Ij4KCkRhbm1ha3VNc2cSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVz", - "ZXISDwoHY29udGVudBgCIAEoCSJ4CgdHaWZ0TXNnEh8KBHVzZXIYASABKAsy", - "ES5wYi5jb21tb24uUGJVc2VyEg4KBmdpZnRJZBgCIAEoAxILCgNudW0YAyAB", - "KAMSEAoIZ2lmdE5hbWUYBCABKAkSDQoFcHJpY2UYBSABKAMSDgoGaXNQYWlk", - "GAYgASgIIp0BCg1SZXdhcmRQb29sTXNnEhMKC3dlbGZhcmVQb29sGAEgASgD", - "EhAKCGJhdHRsZUlkGAIgASgDEhIKCmluaXRSZXdhcmQYAyABKAMSEgoKZ2lm", - "dFJld2FyZBgEIAEoAxIUCgxiYXR0bGVSZXdhcmQYBSABKAMSEwoLb3RoZXJS", - "ZXdhcmQYBiABKAMSEgoKYWxsUmV3YXJkcxgKIAEoA0IdWhtkY2cvZ2FtZS9w", - "Yi9jb21tb247cGJDb21tb25iBnByb3RvMw==")); + "ChNjb21tb24vY29tbW9uLnByb3RvEglwYi5jb21tb24aD3ZhcnMvdmFycy5w", + "cm90byI6CgZQYlVzZXISDgoGdXNlcklkGAEgASgDEhAKCHVzZXJuYW1lGAIg", + "ASgJEg4KBmF2YXRhchgDIAEoCSIyCg1HYW1lU3RhdHVzUmVxEg4KBnN0YXR1", + "cxgBIAEoBRIRCgl0aW1lc3RhbXAYAiABKAMiRgoOR2FtZVN0YXR1c1Jlc3AS", + "DwoHc3VjY2VzcxgBIAEoCBIQCghiYXR0bGVJZBgCIAEoAxIRCgl0aW1lc3Rh", + "bXAYAyABKAMihgEKElVzZXJDb2luQ2hhbmdlZE1zZxIfCgR1c2VyGAEgASgL", + "MhEucGIuY29tbW9uLlBiVXNlchIuCgZyZWFzb24YAiABKA4yHi5wYi52YXJz", + "LlVzZXJDb2luQ2hhbmdlZFJlYXNvbhIOCgZjaGFuZ2UYCiABKAMSDwoHY3Vy", + "cmVudBgLIAEoAyJjChFDaGFuZ2VVc2VyQ29pblJlcRIOCgZ1c2VySWQYASAB", + "KAMSDgoGY2hhbmdlGAIgASgDEi4KBnJlYXNvbhgDIAEoDjIeLnBiLnZhcnMu", + "VXNlckNvaW5DaGFuZ2VkUmVhc29uIk8KEkNoYW5nZVVzZXJDb2luUmVzcBIM", + "CgRjb2RlGAEgASgFEgsKA21zZxgCIAEoCRIOCgZ1c2VySWQYAyABKAMSDgoG", + "Y2hhbmdlGAQgASgDIoUBCgpDaGVja0luTXNnEgwKBGNvZGUYASABKAUSCwoD", + "bXNnGAIgASgJEh8KBHVzZXIYAyABKAsyES5wYi5jb21tb24uUGJVc2VyEhIK", + "CmNvaW5DaGFuZ2UYBCABKAMSEwoLY3VycmVudENvaW4YBSABKAMSEgoKaXND", + "cml0aWNhbBgKIAEoCCJXCgtHaWZ0UGFja01zZxIMCgRjb2RlGAEgASgFEgsK", + "A21zZxgCIAEoCRIfCgR1c2VyGAMgASgLMhEucGIuY29tbW9uLlBiVXNlchIM", + "CgRjb2luGAQgASgDIp8BCg9Vc2VyQnV5R29vZHNNc2cSDAoEY29kZRgBIAEo", + "BRIfCgR1c2VyGAMgASgLMhEucGIuY29tbW9uLlBiVXNlchIdCgVnb29kcxgE", + "IAEoDjIOLnBiLnZhcnMuR29vZHMSDwoHZ29vZHNJZBgFIAEoAxINCgVjb3Vu", + "dBgGIAEoBRIMCgRjb3N0GAcgASgDEhAKCGR1cmF0aW9uGAggASgFIkMKCVRp", + "dGxlSXRlbRIKCgJpZBgBIAEoAxIMCgRuYW1lGAIgASgJEgwKBHNvcnQYAyAB", + "KAUSDgoGcmVtYWluGAQgASgFIj4KCkRhbm1ha3VNc2cSHwoEdXNlchgBIAEo", + "CzIRLnBiLmNvbW1vbi5QYlVzZXISDwoHY29udGVudBgCIAEoCSJ4CgdHaWZ0", + "TXNnEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmdpZnRJ", + "ZBgCIAEoAxILCgNudW0YAyABKAMSEAoIZ2lmdE5hbWUYBCABKAkSDQoFcHJp", + "Y2UYBSABKAMSDgoGaXNQYWlkGAYgASgIQh1aG2RjZy9nYW1lL3BiL2NvbW1v", + "bjtwYkNvbW1vbmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, + new pbr::FileDescriptor[] { global::Pb.Vars.VarsReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.PbUser), global::Pb.Common.PbUser.Parser, new[]{ "UId", "Uname", "Avatar", "NobilityLevel", "Integral" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.PbUser), global::Pb.Common.PbUser.Parser, new[]{ "UserId", "Username", "Avatar" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GameStatusReq), global::Pb.Common.GameStatusReq.Parser, new[]{ "Status", "Timestamp" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GameStatusResp), global::Pb.Common.GameStatusResp.Parser, new[]{ "Success", "BattleId", "Timestamp" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserIntegralChanged), global::Pb.Common.UserIntegralChanged.Parser, new[]{ "User", "Change", "Integral" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralReq), global::Pb.Common.ChangeUserIntegralReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserIntegralResp), global::Pb.Common.ChangeUserIntegralResp.Parser, new[]{ "Code", "Msg", "UserId", "Change", "Integral" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserCoinChangedMsg), global::Pb.Common.UserCoinChangedMsg.Parser, new[]{ "User", "Change", "Current" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserCoinReq), global::Pb.Common.ChangeUserCoinReq.Parser, new[]{ "UserId", "Change" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserCoinResp), global::Pb.Common.ChangeUserCoinResp.Parser, new[]{ "Code", "Msg", "UserId", "Change", "Current" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange", "IsCritical" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftPackMsg), global::Pb.Common.GiftPackMsg.Parser, new[]{ "Code", "Msg", "User", "IntegralChange" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg), global::Pb.Common.UserQueryMsg.Parser, new[]{ "User", "Rank", "TitleIds" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserQueryMsg.Types.RankItem), global::Pb.Common.UserQueryMsg.Types.RankItem.Parser, new[]{ "RankType", "Score", "Rank" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserCoinChangedMsg), global::Pb.Common.UserCoinChangedMsg.Parser, new[]{ "User", "Reason", "Change", "Current" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserCoinReq), global::Pb.Common.ChangeUserCoinReq.Parser, new[]{ "UserId", "Change", "Reason" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.ChangeUserCoinResp), global::Pb.Common.ChangeUserCoinResp.Parser, new[]{ "Code", "Msg", "UserId", "Change" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.CheckInMsg), global::Pb.Common.CheckInMsg.Parser, new[]{ "Code", "Msg", "User", "CoinChange", "CurrentCoin", "IsCritical" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftPackMsg), global::Pb.Common.GiftPackMsg.Parser, new[]{ "Code", "Msg", "User", "Coin" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.UserBuyGoodsMsg), global::Pb.Common.UserBuyGoodsMsg.Parser, new[]{ "Code", "User", "Goods", "GoodsId", "Count", "Cost", "Duration" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.TitleItem), global::Pb.Common.TitleItem.Parser, new[]{ "Id", "Name", "Sort", "Remain" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.DanmakuMsg), global::Pb.Common.DanmakuMsg.Parser, new[]{ "User", "Content" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftMsg), global::Pb.Common.GiftMsg.Parser, new[]{ "User", "GiftId", "Num", "GiftName", "Price", "IsPaid" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.RewardPoolMsg), global::Pb.Common.RewardPoolMsg.Parser, new[]{ "WelfarePool", "BattleId", "InitReward", "GiftReward", "BattleReward", "OtherReward", "AllRewards" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Common.GiftMsg), global::Pb.Common.GiftMsg.Parser, new[]{ "User", "GiftId", "Num", "GiftName", "Price", "IsPaid" }, null, null, null, null) })); } #endregion @@ -119,11 +110,9 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PbUser(PbUser other) : this() { - uId_ = other.uId_; - uname_ = other.uname_; + userId_ = other.userId_; + username_ = other.username_; avatar_ = other.avatar_; - nobilityLevel_ = other.nobilityLevel_; - integral_ = other.integral_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -133,33 +122,33 @@ namespace Pb.Common { return new PbUser(this); } - /// Field number for the "uId" field. - public const int UIdFieldNumber = 1; - private long uId_; + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private long userId_; /// /// 用户id /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long UId { - get { return uId_; } + public long UserId { + get { return userId_; } set { - uId_ = value; + userId_ = value; } } - /// Field number for the "uname" field. - public const int UnameFieldNumber = 2; - private string uname_ = ""; + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; /// /// 用户名 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Uname { - get { return uname_; } + public string Username { + get { return username_; } set { - uname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } @@ -178,36 +167,6 @@ namespace Pb.Common { } } - /// Field number for the "nobilityLevel" field. - public const int NobilityLevelFieldNumber = 4; - private int nobilityLevel_; - /// - /// 贵族等级 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int NobilityLevel { - get { return nobilityLevel_; } - set { - nobilityLevel_ = value; - } - } - - /// Field number for the "integral" field. - public const int IntegralFieldNumber = 5; - private long integral_; - /// - /// 用户当前积分 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Integral { - get { return integral_; } - set { - integral_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -223,11 +182,9 @@ namespace Pb.Common { if (ReferenceEquals(other, this)) { return true; } - if (UId != other.UId) return false; - if (Uname != other.Uname) return false; + if (UserId != other.UserId) return false; + if (Username != other.Username) return false; if (Avatar != other.Avatar) return false; - if (NobilityLevel != other.NobilityLevel) return false; - if (Integral != other.Integral) return false; return Equals(_unknownFields, other._unknownFields); } @@ -235,11 +192,9 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (UId != 0L) hash ^= UId.GetHashCode(); - if (Uname.Length != 0) hash ^= Uname.GetHashCode(); + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); if (Avatar.Length != 0) hash ^= Avatar.GetHashCode(); - if (NobilityLevel != 0) hash ^= NobilityLevel.GetHashCode(); - if (Integral != 0L) hash ^= Integral.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -258,26 +213,18 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (UId != 0L) { + if (UserId != 0L) { output.WriteRawTag(8); - output.WriteInt64(UId); + output.WriteInt64(UserId); } - if (Uname.Length != 0) { + if (Username.Length != 0) { output.WriteRawTag(18); - output.WriteString(Uname); + output.WriteString(Username); } if (Avatar.Length != 0) { output.WriteRawTag(26); output.WriteString(Avatar); } - if (NobilityLevel != 0) { - output.WriteRawTag(32); - output.WriteInt32(NobilityLevel); - } - if (Integral != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Integral); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -288,26 +235,18 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (UId != 0L) { + if (UserId != 0L) { output.WriteRawTag(8); - output.WriteInt64(UId); + output.WriteInt64(UserId); } - if (Uname.Length != 0) { + if (Username.Length != 0) { output.WriteRawTag(18); - output.WriteString(Uname); + output.WriteString(Username); } if (Avatar.Length != 0) { output.WriteRawTag(26); output.WriteString(Avatar); } - if (NobilityLevel != 0) { - output.WriteRawTag(32); - output.WriteInt32(NobilityLevel); - } - if (Integral != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Integral); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -318,21 +257,15 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (UId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(UId); + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); } - if (Uname.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Uname); + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); } if (Avatar.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Avatar); } - if (NobilityLevel != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(NobilityLevel); - } - if (Integral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -345,21 +278,15 @@ namespace Pb.Common { if (other == null) { return; } - if (other.UId != 0L) { - UId = other.UId; + if (other.UserId != 0L) { + UserId = other.UserId; } - if (other.Uname.Length != 0) { - Uname = other.Uname; + if (other.Username.Length != 0) { + Username = other.Username; } if (other.Avatar.Length != 0) { Avatar = other.Avatar; } - if (other.NobilityLevel != 0) { - NobilityLevel = other.NobilityLevel; - } - if (other.Integral != 0L) { - Integral = other.Integral; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -376,25 +303,17 @@ namespace Pb.Common { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - UId = input.ReadInt64(); + UserId = input.ReadInt64(); break; } case 18: { - Uname = input.ReadString(); + Username = input.ReadString(); break; } case 26: { Avatar = input.ReadString(); break; } - case 32: { - NobilityLevel = input.ReadInt32(); - break; - } - case 40: { - Integral = input.ReadInt64(); - break; - } } } #endif @@ -411,25 +330,17 @@ namespace Pb.Common { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - UId = input.ReadInt64(); + UserId = input.ReadInt64(); break; } case 18: { - Uname = input.ReadString(); + Username = input.ReadString(); break; } case 26: { Avatar = input.ReadString(); break; } - case 32: { - NobilityLevel = input.ReadInt32(); - break; - } - case 40: { - Integral = input.ReadInt64(); - break; - } } } } @@ -945,18 +856,18 @@ namespace Pb.Common { } /// - /// UserIntegralChanged 用户积分变更 push -> user.integral.change + /// UserCoinChangedMsg 用户弹币变更通知 push -> user.coin.change /// - public sealed partial class UserIntegralChanged : pb::IMessage + public sealed partial class UserCoinChangedMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserIntegralChanged()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserCoinChangedMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -972,7 +883,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserIntegralChanged() { + public UserCoinChangedMsg() { OnConstruction(); } @@ -980,17 +891,18 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserIntegralChanged(UserIntegralChanged other) : this() { + public UserCoinChangedMsg(UserCoinChangedMsg other) : this() { user_ = other.user_ != null ? other.user_.Clone() : null; + reason_ = other.reason_; change_ = other.change_; - integral_ = other.integral_; + current_ = other.current_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserIntegralChanged Clone() { - return new UserIntegralChanged(this); + public UserCoinChangedMsg Clone() { + return new UserCoinChangedMsg(this); } /// Field number for the "user" field. @@ -1005,11 +917,26 @@ namespace Pb.Common { } } + /// Field number for the "reason" field. + public const int ReasonFieldNumber = 2; + private global::Pb.Vars.UserCoinChangedReason reason_ = global::Pb.Vars.UserCoinChangedReason.Pay; + /// + /// 变动原因 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Vars.UserCoinChangedReason Reason { + get { return reason_; } + set { + reason_ = value; + } + } + /// Field number for the "change" field. - public const int ChangeFieldNumber = 2; + public const int ChangeFieldNumber = 10; private long change_; /// - /// 变更量 + /// 变动量 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1020,30 +947,30 @@ namespace Pb.Common { } } - /// Field number for the "integral" field. - public const int IntegralFieldNumber = 3; - private long integral_; + /// Field number for the "current" field. + public const int CurrentFieldNumber = 11; + private long current_; /// - /// 现有量 + /// 当前量 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Integral { - get { return integral_; } + public long Current { + get { return current_; } set { - integral_ = value; + current_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserIntegralChanged); + return Equals(other as UserCoinChangedMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(UserIntegralChanged other) { + public bool Equals(UserCoinChangedMsg other) { if (ReferenceEquals(other, null)) { return false; } @@ -1051,8 +978,9 @@ namespace Pb.Common { return true; } if (!object.Equals(User, other.User)) return false; + if (Reason != other.Reason) return false; if (Change != other.Change) return false; - if (Integral != other.Integral) return false; + if (Current != other.Current) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1061,8 +989,9 @@ namespace Pb.Common { public override int GetHashCode() { int hash = 1; if (user_ != null) hash ^= User.GetHashCode(); + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) hash ^= Reason.GetHashCode(); if (Change != 0L) hash ^= Change.GetHashCode(); - if (Integral != 0L) hash ^= Integral.GetHashCode(); + if (Current != 0L) hash ^= Current.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1085,13 +1014,17 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (Change != 0L) { + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { output.WriteRawTag(16); + output.WriteEnum((int) Reason); + } + if (Change != 0L) { + output.WriteRawTag(80); output.WriteInt64(Change); } - if (Integral != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Integral); + if (Current != 0L) { + output.WriteRawTag(88); + output.WriteInt64(Current); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1107,13 +1040,17 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (Change != 0L) { + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { output.WriteRawTag(16); + output.WriteEnum((int) Reason); + } + if (Change != 0L) { + output.WriteRawTag(80); output.WriteInt64(Change); } - if (Integral != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Integral); + if (Current != 0L) { + output.WriteRawTag(88); + output.WriteInt64(Current); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -1128,11 +1065,14 @@ namespace Pb.Common { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Reason); + } if (Change != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); } - if (Integral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); + if (Current != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Current); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1142,7 +1082,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(UserIntegralChanged other) { + public void MergeFrom(UserCoinChangedMsg other) { if (other == null) { return; } @@ -1152,11 +1092,14 @@ namespace Pb.Common { } User.MergeFrom(other.User); } + if (other.Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { + Reason = other.Reason; + } if (other.Change != 0L) { Change = other.Change; } - if (other.Integral != 0L) { - Integral = other.Integral; + if (other.Current != 0L) { + Current = other.Current; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1181,11 +1124,15 @@ namespace Pb.Common { break; } case 16: { + Reason = (global::Pb.Vars.UserCoinChangedReason) input.ReadEnum(); + break; + } + case 80: { Change = input.ReadInt64(); break; } - case 24: { - Integral = input.ReadInt64(); + case 88: { + Current = input.ReadInt64(); break; } } @@ -1211,11 +1158,15 @@ namespace Pb.Common { break; } case 16: { + Reason = (global::Pb.Vars.UserCoinChangedReason) input.ReadEnum(); + break; + } + case 80: { Change = input.ReadInt64(); break; } - case 24: { - Integral = input.ReadInt64(); + case 88: { + Current = input.ReadInt64(); break; } } @@ -1226,18 +1177,18 @@ namespace Pb.Common { } /// - /// ChangeUserIntegral 更新用户积分 request -> user.integral.change + /// ChangeUserCoinReq 更新用户弹币 request -> user.coin.change /// - public sealed partial class ChangeUserIntegralReq : pb::IMessage + public sealed partial class ChangeUserCoinReq : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserIntegralReq()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserCoinReq()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1253,7 +1204,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralReq() { + public ChangeUserCoinReq() { OnConstruction(); } @@ -1261,16 +1212,17 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralReq(ChangeUserIntegralReq other) : this() { + public ChangeUserCoinReq(ChangeUserCoinReq other) : this() { userId_ = other.userId_; change_ = other.change_; + reason_ = other.reason_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralReq Clone() { - return new ChangeUserIntegralReq(this); + public ChangeUserCoinReq Clone() { + return new ChangeUserCoinReq(this); } /// Field number for the "userId" field. @@ -1292,7 +1244,7 @@ namespace Pb.Common { public const int ChangeFieldNumber = 2; private long change_; /// - /// 更新积分量,负数为消耗,正数为增加 + /// 更新量,负数为消耗,正数为增加 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1303,15 +1255,30 @@ namespace Pb.Common { } } + /// Field number for the "reason" field. + public const int ReasonFieldNumber = 3; + private global::Pb.Vars.UserCoinChangedReason reason_ = global::Pb.Vars.UserCoinChangedReason.Pay; + /// + /// 变更原因 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Vars.UserCoinChangedReason Reason { + get { return reason_; } + set { + reason_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeUserIntegralReq); + return Equals(other as ChangeUserCoinReq); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ChangeUserIntegralReq other) { + public bool Equals(ChangeUserCoinReq other) { if (ReferenceEquals(other, null)) { return false; } @@ -1320,6 +1287,7 @@ namespace Pb.Common { } if (UserId != other.UserId) return false; if (Change != other.Change) return false; + if (Reason != other.Reason) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1329,6 +1297,7 @@ namespace Pb.Common { int hash = 1; if (UserId != 0L) hash ^= UserId.GetHashCode(); if (Change != 0L) hash ^= Change.GetHashCode(); + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) hash ^= Reason.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1355,6 +1324,10 @@ namespace Pb.Common { output.WriteRawTag(16); output.WriteInt64(Change); } + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { + output.WriteRawTag(24); + output.WriteEnum((int) Reason); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1373,6 +1346,10 @@ namespace Pb.Common { output.WriteRawTag(16); output.WriteInt64(Change); } + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { + output.WriteRawTag(24); + output.WriteEnum((int) Reason); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1389,6 +1366,9 @@ namespace Pb.Common { if (Change != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); } + if (Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Reason); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1397,7 +1377,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(ChangeUserIntegralReq other) { + public void MergeFrom(ChangeUserCoinReq other) { if (other == null) { return; } @@ -1407,6 +1387,9 @@ namespace Pb.Common { if (other.Change != 0L) { Change = other.Change; } + if (other.Reason != global::Pb.Vars.UserCoinChangedReason.Pay) { + Reason = other.Reason; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1430,6 +1413,10 @@ namespace Pb.Common { Change = input.ReadInt64(); break; } + case 24: { + Reason = (global::Pb.Vars.UserCoinChangedReason) input.ReadEnum(); + break; + } } } #endif @@ -1453,6 +1440,10 @@ namespace Pb.Common { Change = input.ReadInt64(); break; } + case 24: { + Reason = (global::Pb.Vars.UserCoinChangedReason) input.ReadEnum(); + break; + } } } } @@ -1461,18 +1452,18 @@ namespace Pb.Common { } /// - /// ChangeUserIntegralResp 用户积分更新返回 + /// ChangeUserCoinResp 用户金币更新返回 response -> user.coin.change /// - public sealed partial class ChangeUserIntegralResp : pb::IMessage + public sealed partial class ChangeUserCoinResp : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserIntegralResp()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserCoinResp()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1488,7 +1479,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralResp() { + public ChangeUserCoinResp() { OnConstruction(); } @@ -1496,19 +1487,18 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralResp(ChangeUserIntegralResp other) : this() { + public ChangeUserCoinResp(ChangeUserCoinResp other) : this() { code_ = other.code_; msg_ = other.msg_; userId_ = other.userId_; change_ = other.change_; - integral_ = other.integral_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserIntegralResp Clone() { - return new ChangeUserIntegralResp(this); + public ChangeUserCoinResp Clone() { + return new ChangeUserCoinResp(this); } /// Field number for the "code" field. @@ -1560,7 +1550,7 @@ namespace Pb.Common { public const int ChangeFieldNumber = 4; private long change_; /// - /// 本次更新积分量 + /// 变更量 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1571,30 +1561,15 @@ namespace Pb.Common { } } - /// Field number for the "integral" field. - public const int IntegralFieldNumber = 5; - private long integral_; - /// - /// 当前剩余积分 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Integral { - get { return integral_; } - set { - integral_ = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeUserIntegralResp); + return Equals(other as ChangeUserCoinResp); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ChangeUserIntegralResp other) { + public bool Equals(ChangeUserCoinResp other) { if (ReferenceEquals(other, null)) { return false; } @@ -1605,7 +1580,6 @@ namespace Pb.Common { if (Msg != other.Msg) return false; if (UserId != other.UserId) return false; if (Change != other.Change) return false; - if (Integral != other.Integral) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1617,7 +1591,6 @@ namespace Pb.Common { if (Msg.Length != 0) hash ^= Msg.GetHashCode(); if (UserId != 0L) hash ^= UserId.GetHashCode(); if (Change != 0L) hash ^= Change.GetHashCode(); - if (Integral != 0L) hash ^= Integral.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1652,10 +1625,6 @@ namespace Pb.Common { output.WriteRawTag(32); output.WriteInt64(Change); } - if (Integral != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Integral); - } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1682,10 +1651,6 @@ namespace Pb.Common { output.WriteRawTag(32); output.WriteInt64(Change); } - if (Integral != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Integral); - } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1708,9 +1673,6 @@ namespace Pb.Common { if (Change != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); } - if (Integral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Integral); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1719,7 +1681,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(ChangeUserIntegralResp other) { + public void MergeFrom(ChangeUserCoinResp other) { if (other == null) { return; } @@ -1735,9 +1697,6 @@ namespace Pb.Common { if (other.Change != 0L) { Change = other.Change; } - if (other.Integral != 0L) { - Integral = other.Integral; - } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1769,10 +1728,6 @@ namespace Pb.Common { Change = input.ReadInt64(); break; } - case 40: { - Integral = input.ReadInt64(); - break; - } } } #endif @@ -1804,10 +1759,6 @@ namespace Pb.Common { Change = input.ReadInt64(); break; } - case 40: { - Integral = input.ReadInt64(); - break; - } } } } @@ -1816,18 +1767,18 @@ namespace Pb.Common { } /// - /// UserIntegralChanged 用户金币变更通知 push -> user.coin.change + /// CheckInMsg 每日打卡 push -> user.checkIn /// - public sealed partial class UserCoinChangedMsg : pb::IMessage + public sealed partial class CheckInMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserCoinChangedMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CheckInMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1843,7 +1794,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserCoinChangedMsg() { + public CheckInMsg() { OnConstruction(); } @@ -1851,21 +1802,54 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserCoinChangedMsg(UserCoinChangedMsg other) : this() { + public CheckInMsg(CheckInMsg other) : this() { + code_ = other.code_; + msg_ = other.msg_; user_ = other.user_ != null ? other.user_.Clone() : null; - change_ = other.change_; - current_ = other.current_; + coinChange_ = other.coinChange_; + currentCoin_ = other.currentCoin_; + isCritical_ = other.isCritical_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserCoinChangedMsg Clone() { - return new UserCoinChangedMsg(this); + public CheckInMsg Clone() { + return new CheckInMsg(this); + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private int code_; + /// + /// code, 200表示成功,其余根据对照表 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "msg" field. + public const int MsgFieldNumber = 2; + private string msg_ = ""; + /// + /// 消息 [打卡成功,快乐玩耍吧! | 今天已打过卡了!] + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Msg { + get { return msg_; } + set { + msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } /// Field number for the "user" field. - public const int UserFieldNumber = 1; + public const int UserFieldNumber = 3; private global::Pb.Common.PbUser user_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1876,940 +1860,49 @@ namespace Pb.Common { } } - /// Field number for the "change" field. - public const int ChangeFieldNumber = 2; - private long change_; + /// Field number for the "coinChange" field. + public const int CoinChangeFieldNumber = 4; + private long coinChange_; /// - /// 变更量 + /// 弹币变动 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Change { - get { return change_; } + public long CoinChange { + get { return coinChange_; } set { - change_ = value; + coinChange_ = value; } } - /// Field number for the "current" field. - public const int CurrentFieldNumber = 3; - private long current_; + /// Field number for the "currentCoin" field. + public const int CurrentCoinFieldNumber = 5; + private long currentCoin_; /// - /// 现有量 + /// 当前金币 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Current { - get { return current_; } + public long CurrentCoin { + get { return currentCoin_; } set { - current_ = value; + currentCoin_ = value; } } + /// Field number for the "isCritical" field. + public const int IsCriticalFieldNumber = 10; + private bool isCritical_; + /// + /// 是否欧皇附体 + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as UserCoinChangedMsg); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(UserCoinChangedMsg other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (!object.Equals(User, other.User)) return false; - if (Change != other.Change) return false; - if (Current != other.Current) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (user_ != null) hash ^= User.GetHashCode(); - if (Change != 0L) hash ^= Change.GetHashCode(); - if (Current != 0L) hash ^= Current.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); - } - if (Change != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Change); - } - if (Current != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Current); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); - } - if (Change != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Change); - } - if (Current != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Current); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (user_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); - } - if (Change != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); - } - if (Current != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Current); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(UserCoinChangedMsg other) { - if (other == null) { - return; - } - if (other.user_ != null) { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - User.MergeFrom(other.User); - } - if (other.Change != 0L) { - Change = other.Change; - } - if (other.Current != 0L) { - Current = other.Current; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); - break; - } - case 16: { - Change = input.ReadInt64(); - break; - } - case 24: { - Current = input.ReadInt64(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); - break; - } - case 16: { - Change = input.ReadInt64(); - break; - } - case 24: { - Current = input.ReadInt64(); - break; - } - } - } - } - #endif - - } - - /// - /// ChangeUserIntegral 更新用户金币 request -> user.coin.change - /// - public sealed partial class ChangeUserCoinReq : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserCoinReq()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserCoinReq() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserCoinReq(ChangeUserCoinReq other) : this() { - userId_ = other.userId_; - change_ = other.change_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserCoinReq Clone() { - return new ChangeUserCoinReq(this); - } - - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 1; - private long userId_; - /// - /// 用户ID - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long UserId { - get { return userId_; } - set { - userId_ = value; - } - } - - /// Field number for the "change" field. - public const int ChangeFieldNumber = 2; - private long change_; - /// - /// 更新量,负数为消耗,正数为增加 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Change { - get { return change_; } - set { - change_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as ChangeUserCoinReq); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ChangeUserCoinReq other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (UserId != other.UserId) return false; - if (Change != other.Change) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (UserId != 0L) hash ^= UserId.GetHashCode(); - if (Change != 0L) hash ^= Change.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (UserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(UserId); - } - if (Change != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Change); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (UserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(UserId); - } - if (Change != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Change); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (UserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); - } - if (Change != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(ChangeUserCoinReq other) { - if (other == null) { - return; - } - if (other.UserId != 0L) { - UserId = other.UserId; - } - if (other.Change != 0L) { - Change = other.Change; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - UserId = input.ReadInt64(); - break; - } - case 16: { - Change = input.ReadInt64(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - UserId = input.ReadInt64(); - break; - } - case 16: { - Change = input.ReadInt64(); - break; - } - } - } - } - #endif - - } - - /// - /// ChangeUserIntegralResp 用户金币更新返回 - /// - public sealed partial class ChangeUserCoinResp : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeUserCoinResp()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[8]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserCoinResp() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserCoinResp(ChangeUserCoinResp other) : this() { - code_ = other.code_; - msg_ = other.msg_; - userId_ = other.userId_; - change_ = other.change_; - current_ = other.current_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public ChangeUserCoinResp Clone() { - return new ChangeUserCoinResp(this); - } - - /// Field number for the "code" field. - public const int CodeFieldNumber = 1; - private int code_; - /// - /// code, 200表示成功,其余根据对照表 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Code { - get { return code_; } - set { - code_ = value; - } - } - - /// Field number for the "msg" field. - public const int MsgFieldNumber = 2; - private string msg_ = ""; - /// - /// 消息 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Msg { - get { return msg_; } - set { - msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 3; - private long userId_; - /// - /// 用户ID - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long UserId { - get { return userId_; } - set { - userId_ = value; - } - } - - /// Field number for the "change" field. - public const int ChangeFieldNumber = 4; - private long change_; - /// - /// 变更量 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Change { - get { return change_; } - set { - change_ = value; - } - } - - /// Field number for the "current" field. - public const int CurrentFieldNumber = 5; - private long current_; - /// - /// 现有量 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Current { - get { return current_; } - set { - current_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as ChangeUserCoinResp); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(ChangeUserCoinResp other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Code != other.Code) return false; - if (Msg != other.Msg) return false; - if (UserId != other.UserId) return false; - if (Change != other.Change) return false; - if (Current != other.Current) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (Code != 0) hash ^= Code.GetHashCode(); - if (Msg.Length != 0) hash ^= Msg.GetHashCode(); - if (UserId != 0L) hash ^= UserId.GetHashCode(); - if (Change != 0L) hash ^= Change.GetHashCode(); - if (Current != 0L) hash ^= Current.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (Code != 0) { - output.WriteRawTag(8); - output.WriteInt32(Code); - } - if (Msg.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Msg); - } - if (UserId != 0L) { - output.WriteRawTag(24); - output.WriteInt64(UserId); - } - if (Change != 0L) { - output.WriteRawTag(32); - output.WriteInt64(Change); - } - if (Current != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Current); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Code != 0) { - output.WriteRawTag(8); - output.WriteInt32(Code); - } - if (Msg.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Msg); - } - if (UserId != 0L) { - output.WriteRawTag(24); - output.WriteInt64(UserId); - } - if (Change != 0L) { - output.WriteRawTag(32); - output.WriteInt64(Change); - } - if (Current != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Current); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Code != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); - } - if (Msg.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg); - } - if (UserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); - } - if (Change != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Change); - } - if (Current != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Current); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(ChangeUserCoinResp other) { - if (other == null) { - return; - } - if (other.Code != 0) { - Code = other.Code; - } - if (other.Msg.Length != 0) { - Msg = other.Msg; - } - if (other.UserId != 0L) { - UserId = other.UserId; - } - if (other.Change != 0L) { - Change = other.Change; - } - if (other.Current != 0L) { - Current = other.Current; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Code = input.ReadInt32(); - break; - } - case 18: { - Msg = input.ReadString(); - break; - } - case 24: { - UserId = input.ReadInt64(); - break; - } - case 32: { - Change = input.ReadInt64(); - break; - } - case 40: { - Current = input.ReadInt64(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - Code = input.ReadInt32(); - break; - } - case 18: { - Msg = input.ReadString(); - break; - } - case 24: { - UserId = input.ReadInt64(); - break; - } - case 32: { - Change = input.ReadInt64(); - break; - } - case 40: { - Current = input.ReadInt64(); - break; - } - } - } - } - #endif - - } - - /// - /// CheckInMsg 每日打卡 push -> user.checkIn - /// - public sealed partial class CheckInMsg : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CheckInMsg()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[9]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CheckInMsg() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CheckInMsg(CheckInMsg other) : this() { - code_ = other.code_; - msg_ = other.msg_; - user_ = other.user_ != null ? other.user_.Clone() : null; - integralChange_ = other.integralChange_; - isCritical_ = other.isCritical_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public CheckInMsg Clone() { - return new CheckInMsg(this); - } - - /// Field number for the "code" field. - public const int CodeFieldNumber = 1; - private int code_; - /// - /// code, 200表示成功,其余根据对照表 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Code { - get { return code_; } - set { - code_ = value; - } - } - - /// Field number for the "msg" field. - public const int MsgFieldNumber = 2; - private string msg_ = ""; - /// - /// 消息 [打卡成功,快乐玩耍吧! | 今天已打过卡了!] - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Msg { - get { return msg_; } - set { - msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "user" field. - public const int UserFieldNumber = 3; - private global::Pb.Common.PbUser user_; - /// - /// 最新积分放置在user中 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Common.PbUser User { - get { return user_; } - set { - user_ = value; - } - } - - /// Field number for the "integralChange" field. - public const int IntegralChangeFieldNumber = 4; - private long integralChange_; - /// - /// 积分变动 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long IntegralChange { - get { return integralChange_; } - set { - integralChange_ = value; - } - } - - /// Field number for the "isCritical" field. - public const int IsCriticalFieldNumber = 5; - private bool isCritical_; - /// - /// 是否欧皇附体 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool IsCritical { - get { return isCritical_; } - set { - isCritical_ = value; - } + public bool IsCritical { + get { return isCritical_; } + set { + isCritical_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2830,7 +1923,8 @@ namespace Pb.Common { if (Code != other.Code) return false; if (Msg != other.Msg) return false; if (!object.Equals(User, other.User)) return false; - if (IntegralChange != other.IntegralChange) return false; + if (CoinChange != other.CoinChange) return false; + if (CurrentCoin != other.CurrentCoin) return false; if (IsCritical != other.IsCritical) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2842,7 +1936,8 @@ namespace Pb.Common { if (Code != 0) hash ^= Code.GetHashCode(); if (Msg.Length != 0) hash ^= Msg.GetHashCode(); if (user_ != null) hash ^= User.GetHashCode(); - if (IntegralChange != 0L) hash ^= IntegralChange.GetHashCode(); + if (CoinChange != 0L) hash ^= CoinChange.GetHashCode(); + if (CurrentCoin != 0L) hash ^= CurrentCoin.GetHashCode(); if (IsCritical != false) hash ^= IsCritical.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -2874,12 +1969,16 @@ namespace Pb.Common { output.WriteRawTag(26); output.WriteMessage(User); } - if (IntegralChange != 0L) { + if (CoinChange != 0L) { output.WriteRawTag(32); - output.WriteInt64(IntegralChange); + output.WriteInt64(CoinChange); } - if (IsCritical != false) { + if (CurrentCoin != 0L) { output.WriteRawTag(40); + output.WriteInt64(CurrentCoin); + } + if (IsCritical != false) { + output.WriteRawTag(80); output.WriteBool(IsCritical); } if (_unknownFields != null) { @@ -2904,12 +2003,16 @@ namespace Pb.Common { output.WriteRawTag(26); output.WriteMessage(User); } - if (IntegralChange != 0L) { + if (CoinChange != 0L) { output.WriteRawTag(32); - output.WriteInt64(IntegralChange); + output.WriteInt64(CoinChange); } - if (IsCritical != false) { + if (CurrentCoin != 0L) { output.WriteRawTag(40); + output.WriteInt64(CurrentCoin); + } + if (IsCritical != false) { + output.WriteRawTag(80); output.WriteBool(IsCritical); } if (_unknownFields != null) { @@ -2931,8 +2034,11 @@ namespace Pb.Common { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - if (IntegralChange != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntegralChange); + if (CoinChange != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(CoinChange); + } + if (CurrentCoin != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(CurrentCoin); } if (IsCritical != false) { size += 1 + 1; @@ -2961,8 +2067,11 @@ namespace Pb.Common { } User.MergeFrom(other.User); } - if (other.IntegralChange != 0L) { - IntegralChange = other.IntegralChange; + if (other.CoinChange != 0L) { + CoinChange = other.CoinChange; + } + if (other.CurrentCoin != 0L) { + CurrentCoin = other.CurrentCoin; } if (other.IsCritical != false) { IsCritical = other.IsCritical; @@ -2998,10 +2107,14 @@ namespace Pb.Common { break; } case 32: { - IntegralChange = input.ReadInt64(); + CoinChange = input.ReadInt64(); break; } case 40: { + CurrentCoin = input.ReadInt64(); + break; + } + case 80: { IsCritical = input.ReadBool(); break; } @@ -3036,10 +2149,14 @@ namespace Pb.Common { break; } case 32: { - IntegralChange = input.ReadInt64(); + CoinChange = input.ReadInt64(); break; } case 40: { + CurrentCoin = input.ReadInt64(); + break; + } + case 80: { IsCritical = input.ReadBool(); break; } @@ -3067,7 +2184,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[10]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3090,7 +2207,7 @@ namespace Pb.Common { code_ = other.code_; msg_ = other.msg_; user_ = other.user_ != null ? other.user_.Clone() : null; - integralChange_ = other.integralChange_; + coin_ = other.coin_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -3142,18 +2259,18 @@ namespace Pb.Common { } } - /// Field number for the "integralChange" field. - public const int IntegralChangeFieldNumber = 4; - private long integralChange_; + /// Field number for the "coin" field. + public const int CoinFieldNumber = 4; + private long coin_; /// - /// 积分变动 + /// 领取到的金币数 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long IntegralChange { - get { return integralChange_; } + public long Coin { + get { return coin_; } set { - integralChange_ = value; + coin_ = value; } } @@ -3175,7 +2292,7 @@ namespace Pb.Common { if (Code != other.Code) return false; if (Msg != other.Msg) return false; if (!object.Equals(User, other.User)) return false; - if (IntegralChange != other.IntegralChange) return false; + if (Coin != other.Coin) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3186,7 +2303,7 @@ namespace Pb.Common { if (Code != 0) hash ^= Code.GetHashCode(); if (Msg.Length != 0) hash ^= Msg.GetHashCode(); if (user_ != null) hash ^= User.GetHashCode(); - if (IntegralChange != 0L) hash ^= IntegralChange.GetHashCode(); + if (Coin != 0L) hash ^= Coin.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3217,9 +2334,9 @@ namespace Pb.Common { output.WriteRawTag(26); output.WriteMessage(User); } - if (IntegralChange != 0L) { + if (Coin != 0L) { output.WriteRawTag(32); - output.WriteInt64(IntegralChange); + output.WriteInt64(Coin); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -3243,9 +2360,9 @@ namespace Pb.Common { output.WriteRawTag(26); output.WriteMessage(User); } - if (IntegralChange != 0L) { + if (Coin != 0L) { output.WriteRawTag(32); - output.WriteInt64(IntegralChange); + output.WriteInt64(Coin); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -3266,8 +2383,8 @@ namespace Pb.Common { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - if (IntegralChange != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntegralChange); + if (Coin != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Coin); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -3293,8 +2410,8 @@ namespace Pb.Common { } User.MergeFrom(other.User); } - if (other.IntegralChange != 0L) { - IntegralChange = other.IntegralChange; + if (other.Coin != 0L) { + Coin = other.Coin; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3327,7 +2444,7 @@ namespace Pb.Common { break; } case 32: { - IntegralChange = input.ReadInt64(); + Coin = input.ReadInt64(); break; } } @@ -3361,7 +2478,7 @@ namespace Pb.Common { break; } case 32: { - IntegralChange = input.ReadInt64(); + Coin = input.ReadInt64(); break; } } @@ -3372,23 +2489,23 @@ namespace Pb.Common { } /// - /// QueryIntegralMsg 用户查询信息通知 push -> user.query + /// UserBuyGoodsMsg 用户兑换商品消息 push -> user.buy /// - public sealed partial class UserQueryMsg : pb::IMessage + public sealed partial class UserBuyGoodsMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserQueryMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserBuyGoodsMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[11]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3399,7 +2516,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserQueryMsg() { + public UserBuyGoodsMsg() { OnConstruction(); } @@ -3407,27 +2524,44 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserQueryMsg(UserQueryMsg other) : this() { + public UserBuyGoodsMsg(UserBuyGoodsMsg other) : this() { + code_ = other.code_; user_ = other.user_ != null ? other.user_.Clone() : null; - rank_ = other.rank_.Clone(); - titleIds_ = other.titleIds_.Clone(); + goods_ = other.goods_; + goodsId_ = other.goodsId_; + count_ = other.count_; + cost_ = other.cost_; + duration_ = other.duration_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public UserQueryMsg Clone() { - return new UserQueryMsg(this); + public UserBuyGoodsMsg Clone() { + return new UserBuyGoodsMsg(this); } - /// Field number for the "user" field. - public const int UserFieldNumber = 1; - private global::Pb.Common.PbUser user_; + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private int code_; /// - /// 用户信息 + /// 500: 兑换精英单位时发生错误,请联系UP主。 + /// 200: OK /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 3; + private global::Pb.Common.PbUser user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Pb.Common.PbUser User { get { return user_; } set { @@ -3435,52 +2569,103 @@ namespace Pb.Common { } } - /// Field number for the "rank" field. - public const int RankFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_rank_codec - = pb::FieldCodec.ForMessage(18, global::Pb.Common.UserQueryMsg.Types.RankItem.Parser); - private readonly pbc::RepeatedField rank_ = new pbc::RepeatedField(); + /// Field number for the "goods" field. + public const int GoodsFieldNumber = 4; + private global::Pb.Vars.Goods goods_ = global::Pb.Vars.Goods.Title; + /// + /// 商品类型 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Vars.Goods Goods { + get { return goods_; } + set { + goods_ = value; + } + } + + /// Field number for the "goodsId" field. + public const int GoodsIdFieldNumber = 5; + private long goodsId_; + /// + /// 商品ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long GoodsId { + get { return goodsId_; } + set { + goodsId_ = value; + } + } + + /// Field number for the "count" field. + public const int CountFieldNumber = 6; + private int count_; + /// + /// 数量 -1表示无限数量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Count { + get { return count_; } + set { + count_ = value; + } + } + + /// Field number for the "cost" field. + public const int CostFieldNumber = 7; + private long cost_; /// - /// 排行数据(多个榜) + /// 花费 0表示无花费 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Rank { - get { return rank_; } + public long Cost { + get { return cost_; } + set { + cost_ = value; + } } - /// Field number for the "titleIds" field. - public const int TitleIdsFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_titleIds_codec - = pb::FieldCodec.ForInt64(26); - private readonly pbc::RepeatedField titleIds_ = new pbc::RepeatedField(); + /// Field number for the "duration" field. + public const int DurationFieldNumber = 8; + private int duration_; /// - /// 称号ID列表,具体称号配置 给接口取 + /// 持续时长(单位:小时) -1表示无限制 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField TitleIds { - get { return titleIds_; } + public int Duration { + get { return duration_; } + set { + duration_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserQueryMsg); + return Equals(other as UserBuyGoodsMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(UserQueryMsg other) { + public bool Equals(UserBuyGoodsMsg other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } + if (Code != other.Code) return false; if (!object.Equals(User, other.User)) return false; - if(!rank_.Equals(other.rank_)) return false; - if(!titleIds_.Equals(other.titleIds_)) return false; + if (Goods != other.Goods) return false; + if (GoodsId != other.GoodsId) return false; + if (Count != other.Count) return false; + if (Cost != other.Cost) return false; + if (Duration != other.Duration) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3488,9 +2673,13 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; + if (Code != 0) hash ^= Code.GetHashCode(); if (user_ != null) hash ^= User.GetHashCode(); - hash ^= rank_.GetHashCode(); - hash ^= titleIds_.GetHashCode(); + if (Goods != global::Pb.Vars.Goods.Title) hash ^= Goods.GetHashCode(); + if (GoodsId != 0L) hash ^= GoodsId.GetHashCode(); + if (Count != 0) hash ^= Count.GetHashCode(); + if (Cost != 0L) hash ^= Cost.GetHashCode(); + if (Duration != 0) hash ^= Duration.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3509,12 +2698,34 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } if (user_ != null) { - output.WriteRawTag(10); + output.WriteRawTag(26); output.WriteMessage(User); } - rank_.WriteTo(output, _repeated_rank_codec); - titleIds_.WriteTo(output, _repeated_titleIds_codec); + if (Goods != global::Pb.Vars.Goods.Title) { + output.WriteRawTag(32); + output.WriteEnum((int) Goods); + } + if (GoodsId != 0L) { + output.WriteRawTag(40); + output.WriteInt64(GoodsId); + } + if (Count != 0) { + output.WriteRawTag(48); + output.WriteInt32(Count); + } + if (Cost != 0L) { + output.WriteRawTag(56); + output.WriteInt64(Cost); + } + if (Duration != 0) { + output.WriteRawTag(64); + output.WriteInt32(Duration); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3525,12 +2736,34 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } if (user_ != null) { - output.WriteRawTag(10); + output.WriteRawTag(26); output.WriteMessage(User); } - rank_.WriteTo(ref output, _repeated_rank_codec); - titleIds_.WriteTo(ref output, _repeated_titleIds_codec); + if (Goods != global::Pb.Vars.Goods.Title) { + output.WriteRawTag(32); + output.WriteEnum((int) Goods); + } + if (GoodsId != 0L) { + output.WriteRawTag(40); + output.WriteInt64(GoodsId); + } + if (Count != 0) { + output.WriteRawTag(48); + output.WriteInt32(Count); + } + if (Cost != 0L) { + output.WriteRawTag(56); + output.WriteInt64(Cost); + } + if (Duration != 0) { + output.WriteRawTag(64); + output.WriteInt32(Duration); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -3541,11 +2774,27 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); + } if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - size += rank_.CalculateSize(_repeated_rank_codec); - size += titleIds_.CalculateSize(_repeated_titleIds_codec); + if (Goods != global::Pb.Vars.Goods.Title) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Goods); + } + if (GoodsId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(GoodsId); + } + if (Count != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Count); + } + if (Cost != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Cost); + } + if (Duration != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Duration); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3554,18 +2803,34 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(UserQueryMsg other) { + public void MergeFrom(UserBuyGoodsMsg other) { if (other == null) { return; } + if (other.Code != 0) { + Code = other.Code; + } if (other.user_ != null) { if (user_ == null) { User = new global::Pb.Common.PbUser(); } User.MergeFrom(other.User); } - rank_.Add(other.rank_); - titleIds_.Add(other.titleIds_); + if (other.Goods != global::Pb.Vars.Goods.Title) { + Goods = other.Goods; + } + if (other.GoodsId != 0L) { + GoodsId = other.GoodsId; + } + if (other.Count != 0) { + Count = other.Count; + } + if (other.Cost != 0L) { + Cost = other.Cost; + } + if (other.Duration != 0) { + Duration = other.Duration; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3581,20 +2846,35 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { + case 8: { + Code = input.ReadInt32(); + break; + } + case 26: { if (user_ == null) { User = new global::Pb.Common.PbUser(); } input.ReadMessage(User); break; } - case 18: { - rank_.AddEntriesFrom(input, _repeated_rank_codec); + case 32: { + Goods = (global::Pb.Vars.Goods) input.ReadEnum(); break; } - case 26: - case 24: { - titleIds_.AddEntriesFrom(input, _repeated_titleIds_codec); + case 40: { + GoodsId = input.ReadInt64(); + break; + } + case 48: { + Count = input.ReadInt32(); + break; + } + case 56: { + Cost = input.ReadInt64(); + break; + } + case 64: { + Duration = input.ReadInt32(); break; } } @@ -3612,330 +2892,62 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { + case 8: { + Code = input.ReadInt32(); + break; + } + case 26: { if (user_ == null) { User = new global::Pb.Common.PbUser(); } input.ReadMessage(User); break; } - case 18: { - rank_.AddEntriesFrom(ref input, _repeated_rank_codec); + case 32: { + Goods = (global::Pb.Vars.Goods) input.ReadEnum(); break; } - case 26: - case 24: { - titleIds_.AddEntriesFrom(ref input, _repeated_titleIds_codec); + case 40: { + GoodsId = input.ReadInt64(); break; } - } - } - } - #endif - - #region Nested types - /// Container for nested types declared in the UserQueryMsg message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - /// - /// RankItem 排行数据结构 - /// - public sealed partial class RankItem : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RankItem()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.UserQueryMsg.Descriptor.NestedTypes[0]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public RankItem() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public RankItem(RankItem other) : this() { - rankType_ = other.rankType_; - score_ = other.score_; - rank_ = other.rank_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public RankItem Clone() { - return new RankItem(this); - } - - /// Field number for the "rankType" field. - public const int RankTypeFieldNumber = 1; - private int rankType_; - /// - /// 排行榜类型 (与pbGameZhg.RankType一致) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int RankType { - get { return rankType_; } - set { - rankType_ = value; - } - } - - /// Field number for the "score" field. - public const int ScoreFieldNumber = 2; - private long score_; - /// - /// 具体分数 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Score { - get { return score_; } - set { - score_ = value; - } - } - - /// Field number for the "rank" field. - public const int RankFieldNumber = 3; - private int rank_; - /// - /// 具体排名,不上榜为0 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Rank { - get { return rank_; } - set { - rank_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as RankItem); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(RankItem other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (RankType != other.RankType) return false; - if (Score != other.Score) return false; - if (Rank != other.Rank) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (RankType != 0) hash ^= RankType.GetHashCode(); - if (Score != 0L) hash ^= Score.GetHashCode(); - if (Rank != 0) hash ^= Rank.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (RankType != 0) { - output.WriteRawTag(8); - output.WriteInt32(RankType); - } - if (Score != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Score); - } - if (Rank != 0) { - output.WriteRawTag(24); - output.WriteInt32(Rank); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (RankType != 0) { - output.WriteRawTag(8); - output.WriteInt32(RankType); - } - if (Score != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Score); - } - if (Rank != 0) { - output.WriteRawTag(24); - output.WriteInt32(Rank); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (RankType != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(RankType); - } - if (Score != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Score); - } - if (Rank != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Rank); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(RankItem other) { - if (other == null) { - return; - } - if (other.RankType != 0) { - RankType = other.RankType; - } - if (other.Score != 0L) { - Score = other.Score; - } - if (other.Rank != 0) { - Rank = other.Rank; + case 48: { + Count = input.ReadInt32(); + break; } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - RankType = input.ReadInt32(); - break; - } - case 16: { - Score = input.ReadInt64(); - break; - } - case 24: { - Rank = input.ReadInt32(); - break; - } - } + case 56: { + Cost = input.ReadInt64(); + break; } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - RankType = input.ReadInt32(); - break; - } - case 16: { - Score = input.ReadInt64(); - break; - } - case 24: { - Rank = input.ReadInt32(); - break; - } - } + case 64: { + Duration = input.ReadInt32(); + break; } } - #endif - } - } - #endregion + #endif } /// - /// DanmakuMsg 普通弹幕消息 push -> live.danmaku + /// TitleItem 称号 /// - public sealed partial class DanmakuMsg : pb::IMessage + public sealed partial class TitleItem : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DanmakuMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TitleItem()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[12]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -3946,7 +2958,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DanmakuMsg() { + public TitleItem() { OnConstruction(); } @@ -3954,59 +2966,99 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DanmakuMsg(DanmakuMsg other) : this() { - user_ = other.user_ != null ? other.user_.Clone() : null; - content_ = other.content_; + public TitleItem(TitleItem other) : this() { + id_ = other.id_; + name_ = other.name_; + sort_ = other.sort_; + remain_ = other.remain_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public DanmakuMsg Clone() { - return new DanmakuMsg(this); + public TitleItem Clone() { + return new TitleItem(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private long id_; + /// + /// ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + /// + /// 称号名 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "user" field. - public const int UserFieldNumber = 1; - private global::Pb.Common.PbUser user_; + /// Field number for the "sort" field. + public const int SortFieldNumber = 3; + private int sort_; + /// + /// 排序号 + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public global::Pb.Common.PbUser User { - get { return user_; } + public int Sort { + get { return sort_; } set { - user_ = value; + sort_ = value; } } - /// Field number for the "content" field. - public const int ContentFieldNumber = 2; - private string content_ = ""; + /// Field number for the "remain" field. + public const int RemainFieldNumber = 4; + private int remain_; + /// + /// 剩余时长(单位:小时) + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Content { - get { return content_; } + public int Remain { + get { return remain_; } set { - content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + remain_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DanmakuMsg); + return Equals(other as TitleItem); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(DanmakuMsg other) { + public bool Equals(TitleItem other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(User, other.User)) return false; - if (Content != other.Content) return false; + if (Id != other.Id) return false; + if (Name != other.Name) return false; + if (Sort != other.Sort) return false; + if (Remain != other.Remain) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4014,8 +3066,10 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (user_ != null) hash ^= User.GetHashCode(); - if (Content.Length != 0) hash ^= Content.GetHashCode(); + if (Id != 0L) hash ^= Id.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Sort != 0) hash ^= Sort.GetHashCode(); + if (Remain != 0) hash ^= Remain.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4034,13 +3088,21 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); } - if (Content.Length != 0) { + if (Name.Length != 0) { output.WriteRawTag(18); - output.WriteString(Content); + output.WriteString(Name); + } + if (Sort != 0) { + output.WriteRawTag(24); + output.WriteInt32(Sort); + } + if (Remain != 0) { + output.WriteRawTag(32); + output.WriteInt32(Remain); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -4052,13 +3114,21 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (user_ != null) { - output.WriteRawTag(10); - output.WriteMessage(User); + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); } - if (Content.Length != 0) { + if (Name.Length != 0) { output.WriteRawTag(18); - output.WriteString(Content); + output.WriteString(Name); + } + if (Sort != 0) { + output.WriteRawTag(24); + output.WriteInt32(Sort); + } + if (Remain != 0) { + output.WriteRawTag(32); + output.WriteInt32(Remain); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -4070,11 +3140,17 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (user_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + if (Id != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); } - if (Content.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Content); + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Sort != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Sort); + } + if (Remain != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Remain); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -4084,18 +3160,21 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(DanmakuMsg other) { + public void MergeFrom(TitleItem other) { if (other == null) { return; } - if (other.user_ != null) { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - User.MergeFrom(other.User); + if (other.Id != 0L) { + Id = other.Id; } - if (other.Content.Length != 0) { - Content = other.Content; + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Sort != 0) { + Sort = other.Sort; + } + if (other.Remain != 0) { + Remain = other.Remain; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4112,15 +3191,20 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + Id = input.ReadInt64(); break; } case 18: { - Content = input.ReadString(); + Name = input.ReadString(); + break; + } + case 24: { + Sort = input.ReadInt32(); + break; + } + case 32: { + Remain = input.ReadInt32(); break; } } @@ -4138,15 +3222,20 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - if (user_ == null) { - User = new global::Pb.Common.PbUser(); - } - input.ReadMessage(User); + case 8: { + Id = input.ReadInt64(); break; } case 18: { - Content = input.ReadString(); + Name = input.ReadString(); + break; + } + case 24: { + Sort = input.ReadInt32(); + break; + } + case 32: { + Remain = input.ReadInt32(); break; } } @@ -4157,23 +3246,23 @@ namespace Pb.Common { } /// - /// 赠送礼物 push -> live.gift.common | live.gift.nobility + /// DanmakuMsg 普通弹幕消息 push -> live.danmaku /// - public sealed partial class GiftMsg : pb::IMessage + public sealed partial class DanmakuMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GiftMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DanmakuMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[13]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -4184,7 +3273,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public GiftMsg() { + public DanmakuMsg() { OnConstruction(); } @@ -4192,20 +3281,16 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public GiftMsg(GiftMsg other) : this() { + public DanmakuMsg(DanmakuMsg other) : this() { user_ = other.user_ != null ? other.user_.Clone() : null; - giftId_ = other.giftId_; - num_ = other.num_; - giftName_ = other.giftName_; - price_ = other.price_; - isPaid_ = other.isPaid_; + content_ = other.content_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public GiftMsg Clone() { - return new GiftMsg(this); + public DanmakuMsg Clone() { + return new DanmakuMsg(this); } /// Field number for the "user" field. @@ -4220,81 +3305,27 @@ namespace Pb.Common { } } - /// Field number for the "giftId" field. - public const int GiftIdFieldNumber = 2; - private long giftId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long GiftId { - get { return giftId_; } - set { - giftId_ = value; - } - } - - /// Field number for the "num" field. - public const int NumFieldNumber = 3; - private long num_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Num { - get { return num_; } - set { - num_ = value; - } - } - - /// Field number for the "giftName" field. - public const int GiftNameFieldNumber = 4; - private string giftName_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string GiftName { - get { return giftName_; } - set { - giftName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "price" field. - public const int PriceFieldNumber = 5; - private long price_; - /// - /// 单价 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Price { - get { return price_; } - set { - price_ = value; - } - } - - /// Field number for the "isPaid" field. - public const int IsPaidFieldNumber = 6; - private bool isPaid_; - /// - /// 是否收费礼物 - /// + /// Field number for the "content" field. + public const int ContentFieldNumber = 2; + private string content_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool IsPaid { - get { return isPaid_; } + public string Content { + get { return content_; } set { - isPaid_ = value; + content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GiftMsg); + return Equals(other as DanmakuMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(GiftMsg other) { + public bool Equals(DanmakuMsg other) { if (ReferenceEquals(other, null)) { return false; } @@ -4302,11 +3333,7 @@ namespace Pb.Common { return true; } if (!object.Equals(User, other.User)) return false; - if (GiftId != other.GiftId) return false; - if (Num != other.Num) return false; - if (GiftName != other.GiftName) return false; - if (Price != other.Price) return false; - if (IsPaid != other.IsPaid) return false; + if (Content != other.Content) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4315,11 +3342,7 @@ namespace Pb.Common { public override int GetHashCode() { int hash = 1; if (user_ != null) hash ^= User.GetHashCode(); - if (GiftId != 0L) hash ^= GiftId.GetHashCode(); - if (Num != 0L) hash ^= Num.GetHashCode(); - if (GiftName.Length != 0) hash ^= GiftName.GetHashCode(); - if (Price != 0L) hash ^= Price.GetHashCode(); - if (IsPaid != false) hash ^= IsPaid.GetHashCode(); + if (Content.Length != 0) hash ^= Content.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4342,25 +3365,9 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (GiftId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(GiftId); - } - if (Num != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Num); - } - if (GiftName.Length != 0) { - output.WriteRawTag(34); - output.WriteString(GiftName); - } - if (Price != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Price); - } - if (IsPaid != false) { - output.WriteRawTag(48); - output.WriteBool(IsPaid); + if (Content.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Content); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -4376,25 +3383,9 @@ namespace Pb.Common { output.WriteRawTag(10); output.WriteMessage(User); } - if (GiftId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(GiftId); - } - if (Num != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Num); - } - if (GiftName.Length != 0) { - output.WriteRawTag(34); - output.WriteString(GiftName); - } - if (Price != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Price); - } - if (IsPaid != false) { - output.WriteRawTag(48); - output.WriteBool(IsPaid); + if (Content.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Content); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -4409,20 +3400,8 @@ namespace Pb.Common { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - if (GiftId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(GiftId); - } - if (Num != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num); - } - if (GiftName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(GiftName); - } - if (Price != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Price); - } - if (IsPaid != false) { - size += 1 + 1; + if (Content.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Content); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -4432,7 +3411,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(GiftMsg other) { + public void MergeFrom(DanmakuMsg other) { if (other == null) { return; } @@ -4442,20 +3421,8 @@ namespace Pb.Common { } User.MergeFrom(other.User); } - if (other.GiftId != 0L) { - GiftId = other.GiftId; - } - if (other.Num != 0L) { - Num = other.Num; - } - if (other.GiftName.Length != 0) { - GiftName = other.GiftName; - } - if (other.Price != 0L) { - Price = other.Price; - } - if (other.IsPaid != false) { - IsPaid = other.IsPaid; + if (other.Content.Length != 0) { + Content = other.Content; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4479,24 +3446,8 @@ namespace Pb.Common { input.ReadMessage(User); break; } - case 16: { - GiftId = input.ReadInt64(); - break; - } - case 24: { - Num = input.ReadInt64(); - break; - } - case 34: { - GiftName = input.ReadString(); - break; - } - case 40: { - Price = input.ReadInt64(); - break; - } - case 48: { - IsPaid = input.ReadBool(); + case 18: { + Content = input.ReadString(); break; } } @@ -4521,24 +3472,8 @@ namespace Pb.Common { input.ReadMessage(User); break; } - case 16: { - GiftId = input.ReadInt64(); - break; - } - case 24: { - Num = input.ReadInt64(); - break; - } - case 34: { - GiftName = input.ReadString(); - break; - } - case 40: { - Price = input.ReadInt64(); - break; - } - case 48: { - IsPaid = input.ReadBool(); + case 18: { + Content = input.ReadString(); break; } } @@ -4549,23 +3484,23 @@ namespace Pb.Common { } /// - /// 奖池变动消息 push -> game.rewardPool + /// 赠送礼物 push -> live.gift.common | live.gift.nobility /// - public sealed partial class RewardPoolMsg : pb::IMessage + public sealed partial class GiftMsg : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RewardPoolMsg()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GiftMsg()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[14]; } + get { return global::Pb.Common.CommonReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -4576,7 +3511,7 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public RewardPoolMsg() { + public GiftMsg() { OnConstruction(); } @@ -4584,150 +3519,121 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public RewardPoolMsg(RewardPoolMsg other) : this() { - welfarePool_ = other.welfarePool_; - battleId_ = other.battleId_; - initReward_ = other.initReward_; - giftReward_ = other.giftReward_; - battleReward_ = other.battleReward_; - otherReward_ = other.otherReward_; - allRewards_ = other.allRewards_; + public GiftMsg(GiftMsg other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + giftId_ = other.giftId_; + num_ = other.num_; + giftName_ = other.giftName_; + price_ = other.price_; + isPaid_ = other.isPaid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public RewardPoolMsg Clone() { - return new RewardPoolMsg(this); - } - - /// Field number for the "welfarePool" field. - public const int WelfarePoolFieldNumber = 1; - private long welfarePool_; - /// - /// 福利池,与战局无关 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long WelfarePool { - get { return welfarePool_; } - set { - welfarePool_ = value; - } + public GiftMsg Clone() { + return new GiftMsg(this); } - /// Field number for the "battleId" field. - public const int BattleIdFieldNumber = 2; - private long battleId_; - /// - /// 战局ID - /// + /// Field number for the "user" field. + public const int UserFieldNumber = 1; + private global::Pb.Common.PbUser user_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long BattleId { - get { return battleId_; } + public global::Pb.Common.PbUser User { + get { return user_; } set { - battleId_ = value; + user_ = value; } } - /// Field number for the "initReward" field. - public const int InitRewardFieldNumber = 3; - private long initReward_; - /// - /// 初始奖池 - /// + /// Field number for the "giftId" field. + public const int GiftIdFieldNumber = 2; + private long giftId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long InitReward { - get { return initReward_; } + public long GiftId { + get { return giftId_; } set { - initReward_ = value; + giftId_ = value; } } - /// Field number for the "giftReward" field. - public const int GiftRewardFieldNumber = 4; - private long giftReward_; - /// - /// 礼物奖池 - /// + /// Field number for the "num" field. + public const int NumFieldNumber = 3; + private long num_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long GiftReward { - get { return giftReward_; } + public long Num { + get { return num_; } set { - giftReward_ = value; + num_ = value; } } - /// Field number for the "battleReward" field. - public const int BattleRewardFieldNumber = 5; - private long battleReward_; - /// - /// 战斗奖池 - /// + /// Field number for the "giftName" field. + public const int GiftNameFieldNumber = 4; + private string giftName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long BattleReward { - get { return battleReward_; } + public string GiftName { + get { return giftName_; } set { - battleReward_ = value; + giftName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "otherReward" field. - public const int OtherRewardFieldNumber = 6; - private long otherReward_; + /// Field number for the "price" field. + public const int PriceFieldNumber = 5; + private long price_; /// - /// 其它奖池 + /// 单价 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long OtherReward { - get { return otherReward_; } + public long Price { + get { return price_; } set { - otherReward_ = value; + price_ = value; } } - /// Field number for the "allRewards" field. - public const int AllRewardsFieldNumber = 10; - private long allRewards_; + /// Field number for the "isPaid" field. + public const int IsPaidFieldNumber = 6; + private bool isPaid_; /// - /// 所有奖池 + /// 是否收费礼物 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long AllRewards { - get { return allRewards_; } + public bool IsPaid { + get { return isPaid_; } set { - allRewards_ = value; + isPaid_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RewardPoolMsg); + return Equals(other as GiftMsg); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(RewardPoolMsg other) { + public bool Equals(GiftMsg other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (WelfarePool != other.WelfarePool) return false; - if (BattleId != other.BattleId) return false; - if (InitReward != other.InitReward) return false; - if (GiftReward != other.GiftReward) return false; - if (BattleReward != other.BattleReward) return false; - if (OtherReward != other.OtherReward) return false; - if (AllRewards != other.AllRewards) return false; + if (!object.Equals(User, other.User)) return false; + if (GiftId != other.GiftId) return false; + if (Num != other.Num) return false; + if (GiftName != other.GiftName) return false; + if (Price != other.Price) return false; + if (IsPaid != other.IsPaid) return false; return Equals(_unknownFields, other._unknownFields); } @@ -4735,13 +3641,12 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (WelfarePool != 0L) hash ^= WelfarePool.GetHashCode(); - if (BattleId != 0L) hash ^= BattleId.GetHashCode(); - if (InitReward != 0L) hash ^= InitReward.GetHashCode(); - if (GiftReward != 0L) hash ^= GiftReward.GetHashCode(); - if (BattleReward != 0L) hash ^= BattleReward.GetHashCode(); - if (OtherReward != 0L) hash ^= OtherReward.GetHashCode(); - if (AllRewards != 0L) hash ^= AllRewards.GetHashCode(); + if (user_ != null) hash ^= User.GetHashCode(); + if (GiftId != 0L) hash ^= GiftId.GetHashCode(); + if (Num != 0L) hash ^= Num.GetHashCode(); + if (GiftName.Length != 0) hash ^= GiftName.GetHashCode(); + if (Price != 0L) hash ^= Price.GetHashCode(); + if (IsPaid != false) hash ^= IsPaid.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4760,33 +3665,29 @@ namespace Pb.Common { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (WelfarePool != 0L) { - output.WriteRawTag(8); - output.WriteInt64(WelfarePool); + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); } - if (BattleId != 0L) { + if (GiftId != 0L) { output.WriteRawTag(16); - output.WriteInt64(BattleId); + output.WriteInt64(GiftId); } - if (InitReward != 0L) { + if (Num != 0L) { output.WriteRawTag(24); - output.WriteInt64(InitReward); + output.WriteInt64(Num); } - if (GiftReward != 0L) { - output.WriteRawTag(32); - output.WriteInt64(GiftReward); + if (GiftName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(GiftName); } - if (BattleReward != 0L) { + if (Price != 0L) { output.WriteRawTag(40); - output.WriteInt64(BattleReward); + output.WriteInt64(Price); } - if (OtherReward != 0L) { + if (IsPaid != false) { output.WriteRawTag(48); - output.WriteInt64(OtherReward); - } - if (AllRewards != 0L) { - output.WriteRawTag(80); - output.WriteInt64(AllRewards); + output.WriteBool(IsPaid); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -4798,33 +3699,29 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (WelfarePool != 0L) { - output.WriteRawTag(8); - output.WriteInt64(WelfarePool); + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); } - if (BattleId != 0L) { + if (GiftId != 0L) { output.WriteRawTag(16); - output.WriteInt64(BattleId); + output.WriteInt64(GiftId); } - if (InitReward != 0L) { + if (Num != 0L) { output.WriteRawTag(24); - output.WriteInt64(InitReward); + output.WriteInt64(Num); } - if (GiftReward != 0L) { - output.WriteRawTag(32); - output.WriteInt64(GiftReward); + if (GiftName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(GiftName); } - if (BattleReward != 0L) { + if (Price != 0L) { output.WriteRawTag(40); - output.WriteInt64(BattleReward); + output.WriteInt64(Price); } - if (OtherReward != 0L) { + if (IsPaid != false) { output.WriteRawTag(48); - output.WriteInt64(OtherReward); - } - if (AllRewards != 0L) { - output.WriteRawTag(80); - output.WriteInt64(AllRewards); + output.WriteBool(IsPaid); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -4836,26 +3733,23 @@ namespace Pb.Common { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (WelfarePool != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(WelfarePool); - } - if (BattleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleId); + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } - if (InitReward != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(InitReward); + if (GiftId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(GiftId); } - if (GiftReward != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(GiftReward); + if (Num != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num); } - if (BattleReward != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleReward); + if (GiftName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GiftName); } - if (OtherReward != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(OtherReward); + if (Price != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Price); } - if (AllRewards != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(AllRewards); + if (IsPaid != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -4865,30 +3759,30 @@ namespace Pb.Common { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(RewardPoolMsg other) { + public void MergeFrom(GiftMsg other) { if (other == null) { return; } - if (other.WelfarePool != 0L) { - WelfarePool = other.WelfarePool; - } - if (other.BattleId != 0L) { - BattleId = other.BattleId; + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); } - if (other.InitReward != 0L) { - InitReward = other.InitReward; + if (other.GiftId != 0L) { + GiftId = other.GiftId; } - if (other.GiftReward != 0L) { - GiftReward = other.GiftReward; + if (other.Num != 0L) { + Num = other.Num; } - if (other.BattleReward != 0L) { - BattleReward = other.BattleReward; + if (other.GiftName.Length != 0) { + GiftName = other.GiftName; } - if (other.OtherReward != 0L) { - OtherReward = other.OtherReward; + if (other.Price != 0L) { + Price = other.Price; } - if (other.AllRewards != 0L) { - AllRewards = other.AllRewards; + if (other.IsPaid != false) { + IsPaid = other.IsPaid; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -4905,32 +3799,31 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - WelfarePool = input.ReadInt64(); + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); break; } case 16: { - BattleId = input.ReadInt64(); + GiftId = input.ReadInt64(); break; } case 24: { - InitReward = input.ReadInt64(); + Num = input.ReadInt64(); break; } - case 32: { - GiftReward = input.ReadInt64(); + case 34: { + GiftName = input.ReadString(); break; } case 40: { - BattleReward = input.ReadInt64(); + Price = input.ReadInt64(); break; } case 48: { - OtherReward = input.ReadInt64(); - break; - } - case 80: { - AllRewards = input.ReadInt64(); + IsPaid = input.ReadBool(); break; } } @@ -4948,32 +3841,31 @@ namespace Pb.Common { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - WelfarePool = input.ReadInt64(); + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); break; } case 16: { - BattleId = input.ReadInt64(); + GiftId = input.ReadInt64(); break; } case 24: { - InitReward = input.ReadInt64(); + Num = input.ReadInt64(); break; } - case 32: { - GiftReward = input.ReadInt64(); + case 34: { + GiftName = input.ReadString(); break; } case 40: { - BattleReward = input.ReadInt64(); + Price = input.ReadInt64(); break; } case 48: { - OtherReward = input.ReadInt64(); - break; - } - case 80: { - AllRewards = input.ReadInt64(); + IsPaid = input.ReadBool(); break; } } diff --git a/game/pb/common/common.pb.go b/game/pb/common/common.pb.go index 8431588..0de24ae 100644 --- a/game/pb/common/common.pb.go +++ b/game/pb/common/common.pb.go @@ -7,6 +7,7 @@ package pbCommon import ( + vars "dcg/game/pb/vars" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -26,11 +27,9 @@ type PbUser struct { 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"` // 用户名 - Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` // 头像 - NobilityLevel int32 `protobuf:"varint,4,opt,name=nobilityLevel,proto3" json:"nobilityLevel,omitempty"` // 贵族等级 - Integral int64 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral,omitempty"` // 用户当前积分 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户id + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // 用户名 + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` // 头像 } func (x *PbUser) Reset() { @@ -65,16 +64,16 @@ func (*PbUser) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{0} } -func (x *PbUser) GetUId() int64 { +func (x *PbUser) GetUserId() int64 { if x != nil { - return x.UId + return x.UserId } return 0 } -func (x *PbUser) GetUname() string { +func (x *PbUser) GetUsername() string { if x != nil { - return x.Uname + return x.Username } return "" } @@ -86,20 +85,6 @@ func (x *PbUser) GetAvatar() string { return "" } -func (x *PbUser) GetNobilityLevel() int32 { - if x != nil { - return x.NobilityLevel - } - return 0 -} - -func (x *PbUser) GetIntegral() int64 { - if x != nil { - return x.Integral - } - return 0 -} - // GameStatusReq 游戏状态控制 game.status type GameStatusReq struct { state protoimpl.MessageState @@ -220,19 +205,20 @@ func (x *GameStatusResp) GetTimestamp() int64 { return 0 } -// UserIntegralChanged 用户积分变更 push -> user.integral.change -type UserIntegralChanged struct { +// UserCoinChangedMsg 用户弹币变更通知 push -> user.coin.change +type UserCoinChangedMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 变更量 - Integral int64 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral,omitempty"` // 现有量 + User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Reason vars.UserCoinChangedReason `protobuf:"varint,2,opt,name=reason,proto3,enum=pb.vars.UserCoinChangedReason" json:"reason,omitempty"` // 变动原因 + Change int64 `protobuf:"varint,10,opt,name=change,proto3" json:"change,omitempty"` // 变动量 + Current int64 `protobuf:"varint,11,opt,name=current,proto3" json:"current,omitempty"` // 当前量 } -func (x *UserIntegralChanged) Reset() { - *x = UserIntegralChanged{} +func (x *UserCoinChangedMsg) Reset() { + *x = UserCoinChangedMsg{} if protoimpl.UnsafeEnabled { mi := &file_common_common_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -240,13 +226,13 @@ func (x *UserIntegralChanged) Reset() { } } -func (x *UserIntegralChanged) String() string { +func (x *UserCoinChangedMsg) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserIntegralChanged) ProtoMessage() {} +func (*UserCoinChangedMsg) ProtoMessage() {} -func (x *UserIntegralChanged) ProtoReflect() protoreflect.Message { +func (x *UserCoinChangedMsg) ProtoReflect() protoreflect.Message { mi := &file_common_common_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -258,44 +244,52 @@ func (x *UserIntegralChanged) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserIntegralChanged.ProtoReflect.Descriptor instead. -func (*UserIntegralChanged) Descriptor() ([]byte, []int) { +// Deprecated: Use UserCoinChangedMsg.ProtoReflect.Descriptor instead. +func (*UserCoinChangedMsg) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{3} } -func (x *UserIntegralChanged) GetUser() *PbUser { +func (x *UserCoinChangedMsg) GetUser() *PbUser { if x != nil { return x.User } return nil } -func (x *UserIntegralChanged) GetChange() int64 { +func (x *UserCoinChangedMsg) GetReason() vars.UserCoinChangedReason { + if x != nil { + return x.Reason + } + return vars.UserCoinChangedReason(0) +} + +func (x *UserCoinChangedMsg) GetChange() int64 { if x != nil { return x.Change } return 0 } -func (x *UserIntegralChanged) GetIntegral() int64 { +func (x *UserCoinChangedMsg) GetCurrent() int64 { if x != nil { - return x.Integral + return x.Current } return 0 } -// ChangeUserIntegral 更新用户积分 request -> user.integral.change -type ChangeUserIntegralReq struct { +// ChangeUserCoinReq 更新用户弹币 request -> user.coin.change +type ChangeUserCoinReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID - Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 更新积分量,负数为消耗,正数为增加 + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID + Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 更新量,负数为消耗,正数为增加 + Reason vars.UserCoinChangedReason `protobuf:"varint,3,opt,name=reason,proto3,enum=pb.vars.UserCoinChangedReason" json:"reason,omitempty"` // 变更原因 } -func (x *ChangeUserIntegralReq) Reset() { - *x = ChangeUserIntegralReq{} +func (x *ChangeUserCoinReq) Reset() { + *x = ChangeUserCoinReq{} if protoimpl.UnsafeEnabled { mi := &file_common_common_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -303,13 +297,13 @@ func (x *ChangeUserIntegralReq) Reset() { } } -func (x *ChangeUserIntegralReq) String() string { +func (x *ChangeUserCoinReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeUserIntegralReq) ProtoMessage() {} +func (*ChangeUserCoinReq) ProtoMessage() {} -func (x *ChangeUserIntegralReq) ProtoReflect() protoreflect.Message { +func (x *ChangeUserCoinReq) ProtoReflect() protoreflect.Message { mi := &file_common_common_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -321,40 +315,46 @@ func (x *ChangeUserIntegralReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeUserIntegralReq.ProtoReflect.Descriptor instead. -func (*ChangeUserIntegralReq) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeUserCoinReq.ProtoReflect.Descriptor instead. +func (*ChangeUserCoinReq) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{4} } -func (x *ChangeUserIntegralReq) GetUserId() int64 { +func (x *ChangeUserCoinReq) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -func (x *ChangeUserIntegralReq) GetChange() int64 { +func (x *ChangeUserCoinReq) GetChange() int64 { if x != nil { return x.Change } return 0 } -// ChangeUserIntegralResp 用户积分更新返回 -type ChangeUserIntegralResp struct { +func (x *ChangeUserCoinReq) GetReason() vars.UserCoinChangedReason { + if x != nil { + return x.Reason + } + return vars.UserCoinChangedReason(0) +} + +// ChangeUserCoinResp 用户金币更新返回 response -> user.coin.change +type ChangeUserCoinResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - 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"` // 本次更新积分量 - Integral int64 `protobuf:"varint,5,opt,name=integral,proto3" json:"integral,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"` // 变更量 } -func (x *ChangeUserIntegralResp) Reset() { - *x = ChangeUserIntegralResp{} +func (x *ChangeUserCoinResp) Reset() { + *x = ChangeUserCoinResp{} if protoimpl.UnsafeEnabled { mi := &file_common_common_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -362,13 +362,13 @@ func (x *ChangeUserIntegralResp) Reset() { } } -func (x *ChangeUserIntegralResp) String() string { +func (x *ChangeUserCoinResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeUserIntegralResp) ProtoMessage() {} +func (*ChangeUserCoinResp) ProtoMessage() {} -func (x *ChangeUserIntegralResp) ProtoReflect() protoreflect.Message { +func (x *ChangeUserCoinResp) ProtoReflect() protoreflect.Message { mi := &file_common_common_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -380,59 +380,55 @@ func (x *ChangeUserIntegralResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeUserIntegralResp.ProtoReflect.Descriptor instead. -func (*ChangeUserIntegralResp) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeUserCoinResp.ProtoReflect.Descriptor instead. +func (*ChangeUserCoinResp) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{5} } -func (x *ChangeUserIntegralResp) GetCode() int32 { +func (x *ChangeUserCoinResp) GetCode() int32 { if x != nil { return x.Code } return 0 } -func (x *ChangeUserIntegralResp) GetMsg() string { +func (x *ChangeUserCoinResp) GetMsg() string { if x != nil { return x.Msg } return "" } -func (x *ChangeUserIntegralResp) GetUserId() int64 { +func (x *ChangeUserCoinResp) GetUserId() int64 { if x != nil { return x.UserId } return 0 } -func (x *ChangeUserIntegralResp) GetChange() int64 { +func (x *ChangeUserCoinResp) GetChange() int64 { if x != nil { return x.Change } return 0 } -func (x *ChangeUserIntegralResp) GetIntegral() int64 { - if x != nil { - return x.Integral - } - return 0 -} - -// UserIntegralChanged 用户金币变更通知 push -> user.coin.change -type UserCoinChangedMsg struct { +// CheckInMsg 每日打卡 push -> user.checkIn +type CheckInMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 变更量 - Current int64 `protobuf:"varint,3,opt,name=current,proto3" json:"current,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"` + CoinChange int64 `protobuf:"varint,4,opt,name=coinChange,proto3" json:"coinChange,omitempty"` // 弹币变动 + CurrentCoin int64 `protobuf:"varint,5,opt,name=currentCoin,proto3" json:"currentCoin,omitempty"` // 当前金币 + IsCritical bool `protobuf:"varint,10,opt,name=isCritical,proto3" json:"isCritical,omitempty"` // 是否欧皇附体 } -func (x *UserCoinChangedMsg) Reset() { - *x = UserCoinChangedMsg{} +func (x *CheckInMsg) Reset() { + *x = CheckInMsg{} if protoimpl.UnsafeEnabled { mi := &file_common_common_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -440,13 +436,13 @@ func (x *UserCoinChangedMsg) Reset() { } } -func (x *UserCoinChangedMsg) String() string { +func (x *CheckInMsg) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserCoinChangedMsg) ProtoMessage() {} +func (*CheckInMsg) ProtoMessage() {} -func (x *UserCoinChangedMsg) ProtoReflect() protoreflect.Message { +func (x *CheckInMsg) ProtoReflect() protoreflect.Message { mi := &file_common_common_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -458,118 +454,82 @@ func (x *UserCoinChangedMsg) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserCoinChangedMsg.ProtoReflect.Descriptor instead. -func (*UserCoinChangedMsg) Descriptor() ([]byte, []int) { +// Deprecated: Use CheckInMsg.ProtoReflect.Descriptor instead. +func (*CheckInMsg) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{6} } -func (x *UserCoinChangedMsg) GetUser() *PbUser { - if x != nil { - return x.User - } - return nil -} - -func (x *UserCoinChangedMsg) GetChange() int64 { +func (x *CheckInMsg) GetCode() int32 { if x != nil { - return x.Change + return x.Code } return 0 } -func (x *UserCoinChangedMsg) GetCurrent() int64 { +func (x *CheckInMsg) GetMsg() string { if x != nil { - return x.Current + return x.Msg } - return 0 -} - -// ChangeUserIntegral 更新用户金币 request -> user.coin.change -type ChangeUserCoinReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID - Change int64 `protobuf:"varint,2,opt,name=change,proto3" json:"change,omitempty"` // 更新量,负数为消耗,正数为增加 + return "" } -func (x *ChangeUserCoinReq) Reset() { - *x = ChangeUserCoinReq{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *CheckInMsg) GetUser() *PbUser { + if x != nil { + return x.User } + return nil } -func (x *ChangeUserCoinReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChangeUserCoinReq) ProtoMessage() {} - -func (x *ChangeUserCoinReq) 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 { - ms.StoreMessageInfo(mi) - } - return ms +func (x *CheckInMsg) GetCoinChange() int64 { + if x != nil { + return x.CoinChange } - return mi.MessageOf(x) -} - -// Deprecated: Use ChangeUserCoinReq.ProtoReflect.Descriptor instead. -func (*ChangeUserCoinReq) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{7} + return 0 } -func (x *ChangeUserCoinReq) GetUserId() int64 { +func (x *CheckInMsg) GetCurrentCoin() int64 { if x != nil { - return x.UserId + return x.CurrentCoin } return 0 } -func (x *ChangeUserCoinReq) GetChange() int64 { +func (x *CheckInMsg) GetIsCritical() bool { if x != nil { - return x.Change + return x.IsCritical } - return 0 + return false } -// ChangeUserIntegralResp 用户金币更新返回 -type ChangeUserCoinResp struct { +// GiftPackMsg 领取礼包消息 push -> user.giftPack 命令(新手礼包|福利|低保|其它礼包) +type GiftPackMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - 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"` // 变更量 - Current int64 `protobuf:"varint,5,opt,name=current,proto3" json:"current,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"` // 领取消息: [成功无msg | 已经领过礼包了xxx ] + User *PbUser `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` + Coin int64 `protobuf:"varint,4,opt,name=coin,proto3" json:"coin,omitempty"` // 领取到的金币数 } -func (x *ChangeUserCoinResp) Reset() { - *x = ChangeUserCoinResp{} +func (x *GiftPackMsg) Reset() { + *x = GiftPackMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[8] + mi := &file_common_common_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ChangeUserCoinResp) String() string { +func (x *GiftPackMsg) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeUserCoinResp) ProtoMessage() {} +func (*GiftPackMsg) ProtoMessage() {} -func (x *ChangeUserCoinResp) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[8] +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 { @@ -580,76 +540,73 @@ func (x *ChangeUserCoinResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeUserCoinResp.ProtoReflect.Descriptor instead. -func (*ChangeUserCoinResp) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{8} +// Deprecated: Use GiftPackMsg.ProtoReflect.Descriptor instead. +func (*GiftPackMsg) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{7} } -func (x *ChangeUserCoinResp) GetCode() int32 { +func (x *GiftPackMsg) GetCode() int32 { if x != nil { return x.Code } return 0 } -func (x *ChangeUserCoinResp) GetMsg() string { +func (x *GiftPackMsg) GetMsg() string { if x != nil { return x.Msg } return "" } -func (x *ChangeUserCoinResp) GetUserId() int64 { - if x != nil { - return x.UserId - } - return 0 -} - -func (x *ChangeUserCoinResp) GetChange() int64 { +func (x *GiftPackMsg) GetUser() *PbUser { if x != nil { - return x.Change + return x.User } - return 0 + return nil } -func (x *ChangeUserCoinResp) GetCurrent() int64 { +func (x *GiftPackMsg) GetCoin() int64 { if x != nil { - return x.Current + return x.Coin } return 0 } -// CheckInMsg 每日打卡 push -> user.checkIn -type CheckInMsg struct { +// UserBuyGoodsMsg 用户兑换商品消息 push -> user.buy +type UserBuyGoodsMsg struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - 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"` // 是否欧皇附体 + // 500: 兑换精英单位时发生错误,请联系UP主。 + // 200: OK + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + User *PbUser `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` + Goods vars.Goods `protobuf:"varint,4,opt,name=goods,proto3,enum=pb.vars.Goods" json:"goods,omitempty"` // 商品类型 + GoodsId int64 `protobuf:"varint,5,opt,name=goodsId,proto3" json:"goodsId,omitempty"` // 商品ID + Count int32 `protobuf:"varint,6,opt,name=count,proto3" json:"count,omitempty"` // 数量 -1表示无限数量 + Cost int64 `protobuf:"varint,7,opt,name=cost,proto3" json:"cost,omitempty"` // 花费 0表示无花费 + Duration int32 `protobuf:"varint,8,opt,name=duration,proto3" json:"duration,omitempty"` // 持续时长(单位:小时) -1表示无限制 } -func (x *CheckInMsg) Reset() { - *x = CheckInMsg{} +func (x *UserBuyGoodsMsg) Reset() { + *x = UserBuyGoodsMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[9] + mi := &file_common_common_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CheckInMsg) String() string { +func (x *UserBuyGoodsMsg) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CheckInMsg) ProtoMessage() {} +func (*UserBuyGoodsMsg) ProtoMessage() {} -func (x *CheckInMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[9] +func (x *UserBuyGoodsMsg) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -660,146 +617,89 @@ func (x *CheckInMsg) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CheckInMsg.ProtoReflect.Descriptor instead. -func (*CheckInMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{9} +// Deprecated: Use UserBuyGoodsMsg.ProtoReflect.Descriptor instead. +func (*UserBuyGoodsMsg) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{8} } -func (x *CheckInMsg) GetCode() int32 { +func (x *UserBuyGoodsMsg) GetCode() int32 { if x != nil { return x.Code } return 0 } -func (x *CheckInMsg) GetMsg() string { - if x != nil { - return x.Msg - } - return "" -} - -func (x *CheckInMsg) GetUser() *PbUser { +func (x *UserBuyGoodsMsg) GetUser() *PbUser { if x != nil { return x.User } return nil } -func (x *CheckInMsg) GetIntegralChange() int64 { +func (x *UserBuyGoodsMsg) GetGoods() vars.Goods { if x != nil { - return x.IntegralChange + return x.Goods } - return 0 + return vars.Goods(0) } -func (x *CheckInMsg) GetIsCritical() bool { +func (x *UserBuyGoodsMsg) GetGoodsId() int64 { if x != nil { - return x.IsCritical - } - return false -} - -// GiftPackMsg 领取礼包消息 push -> user.giftPack 命令(新手礼包|福利|低保|其它礼包) -type GiftPackMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - 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 *GiftPackMsg) Reset() { - *x = GiftPackMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GiftPackMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GiftPackMsg) ProtoMessage() {} - -func (x *GiftPackMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GiftPackMsg.ProtoReflect.Descriptor instead. -func (*GiftPackMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{10} -} - -func (x *GiftPackMsg) GetCode() int32 { - if x != nil { - return x.Code + return x.GoodsId } return 0 } -func (x *GiftPackMsg) GetMsg() string { +func (x *UserBuyGoodsMsg) GetCount() int32 { if x != nil { - return x.Msg + return x.Count } - return "" + return 0 } -func (x *GiftPackMsg) GetUser() *PbUser { +func (x *UserBuyGoodsMsg) GetCost() int64 { if x != nil { - return x.User + return x.Cost } - return nil + return 0 } -func (x *GiftPackMsg) GetIntegralChange() int64 { +func (x *UserBuyGoodsMsg) GetDuration() int32 { if x != nil { - return x.IntegralChange + return x.Duration } return 0 } -// QueryIntegralMsg 用户查询信息通知 push -> user.query -type UserQueryMsg struct { +// TitleItem 称号 +type TitleItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - 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列表,具体称号配置 给接口取 + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 称号名 + Sort int32 `protobuf:"varint,3,opt,name=sort,proto3" json:"sort,omitempty"` // 排序号 + Remain int32 `protobuf:"varint,4,opt,name=remain,proto3" json:"remain,omitempty"` // 剩余时长(单位:小时) } -func (x *UserQueryMsg) Reset() { - *x = UserQueryMsg{} +func (x *TitleItem) Reset() { + *x = TitleItem{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[11] + mi := &file_common_common_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UserQueryMsg) String() string { +func (x *TitleItem) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserQueryMsg) ProtoMessage() {} +func (*TitleItem) ProtoMessage() {} -func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[11] +func (x *TitleItem) ProtoReflect() protoreflect.Message { + mi := &file_common_common_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -810,30 +710,37 @@ func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UserQueryMsg.ProtoReflect.Descriptor instead. -func (*UserQueryMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{11} +// Deprecated: Use TitleItem.ProtoReflect.Descriptor instead. +func (*TitleItem) Descriptor() ([]byte, []int) { + return file_common_common_proto_rawDescGZIP(), []int{9} } -func (x *UserQueryMsg) GetUser() *PbUser { +func (x *TitleItem) GetId() int64 { if x != nil { - return x.User + return x.Id } - return nil + return 0 } -func (x *UserQueryMsg) GetRank() []*UserQueryMsg_RankItem { +func (x *TitleItem) GetName() string { if x != nil { - return x.Rank + return x.Name } - return nil + return "" } -func (x *UserQueryMsg) GetTitleIds() []int64 { +func (x *TitleItem) GetSort() int32 { if x != nil { - return x.TitleIds + return x.Sort } - return nil + return 0 +} + +func (x *TitleItem) GetRemain() int32 { + if x != nil { + return x.Remain + } + return 0 } // DanmakuMsg 普通弹幕消息 push -> live.danmaku @@ -849,7 +756,7 @@ type DanmakuMsg struct { func (x *DanmakuMsg) Reset() { *x = DanmakuMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[12] + mi := &file_common_common_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -862,7 +769,7 @@ func (x *DanmakuMsg) String() string { func (*DanmakuMsg) ProtoMessage() {} func (x *DanmakuMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[12] + mi := &file_common_common_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -875,7 +782,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{12} + return file_common_common_proto_rawDescGZIP(), []int{10} } func (x *DanmakuMsg) GetUser() *PbUser { @@ -909,7 +816,7 @@ type GiftMsg struct { func (x *GiftMsg) Reset() { *x = GiftMsg{} if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[13] + mi := &file_common_common_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -922,7 +829,7 @@ func (x *GiftMsg) String() string { func (*GiftMsg) ProtoMessage() {} func (x *GiftMsg) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[13] + mi := &file_common_common_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -935,7 +842,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{13} + return file_common_common_proto_rawDescGZIP(), []int{11} } func (x *GiftMsg) GetUser() *PbUser { @@ -980,297 +887,110 @@ 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[14] - 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[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RewardPoolMsg.ProtoReflect.Descriptor instead. -func (*RewardPoolMsg) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{14} -} - -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[15] - 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[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UserQueryMsg_RankItem.ProtoReflect.Descriptor instead. -func (*UserQueryMsg_RankItem) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{11, 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{ 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x49, 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, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6e, - 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, 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, 0x6d, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 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, + 0x1a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x54, 0x0a, 0x06, 0x50, 0x62, 0x55, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 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, 0xa5, 0x01, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, + 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 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, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x7b, 0x0a, 0x11, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 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, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x6a, 0x0a, 0x12, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 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, 0x22, 0xbb, 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, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x69, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, + 0x6f, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, + 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x43, 0x72, 0x69, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x22, 0x6e, 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, - 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x22, 0x43, 0x0a, 0x11, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, - 0x6f, 0x69, 0x6e, 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, 0x84, 0x01, 0x0a, 0x12, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x12, 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, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 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, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, + 0x6f, 0x69, 0x6e, 0x22, 0xd2, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x47, + 0x6f, 0x6f, 0x64, 0x73, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 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, 0x24, 0x0a, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x64, + 0x73, 0x52, 0x05, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x6f, 0x6f, 0x64, + 0x73, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x6f, 0x6f, 0x64, 0x73, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x09, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, + 0x65, 0x6d, 0x61, 0x69, 0x6e, 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, 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, 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, + 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, } var ( @@ -1285,39 +1005,38 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_common_common_proto_goTypes = []interface{}{ - (*PbUser)(nil), // 0: pb.common.PbUser - (*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 - (*UserCoinChangedMsg)(nil), // 6: pb.common.UserCoinChangedMsg - (*ChangeUserCoinReq)(nil), // 7: pb.common.ChangeUserCoinReq - (*ChangeUserCoinResp)(nil), // 8: pb.common.ChangeUserCoinResp - (*CheckInMsg)(nil), // 9: pb.common.CheckInMsg - (*GiftPackMsg)(nil), // 10: pb.common.GiftPackMsg - (*UserQueryMsg)(nil), // 11: pb.common.UserQueryMsg - (*DanmakuMsg)(nil), // 12: pb.common.DanmakuMsg - (*GiftMsg)(nil), // 13: pb.common.GiftMsg - (*RewardPoolMsg)(nil), // 14: pb.common.RewardPoolMsg - (*UserQueryMsg_RankItem)(nil), // 15: pb.common.UserQueryMsg.RankItem + (*PbUser)(nil), // 0: pb.common.PbUser + (*GameStatusReq)(nil), // 1: pb.common.GameStatusReq + (*GameStatusResp)(nil), // 2: pb.common.GameStatusResp + (*UserCoinChangedMsg)(nil), // 3: pb.common.UserCoinChangedMsg + (*ChangeUserCoinReq)(nil), // 4: pb.common.ChangeUserCoinReq + (*ChangeUserCoinResp)(nil), // 5: pb.common.ChangeUserCoinResp + (*CheckInMsg)(nil), // 6: pb.common.CheckInMsg + (*GiftPackMsg)(nil), // 7: pb.common.GiftPackMsg + (*UserBuyGoodsMsg)(nil), // 8: pb.common.UserBuyGoodsMsg + (*TitleItem)(nil), // 9: pb.common.TitleItem + (*DanmakuMsg)(nil), // 10: pb.common.DanmakuMsg + (*GiftMsg)(nil), // 11: pb.common.GiftMsg + (vars.UserCoinChangedReason)(0), // 12: pb.vars.UserCoinChangedReason + (vars.Goods)(0), // 13: pb.vars.Goods } var file_common_common_proto_depIdxs = []int32{ - 0, // 0: pb.common.UserIntegralChanged.user:type_name -> pb.common.PbUser - 0, // 1: pb.common.UserCoinChangedMsg.user:type_name -> pb.common.PbUser - 0, // 2: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser - 0, // 3: pb.common.GiftPackMsg.user:type_name -> pb.common.PbUser - 0, // 4: pb.common.UserQueryMsg.user:type_name -> pb.common.PbUser - 15, // 5: pb.common.UserQueryMsg.rank:type_name -> pb.common.UserQueryMsg.RankItem - 0, // 6: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser - 0, // 7: pb.common.GiftMsg.user:type_name -> pb.common.PbUser - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 0, // 0: pb.common.UserCoinChangedMsg.user:type_name -> pb.common.PbUser + 12, // 1: pb.common.UserCoinChangedMsg.reason:type_name -> pb.vars.UserCoinChangedReason + 12, // 2: pb.common.ChangeUserCoinReq.reason:type_name -> pb.vars.UserCoinChangedReason + 0, // 3: pb.common.CheckInMsg.user:type_name -> pb.common.PbUser + 0, // 4: pb.common.GiftPackMsg.user:type_name -> pb.common.PbUser + 0, // 5: pb.common.UserBuyGoodsMsg.user:type_name -> pb.common.PbUser + 13, // 6: pb.common.UserBuyGoodsMsg.goods:type_name -> pb.vars.Goods + 0, // 7: pb.common.DanmakuMsg.user:type_name -> pb.common.PbUser + 0, // 8: pb.common.GiftMsg.user:type_name -> pb.common.PbUser + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_common_common_proto_init() } @@ -1363,7 +1082,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserIntegralChanged); i { + switch v := v.(*UserCoinChangedMsg); i { case 0: return &v.state case 1: @@ -1375,7 +1094,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeUserIntegralReq); i { + switch v := v.(*ChangeUserCoinReq); i { case 0: return &v.state case 1: @@ -1387,7 +1106,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeUserIntegralResp); i { + switch v := v.(*ChangeUserCoinResp); i { case 0: return &v.state case 1: @@ -1399,7 +1118,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserCoinChangedMsg); i { + switch v := v.(*CheckInMsg); i { case 0: return &v.state case 1: @@ -1411,7 +1130,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeUserCoinReq); i { + switch v := v.(*GiftPackMsg); i { case 0: return &v.state case 1: @@ -1423,7 +1142,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeUserCoinResp); i { + switch v := v.(*UserBuyGoodsMsg); i { case 0: return &v.state case 1: @@ -1435,7 +1154,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckInMsg); i { + switch v := v.(*TitleItem); i { case 0: return &v.state case 1: @@ -1447,30 +1166,6 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GiftPackMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_common_proto_msgTypes[11].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[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DanmakuMsg); i { case 0: return &v.state @@ -1482,7 +1177,7 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_common_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GiftMsg); i { case 0: return &v.state @@ -1494,30 +1189,6 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[14].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[15].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{ @@ -1525,7 +1196,7 @@ func file_common_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_common_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/common/common.proto b/game/pb/common/common.proto index 3651d4e..1a7220f 100644 --- a/game/pb/common/common.proto +++ b/game/pb/common/common.proto @@ -4,13 +4,13 @@ package pb.common; option go_package = "dcg/game/pb/common;pbCommon"; +import "vars/vars.proto"; + // PbUser 用户 message PbUser { - int64 uId = 1; // 用户id - string uname = 2; // 用户名 + int64 userId = 1; // 用户id + string username = 2; // 用户名 string avatar = 3; // 头像 - int32 nobilityLevel = 4; // 贵族等级 - int64 integral = 5; // 用户当前积分 } // GameStatusReq 游戏状态控制 game.status @@ -26,63 +26,42 @@ message GameStatusResp { int64 timestamp = 3; // 时间戳 } -///////////////// 用户积分 - -// UserIntegralChanged 用户积分变更 push -> user.integral.change -message UserIntegralChanged { - pb.common.PbUser user = 1; - int64 change = 2; // 变更量 - int64 integral = 3; // 现有量 -} - -// ChangeUserIntegral 更新用户积分 request -> user.integral.change -message ChangeUserIntegralReq { - int64 userId = 1; // 用户ID - int64 change = 2; // 更新积分量,负数为消耗,正数为增加 -} - -// ChangeUserIntegralResp 用户积分更新返回 -message ChangeUserIntegralResp { - int32 code = 1; // code, 200表示成功,其余根据对照表 - string msg = 2; // 消息 - - int64 userId = 3; // 用户ID - int64 change = 4; // 本次更新积分量 - int64 integral = 5; // 当前剩余积分 -} - -//////////////////// 用户金币 +//////////////////// 用户弹币 -// UserIntegralChanged 用户金币变更通知 push -> user.coin.change +// UserCoinChangedMsg 用户弹币变更通知 push -> user.coin.change message UserCoinChangedMsg { - pb.common.PbUser user = 1; - int64 change = 2; // 变更量 - int64 current = 3; // 现有量 + PbUser user = 1; + pb.vars.UserCoinChangedReason reason = 2; // 变动原因 + + int64 change = 10; // 变动量 + int64 current = 11; // 当前量 } -// ChangeUserIntegral 更新用户金币 request -> user.coin.change +// ChangeUserCoinReq 更新用户弹币 request -> user.coin.change message ChangeUserCoinReq { int64 userId = 1; // 用户ID int64 change = 2; // 更新量,负数为消耗,正数为增加 + pb.vars.UserCoinChangedReason reason = 3; // 变更原因 } -// ChangeUserIntegralResp 用户金币更新返回 +// ChangeUserCoinResp 用户金币更新返回 response -> user.coin.change message ChangeUserCoinResp { int32 code = 1; // code, 200表示成功,其余根据对照表 string msg = 2; // 消息 int64 userId = 3; // 用户ID int64 change = 4; // 变更量 - int64 current = 5; // 现有量 } // CheckInMsg 每日打卡 push -> user.checkIn message CheckInMsg { int32 code = 1; // code, 200表示成功,其余根据对照表 string msg = 2; // 消息 [打卡成功,快乐玩耍吧! | 今天已打过卡了!] - pb.common.PbUser user = 3; // 最新积分放置在user中 - int64 integralChange = 4; // 积分变动 - bool isCritical = 5; // 是否欧皇附体 + pb.common.PbUser user = 3; + + int64 coinChange = 4; // 弹币变动 + int64 currentCoin = 5; // 当前金币 + bool isCritical = 10; // 是否欧皇附体 } // GiftPackMsg 领取礼包消息 push -> user.giftPack 命令(新手礼包|福利|低保|其它礼包) @@ -91,20 +70,29 @@ message GiftPackMsg { string msg = 2; // 领取消息: [成功无msg | 已经领过礼包了xxx ] pb.common.PbUser user = 3; - int64 integralChange = 4; // 积分变动 + int64 coin = 4; // 领取到的金币数 +} + +// UserBuyGoodsMsg 用户兑换商品消息 push -> user.buy +message UserBuyGoodsMsg { + // 500: 兑换精英单位时发生错误,请联系UP主。 + // 200: OK + int32 code = 1; + + pb.common.PbUser user = 3; + pb.vars.Goods goods = 4; // 商品类型 + int64 goodsId = 5; // 商品ID + int32 count = 6; // 数量 -1表示无限数量 + int64 cost = 7; // 花费 0表示无花费 + int32 duration = 8; // 持续时长(单位:小时) -1表示无限制 } -// QueryIntegralMsg 用户查询信息通知 push -> user.query -message UserQueryMsg { - // 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列表,具体称号配置 给接口取 +// TitleItem 称号 +message TitleItem { + int64 id = 1; // ID + string name = 2; // 称号名 + int32 sort = 3; // 排序号 + int32 remain = 4; // 剩余时长(单位:小时) } // DanmakuMsg 普通弹幕消息 push -> live.danmaku @@ -123,13 +111,13 @@ message GiftMsg{ bool isPaid = 6; // 是否收费礼物 } -// 奖池变动消息 push -> game.rewardPool -message RewardPoolMsg { - int64 welfarePool = 1; // 福利池,与战局无关 - int64 battleId = 2; // 战局ID - int64 initReward = 3; // 初始奖池 - int64 giftReward = 4; // 礼物奖池 - int64 battleReward = 5; // 战斗奖池 - int64 otherReward = 6; // 其它奖池 - int64 allRewards = 10; // 所有奖池 -} \ No newline at end of file +//// 奖池变动消息 push -> game.rewardPool +//message RewardPoolMsg { +// int64 welfarePool = 1; // 福利池,与战局无关 +// int64 battleId = 2; // 战局ID +// int64 initReward = 3; // 初始奖池 +// int64 giftReward = 4; // 礼物奖池 +// int64 battleReward = 5; // 战斗奖池 +// int64 otherReward = 6; // 其它奖池 +// int64 allRewards = 10; // 所有奖池 +//} \ No newline at end of file diff --git a/game/pb/common/genCSharp.bat b/game/pb/common/genCSharp.bat deleted file mode 100644 index 61ff858..0000000 --- a/game/pb/common/genCSharp.bat +++ /dev/null @@ -1 +0,0 @@ -protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto \ No newline at end of file diff --git a/game/pb/game/zhg/Command.cs b/game/pb/game/zhg/Command.cs index 3e40f7d..ad201ad 100644 --- a/game/pb/game/zhg/Command.cs +++ b/game/pb/game/zhg/Command.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: command.proto +// source: game/zhg/command.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Game.Zhg { - /// Holder for reflection information generated from command.proto + /// Holder for reflection information generated from game/zhg/command.proto public static partial class CommandReflection { #region Descriptor - /// File descriptor for command.proto + /// File descriptor for game/zhg/command.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,28 +24,50 @@ namespace Pb.Game.Zhg { static CommandReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cg1jb21tYW5kLnByb3RvEgtwYi5nYW1lLnpoZxoTY29tbW9uL2NvbW1vbi5w", - "cm90byIrCghKb2luR2FtZRIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBi", - "VXNlciI7CgpDcmVhdGVVbml0Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24u", - "UGJVc2VyEgwKBHVuaXQYAiABKAkiNQoETW92ZRIfCgR1c2VyGAEgASgLMhEu", - "cGIuY29tbW9uLlBiVXNlchIMCgRsaW5lGAIgASgJIisKCE91dGJyZWFrEh8K", - "BHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyImoKEE91dGJyZWFrSW50", - "ZWdyYWwSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISEAoIdW5p", - "dFR5cGUYAiABKAkSDQoFY291bnQYAyABKAUSFAoMY29zdEludGVncmFsGAQg", - "ASgDIiYKA1dhaRIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlciI9", - "CgxCdWlsZGluZ01vZGUSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVz", - "ZXISDAoEbW9kZRgCIAEoCUIgWh5kY2cvZ2FtZS9wYi9nYW1lL3poZztwYkdh", - "bWVaaGdiBnByb3RvMw==")); + "ChZnYW1lL3poZy9jb21tYW5kLnByb3RvEgtwYi5nYW1lLnpoZxoTY29tbW9u", + "L2NvbW1vbi5wcm90byKqAQoISm9pbkdhbWUSHwoEdXNlchgBIAEoCzIRLnBi", + "LmNvbW1vbi5QYlVzZXISFQoNbm9iaWxpdHlMZXZlbBgCIAEoBRIMCgRjb2lu", + "GAMgASgDEioKDGN1cnJlbnRUaXRsZRgKIAEoCzIULnBiLmNvbW1vbi5UaXRs", + "ZUl0ZW0SLAoMY3VycmVudEVsaXRlGAsgASgLMhYucGIuZ2FtZS56aGcuRWxp", + "dGVJdGVtIjsKCkNyZWF0ZVVuaXQSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1v", + "bi5QYlVzZXISDAoEdW5pdBgCIAEoCSI1CgRNb3ZlEh8KBHVzZXIYASABKAsy", + "ES5wYi5jb21tb24uUGJVc2VyEgwKBGxpbmUYAiABKAkiKwoIT3V0YnJlYWsS", + "HwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXIiXgoMT3V0YnJlYWtG", + "b29kEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEhAKCHVuaXRU", + "eXBlGAIgASgJEg0KBWNvdW50GAMgASgFEgwKBGNvc3QYBCABKAMiJgoDV2Fp", + "Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyIj0KDEJ1aWxkaW5n", + "TW9kZRIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlchIMCgRtb2Rl", + "GAIgASgJIk0KC0NoYW5nZUVsaXRlEgwKBGNvZGUYASABKAUSHwoEdXNlchgC", + "IAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISDwoHZWxpdGVJZBgDIAEoAyJbCgtD", + "aGFuZ2VUaXRsZRIMCgRjb2RlGAEgASgFEh8KBHVzZXIYAiABKAsyES5wYi5j", + "b21tb24uUGJVc2VyEg8KB3RpdGxlSWQYAyABKAMSDAoEbmFtZRgEIAEoCSI7", + "Cg1CdXlCYXR0bGVGb29kEg4KBnVzZXJJZBgBIAEoAxIMCgRjb3N0GAIgASgD", + "EgwKBGZvb2QYAyABKAMiNQoJRWxpdGVJdGVtEgoKAmlkGAEgASgDEgwKBHNv", + "cnQYAiABKAUSDgoGcmVtYWluGAMgASgFItICCgxVc2VyUXVlcnlNc2cSHwoE", + "dXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISMAoEcmFuaxgCIAMoCzIi", + "LnBiLmdhbWUuemhnLlVzZXJRdWVyeU1zZy5SYW5rSXRlbRIMCgRjb2luGAMg", + "ASgDEiQKBnRpdGxlcxgKIAMoCzIULnBiLmNvbW1vbi5UaXRsZUl0ZW0SJgoG", + "ZWxpdGVzGAsgAygLMhYucGIuZ2FtZS56aGcuRWxpdGVJdGVtEioKDGN1cnJl", + "bnRUaXRsZRgMIAEoCzIULnBiLmNvbW1vbi5UaXRsZUl0ZW0SLAoMY3VycmVu", + "dEVsaXRlGA0gASgLMhYucGIuZ2FtZS56aGcuRWxpdGVJdGVtGjkKCFJhbmtJ", + "dGVtEhAKCHJhbmtUeXBlGAEgASgFEg0KBXNjb3JlGAIgASgDEgwKBHJhbmsY", + "AyABKAVCIFoeZGNnL2dhbWUvcGIvZ2FtZS96aGc7cGJHYW1lWmhnYgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Pb.Common.CommonReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.JoinGame), global::Pb.Game.Zhg.JoinGame.Parser, new[]{ "User" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.JoinGame), global::Pb.Game.Zhg.JoinGame.Parser, new[]{ "User", "NobilityLevel", "Coin", "CurrentTitle", "CurrentElite" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.CreateUnit), global::Pb.Game.Zhg.CreateUnit.Parser, new[]{ "User", "Unit" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.Move), global::Pb.Game.Zhg.Move.Parser, new[]{ "User", "Line" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.Outbreak), global::Pb.Game.Zhg.Outbreak.Parser, new[]{ "User" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.OutbreakIntegral), global::Pb.Game.Zhg.OutbreakIntegral.Parser, new[]{ "User", "UnitType", "Count", "CostIntegral" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.OutbreakFood), global::Pb.Game.Zhg.OutbreakFood.Parser, new[]{ "User", "UnitType", "Count", "Cost" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.Wai), global::Pb.Game.Zhg.Wai.Parser, new[]{ "User" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.BuildingMode), global::Pb.Game.Zhg.BuildingMode.Parser, new[]{ "User", "Mode" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.BuildingMode), global::Pb.Game.Zhg.BuildingMode.Parser, new[]{ "User", "Mode" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.ChangeElite), global::Pb.Game.Zhg.ChangeElite.Parser, new[]{ "Code", "User", "EliteId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.ChangeTitle), global::Pb.Game.Zhg.ChangeTitle.Parser, new[]{ "Code", "User", "TitleId", "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.BuyBattleFood), global::Pb.Game.Zhg.BuyBattleFood.Parser, new[]{ "UserId", "Cost", "Food" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.EliteItem), global::Pb.Game.Zhg.EliteItem.Parser, new[]{ "Id", "Sort", "Remain" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.UserQueryMsg), global::Pb.Game.Zhg.UserQueryMsg.Parser, new[]{ "User", "Rank", "Coin", "Titles", "Elites", "CurrentTitle", "CurrentElite" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.UserQueryMsg.Types.RankItem), global::Pb.Game.Zhg.UserQueryMsg.Types.RankItem.Parser, new[]{ "RankType", "Score", "Rank" }, null, null, null, null)}) })); } #endregion @@ -90,6 +112,10 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public JoinGame(JoinGame other) : this() { user_ = other.user_ != null ? other.user_.Clone() : null; + nobilityLevel_ = other.nobilityLevel_; + coin_ = other.coin_; + currentTitle_ = other.currentTitle_ != null ? other.currentTitle_.Clone() : null; + currentElite_ = other.currentElite_ != null ? other.currentElite_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -111,6 +137,66 @@ namespace Pb.Game.Zhg { } } + /// Field number for the "nobilityLevel" field. + public const int NobilityLevelFieldNumber = 2; + private int nobilityLevel_; + /// + /// 贵族等级 3舰长 0总督? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NobilityLevel { + get { return nobilityLevel_; } + set { + nobilityLevel_ = value; + } + } + + /// Field number for the "coin" field. + public const int CoinFieldNumber = 3; + private long coin_; + /// + /// 金币数量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Coin { + get { return coin_; } + set { + coin_ = value; + } + } + + /// Field number for the "currentTitle" field. + public const int CurrentTitleFieldNumber = 10; + private global::Pb.Common.TitleItem currentTitle_; + /// + /// 当前佩戴的称号 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.TitleItem CurrentTitle { + get { return currentTitle_; } + set { + currentTitle_ = value; + } + } + + /// Field number for the "currentElite" field. + public const int CurrentEliteFieldNumber = 11; + private global::Pb.Game.Zhg.EliteItem currentElite_; + /// + /// 当前装备的精英单位 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Game.Zhg.EliteItem CurrentElite { + get { return currentElite_; } + set { + currentElite_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -127,6 +213,10 @@ namespace Pb.Game.Zhg { return true; } if (!object.Equals(User, other.User)) return false; + if (NobilityLevel != other.NobilityLevel) return false; + if (Coin != other.Coin) return false; + if (!object.Equals(CurrentTitle, other.CurrentTitle)) return false; + if (!object.Equals(CurrentElite, other.CurrentElite)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -135,6 +225,10 @@ namespace Pb.Game.Zhg { public override int GetHashCode() { int hash = 1; if (user_ != null) hash ^= User.GetHashCode(); + if (NobilityLevel != 0) hash ^= NobilityLevel.GetHashCode(); + if (Coin != 0L) hash ^= Coin.GetHashCode(); + if (currentTitle_ != null) hash ^= CurrentTitle.GetHashCode(); + if (currentElite_ != null) hash ^= CurrentElite.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -157,6 +251,22 @@ namespace Pb.Game.Zhg { output.WriteRawTag(10); output.WriteMessage(User); } + if (NobilityLevel != 0) { + output.WriteRawTag(16); + output.WriteInt32(NobilityLevel); + } + if (Coin != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Coin); + } + if (currentTitle_ != null) { + output.WriteRawTag(82); + output.WriteMessage(CurrentTitle); + } + if (currentElite_ != null) { + output.WriteRawTag(90); + output.WriteMessage(CurrentElite); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -171,6 +281,22 @@ namespace Pb.Game.Zhg { output.WriteRawTag(10); output.WriteMessage(User); } + if (NobilityLevel != 0) { + output.WriteRawTag(16); + output.WriteInt32(NobilityLevel); + } + if (Coin != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Coin); + } + if (currentTitle_ != null) { + output.WriteRawTag(82); + output.WriteMessage(CurrentTitle); + } + if (currentElite_ != null) { + output.WriteRawTag(90); + output.WriteMessage(CurrentElite); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -184,6 +310,18 @@ namespace Pb.Game.Zhg { if (user_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); } + if (NobilityLevel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NobilityLevel); + } + if (Coin != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Coin); + } + if (currentTitle_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CurrentTitle); + } + if (currentElite_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CurrentElite); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -202,6 +340,24 @@ namespace Pb.Game.Zhg { } User.MergeFrom(other.User); } + if (other.NobilityLevel != 0) { + NobilityLevel = other.NobilityLevel; + } + if (other.Coin != 0L) { + Coin = other.Coin; + } + if (other.currentTitle_ != null) { + if (currentTitle_ == null) { + CurrentTitle = new global::Pb.Common.TitleItem(); + } + CurrentTitle.MergeFrom(other.CurrentTitle); + } + if (other.currentElite_ != null) { + if (currentElite_ == null) { + CurrentElite = new global::Pb.Game.Zhg.EliteItem(); + } + CurrentElite.MergeFrom(other.CurrentElite); + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -224,6 +380,28 @@ namespace Pb.Game.Zhg { input.ReadMessage(User); break; } + case 16: { + NobilityLevel = input.ReadInt32(); + break; + } + case 24: { + Coin = input.ReadInt64(); + break; + } + case 82: { + if (currentTitle_ == null) { + CurrentTitle = new global::Pb.Common.TitleItem(); + } + input.ReadMessage(CurrentTitle); + break; + } + case 90: { + if (currentElite_ == null) { + CurrentElite = new global::Pb.Game.Zhg.EliteItem(); + } + input.ReadMessage(CurrentElite); + break; + } } } #endif @@ -246,6 +424,28 @@ namespace Pb.Game.Zhg { input.ReadMessage(User); break; } + case 16: { + NobilityLevel = input.ReadInt32(); + break; + } + case 24: { + Coin = input.ReadInt64(); + break; + } + case 82: { + if (currentTitle_ == null) { + CurrentTitle = new global::Pb.Common.TitleItem(); + } + input.ReadMessage(CurrentTitle); + break; + } + case 90: { + if (currentElite_ == null) { + CurrentElite = new global::Pb.Game.Zhg.EliteItem(); + } + input.ReadMessage(CurrentElite); + break; + } } } } @@ -254,7 +454,7 @@ namespace Pb.Game.Zhg { } /// - /// 生产单位 push -> game.createUnit + /// 切换生产单位种类 push -> game.createUnit /// public sealed partial class CreateUnit : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -495,7 +695,7 @@ namespace Pb.Game.Zhg { } /// - /// 修改出兵位置 push -> game.move + /// 修改出兵路线 push -> game.move /// public sealed partial class Move : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -736,7 +936,7 @@ namespace Pb.Game.Zhg { } /// - /// 暴兵 push -> game.outbreak + /// 普通暴兵 push -> game.outbreak /// public sealed partial class Outbreak : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -937,18 +1137,18 @@ namespace Pb.Game.Zhg { } /// - /// 暴兵(积分) push -> game.outbreak.integral + /// 暴兵(粮草) push -> game.outbreak.food /// - public sealed partial class OutbreakIntegral : pb::IMessage + public sealed partial class OutbreakFood : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OutbreakIntegral()); + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OutbreakFood()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -964,7 +1164,7 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public OutbreakIntegral() { + public OutbreakFood() { OnConstruction(); } @@ -972,18 +1172,18 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public OutbreakIntegral(OutbreakIntegral other) : this() { + public OutbreakFood(OutbreakFood other) : this() { user_ = other.user_ != null ? other.user_.Clone() : null; unitType_ = other.unitType_; count_ = other.count_; - costIntegral_ = other.costIntegral_; + cost_ = other.cost_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public OutbreakIntegral Clone() { - return new OutbreakIntegral(this); + public OutbreakFood Clone() { + return new OutbreakFood(this); } /// Field number for the "user" field. @@ -1028,30 +1228,30 @@ namespace Pb.Game.Zhg { } } - /// Field number for the "costIntegral" field. - public const int CostIntegralFieldNumber = 4; - private long costIntegral_; + /// Field number for the "cost" field. + public const int CostFieldNumber = 4; + private long cost_; /// - /// 消耗积分 + /// 消耗 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long CostIntegral { - get { return costIntegral_; } + public long Cost { + get { return cost_; } set { - costIntegral_ = value; + cost_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as OutbreakIntegral); + return Equals(other as OutbreakFood); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(OutbreakIntegral other) { + public bool Equals(OutbreakFood other) { if (ReferenceEquals(other, null)) { return false; } @@ -1061,7 +1261,7 @@ namespace Pb.Game.Zhg { if (!object.Equals(User, other.User)) return false; if (UnitType != other.UnitType) return false; if (Count != other.Count) return false; - if (CostIntegral != other.CostIntegral) return false; + if (Cost != other.Cost) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1072,7 +1272,7 @@ namespace Pb.Game.Zhg { if (user_ != null) hash ^= User.GetHashCode(); if (UnitType.Length != 0) hash ^= UnitType.GetHashCode(); if (Count != 0) hash ^= Count.GetHashCode(); - if (CostIntegral != 0L) hash ^= CostIntegral.GetHashCode(); + if (Cost != 0L) hash ^= Cost.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1103,9 +1303,9 @@ namespace Pb.Game.Zhg { output.WriteRawTag(24); output.WriteInt32(Count); } - if (CostIntegral != 0L) { + if (Cost != 0L) { output.WriteRawTag(32); - output.WriteInt64(CostIntegral); + output.WriteInt64(Cost); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1129,9 +1329,9 @@ namespace Pb.Game.Zhg { output.WriteRawTag(24); output.WriteInt32(Count); } - if (CostIntegral != 0L) { + if (Cost != 0L) { output.WriteRawTag(32); - output.WriteInt64(CostIntegral); + output.WriteInt64(Cost); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -1152,8 +1352,8 @@ namespace Pb.Game.Zhg { if (Count != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Count); } - if (CostIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(CostIntegral); + if (Cost != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Cost); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1163,7 +1363,7 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(OutbreakIntegral other) { + public void MergeFrom(OutbreakFood other) { if (other == null) { return; } @@ -1179,8 +1379,8 @@ namespace Pb.Game.Zhg { if (other.Count != 0) { Count = other.Count; } - if (other.CostIntegral != 0L) { - CostIntegral = other.CostIntegral; + if (other.Cost != 0L) { + Cost = other.Cost; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1213,7 +1413,7 @@ namespace Pb.Game.Zhg { break; } case 32: { - CostIntegral = input.ReadInt64(); + Cost = input.ReadInt64(); break; } } @@ -1247,7 +1447,7 @@ namespace Pb.Game.Zhg { break; } case 32: { - CostIntegral = input.ReadInt64(); + Cost = input.ReadInt64(); break; } } @@ -1696,6 +1896,1864 @@ namespace Pb.Game.Zhg { } + /// + /// 切换精英单位 push -> game.change.elite + /// + public sealed partial class ChangeElite : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeElite()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhg.CommandReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeElite() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeElite(ChangeElite other) : this() { + code_ = other.code_; + user_ = other.user_ != null ? other.user_.Clone() : null; + eliteId_ = other.eliteId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeElite Clone() { + return new ChangeElite(this); + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private int code_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 2; + private global::Pb.Common.PbUser user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.PbUser User { + get { return user_; } + set { + user_ = value; + } + } + + /// Field number for the "eliteId" field. + public const int EliteIdFieldNumber = 3; + private long eliteId_; + /// + /// ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EliteId { + get { return eliteId_; } + set { + eliteId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeElite); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeElite other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Code != other.Code) return false; + if (!object.Equals(User, other.User)) return false; + if (EliteId != other.EliteId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Code != 0) hash ^= Code.GetHashCode(); + if (user_ != null) hash ^= User.GetHashCode(); + if (EliteId != 0L) hash ^= EliteId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } + if (user_ != null) { + output.WriteRawTag(18); + output.WriteMessage(User); + } + if (EliteId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(EliteId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } + if (user_ != null) { + output.WriteRawTag(18); + output.WriteMessage(User); + } + if (EliteId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(EliteId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); + } + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + if (EliteId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EliteId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeElite other) { + if (other == null) { + return; + } + if (other.Code != 0) { + Code = other.Code; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.EliteId != 0L) { + EliteId = other.EliteId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Code = input.ReadInt32(); + break; + } + case 18: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 24: { + EliteId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Code = input.ReadInt32(); + break; + } + case 18: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 24: { + EliteId = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// 切换称号 push -> game.change.title + /// + public sealed partial class ChangeTitle : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeTitle()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhg.CommandReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeTitle() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeTitle(ChangeTitle other) : this() { + code_ = other.code_; + user_ = other.user_ != null ? other.user_.Clone() : null; + titleId_ = other.titleId_; + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeTitle Clone() { + return new ChangeTitle(this); + } + + /// Field number for the "code" field. + public const int CodeFieldNumber = 1; + private int code_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Code { + get { return code_; } + set { + code_ = value; + } + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 2; + private global::Pb.Common.PbUser user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.PbUser User { + get { return user_; } + set { + user_ = value; + } + } + + /// Field number for the "titleId" field. + public const int TitleIdFieldNumber = 3; + private long titleId_; + /// + /// ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TitleId { + get { return titleId_; } + set { + titleId_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 4; + private string name_ = ""; + /// + /// 名称 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeTitle); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeTitle other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Code != other.Code) return false; + if (!object.Equals(User, other.User)) return false; + if (TitleId != other.TitleId) return false; + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Code != 0) hash ^= Code.GetHashCode(); + if (user_ != null) hash ^= User.GetHashCode(); + if (TitleId != 0L) hash ^= TitleId.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } + if (user_ != null) { + output.WriteRawTag(18); + output.WriteMessage(User); + } + if (TitleId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(TitleId); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Code != 0) { + output.WriteRawTag(8); + output.WriteInt32(Code); + } + if (user_ != null) { + output.WriteRawTag(18); + output.WriteMessage(User); + } + if (TitleId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(TitleId); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Code != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Code); + } + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + if (TitleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TitleId); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeTitle other) { + if (other == null) { + return; + } + if (other.Code != 0) { + Code = other.Code; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.TitleId != 0L) { + TitleId = other.TitleId; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Code = input.ReadInt32(); + break; + } + case 18: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 24: { + TitleId = input.ReadInt64(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Code = input.ReadInt32(); + break; + } + case 18: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 24: { + TitleId = input.ReadInt64(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// BuyBattleFood 购买粮草 push -> game.buy.food + /// + public sealed partial class BuyBattleFood : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BuyBattleFood()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhg.CommandReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BuyBattleFood() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BuyBattleFood(BuyBattleFood other) : this() { + userId_ = other.userId_; + cost_ = other.cost_; + food_ = other.food_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BuyBattleFood Clone() { + return new BuyBattleFood(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private long userId_; + /// + /// 用户ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "cost" field. + public const int CostFieldNumber = 2; + private long cost_; + /// + /// 花费 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Cost { + get { return cost_; } + set { + cost_ = value; + } + } + + /// Field number for the "food" field. + public const int FoodFieldNumber = 3; + private long food_; + /// + /// 购买到的粮草量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Food { + get { return food_; } + set { + food_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BuyBattleFood); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BuyBattleFood other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (Cost != other.Cost) return false; + if (Food != other.Food) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0L) hash ^= UserId.GetHashCode(); + if (Cost != 0L) hash ^= Cost.GetHashCode(); + if (Food != 0L) hash ^= Food.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (Cost != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Cost); + } + if (Food != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Food); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(UserId); + } + if (Cost != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Cost); + } + if (Food != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Food); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(UserId); + } + if (Cost != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Cost); + } + if (Food != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Food); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BuyBattleFood other) { + if (other == null) { + return; + } + if (other.UserId != 0L) { + UserId = other.UserId; + } + if (other.Cost != 0L) { + Cost = other.Cost; + } + if (other.Food != 0L) { + Food = other.Food; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 16: { + Cost = input.ReadInt64(); + break; + } + case 24: { + Food = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt64(); + break; + } + case 16: { + Cost = input.ReadInt64(); + break; + } + case 24: { + Food = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// 精英单位 zw1 2 + /// + public sealed partial class EliteItem : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EliteItem()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhg.CommandReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EliteItem() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EliteItem(EliteItem other) : this() { + id_ = other.id_; + sort_ = other.sort_; + remain_ = other.remain_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EliteItem Clone() { + return new EliteItem(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private long id_; + /// + /// ID 1000(普通x) 1001(弓骑兵) 1002(牧师) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "sort" field. + public const int SortFieldNumber = 2; + private int sort_; + /// + /// 排序号 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Sort { + get { return sort_; } + set { + sort_ = value; + } + } + + /// Field number for the "remain" field. + public const int RemainFieldNumber = 3; + private int remain_; + /// + /// 剩余时长(单位:天)-1无限制 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Remain { + get { return remain_; } + set { + remain_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EliteItem); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EliteItem other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Sort != other.Sort) return false; + if (Remain != other.Remain) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0L) hash ^= Id.GetHashCode(); + if (Sort != 0) hash ^= Sort.GetHashCode(); + if (Remain != 0) hash ^= Remain.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (Sort != 0) { + output.WriteRawTag(16); + output.WriteInt32(Sort); + } + if (Remain != 0) { + output.WriteRawTag(24); + output.WriteInt32(Remain); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (Sort != 0) { + output.WriteRawTag(16); + output.WriteInt32(Sort); + } + if (Remain != 0) { + output.WriteRawTag(24); + output.WriteInt32(Remain); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); + } + if (Sort != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Sort); + } + if (Remain != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Remain); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EliteItem other) { + if (other == null) { + return; + } + if (other.Id != 0L) { + Id = other.Id; + } + if (other.Sort != 0) { + Sort = other.Sort; + } + if (other.Remain != 0) { + Remain = other.Remain; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 16: { + Sort = input.ReadInt32(); + break; + } + case 24: { + Remain = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 16: { + Sort = input.ReadInt32(); + break; + } + case 24: { + Remain = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// QueryIntegralMsg 用户查询信息通知 push -> user.query + /// + public sealed partial class UserQueryMsg : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserQueryMsg()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhg.CommandReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserQueryMsg() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserQueryMsg(UserQueryMsg other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + rank_ = other.rank_.Clone(); + coin_ = other.coin_; + titles_ = other.titles_.Clone(); + elites_ = other.elites_.Clone(); + currentTitle_ = other.currentTitle_ != null ? other.currentTitle_.Clone() : null; + currentElite_ = other.currentElite_ != null ? other.currentElite_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserQueryMsg Clone() { + return new UserQueryMsg(this); + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 1; + private global::Pb.Common.PbUser user_; + /// + /// 用户信息 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.PbUser User { + get { return user_; } + set { + user_ = value; + } + } + + /// Field number for the "rank" field. + public const int RankFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_rank_codec + = pb::FieldCodec.ForMessage(18, global::Pb.Game.Zhg.UserQueryMsg.Types.RankItem.Parser); + private readonly pbc::RepeatedField rank_ = new pbc::RepeatedField(); + /// + /// 排行数据(多个榜) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Rank { + get { return rank_; } + } + + /// Field number for the "coin" field. + public const int CoinFieldNumber = 3; + private long coin_; + /// + /// 弹币 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Coin { + get { return coin_; } + set { + coin_ = value; + } + } + + /// Field number for the "titles" field. + public const int TitlesFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_titles_codec + = pb::FieldCodec.ForMessage(82, global::Pb.Common.TitleItem.Parser); + private readonly pbc::RepeatedField titles_ = new pbc::RepeatedField(); + /// + /// 称号ID列表,具体称号配置 给接口取 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Titles { + get { return titles_; } + } + + /// Field number for the "elites" field. + public const int ElitesFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_elites_codec + = pb::FieldCodec.ForMessage(90, global::Pb.Game.Zhg.EliteItem.Parser); + private readonly pbc::RepeatedField elites_ = new pbc::RepeatedField(); + /// + /// 拥有的精英单位列表 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Elites { + get { return elites_; } + } + + /// Field number for the "currentTitle" field. + public const int CurrentTitleFieldNumber = 12; + private global::Pb.Common.TitleItem currentTitle_; + /// + /// 当前佩戴的称号 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.TitleItem CurrentTitle { + get { return currentTitle_; } + set { + currentTitle_ = value; + } + } + + /// Field number for the "currentElite" field. + public const int CurrentEliteFieldNumber = 13; + private global::Pb.Game.Zhg.EliteItem currentElite_; + /// + /// 当前使用的精英单位 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Game.Zhg.EliteItem CurrentElite { + get { return currentElite_; } + set { + currentElite_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserQueryMsg); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserQueryMsg other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if(!rank_.Equals(other.rank_)) return false; + if (Coin != other.Coin) return false; + if(!titles_.Equals(other.titles_)) return false; + if(!elites_.Equals(other.elites_)) return false; + if (!object.Equals(CurrentTitle, other.CurrentTitle)) return false; + if (!object.Equals(CurrentElite, other.CurrentElite)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (user_ != null) hash ^= User.GetHashCode(); + hash ^= rank_.GetHashCode(); + if (Coin != 0L) hash ^= Coin.GetHashCode(); + hash ^= titles_.GetHashCode(); + hash ^= elites_.GetHashCode(); + if (currentTitle_ != null) hash ^= CurrentTitle.GetHashCode(); + if (currentElite_ != null) hash ^= CurrentElite.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + rank_.WriteTo(output, _repeated_rank_codec); + if (Coin != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Coin); + } + titles_.WriteTo(output, _repeated_titles_codec); + elites_.WriteTo(output, _repeated_elites_codec); + if (currentTitle_ != null) { + output.WriteRawTag(98); + output.WriteMessage(CurrentTitle); + } + if (currentElite_ != null) { + output.WriteRawTag(106); + output.WriteMessage(CurrentElite); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + rank_.WriteTo(ref output, _repeated_rank_codec); + if (Coin != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Coin); + } + titles_.WriteTo(ref output, _repeated_titles_codec); + elites_.WriteTo(ref output, _repeated_elites_codec); + if (currentTitle_ != null) { + output.WriteRawTag(98); + output.WriteMessage(CurrentTitle); + } + if (currentElite_ != null) { + output.WriteRawTag(106); + output.WriteMessage(CurrentElite); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + size += rank_.CalculateSize(_repeated_rank_codec); + if (Coin != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Coin); + } + size += titles_.CalculateSize(_repeated_titles_codec); + size += elites_.CalculateSize(_repeated_elites_codec); + if (currentTitle_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CurrentTitle); + } + if (currentElite_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CurrentElite); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserQueryMsg other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + rank_.Add(other.rank_); + if (other.Coin != 0L) { + Coin = other.Coin; + } + titles_.Add(other.titles_); + elites_.Add(other.elites_); + if (other.currentTitle_ != null) { + if (currentTitle_ == null) { + CurrentTitle = new global::Pb.Common.TitleItem(); + } + CurrentTitle.MergeFrom(other.CurrentTitle); + } + if (other.currentElite_ != null) { + if (currentElite_ == null) { + CurrentElite = new global::Pb.Game.Zhg.EliteItem(); + } + CurrentElite.MergeFrom(other.CurrentElite); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 18: { + rank_.AddEntriesFrom(input, _repeated_rank_codec); + break; + } + case 24: { + Coin = input.ReadInt64(); + break; + } + case 82: { + titles_.AddEntriesFrom(input, _repeated_titles_codec); + break; + } + case 90: { + elites_.AddEntriesFrom(input, _repeated_elites_codec); + break; + } + case 98: { + if (currentTitle_ == null) { + CurrentTitle = new global::Pb.Common.TitleItem(); + } + input.ReadMessage(CurrentTitle); + break; + } + case 106: { + if (currentElite_ == null) { + CurrentElite = new global::Pb.Game.Zhg.EliteItem(); + } + input.ReadMessage(CurrentElite); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 18: { + rank_.AddEntriesFrom(ref input, _repeated_rank_codec); + break; + } + case 24: { + Coin = input.ReadInt64(); + break; + } + case 82: { + titles_.AddEntriesFrom(ref input, _repeated_titles_codec); + break; + } + case 90: { + elites_.AddEntriesFrom(ref input, _repeated_elites_codec); + break; + } + case 98: { + if (currentTitle_ == null) { + CurrentTitle = new global::Pb.Common.TitleItem(); + } + input.ReadMessage(CurrentTitle); + break; + } + case 106: { + if (currentElite_ == null) { + CurrentElite = new global::Pb.Game.Zhg.EliteItem(); + } + input.ReadMessage(CurrentElite); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the UserQueryMsg message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// RankItem 排行数据结构 + /// + public sealed partial class RankItem : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RankItem()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhg.UserQueryMsg.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RankItem() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RankItem(RankItem other) : this() { + rankType_ = other.rankType_; + score_ = other.score_; + rank_ = other.rank_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RankItem Clone() { + return new RankItem(this); + } + + /// Field number for the "rankType" field. + public const int RankTypeFieldNumber = 1; + private int rankType_; + /// + /// 排行榜类型 (与pbGameZhg.RankType一致) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RankType { + get { return rankType_; } + set { + rankType_ = value; + } + } + + /// Field number for the "score" field. + public const int ScoreFieldNumber = 2; + private long score_; + /// + /// 具体分数 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Score { + get { return score_; } + set { + score_ = value; + } + } + + /// Field number for the "rank" field. + public const int RankFieldNumber = 3; + private int rank_; + /// + /// 具体排名,不上榜为0 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Rank { + get { return rank_; } + set { + rank_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RankItem); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RankItem other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RankType != other.RankType) return false; + if (Score != other.Score) return false; + if (Rank != other.Rank) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RankType != 0) hash ^= RankType.GetHashCode(); + if (Score != 0L) hash ^= Score.GetHashCode(); + if (Rank != 0) hash ^= Rank.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RankType != 0) { + output.WriteRawTag(8); + output.WriteInt32(RankType); + } + if (Score != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Score); + } + if (Rank != 0) { + output.WriteRawTag(24); + output.WriteInt32(Rank); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RankType != 0) { + output.WriteRawTag(8); + output.WriteInt32(RankType); + } + if (Score != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Score); + } + if (Rank != 0) { + output.WriteRawTag(24); + output.WriteInt32(Rank); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RankType != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RankType); + } + if (Score != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Score); + } + if (Rank != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Rank); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RankItem other) { + if (other == null) { + return; + } + if (other.RankType != 0) { + RankType = other.RankType; + } + if (other.Score != 0L) { + Score = other.Score; + } + if (other.Rank != 0) { + Rank = other.Rank; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RankType = input.ReadInt32(); + break; + } + case 16: { + Score = input.ReadInt64(); + break; + } + case 24: { + Rank = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RankType = input.ReadInt32(); + break; + } + case 16: { + Score = input.ReadInt64(); + break; + } + case 24: { + Rank = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + #endregion } diff --git a/game/pb/game/zhg/Rank.cs b/game/pb/game/zhg/Rank.cs index 7d8de2b..0ca92bc 100644 --- a/game/pb/game/zhg/Rank.cs +++ b/game/pb/game/zhg/Rank.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: rank.proto +// source: game/zhg/rank.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Game.Zhg { - /// Holder for reflection information generated from rank.proto + /// Holder for reflection information generated from game/zhg/rank.proto public static partial class RankReflection { #region Descriptor - /// File descriptor for rank.proto + /// File descriptor for game/zhg/rank.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,25 +24,22 @@ namespace Pb.Game.Zhg { static RankReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CgpyYW5rLnByb3RvEgtwYi5nYW1lLnpoZyIoCgpSYW5rUHZwUmVxEgwKBHR5", - "cGUYASABKAUSDAoEdG9wThgCIAEoBSKMAQoLUmFua1B2cFJlc3ASDAoEdHlw", - "ZRgBIAEoBRIsCgVpdGVtcxgCIAMoCzIdLnBiLmdhbWUuemhnLlJhbmtQdnBS", - "ZXNwLkl0ZW0aQQoESXRlbRILCgN1aWQYASABKAMSDQoFdW5hbWUYAiABKAkS", - "DQoFc2NvcmUYAyABKAMSDgoGYXZhdGFyGAQgASgJIuIBChNSYW5rUnZwU3Vi", - "bWl0UmVzdWx0EjQKBWl0ZW1zGAEgAygLMiUucGIuZ2FtZS56aGcuUmFua1J2", - "cFN1Ym1pdFJlc3VsdC5JdGVtGkUKBlJld2FyZBILCgN1aWQYASABKAMSDQoF", - "dW5hbWUYAiABKAkSEAoIaW50ZWdyYWwYAyABKAMSDQoFdGl0bGUYBCABKAMa", - "TgoESXRlbRIMCgR0eXBlGAEgASgFEjgKB3Jld2FyZHMYAiADKAsyJy5wYi5n", - "YW1lLnpoZy5SYW5rUnZwU3VibWl0UmVzdWx0LlJld2FyZCrCAQoIUmFua1R5", - "cGUSCwoHVW5rbm93bhAAEgoKBkRhbWFnZRABEgwKCERlRGFtYWdlEAISCwoH", - "R2VuZXJhbBADEg0KCURlR2VuZXJhbBAEEgwKCEtpbGxVbml0EAUSDgoKRGVL", - "aWxsVW5pdBAGEg4KCktpbGxQbGF5ZXIQBxIQCgxEZUtpbGxQbGF5ZXIQCBIH", - "CgNXaW4QCRIICgRMb3N0EAoSDgoKRmlyc3RCbG9vZBALEhAKDERlRmlyc3RC", - "bG9vZBAMQiBaHmRjZy9nYW1lL3BiL2dhbWUvemhnO3BiR2FtZVpoZ2IGcHJv", - "dG8z")); + "ChNnYW1lL3poZy9yYW5rLnByb3RvEgtwYi5nYW1lLnpoZxoPdmFycy92YXJz", + "LnByb3RvIjsKClJhbmtQdnBSZXESHwoEdHlwZRgBIAEoDjIRLnBiLnZhcnMu", + "UmFua1R5cGUSDAoEdG9wThgCIAEoBSKfAQoLUmFua1B2cFJlc3ASHwoEdHlw", + "ZRgBIAEoDjIRLnBiLnZhcnMuUmFua1R5cGUSLAoFaXRlbXMYAiADKAsyHS5w", + "Yi5nYW1lLnpoZy5SYW5rUHZwUmVzcC5JdGVtGkEKBEl0ZW0SCwoDdWlkGAEg", + "ASgDEg0KBXVuYW1lGAIgASgJEg0KBXNjb3JlGAMgASgDEg4KBmF2YXRhchgE", + "IAEoCSL1AQoTUmFua1J2cFN1Ym1pdFJlc3VsdBI0CgVpdGVtcxgBIAMoCzIl", + "LnBiLmdhbWUuemhnLlJhbmtSdnBTdWJtaXRSZXN1bHQuSXRlbRpFCgZSZXdh", + "cmQSCwoDdWlkGAEgASgDEg0KBXVuYW1lGAIgASgJEhAKCGludGVncmFsGAMg", + "ASgDEg0KBXRpdGxlGAQgASgDGmEKBEl0ZW0SHwoEdHlwZRgBIAEoDjIRLnBi", + "LnZhcnMuUmFua1R5cGUSOAoHcmV3YXJkcxgCIAMoCzInLnBiLmdhbWUuemhn", + "LlJhbmtSdnBTdWJtaXRSZXN1bHQuUmV3YXJkQiBaHmRjZy9nYW1lL3BiL2dh", + "bWUvemhnO3BiR2FtZVpoZ2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Game.Zhg.RankType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::FileDescriptor[] { global::Pb.Vars.VarsReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpReq), global::Pb.Game.Zhg.RankPvpReq.Parser, new[]{ "Type", "TopN" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp), global::Pb.Game.Zhg.RankPvpResp.Parser, new[]{ "Type", "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankPvpResp.Types.Item), global::Pb.Game.Zhg.RankPvpResp.Types.Item.Parser, new[]{ "Uid", "Uname", "Score", "Avatar" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult), global::Pb.Game.Zhg.RankRvpSubmitResult.Parser, new[]{ "Items" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward), global::Pb.Game.Zhg.RankRvpSubmitResult.Types.Reward.Parser, new[]{ "Uid", "Uname", "Integral", "Title" }, null, null, null, null), @@ -52,61 +49,6 @@ namespace Pb.Game.Zhg { #endregion } - #region Enums - public enum RankType { - [pbr::OriginalName("Unknown")] Unknown = 0, - /// - /// 伤害榜 - /// - [pbr::OriginalName("Damage")] Damage = 1, - /// - /// 受伤榜 - /// - [pbr::OriginalName("DeDamage")] DeDamage = 2, - /// - /// 名将榜 - /// - [pbr::OriginalName("General")] General = 3, - /// - /// 落马榜 - /// - [pbr::OriginalName("DeGeneral")] DeGeneral = 4, - /// - /// 小兵击杀 - /// - [pbr::OriginalName("KillUnit")] KillUnit = 5, - /// - /// 小兵被杀 - /// - [pbr::OriginalName("DeKillUnit")] DeKillUnit = 6, - /// - /// 击杀玩家 - /// - [pbr::OriginalName("KillPlayer")] KillPlayer = 7, - /// - /// 被杀榜 - /// - [pbr::OriginalName("DeKillPlayer")] DeKillPlayer = 8, - /// - /// 获胜榜 - /// - [pbr::OriginalName("Win")] Win = 9, - /// - /// 战败榜 - /// - [pbr::OriginalName("Lost")] Lost = 10, - /// - /// 一血榜 - /// - [pbr::OriginalName("FirstBlood")] FirstBlood = 11, - /// - /// 被拿一血榜 - /// - [pbr::OriginalName("DeFirstBlood")] DeFirstBlood = 12, - } - - #endregion - #region Messages /// /// RankPvpReq 获取排行榜 request > rank.pvp @@ -158,13 +100,13 @@ namespace Pb.Game.Zhg { /// Field number for the "type" field. public const int TypeFieldNumber = 1; - private int type_; + private global::Pb.Vars.RankType type_ = global::Pb.Vars.RankType.Unknown; /// /// rank类型 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Type { + public global::Pb.Vars.RankType Type { get { return type_; } set { type_ = value; @@ -210,7 +152,7 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Type != 0) hash ^= Type.GetHashCode(); + if (Type != global::Pb.Vars.RankType.Unknown) hash ^= Type.GetHashCode(); if (TopN != 0) hash ^= TopN.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -230,9 +172,9 @@ namespace Pb.Game.Zhg { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Type != 0) { + if (Type != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteInt32(Type); + output.WriteEnum((int) Type); } if (TopN != 0) { output.WriteRawTag(16); @@ -248,9 +190,9 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Type != 0) { + if (Type != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteInt32(Type); + output.WriteEnum((int) Type); } if (TopN != 0) { output.WriteRawTag(16); @@ -266,8 +208,8 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Type != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + if (Type != global::Pb.Vars.RankType.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); } if (TopN != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(TopN); @@ -284,7 +226,7 @@ namespace Pb.Game.Zhg { if (other == null) { return; } - if (other.Type != 0) { + if (other.Type != global::Pb.Vars.RankType.Unknown) { Type = other.Type; } if (other.TopN != 0) { @@ -306,7 +248,7 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Type = input.ReadInt32(); + Type = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 16: { @@ -329,7 +271,7 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - Type = input.ReadInt32(); + Type = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 16: { @@ -393,13 +335,13 @@ namespace Pb.Game.Zhg { /// Field number for the "type" field. public const int TypeFieldNumber = 1; - private int type_; + private global::Pb.Vars.RankType type_ = global::Pb.Vars.RankType.Unknown; /// /// rank类型 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Type { + public global::Pb.Vars.RankType Type { get { return type_; } set { type_ = value; @@ -444,7 +386,7 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Type != 0) hash ^= Type.GetHashCode(); + if (Type != global::Pb.Vars.RankType.Unknown) hash ^= Type.GetHashCode(); hash ^= items_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -464,9 +406,9 @@ namespace Pb.Game.Zhg { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Type != 0) { + if (Type != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteInt32(Type); + output.WriteEnum((int) Type); } items_.WriteTo(output, _repeated_items_codec); if (_unknownFields != null) { @@ -479,9 +421,9 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Type != 0) { + if (Type != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteInt32(Type); + output.WriteEnum((int) Type); } items_.WriteTo(ref output, _repeated_items_codec); if (_unknownFields != null) { @@ -494,8 +436,8 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Type != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + if (Type != global::Pb.Vars.RankType.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); } size += items_.CalculateSize(_repeated_items_codec); if (_unknownFields != null) { @@ -510,7 +452,7 @@ namespace Pb.Game.Zhg { if (other == null) { return; } - if (other.Type != 0) { + if (other.Type != global::Pb.Vars.RankType.Unknown) { Type = other.Type; } items_.Add(other.items_); @@ -530,7 +472,7 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Type = input.ReadInt32(); + Type = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 18: { @@ -553,7 +495,7 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - Type = input.ReadInt32(); + Type = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 18: { @@ -1424,13 +1366,13 @@ namespace Pb.Game.Zhg { /// Field number for the "type" field. public const int TypeFieldNumber = 1; - private int type_; + private global::Pb.Vars.RankType type_ = global::Pb.Vars.RankType.Unknown; /// /// 榜单类型 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Type { + public global::Pb.Vars.RankType Type { get { return type_; } set { type_ = value; @@ -1475,7 +1417,7 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Type != 0) hash ^= Type.GetHashCode(); + if (Type != global::Pb.Vars.RankType.Unknown) hash ^= Type.GetHashCode(); hash ^= rewards_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -1495,9 +1437,9 @@ namespace Pb.Game.Zhg { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Type != 0) { + if (Type != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteInt32(Type); + output.WriteEnum((int) Type); } rewards_.WriteTo(output, _repeated_rewards_codec); if (_unknownFields != null) { @@ -1510,9 +1452,9 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Type != 0) { + if (Type != global::Pb.Vars.RankType.Unknown) { output.WriteRawTag(8); - output.WriteInt32(Type); + output.WriteEnum((int) Type); } rewards_.WriteTo(ref output, _repeated_rewards_codec); if (_unknownFields != null) { @@ -1525,8 +1467,8 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Type != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + if (Type != global::Pb.Vars.RankType.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); } size += rewards_.CalculateSize(_repeated_rewards_codec); if (_unknownFields != null) { @@ -1541,7 +1483,7 @@ namespace Pb.Game.Zhg { if (other == null) { return; } - if (other.Type != 0) { + if (other.Type != global::Pb.Vars.RankType.Unknown) { Type = other.Type; } rewards_.Add(other.rewards_); @@ -1561,7 +1503,7 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Type = input.ReadInt32(); + Type = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 18: { @@ -1584,7 +1526,7 @@ namespace Pb.Game.Zhg { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { - Type = input.ReadInt32(); + Type = (global::Pb.Vars.RankType) input.ReadEnum(); break; } case 18: { diff --git a/game/pb/game/zhg/Stat.cs b/game/pb/game/zhg/Stat.cs index 406f6ff..e112687 100644 --- a/game/pb/game/zhg/Stat.cs +++ b/game/pb/game/zhg/Stat.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: stat.proto +// source: game/zhg/stat.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Game.Zhg { - /// Holder for reflection information generated from stat.proto + /// Holder for reflection information generated from game/zhg/stat.proto public static partial class StatReflection { #region Descriptor - /// File descriptor for stat.proto + /// File descriptor for game/zhg/stat.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,31 +24,27 @@ namespace Pb.Game.Zhg { static StatReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CgpzdGF0LnByb3RvEgtwYi5nYW1lLnpoZyJACgtTdGF0UHZQS2lsbBILCgN1", - "aWQYASABKAMSEQoJdGFyZ2V0VWlkGAIgASgDEhEKCWlzR2VuZXJhbBgDIAEo", - "CCIuChFTdGF0UHZQRmlyc3RCbG9vZBILCgN1aWQYASABKAMSDAoEdHlwZRgC", - "IAEoBSKOAgoQU3RhdFB2UFJlcG9ydFJlcRIPCgd3aW5DYW1wGAEgASgFEjQK", - "CHdpbkl0ZW1zGAogAygLMiIucGIuZ2FtZS56aGcuU3RhdFB2UFJlcG9ydFJl", - "cS5JdGVtEjUKCWxvc3RJdGVtcxgLIAMoCzIiLnBiLmdhbWUuemhnLlN0YXRQ", - "dlBSZXBvcnRSZXEuSXRlbRp8CgRJdGVtEgsKA3VpZBgBIAEoAxINCgV1bmFt", - "ZRgCIAEoCRIQCghwb3NpdGlvbhgDIAEoBRIOCgZkYW1hZ2UYBCABKAMSEAoI", - "ZGVEYW1hZ2UYBSABKAMSEAoIa2lsbFVuaXQYBiABKAMSEgoKZGVLaWxsVW5p", - "dBgHIAEoAyLQAgoRU3RhdFB2UFJlcG9ydFJlc3ASNQoId2luSXRlbXMYASAD", - "KAsyIy5wYi5nYW1lLnpoZy5TdGF0UHZQUmVwb3J0UmVzcC5JdGVtEjYKCWxv", - "c3RJdGVtcxgCIAMoCzIjLnBiLmdhbWUuemhnLlN0YXRQdlBSZXBvcnRSZXNw", - "Lkl0ZW0aywEKBEl0ZW0SCwoDdWlkGAEgASgDEg0KBXVuYW1lGAIgASgJEhAK", - "CHBvc2l0aW9uGAMgASgFEhcKD3JldHVybnNJbnRlZ3JhbBgEIAEoAxIaChJy", - "ZXdhcmRQb29sSW50ZWdyYWwYBSABKAMSFwoPZ2VuZXJhbEludGVncmFsGAYg", - "ASgDEhgKEG5vYmlsaXR5SW50ZWdyYWwYByABKAMSFgoOYmF0dGxlSW50ZWdy", - "YWwYCCABKAMSFQoNdG90YWxJbnRlZ3JhbBgKIAEoA0IgWh5kY2cvZ2FtZS9w", - "Yi9nYW1lL3poZztwYkdhbWVaaGdiBnByb3RvMw==")); + "ChNnYW1lL3poZy9zdGF0LnByb3RvEgtwYi5nYW1lLnpoZyL2AgoQU3RhdFB2", + "UFJlcG9ydFJlcRIPCgd3aW5DYW1wGAEgASgFEhAKCGJhdHRsZUlkGAIgASgD", + "EjQKCHdpbkl0ZW1zGAogAygLMiIucGIuZ2FtZS56aGcuU3RhdFB2UFJlcG9y", + "dFJlcS5JdGVtEjUKCWxvc3RJdGVtcxgLIAMoCzIiLnBiLmdhbWUuemhnLlN0", + "YXRQdlBSZXBvcnRSZXEuSXRlbRrRAQoESXRlbRILCgN1aWQYASABKAMSDQoF", + "dW5hbWUYAiABKAkSDgoGZGFtYWdlGAMgASgDEhAKCGRlRGFtYWdlGAQgASgD", + "EhAKCGtpbGxVbml0GAUgASgDEhIKCmRlS2lsbFVuaXQYBiABKAMSEgoKZmly", + "c3RCbG9vZBgHIAEoCBIUCgxkZUZpcnN0Qmxvb2QYCCABKAgSEgoKa2lsbFBs", + "YXllchgJIAEoAxIUCgxkZUtpbGxQbGF5ZXIYCiABKAgSEQoJaXNHZW5lcmFs", + "GAsgASgIIuoBChFTdGF0UHZQUmVwb3J0UmVzcBIPCgd3aW5DYW1wGAEgASgF", + "EhAKCGJhdHRsZUlkGAIgASgDEjUKCHdpbkl0ZW1zGAogAygLMiMucGIuZ2Ft", + "ZS56aGcuU3RhdFB2UFJlcG9ydFJlc3AuSXRlbRI2Cglsb3N0SXRlbXMYCyAD", + "KAsyIy5wYi5nYW1lLnpoZy5TdGF0UHZQUmVwb3J0UmVzcC5JdGVtGkMKBEl0", + "ZW0SCwoDdWlkGAEgASgDEg0KBXVuYW1lGAIgASgJEhAKCHBvc2l0aW9uGAMg", + "ASgFEg0KBXNjb3JlGAQgASgCQiBaHmRjZy9nYW1lL3BiL2dhbWUvemhnO3Bi", + "R2FtZVpoZ2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPKill), global::Pb.Game.Zhg.StatPvPKill.Parser, new[]{ "Uid", "TargetUid", "IsGeneral" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPFirstBlood), global::Pb.Game.Zhg.StatPvPFirstBlood.Parser, new[]{ "Uid", "Type" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq), global::Pb.Game.Zhg.StatPvPReportReq.Parser, new[]{ "WinCamp", "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq.Types.Item), global::Pb.Game.Zhg.StatPvPReportReq.Types.Item.Parser, new[]{ "Uid", "Uname", "Position", "Damage", "DeDamage", "KillUnit", "DeKillUnit" }, null, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp), global::Pb.Game.Zhg.StatPvPReportResp.Parser, new[]{ "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp.Types.Item), global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser, new[]{ "Uid", "Uname", "Position", "ReturnsIntegral", "RewardPoolIntegral", "GeneralIntegral", "NobilityIntegral", "BattleIntegral", "TotalIntegral" }, null, null, null, null)}) + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq), global::Pb.Game.Zhg.StatPvPReportReq.Parser, new[]{ "WinCamp", "BattleId", "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportReq.Types.Item), global::Pb.Game.Zhg.StatPvPReportReq.Types.Item.Parser, new[]{ "Uid", "Uname", "Damage", "DeDamage", "KillUnit", "DeKillUnit", "FirstBlood", "DeFirstBlood", "KillPlayer", "DeKillPlayer", "IsGeneral" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp), global::Pb.Game.Zhg.StatPvPReportResp.Parser, new[]{ "WinCamp", "BattleId", "WinItems", "LostItems" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhg.StatPvPReportResp.Types.Item), global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser, new[]{ "Uid", "Uname", "Position", "Score" }, null, null, null, null)}) })); } #endregion @@ -56,517 +52,7 @@ namespace Pb.Game.Zhg { } #region Messages /// - /// 通知-PvP杀兵营(人) statistics.pvp.kill - /// - public sealed partial class StatPvPKill : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StatPvPKill()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhg.StatReflection.Descriptor.MessageTypes[0]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StatPvPKill() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StatPvPKill(StatPvPKill other) : this() { - uid_ = other.uid_; - targetUid_ = other.targetUid_; - isGeneral_ = other.isGeneral_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StatPvPKill Clone() { - return new StatPvPKill(this); - } - - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private long uid_; - /// - /// 用户ID - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Uid { - get { return uid_; } - set { - uid_ = value; - } - } - - /// Field number for the "targetUid" field. - public const int TargetUidFieldNumber = 2; - private long targetUid_; - /// - /// 目标用户 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long TargetUid { - get { return targetUid_; } - set { - targetUid_ = value; - } - } - - /// Field number for the "isGeneral" field. - public const int IsGeneralFieldNumber = 3; - private bool isGeneral_; - /// - /// targetUid是否名将 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool IsGeneral { - get { return isGeneral_; } - set { - isGeneral_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as StatPvPKill); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(StatPvPKill other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Uid != other.Uid) return false; - if (TargetUid != other.TargetUid) return false; - if (IsGeneral != other.IsGeneral) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (Uid != 0L) hash ^= Uid.GetHashCode(); - if (TargetUid != 0L) hash ^= TargetUid.GetHashCode(); - if (IsGeneral != false) hash ^= IsGeneral.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (Uid != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Uid); - } - if (TargetUid != 0L) { - output.WriteRawTag(16); - output.WriteInt64(TargetUid); - } - if (IsGeneral != false) { - output.WriteRawTag(24); - output.WriteBool(IsGeneral); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Uid != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Uid); - } - if (TargetUid != 0L) { - output.WriteRawTag(16); - output.WriteInt64(TargetUid); - } - if (IsGeneral != false) { - output.WriteRawTag(24); - output.WriteBool(IsGeneral); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Uid != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Uid); - } - if (TargetUid != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(TargetUid); - } - if (IsGeneral != false) { - size += 1 + 1; - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(StatPvPKill other) { - if (other == null) { - return; - } - if (other.Uid != 0L) { - Uid = other.Uid; - } - if (other.TargetUid != 0L) { - TargetUid = other.TargetUid; - } - if (other.IsGeneral != false) { - IsGeneral = other.IsGeneral; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Uid = input.ReadInt64(); - break; - } - case 16: { - TargetUid = input.ReadInt64(); - break; - } - case 24: { - IsGeneral = input.ReadBool(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - Uid = input.ReadInt64(); - break; - } - case 16: { - TargetUid = input.ReadInt64(); - break; - } - case 24: { - IsGeneral = input.ReadBool(); - break; - } - } - } - } - #endif - - } - - /// - /// 通知-PvP一血 statistics.pvp.first - /// - public sealed partial class StatPvPFirstBlood : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StatPvPFirstBlood()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhg.StatReflection.Descriptor.MessageTypes[1]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StatPvPFirstBlood() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StatPvPFirstBlood(StatPvPFirstBlood other) : this() { - uid_ = other.uid_; - type_ = other.type_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public StatPvPFirstBlood Clone() { - return new StatPvPFirstBlood(this); - } - - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private long uid_; - /// - /// 用户ID - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long Uid { - get { return uid_; } - set { - uid_ = value; - } - } - - /// Field number for the "type" field. - public const int TypeFieldNumber = 2; - private int type_; - /// - /// 1-拿到一血 2-被破一血 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Type { - get { return type_; } - set { - type_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as StatPvPFirstBlood); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(StatPvPFirstBlood other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Uid != other.Uid) return false; - if (Type != other.Type) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override int GetHashCode() { - int hash = 1; - if (Uid != 0L) hash ^= Uid.GetHashCode(); - if (Type != 0) hash ^= Type.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void WriteTo(pb::CodedOutputStream output) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - output.WriteRawMessage(this); - #else - if (Uid != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Uid); - } - if (Type != 0) { - output.WriteRawTag(16); - output.WriteInt32(Type); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Uid != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Uid); - } - if (Type != 0) { - output.WriteRawTag(16); - output.WriteInt32(Type); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(ref output); - } - } - #endif - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int CalculateSize() { - int size = 0; - if (Uid != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Uid); - } - if (Type != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(StatPvPFirstBlood other) { - if (other == null) { - return; - } - if (other.Uid != 0L) { - Uid = other.Uid; - } - if (other.Type != 0) { - Type = other.Type; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(pb::CodedInputStream input) { - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - input.ReadRawMessage(this); - #else - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Uid = input.ReadInt64(); - break; - } - case 16: { - Type = input.ReadInt32(); - break; - } - } - } - #endif - } - - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); - break; - case 8: { - Uid = input.ReadInt64(); - break; - } - case 16: { - Type = input.ReadInt32(); - break; - } - } - } - } - #endif - - } - - /// - /// 通知-PvP战报 statistics.pvp.report + /// PvP战报 request -> statistics.pvp.report /// public sealed partial class StatPvPReportReq : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -582,7 +68,7 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhg.StatReflection.Descriptor.MessageTypes[2]; } + get { return global::Pb.Game.Zhg.StatReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -603,6 +89,7 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StatPvPReportReq(StatPvPReportReq other) : this() { winCamp_ = other.winCamp_; + battleId_ = other.battleId_; winItems_ = other.winItems_.Clone(); lostItems_ = other.lostItems_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -629,6 +116,21 @@ namespace Pb.Game.Zhg { } } + /// Field number for the "battleId" field. + public const int BattleIdFieldNumber = 2; + private long battleId_; + /// + /// 战斗ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BattleId { + get { return battleId_; } + set { + battleId_ = value; + } + } + /// Field number for the "winItems" field. public const int WinItemsFieldNumber = 10; private static readonly pb::FieldCodec _repeated_winItems_codec @@ -673,6 +175,7 @@ namespace Pb.Game.Zhg { return true; } if (WinCamp != other.WinCamp) return false; + if (BattleId != other.BattleId) return false; if(!winItems_.Equals(other.winItems_)) return false; if(!lostItems_.Equals(other.lostItems_)) return false; return Equals(_unknownFields, other._unknownFields); @@ -683,6 +186,7 @@ namespace Pb.Game.Zhg { public override int GetHashCode() { int hash = 1; if (WinCamp != 0) hash ^= WinCamp.GetHashCode(); + if (BattleId != 0L) hash ^= BattleId.GetHashCode(); hash ^= winItems_.GetHashCode(); hash ^= lostItems_.GetHashCode(); if (_unknownFields != null) { @@ -707,6 +211,10 @@ namespace Pb.Game.Zhg { output.WriteRawTag(8); output.WriteInt32(WinCamp); } + if (BattleId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(BattleId); + } winItems_.WriteTo(output, _repeated_winItems_codec); lostItems_.WriteTo(output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -723,6 +231,10 @@ namespace Pb.Game.Zhg { output.WriteRawTag(8); output.WriteInt32(WinCamp); } + if (BattleId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(BattleId); + } winItems_.WriteTo(ref output, _repeated_winItems_codec); lostItems_.WriteTo(ref output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -738,6 +250,9 @@ namespace Pb.Game.Zhg { if (WinCamp != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinCamp); } + if (BattleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleId); + } size += winItems_.CalculateSize(_repeated_winItems_codec); size += lostItems_.CalculateSize(_repeated_lostItems_codec); if (_unknownFields != null) { @@ -755,6 +270,9 @@ namespace Pb.Game.Zhg { if (other.WinCamp != 0) { WinCamp = other.WinCamp; } + if (other.BattleId != 0L) { + BattleId = other.BattleId; + } winItems_.Add(other.winItems_); lostItems_.Add(other.lostItems_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -776,6 +294,10 @@ namespace Pb.Game.Zhg { WinCamp = input.ReadInt32(); break; } + case 16: { + BattleId = input.ReadInt64(); + break; + } case 82: { winItems_.AddEntriesFrom(input, _repeated_winItems_codec); break; @@ -803,6 +325,10 @@ namespace Pb.Game.Zhg { WinCamp = input.ReadInt32(); break; } + case 16: { + BattleId = input.ReadInt64(); + break; + } case 82: { winItems_.AddEntriesFrom(ref input, _repeated_winItems_codec); break; @@ -857,11 +383,15 @@ namespace Pb.Game.Zhg { public Item(Item other) : this() { uid_ = other.uid_; uname_ = other.uname_; - position_ = other.position_; damage_ = other.damage_; deDamage_ = other.deDamage_; killUnit_ = other.killUnit_; deKillUnit_ = other.deKillUnit_; + firstBlood_ = other.firstBlood_; + deFirstBlood_ = other.deFirstBlood_; + killPlayer_ = other.killPlayer_; + deKillPlayer_ = other.deKillPlayer_; + isGeneral_ = other.isGeneral_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -901,23 +431,8 @@ namespace Pb.Game.Zhg { } } - /// Field number for the "position" field. - public const int PositionFieldNumber = 3; - private int position_; - /// - /// 名次(特指在某一方的名次) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Position { - get { return position_; } - set { - position_ = value; - } - } - /// Field number for the "damage" field. - public const int DamageFieldNumber = 4; + public const int DamageFieldNumber = 3; private long damage_; /// /// 伤害量 @@ -932,7 +447,7 @@ namespace Pb.Game.Zhg { } /// Field number for the "deDamage" field. - public const int DeDamageFieldNumber = 5; + public const int DeDamageFieldNumber = 4; private long deDamage_; /// /// 承受伤害 @@ -947,7 +462,7 @@ namespace Pb.Game.Zhg { } /// Field number for the "killUnit" field. - public const int KillUnitFieldNumber = 6; + public const int KillUnitFieldNumber = 5; private long killUnit_; /// /// 击杀单位数量 @@ -962,7 +477,7 @@ namespace Pb.Game.Zhg { } /// Field number for the "deKillUnit" field. - public const int DeKillUnitFieldNumber = 7; + public const int DeKillUnitFieldNumber = 6; private long deKillUnit_; /// /// 被杀单位数量 @@ -976,6 +491,81 @@ namespace Pb.Game.Zhg { } } + /// Field number for the "firstBlood" field. + public const int FirstBloodFieldNumber = 7; + private bool firstBlood_; + /// + /// 拿到一血 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FirstBlood { + get { return firstBlood_; } + set { + firstBlood_ = value; + } + } + + /// Field number for the "deFirstBlood" field. + public const int DeFirstBloodFieldNumber = 8; + private bool deFirstBlood_; + /// + /// 被拿一血 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DeFirstBlood { + get { return deFirstBlood_; } + set { + deFirstBlood_ = value; + } + } + + /// Field number for the "killPlayer" field. + public const int KillPlayerFieldNumber = 9; + private long killPlayer_; + /// + /// 击杀玩家数 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long KillPlayer { + get { return killPlayer_; } + set { + killPlayer_ = value; + } + } + + /// Field number for the "deKillPlayer" field. + public const int DeKillPlayerFieldNumber = 10; + private bool deKillPlayer_; + /// + /// 是否被击杀 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DeKillPlayer { + get { return deKillPlayer_; } + set { + deKillPlayer_ = value; + } + } + + /// Field number for the "isGeneral" field. + public const int IsGeneralFieldNumber = 11; + private bool isGeneral_; + /// + /// 是否上一把名将? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsGeneral { + get { return isGeneral_; } + set { + isGeneral_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -993,11 +583,15 @@ namespace Pb.Game.Zhg { } if (Uid != other.Uid) return false; if (Uname != other.Uname) return false; - if (Position != other.Position) return false; if (Damage != other.Damage) return false; if (DeDamage != other.DeDamage) return false; if (KillUnit != other.KillUnit) return false; if (DeKillUnit != other.DeKillUnit) return false; + if (FirstBlood != other.FirstBlood) return false; + if (DeFirstBlood != other.DeFirstBlood) return false; + if (KillPlayer != other.KillPlayer) return false; + if (DeKillPlayer != other.DeKillPlayer) return false; + if (IsGeneral != other.IsGeneral) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1007,11 +601,15 @@ namespace Pb.Game.Zhg { int hash = 1; if (Uid != 0L) hash ^= Uid.GetHashCode(); if (Uname.Length != 0) hash ^= Uname.GetHashCode(); - if (Position != 0) hash ^= Position.GetHashCode(); if (Damage != 0L) hash ^= Damage.GetHashCode(); if (DeDamage != 0L) hash ^= DeDamage.GetHashCode(); if (KillUnit != 0L) hash ^= KillUnit.GetHashCode(); if (DeKillUnit != 0L) hash ^= DeKillUnit.GetHashCode(); + if (FirstBlood != false) hash ^= FirstBlood.GetHashCode(); + if (DeFirstBlood != false) hash ^= DeFirstBlood.GetHashCode(); + if (KillPlayer != 0L) hash ^= KillPlayer.GetHashCode(); + if (DeKillPlayer != false) hash ^= DeKillPlayer.GetHashCode(); + if (IsGeneral != false) hash ^= IsGeneral.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1038,26 +636,42 @@ namespace Pb.Game.Zhg { output.WriteRawTag(18); output.WriteString(Uname); } - if (Position != 0) { - output.WriteRawTag(24); - output.WriteInt32(Position); - } if (Damage != 0L) { - output.WriteRawTag(32); + output.WriteRawTag(24); output.WriteInt64(Damage); } if (DeDamage != 0L) { - output.WriteRawTag(40); + output.WriteRawTag(32); output.WriteInt64(DeDamage); } if (KillUnit != 0L) { - output.WriteRawTag(48); + output.WriteRawTag(40); output.WriteInt64(KillUnit); } if (DeKillUnit != 0L) { - output.WriteRawTag(56); + output.WriteRawTag(48); output.WriteInt64(DeKillUnit); } + if (FirstBlood != false) { + output.WriteRawTag(56); + output.WriteBool(FirstBlood); + } + if (DeFirstBlood != false) { + output.WriteRawTag(64); + output.WriteBool(DeFirstBlood); + } + if (KillPlayer != 0L) { + output.WriteRawTag(72); + output.WriteInt64(KillPlayer); + } + if (DeKillPlayer != false) { + output.WriteRawTag(80); + output.WriteBool(DeKillPlayer); + } + if (IsGeneral != false) { + output.WriteRawTag(88); + output.WriteBool(IsGeneral); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1076,26 +690,42 @@ namespace Pb.Game.Zhg { output.WriteRawTag(18); output.WriteString(Uname); } - if (Position != 0) { - output.WriteRawTag(24); - output.WriteInt32(Position); - } if (Damage != 0L) { - output.WriteRawTag(32); + output.WriteRawTag(24); output.WriteInt64(Damage); } if (DeDamage != 0L) { - output.WriteRawTag(40); + output.WriteRawTag(32); output.WriteInt64(DeDamage); } if (KillUnit != 0L) { - output.WriteRawTag(48); + output.WriteRawTag(40); output.WriteInt64(KillUnit); } if (DeKillUnit != 0L) { - output.WriteRawTag(56); + output.WriteRawTag(48); output.WriteInt64(DeKillUnit); } + if (FirstBlood != false) { + output.WriteRawTag(56); + output.WriteBool(FirstBlood); + } + if (DeFirstBlood != false) { + output.WriteRawTag(64); + output.WriteBool(DeFirstBlood); + } + if (KillPlayer != 0L) { + output.WriteRawTag(72); + output.WriteInt64(KillPlayer); + } + if (DeKillPlayer != false) { + output.WriteRawTag(80); + output.WriteBool(DeKillPlayer); + } + if (IsGeneral != false) { + output.WriteRawTag(88); + output.WriteBool(IsGeneral); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1112,9 +742,6 @@ namespace Pb.Game.Zhg { if (Uname.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Uname); } - if (Position != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Position); - } if (Damage != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(Damage); } @@ -1127,6 +754,21 @@ namespace Pb.Game.Zhg { if (DeKillUnit != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeKillUnit); } + if (FirstBlood != false) { + size += 1 + 1; + } + if (DeFirstBlood != false) { + size += 1 + 1; + } + if (KillPlayer != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(KillPlayer); + } + if (DeKillPlayer != false) { + size += 1 + 1; + } + if (IsGeneral != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1145,9 +787,6 @@ namespace Pb.Game.Zhg { if (other.Uname.Length != 0) { Uname = other.Uname; } - if (other.Position != 0) { - Position = other.Position; - } if (other.Damage != 0L) { Damage = other.Damage; } @@ -1160,6 +799,21 @@ namespace Pb.Game.Zhg { if (other.DeKillUnit != 0L) { DeKillUnit = other.DeKillUnit; } + if (other.FirstBlood != false) { + FirstBlood = other.FirstBlood; + } + if (other.DeFirstBlood != false) { + DeFirstBlood = other.DeFirstBlood; + } + if (other.KillPlayer != 0L) { + KillPlayer = other.KillPlayer; + } + if (other.DeKillPlayer != false) { + DeKillPlayer = other.DeKillPlayer; + } + if (other.IsGeneral != false) { + IsGeneral = other.IsGeneral; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1184,23 +838,39 @@ namespace Pb.Game.Zhg { break; } case 24: { - Position = input.ReadInt32(); + Damage = input.ReadInt64(); break; } case 32: { - Damage = input.ReadInt64(); + DeDamage = input.ReadInt64(); break; } case 40: { - DeDamage = input.ReadInt64(); + KillUnit = input.ReadInt64(); break; } case 48: { - KillUnit = input.ReadInt64(); + DeKillUnit = input.ReadInt64(); break; } case 56: { - DeKillUnit = input.ReadInt64(); + FirstBlood = input.ReadBool(); + break; + } + case 64: { + DeFirstBlood = input.ReadBool(); + break; + } + case 72: { + KillPlayer = input.ReadInt64(); + break; + } + case 80: { + DeKillPlayer = input.ReadBool(); + break; + } + case 88: { + IsGeneral = input.ReadBool(); break; } } @@ -1227,23 +897,39 @@ namespace Pb.Game.Zhg { break; } case 24: { - Position = input.ReadInt32(); + Damage = input.ReadInt64(); break; } case 32: { - Damage = input.ReadInt64(); + DeDamage = input.ReadInt64(); break; } case 40: { - DeDamage = input.ReadInt64(); + KillUnit = input.ReadInt64(); break; } case 48: { - KillUnit = input.ReadInt64(); + DeKillUnit = input.ReadInt64(); break; } case 56: { - DeKillUnit = input.ReadInt64(); + FirstBlood = input.ReadBool(); + break; + } + case 64: { + DeFirstBlood = input.ReadBool(); + break; + } + case 72: { + KillPlayer = input.ReadInt64(); + break; + } + case 80: { + DeKillPlayer = input.ReadBool(); + break; + } + case 88: { + IsGeneral = input.ReadBool(); break; } } @@ -1259,7 +945,7 @@ namespace Pb.Game.Zhg { } /// - /// 通知-PvP战报 回复 + /// PvP战报 回复 response -> statistics.pvp.report /// public sealed partial class StatPvPReportResp : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -1275,7 +961,7 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhg.StatReflection.Descriptor.MessageTypes[3]; } + get { return global::Pb.Game.Zhg.StatReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1295,6 +981,8 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StatPvPReportResp(StatPvPReportResp other) : this() { + winCamp_ = other.winCamp_; + battleId_ = other.battleId_; winItems_ = other.winItems_.Clone(); lostItems_ = other.lostItems_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -1306,10 +994,40 @@ namespace Pb.Game.Zhg { return new StatPvPReportResp(this); } + /// Field number for the "winCamp" field. + public const int WinCampFieldNumber = 1; + private int winCamp_; + /// + /// 获胜阵营 1-蓝 2-红 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int WinCamp { + get { return winCamp_; } + set { + winCamp_ = value; + } + } + + /// Field number for the "battleId" field. + public const int BattleIdFieldNumber = 2; + private long battleId_; + /// + /// 战斗ID + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BattleId { + get { return battleId_; } + set { + battleId_ = value; + } + } + /// Field number for the "winItems" field. - public const int WinItemsFieldNumber = 1; + public const int WinItemsFieldNumber = 10; private static readonly pb::FieldCodec _repeated_winItems_codec - = pb::FieldCodec.ForMessage(10, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); + = pb::FieldCodec.ForMessage(82, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); private readonly pbc::RepeatedField winItems_ = new pbc::RepeatedField(); /// /// 获胜方数据 @@ -1321,9 +1039,9 @@ namespace Pb.Game.Zhg { } /// Field number for the "lostItems" field. - public const int LostItemsFieldNumber = 2; + public const int LostItemsFieldNumber = 11; private static readonly pb::FieldCodec _repeated_lostItems_codec - = pb::FieldCodec.ForMessage(18, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); + = pb::FieldCodec.ForMessage(90, global::Pb.Game.Zhg.StatPvPReportResp.Types.Item.Parser); private readonly pbc::RepeatedField lostItems_ = new pbc::RepeatedField(); /// /// 战败方数据 @@ -1349,6 +1067,8 @@ namespace Pb.Game.Zhg { if (ReferenceEquals(other, this)) { return true; } + if (WinCamp != other.WinCamp) return false; + if (BattleId != other.BattleId) return false; if(!winItems_.Equals(other.winItems_)) return false; if(!lostItems_.Equals(other.lostItems_)) return false; return Equals(_unknownFields, other._unknownFields); @@ -1358,6 +1078,8 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; + if (WinCamp != 0) hash ^= WinCamp.GetHashCode(); + if (BattleId != 0L) hash ^= BattleId.GetHashCode(); hash ^= winItems_.GetHashCode(); hash ^= lostItems_.GetHashCode(); if (_unknownFields != null) { @@ -1378,6 +1100,14 @@ namespace Pb.Game.Zhg { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else + if (WinCamp != 0) { + output.WriteRawTag(8); + output.WriteInt32(WinCamp); + } + if (BattleId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(BattleId); + } winItems_.WriteTo(output, _repeated_winItems_codec); lostItems_.WriteTo(output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -1390,6 +1120,14 @@ namespace Pb.Game.Zhg { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (WinCamp != 0) { + output.WriteRawTag(8); + output.WriteInt32(WinCamp); + } + if (BattleId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(BattleId); + } winItems_.WriteTo(ref output, _repeated_winItems_codec); lostItems_.WriteTo(ref output, _repeated_lostItems_codec); if (_unknownFields != null) { @@ -1402,6 +1140,12 @@ namespace Pb.Game.Zhg { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; + if (WinCamp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WinCamp); + } + if (BattleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleId); + } size += winItems_.CalculateSize(_repeated_winItems_codec); size += lostItems_.CalculateSize(_repeated_lostItems_codec); if (_unknownFields != null) { @@ -1416,6 +1160,12 @@ namespace Pb.Game.Zhg { if (other == null) { return; } + if (other.WinCamp != 0) { + WinCamp = other.WinCamp; + } + if (other.BattleId != 0L) { + BattleId = other.BattleId; + } winItems_.Add(other.winItems_); lostItems_.Add(other.lostItems_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -1433,11 +1183,19 @@ namespace Pb.Game.Zhg { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { + case 8: { + WinCamp = input.ReadInt32(); + break; + } + case 16: { + BattleId = input.ReadInt64(); + break; + } + case 82: { winItems_.AddEntriesFrom(input, _repeated_winItems_codec); break; } - case 18: { + case 90: { lostItems_.AddEntriesFrom(input, _repeated_lostItems_codec); break; } @@ -1456,11 +1214,19 @@ namespace Pb.Game.Zhg { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { + case 8: { + WinCamp = input.ReadInt32(); + break; + } + case 16: { + BattleId = input.ReadInt64(); + break; + } + case 82: { winItems_.AddEntriesFrom(ref input, _repeated_winItems_codec); break; } - case 18: { + case 90: { lostItems_.AddEntriesFrom(ref input, _repeated_lostItems_codec); break; } @@ -1511,12 +1277,7 @@ namespace Pb.Game.Zhg { uid_ = other.uid_; uname_ = other.uname_; position_ = other.position_; - returnsIntegral_ = other.returnsIntegral_; - rewardPoolIntegral_ = other.rewardPoolIntegral_; - generalIntegral_ = other.generalIntegral_; - nobilityIntegral_ = other.nobilityIntegral_; - battleIntegral_ = other.battleIntegral_; - totalIntegral_ = other.totalIntegral_; + score_ = other.score_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1571,93 +1332,18 @@ namespace Pb.Game.Zhg { } } - /// Field number for the "returnsIntegral" field. - public const int ReturnsIntegralFieldNumber = 4; - private long returnsIntegral_; - /// - /// 回收的积分(获胜方才能回收,0不要展示) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long ReturnsIntegral { - get { return returnsIntegral_; } - set { - returnsIntegral_ = value; - } - } - - /// Field number for the "rewardPoolIntegral" field. - public const int RewardPoolIntegralFieldNumber = 5; - private long rewardPoolIntegral_; - /// - /// 瓜分奖池分 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long RewardPoolIntegral { - get { return rewardPoolIntegral_; } - set { - rewardPoolIntegral_ = value; - } - } - - /// Field number for the "generalIntegral" field. - public const int GeneralIntegralFieldNumber = 6; - private long generalIntegral_; - /// - /// 名将 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long GeneralIntegral { - get { return generalIntegral_; } - set { - generalIntegral_ = value; - } - } - - /// Field number for the "nobilityIntegral" field. - public const int NobilityIntegralFieldNumber = 7; - private long nobilityIntegral_; - /// - /// 舰长|总督|贵族 加成分 - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long NobilityIntegral { - get { return nobilityIntegral_; } - set { - nobilityIntegral_ = value; - } - } - - /// Field number for the "battleIntegral" field. - public const int BattleIntegralFieldNumber = 8; - private long battleIntegral_; - /// - /// 战斗结算奖励(普通) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long BattleIntegral { - get { return battleIntegral_; } - set { - battleIntegral_ = value; - } - } - - /// Field number for the "totalIntegral" field. - public const int TotalIntegralFieldNumber = 10; - private long totalIntegral_; + /// Field number for the "score" field. + public const int ScoreFieldNumber = 4; + private float score_; /// - /// 总计加分 + /// 评分(一位小数) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public long TotalIntegral { - get { return totalIntegral_; } + public float Score { + get { return score_; } set { - totalIntegral_ = value; + score_ = value; } } @@ -1679,12 +1365,7 @@ namespace Pb.Game.Zhg { if (Uid != other.Uid) return false; if (Uname != other.Uname) return false; if (Position != other.Position) return false; - if (ReturnsIntegral != other.ReturnsIntegral) return false; - if (RewardPoolIntegral != other.RewardPoolIntegral) return false; - if (GeneralIntegral != other.GeneralIntegral) return false; - if (NobilityIntegral != other.NobilityIntegral) return false; - if (BattleIntegral != other.BattleIntegral) return false; - if (TotalIntegral != other.TotalIntegral) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Score, other.Score)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1695,12 +1376,7 @@ namespace Pb.Game.Zhg { if (Uid != 0L) hash ^= Uid.GetHashCode(); if (Uname.Length != 0) hash ^= Uname.GetHashCode(); if (Position != 0) hash ^= Position.GetHashCode(); - if (ReturnsIntegral != 0L) hash ^= ReturnsIntegral.GetHashCode(); - if (RewardPoolIntegral != 0L) hash ^= RewardPoolIntegral.GetHashCode(); - if (GeneralIntegral != 0L) hash ^= GeneralIntegral.GetHashCode(); - if (NobilityIntegral != 0L) hash ^= NobilityIntegral.GetHashCode(); - if (BattleIntegral != 0L) hash ^= BattleIntegral.GetHashCode(); - if (TotalIntegral != 0L) hash ^= TotalIntegral.GetHashCode(); + if (Score != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Score); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1731,29 +1407,9 @@ namespace Pb.Game.Zhg { output.WriteRawTag(24); output.WriteInt32(Position); } - if (ReturnsIntegral != 0L) { - output.WriteRawTag(32); - output.WriteInt64(ReturnsIntegral); - } - if (RewardPoolIntegral != 0L) { - output.WriteRawTag(40); - output.WriteInt64(RewardPoolIntegral); - } - if (GeneralIntegral != 0L) { - output.WriteRawTag(48); - output.WriteInt64(GeneralIntegral); - } - if (NobilityIntegral != 0L) { - output.WriteRawTag(56); - output.WriteInt64(NobilityIntegral); - } - if (BattleIntegral != 0L) { - output.WriteRawTag(64); - output.WriteInt64(BattleIntegral); - } - if (TotalIntegral != 0L) { - output.WriteRawTag(80); - output.WriteInt64(TotalIntegral); + if (Score != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Score); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -1777,29 +1433,9 @@ namespace Pb.Game.Zhg { output.WriteRawTag(24); output.WriteInt32(Position); } - if (ReturnsIntegral != 0L) { - output.WriteRawTag(32); - output.WriteInt64(ReturnsIntegral); - } - if (RewardPoolIntegral != 0L) { - output.WriteRawTag(40); - output.WriteInt64(RewardPoolIntegral); - } - if (GeneralIntegral != 0L) { - output.WriteRawTag(48); - output.WriteInt64(GeneralIntegral); - } - if (NobilityIntegral != 0L) { - output.WriteRawTag(56); - output.WriteInt64(NobilityIntegral); - } - if (BattleIntegral != 0L) { - output.WriteRawTag(64); - output.WriteInt64(BattleIntegral); - } - if (TotalIntegral != 0L) { - output.WriteRawTag(80); - output.WriteInt64(TotalIntegral); + if (Score != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Score); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); @@ -1820,23 +1456,8 @@ namespace Pb.Game.Zhg { if (Position != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Position); } - if (ReturnsIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(ReturnsIntegral); - } - if (RewardPoolIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RewardPoolIntegral); - } - if (GeneralIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(GeneralIntegral); - } - if (NobilityIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NobilityIntegral); - } - if (BattleIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(BattleIntegral); - } - if (TotalIntegral != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(TotalIntegral); + if (Score != 0F) { + size += 1 + 4; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1859,23 +1480,8 @@ namespace Pb.Game.Zhg { if (other.Position != 0) { Position = other.Position; } - if (other.ReturnsIntegral != 0L) { - ReturnsIntegral = other.ReturnsIntegral; - } - if (other.RewardPoolIntegral != 0L) { - RewardPoolIntegral = other.RewardPoolIntegral; - } - if (other.GeneralIntegral != 0L) { - GeneralIntegral = other.GeneralIntegral; - } - if (other.NobilityIntegral != 0L) { - NobilityIntegral = other.NobilityIntegral; - } - if (other.BattleIntegral != 0L) { - BattleIntegral = other.BattleIntegral; - } - if (other.TotalIntegral != 0L) { - TotalIntegral = other.TotalIntegral; + if (other.Score != 0F) { + Score = other.Score; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1904,28 +1510,8 @@ namespace Pb.Game.Zhg { Position = input.ReadInt32(); break; } - case 32: { - ReturnsIntegral = input.ReadInt64(); - break; - } - case 40: { - RewardPoolIntegral = input.ReadInt64(); - break; - } - case 48: { - GeneralIntegral = input.ReadInt64(); - break; - } - case 56: { - NobilityIntegral = input.ReadInt64(); - break; - } - case 64: { - BattleIntegral = input.ReadInt64(); - break; - } - case 80: { - TotalIntegral = input.ReadInt64(); + case 37: { + Score = input.ReadFloat(); break; } } @@ -1955,28 +1541,8 @@ namespace Pb.Game.Zhg { Position = input.ReadInt32(); break; } - case 32: { - ReturnsIntegral = input.ReadInt64(); - break; - } - case 40: { - RewardPoolIntegral = input.ReadInt64(); - break; - } - case 48: { - GeneralIntegral = input.ReadInt64(); - break; - } - case 56: { - NobilityIntegral = input.ReadInt64(); - break; - } - case 64: { - BattleIntegral = input.ReadInt64(); - break; - } - case 80: { - TotalIntegral = input.ReadInt64(); + case 37: { + Score = input.ReadFloat(); break; } } diff --git a/game/pb/game/zhg/command.pb.go b/game/pb/game/zhg/command.pb.go index 801c72c..2405121 100644 --- a/game/pb/game/zhg/command.pb.go +++ b/game/pb/game/zhg/command.pb.go @@ -27,7 +27,11 @@ type JoinGame struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + NobilityLevel int32 `protobuf:"varint,2,opt,name=nobilityLevel,proto3" json:"nobilityLevel,omitempty"` // 贵族等级 3舰长 0总督? + Coin int64 `protobuf:"varint,3,opt,name=coin,proto3" json:"coin,omitempty"` // 金币数量 + CurrentTitle *common.TitleItem `protobuf:"bytes,10,opt,name=currentTitle,proto3" json:"currentTitle,omitempty"` // 当前佩戴的称号 + CurrentElite *EliteItem `protobuf:"bytes,11,opt,name=currentElite,proto3" json:"currentElite,omitempty"` // 当前装备的精英单位 } func (x *JoinGame) Reset() { @@ -69,7 +73,35 @@ func (x *JoinGame) GetUser() *common.PbUser { return nil } -// 生产单位 push -> game.createUnit +func (x *JoinGame) GetNobilityLevel() int32 { + if x != nil { + return x.NobilityLevel + } + return 0 +} + +func (x *JoinGame) GetCoin() int64 { + if x != nil { + return x.Coin + } + return 0 +} + +func (x *JoinGame) GetCurrentTitle() *common.TitleItem { + if x != nil { + return x.CurrentTitle + } + return nil +} + +func (x *JoinGame) GetCurrentElite() *EliteItem { + if x != nil { + return x.CurrentElite + } + return nil +} + +// 切换生产单位种类 push -> game.createUnit type CreateUnit struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -125,7 +157,7 @@ func (x *CreateUnit) GetUnit() string { return "" } -// 修改出兵位置 push -> game.move +// 修改出兵路线 push -> game.move type Move struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -181,7 +213,7 @@ func (x *Move) GetLine() string { return "" } -// 暴兵 push -> game.outbreak +// 普通暴兵 push -> game.outbreak type Outbreak struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -229,20 +261,20 @@ func (x *Outbreak) GetUser() *common.PbUser { return nil } -// 暴兵(积分) push -> game.outbreak.integral -type OutbreakIntegral struct { +// 暴兵(粮草) push -> game.outbreak.food +type OutbreakFood struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - UnitType string `protobuf:"bytes,2,opt,name=unitType,proto3" json:"unitType,omitempty"` // 暴兵类型 - Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // 数量 - CostIntegral int64 `protobuf:"varint,4,opt,name=costIntegral,proto3" json:"costIntegral,omitempty"` // 消耗积分 + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + UnitType string `protobuf:"bytes,2,opt,name=unitType,proto3" json:"unitType,omitempty"` // 暴兵类型 + Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // 数量 + Cost int64 `protobuf:"varint,4,opt,name=cost,proto3" json:"cost,omitempty"` // 消耗 } -func (x *OutbreakIntegral) Reset() { - *x = OutbreakIntegral{} +func (x *OutbreakFood) Reset() { + *x = OutbreakFood{} if protoimpl.UnsafeEnabled { mi := &file_game_zhg_command_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -250,13 +282,13 @@ func (x *OutbreakIntegral) Reset() { } } -func (x *OutbreakIntegral) String() string { +func (x *OutbreakFood) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OutbreakIntegral) ProtoMessage() {} +func (*OutbreakFood) ProtoMessage() {} -func (x *OutbreakIntegral) ProtoReflect() protoreflect.Message { +func (x *OutbreakFood) ProtoReflect() protoreflect.Message { mi := &file_game_zhg_command_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -268,35 +300,35 @@ func (x *OutbreakIntegral) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use OutbreakIntegral.ProtoReflect.Descriptor instead. -func (*OutbreakIntegral) Descriptor() ([]byte, []int) { +// Deprecated: Use OutbreakFood.ProtoReflect.Descriptor instead. +func (*OutbreakFood) Descriptor() ([]byte, []int) { return file_game_zhg_command_proto_rawDescGZIP(), []int{4} } -func (x *OutbreakIntegral) GetUser() *common.PbUser { +func (x *OutbreakFood) GetUser() *common.PbUser { if x != nil { return x.User } return nil } -func (x *OutbreakIntegral) GetUnitType() string { +func (x *OutbreakFood) GetUnitType() string { if x != nil { return x.UnitType } return "" } -func (x *OutbreakIntegral) GetCount() int32 { +func (x *OutbreakFood) GetCount() int32 { if x != nil { return x.Count } return 0 } -func (x *OutbreakIntegral) GetCostIntegral() int64 { +func (x *OutbreakFood) GetCost() int64 { if x != nil { - return x.CostIntegral + return x.Cost } return 0 } @@ -405,48 +437,531 @@ func (x *BuildingMode) GetMode() string { return "" } +// 切换精英单位 push -> game.change.elite +type ChangeElite struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + User *common.PbUser `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + EliteId int64 `protobuf:"varint,3,opt,name=eliteId,proto3" json:"eliteId,omitempty"` // ID +} + +func (x *ChangeElite) Reset() { + *x = ChangeElite{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhg_command_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeElite) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeElite) ProtoMessage() {} + +func (x *ChangeElite) ProtoReflect() protoreflect.Message { + mi := &file_game_zhg_command_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeElite.ProtoReflect.Descriptor instead. +func (*ChangeElite) Descriptor() ([]byte, []int) { + return file_game_zhg_command_proto_rawDescGZIP(), []int{7} +} + +func (x *ChangeElite) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ChangeElite) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *ChangeElite) GetEliteId() int64 { + if x != nil { + return x.EliteId + } + return 0 +} + +// 切换称号 push -> game.change.title +type ChangeTitle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + User *common.PbUser `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` + TitleId int64 `protobuf:"varint,3,opt,name=titleId,proto3" json:"titleId,omitempty"` // ID + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` // 名称 +} + +func (x *ChangeTitle) Reset() { + *x = ChangeTitle{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhg_command_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeTitle) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeTitle) ProtoMessage() {} + +func (x *ChangeTitle) ProtoReflect() protoreflect.Message { + mi := &file_game_zhg_command_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeTitle.ProtoReflect.Descriptor instead. +func (*ChangeTitle) Descriptor() ([]byte, []int) { + return file_game_zhg_command_proto_rawDescGZIP(), []int{8} +} + +func (x *ChangeTitle) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ChangeTitle) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *ChangeTitle) GetTitleId() int64 { + if x != nil { + return x.TitleId + } + return 0 +} + +func (x *ChangeTitle) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// BuyBattleFood 购买粮草 push -> game.buy.food +type BuyBattleFood struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` // 用户ID + Cost int64 `protobuf:"varint,2,opt,name=cost,proto3" json:"cost,omitempty"` // 花费 + Food int64 `protobuf:"varint,3,opt,name=food,proto3" json:"food,omitempty"` // 购买到的粮草量 +} + +func (x *BuyBattleFood) Reset() { + *x = BuyBattleFood{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhg_command_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuyBattleFood) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuyBattleFood) ProtoMessage() {} + +func (x *BuyBattleFood) ProtoReflect() protoreflect.Message { + mi := &file_game_zhg_command_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BuyBattleFood.ProtoReflect.Descriptor instead. +func (*BuyBattleFood) Descriptor() ([]byte, []int) { + return file_game_zhg_command_proto_rawDescGZIP(), []int{9} +} + +func (x *BuyBattleFood) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *BuyBattleFood) GetCost() int64 { + if x != nil { + return x.Cost + } + return 0 +} + +func (x *BuyBattleFood) GetFood() int64 { + if x != nil { + return x.Food + } + return 0 +} + +// 精英单位 zw1 2 +type EliteItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // ID 1000(普通x) 1001(弓骑兵) 1002(牧师) + Sort int32 `protobuf:"varint,2,opt,name=sort,proto3" json:"sort,omitempty"` // 排序号 + Remain int32 `protobuf:"varint,3,opt,name=remain,proto3" json:"remain,omitempty"` // 剩余时长(单位:天)-1无限制 +} + +func (x *EliteItem) Reset() { + *x = EliteItem{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhg_command_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EliteItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EliteItem) ProtoMessage() {} + +func (x *EliteItem) ProtoReflect() protoreflect.Message { + mi := &file_game_zhg_command_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EliteItem.ProtoReflect.Descriptor instead. +func (*EliteItem) Descriptor() ([]byte, []int) { + return file_game_zhg_command_proto_rawDescGZIP(), []int{10} +} + +func (x *EliteItem) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *EliteItem) GetSort() int32 { + if x != nil { + return x.Sort + } + return 0 +} + +func (x *EliteItem) GetRemain() int32 { + if x != nil { + return x.Remain + } + return 0 +} + +// QueryIntegralMsg 用户查询信息通知 push -> user.query +type UserQueryMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // 用户信息 + Rank []*UserQueryMsg_RankItem `protobuf:"bytes,2,rep,name=rank,proto3" json:"rank,omitempty"` // 排行数据(多个榜) + Coin int64 `protobuf:"varint,3,opt,name=coin,proto3" json:"coin,omitempty"` // 弹币 + Titles []*common.TitleItem `protobuf:"bytes,10,rep,name=titles,proto3" json:"titles,omitempty"` // 称号ID列表,具体称号配置 给接口取 + Elites []*EliteItem `protobuf:"bytes,11,rep,name=elites,proto3" json:"elites,omitempty"` // 拥有的精英单位列表 + CurrentTitle *common.TitleItem `protobuf:"bytes,12,opt,name=currentTitle,proto3" json:"currentTitle,omitempty"` // 当前佩戴的称号 + CurrentElite *EliteItem `protobuf:"bytes,13,opt,name=currentElite,proto3" json:"currentElite,omitempty"` // 当前使用的精英单位 +} + +func (x *UserQueryMsg) Reset() { + *x = UserQueryMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhg_command_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserQueryMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserQueryMsg) ProtoMessage() {} + +func (x *UserQueryMsg) ProtoReflect() protoreflect.Message { + mi := &file_game_zhg_command_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 UserQueryMsg.ProtoReflect.Descriptor instead. +func (*UserQueryMsg) Descriptor() ([]byte, []int) { + return file_game_zhg_command_proto_rawDescGZIP(), []int{11} +} + +func (x *UserQueryMsg) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *UserQueryMsg) GetRank() []*UserQueryMsg_RankItem { + if x != nil { + return x.Rank + } + return nil +} + +func (x *UserQueryMsg) GetCoin() int64 { + if x != nil { + return x.Coin + } + return 0 +} + +func (x *UserQueryMsg) GetTitles() []*common.TitleItem { + if x != nil { + return x.Titles + } + return nil +} + +func (x *UserQueryMsg) GetElites() []*EliteItem { + if x != nil { + return x.Elites + } + return nil +} + +func (x *UserQueryMsg) GetCurrentTitle() *common.TitleItem { + if x != nil { + return x.CurrentTitle + } + return nil +} + +func (x *UserQueryMsg) GetCurrentElite() *EliteItem { + if x != nil { + return x.CurrentElite + } + return nil +} + +// 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_game_zhg_command_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_game_zhg_command_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_game_zhg_command_proto_rawDescGZIP(), []int{11, 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_game_zhg_command_proto protoreflect.FileDescriptor var file_game_zhg_command_proto_rawDesc = []byte{ 0x0a, 0x16, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x08, 0x4a, 0x6f, - 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 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, 0x47, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, 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, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x41, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 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, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x31, 0x0a, 0x08, 0x4f, 0x75, 0x74, - 0x62, 0x72, 0x65, 0x61, 0x6b, 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, 0x8f, 0x01, 0x0a, - 0x10, 0x4f, 0x75, 0x74, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x6c, 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, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, - 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0c, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x2c, - 0x0a, 0x03, 0x57, 0x61, 0x69, 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, 0x49, 0x0a, 0x0c, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x04, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe1, 0x01, 0x0a, 0x08, 0x4a, + 0x6f, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 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, 0x24, + 0x0a, 0x0d, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x74, + 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x69, + 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, + 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, + 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x22, 0x47, + 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, 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, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 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, + 0x73, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x41, 0x0a, 0x04, 0x4d, 0x6f, 0x76, 0x65, 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, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x31, 0x0a, 0x08, 0x4f, 0x75, + 0x74, 0x62, 0x72, 0x65, 0x61, 0x6b, 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, 0x7b, 0x0a, + 0x0c, 0x4f, 0x75, 0x74, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x46, 0x6f, 0x6f, 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, 0x1a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x03, 0x57, 0x61, + 0x69, 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, 0x49, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x69, 0x6e, 0x67, 0x4d, 0x6f, 0x64, 0x65, 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, + 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, + 0x6f, 0x64, 0x65, 0x22, 0x62, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, + 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, + 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, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x18, 0x02, 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, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x4f, 0x0a, 0x0d, 0x42, 0x75, 0x79, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x6f, 0x64, + 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, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x6f, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x64, + 0x22, 0x47, 0x0a, 0x09, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0xa7, 0x03, 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, 0x36, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 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, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x2c, 0x0a, + 0x06, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x06, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x65, + 0x6c, 0x69, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, + 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x06, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x0c, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x69, + 0x74, 0x6c, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x3a, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x45, 0x6c, 0x69, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, + 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x6c, 0x69, 0x74, + 0x65, 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, 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 ( @@ -461,30 +976,47 @@ func file_game_zhg_command_proto_rawDescGZIP() []byte { return file_game_zhg_command_proto_rawDescData } -var file_game_zhg_command_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_game_zhg_command_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_game_zhg_command_proto_goTypes = []interface{}{ - (*JoinGame)(nil), // 0: pb.game.zhg.JoinGame - (*CreateUnit)(nil), // 1: pb.game.zhg.CreateUnit - (*Move)(nil), // 2: pb.game.zhg.Move - (*Outbreak)(nil), // 3: pb.game.zhg.Outbreak - (*OutbreakIntegral)(nil), // 4: pb.game.zhg.OutbreakIntegral - (*Wai)(nil), // 5: pb.game.zhg.Wai - (*BuildingMode)(nil), // 6: pb.game.zhg.BuildingMode - (*common.PbUser)(nil), // 7: pb.common.PbUser + (*JoinGame)(nil), // 0: pb.game.zhg.JoinGame + (*CreateUnit)(nil), // 1: pb.game.zhg.CreateUnit + (*Move)(nil), // 2: pb.game.zhg.Move + (*Outbreak)(nil), // 3: pb.game.zhg.Outbreak + (*OutbreakFood)(nil), // 4: pb.game.zhg.OutbreakFood + (*Wai)(nil), // 5: pb.game.zhg.Wai + (*BuildingMode)(nil), // 6: pb.game.zhg.BuildingMode + (*ChangeElite)(nil), // 7: pb.game.zhg.ChangeElite + (*ChangeTitle)(nil), // 8: pb.game.zhg.ChangeTitle + (*BuyBattleFood)(nil), // 9: pb.game.zhg.BuyBattleFood + (*EliteItem)(nil), // 10: pb.game.zhg.EliteItem + (*UserQueryMsg)(nil), // 11: pb.game.zhg.UserQueryMsg + (*UserQueryMsg_RankItem)(nil), // 12: pb.game.zhg.UserQueryMsg.RankItem + (*common.PbUser)(nil), // 13: pb.common.PbUser + (*common.TitleItem)(nil), // 14: pb.common.TitleItem } var file_game_zhg_command_proto_depIdxs = []int32{ - 7, // 0: pb.game.zhg.JoinGame.user:type_name -> pb.common.PbUser - 7, // 1: pb.game.zhg.CreateUnit.user:type_name -> pb.common.PbUser - 7, // 2: pb.game.zhg.Move.user:type_name -> pb.common.PbUser - 7, // 3: pb.game.zhg.Outbreak.user:type_name -> pb.common.PbUser - 7, // 4: pb.game.zhg.OutbreakIntegral.user:type_name -> pb.common.PbUser - 7, // 5: pb.game.zhg.Wai.user:type_name -> pb.common.PbUser - 7, // 6: pb.game.zhg.BuildingMode.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 + 13, // 0: pb.game.zhg.JoinGame.user:type_name -> pb.common.PbUser + 14, // 1: pb.game.zhg.JoinGame.currentTitle:type_name -> pb.common.TitleItem + 10, // 2: pb.game.zhg.JoinGame.currentElite:type_name -> pb.game.zhg.EliteItem + 13, // 3: pb.game.zhg.CreateUnit.user:type_name -> pb.common.PbUser + 13, // 4: pb.game.zhg.Move.user:type_name -> pb.common.PbUser + 13, // 5: pb.game.zhg.Outbreak.user:type_name -> pb.common.PbUser + 13, // 6: pb.game.zhg.OutbreakFood.user:type_name -> pb.common.PbUser + 13, // 7: pb.game.zhg.Wai.user:type_name -> pb.common.PbUser + 13, // 8: pb.game.zhg.BuildingMode.user:type_name -> pb.common.PbUser + 13, // 9: pb.game.zhg.ChangeElite.user:type_name -> pb.common.PbUser + 13, // 10: pb.game.zhg.ChangeTitle.user:type_name -> pb.common.PbUser + 13, // 11: pb.game.zhg.UserQueryMsg.user:type_name -> pb.common.PbUser + 12, // 12: pb.game.zhg.UserQueryMsg.rank:type_name -> pb.game.zhg.UserQueryMsg.RankItem + 14, // 13: pb.game.zhg.UserQueryMsg.titles:type_name -> pb.common.TitleItem + 10, // 14: pb.game.zhg.UserQueryMsg.elites:type_name -> pb.game.zhg.EliteItem + 14, // 15: pb.game.zhg.UserQueryMsg.currentTitle:type_name -> pb.common.TitleItem + 10, // 16: pb.game.zhg.UserQueryMsg.currentElite:type_name -> pb.game.zhg.EliteItem + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_game_zhg_command_proto_init() } @@ -542,7 +1074,7 @@ func file_game_zhg_command_proto_init() { } } file_game_zhg_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutbreakIntegral); i { + switch v := v.(*OutbreakFood); i { case 0: return &v.state case 1: @@ -577,6 +1109,78 @@ func file_game_zhg_command_proto_init() { return nil } } + file_game_zhg_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeElite); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhg_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChangeTitle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhg_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BuyBattleFood); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhg_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EliteItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhg_command_proto_msgTypes[11].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_game_zhg_command_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{ @@ -584,7 +1188,7 @@ func file_game_zhg_command_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_zhg_command_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 13, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/game/zhg/command.proto b/game/pb/game/zhg/command.proto index e939ad5..a3132f3 100644 --- a/game/pb/game/zhg/command.proto +++ b/game/pb/game/zhg/command.proto @@ -9,31 +9,35 @@ option go_package = "dcg/game/pb/game/zhg;pbGameZhg"; // 加入游戏 push -> game.join message JoinGame{ pb.common.PbUser user = 1; + int32 nobilityLevel = 2; // 贵族等级 3舰长 0总督? + int64 coin = 3; // 金币数量 + pb.common.TitleItem currentTitle = 10; // 当前佩戴的称号 + EliteItem currentElite = 11; // 当前装备的精英单位 } -// 生产单位 push -> game.createUnit +// 切换生产单位种类 push -> game.createUnit message CreateUnit{ pb.common.PbUser user = 1; string unit = 2;//1-步兵,2-骑兵,3-弓箭手,4-法师 } -// 修改出兵位置 push -> game.move +// 修改出兵路线 push -> game.move message Move{ pb.common.PbUser user = 1; string line = 2;//1-上,2-中,3-下 } -// 暴兵 push -> game.outbreak +// 普通暴兵 push -> game.outbreak message Outbreak{ pb.common.PbUser user = 1; } -// 暴兵(积分) push -> game.outbreak.integral -message OutbreakIntegral { +// 暴兵(粮草) push -> game.outbreak.food +message OutbreakFood { pb.common.PbUser user = 1; string unitType = 2; // 暴兵类型 int32 count = 3; // 数量 - int64 costIntegral = 4; // 消耗积分 + int64 cost = 4; // 消耗 } // 查询位置 push -> game.wai @@ -45,4 +49,55 @@ message Wai{ message BuildingMode{ pb.common.PbUser user = 1; string mode = 2; +} + +// 切换精英单位 push -> game.change.elite +message ChangeElite { + int32 code = 1; + + pb.common.PbUser user = 2; + int64 eliteId = 3; // ID +} + +// 切换称号 push -> game.change.title +message ChangeTitle { + int32 code = 1; + + pb.common.PbUser user = 2; + int64 titleId = 3; // ID + string name = 4; // 名称 +} + +// BuyBattleFood 购买粮草 push -> game.buy.food +message BuyBattleFood { + int64 userId = 1; // 用户ID + int64 cost = 2; // 花费 + int64 food = 3; // 购买到的粮草量 +} + +// 精英单位 zw1 2 +message EliteItem { + int64 id = 1; // ID 1000(普通x) 1001(弓骑兵) 1002(牧师) + int32 sort = 2; // 排序号 + int32 remain = 3; // 剩余时长(单位:天)-1无限制 +} + +// QueryIntegralMsg 用户查询信息通知 push -> user.query +message UserQueryMsg { + // RankItem 排行数据结构 + message RankItem { + int32 rankType = 1; // 排行榜类型 (与pbGameZhg.RankType一致) + int64 score = 2; // 具体分数 + int32 rank = 3; // 具体排名,不上榜为0 + } + + pb.common.PbUser user = 1; // 用户信息 + repeated RankItem rank = 2; // 排行数据(多个榜) + int64 coin = 3; // 弹币 + + repeated pb.common.TitleItem titles = 10; // 称号ID列表,具体称号配置 给接口取 + repeated EliteItem elites = 11; // 拥有的精英单位列表 + + pb.common.TitleItem currentTitle = 12; // 当前佩戴的称号 + EliteItem currentElite = 13; // 当前使用的精英单位 } \ No newline at end of file diff --git a/game/pb/game/zhg/genCSharp.bat b/game/pb/game/zhg/genCSharp.bat deleted file mode 100644 index 61ff858..0000000 --- a/game/pb/game/zhg/genCSharp.bat +++ /dev/null @@ -1 +0,0 @@ -protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto \ No newline at end of file diff --git a/game/pb/game/zhg/rank.pb.go b/game/pb/game/zhg/rank.pb.go index 03b3e5e..2edb555 100644 --- a/game/pb/game/zhg/rank.pb.go +++ b/game/pb/game/zhg/rank.pb.go @@ -7,6 +7,7 @@ package pbGameZhg import ( + vars "dcg/game/pb/vars" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -20,93 +21,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type RankType int32 - -const ( - RankType_Unknown RankType = 0 - RankType_Damage RankType = 1 // 伤害榜 - RankType_DeDamage RankType = 2 // 受伤榜 - RankType_General RankType = 3 // 名将榜 - RankType_DeGeneral RankType = 4 // 落马榜 - RankType_KillUnit RankType = 5 // 小兵击杀 - RankType_DeKillUnit RankType = 6 // 小兵被杀 - RankType_KillPlayer RankType = 7 // 击杀玩家 - RankType_DeKillPlayer RankType = 8 // 被杀榜 - RankType_Win RankType = 9 // 获胜榜 - RankType_Lost RankType = 10 // 战败榜 - RankType_FirstBlood RankType = 11 // 一血榜 - RankType_DeFirstBlood RankType = 12 // 被拿一血榜 -) - -// Enum value maps for RankType. -var ( - RankType_name = map[int32]string{ - 0: "Unknown", - 1: "Damage", - 2: "DeDamage", - 3: "General", - 4: "DeGeneral", - 5: "KillUnit", - 6: "DeKillUnit", - 7: "KillPlayer", - 8: "DeKillPlayer", - 9: "Win", - 10: "Lost", - 11: "FirstBlood", - 12: "DeFirstBlood", - } - RankType_value = map[string]int32{ - "Unknown": 0, - "Damage": 1, - "DeDamage": 2, - "General": 3, - "DeGeneral": 4, - "KillUnit": 5, - "DeKillUnit": 6, - "KillPlayer": 7, - "DeKillPlayer": 8, - "Win": 9, - "Lost": 10, - "FirstBlood": 11, - "DeFirstBlood": 12, - } -) - -func (x RankType) Enum() *RankType { - p := new(RankType) - *p = x - return p -} - -func (x RankType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RankType) Descriptor() protoreflect.EnumDescriptor { - return file_game_zhg_rank_proto_enumTypes[0].Descriptor() -} - -func (RankType) Type() protoreflect.EnumType { - return &file_game_zhg_rank_proto_enumTypes[0] -} - -func (x RankType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RankType.Descriptor instead. -func (RankType) EnumDescriptor() ([]byte, []int) { - return file_game_zhg_rank_proto_rawDescGZIP(), []int{0} -} - // RankPvpReq 获取排行榜 request > rank.pvp type RankPvpReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // rank类型 - TopN int32 `protobuf:"varint,2,opt,name=topN,proto3" json:"topN,omitempty"` // TopN + Type vars.RankType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.vars.RankType" json:"type,omitempty"` // rank类型 + TopN int32 `protobuf:"varint,2,opt,name=topN,proto3" json:"topN,omitempty"` // TopN } func (x *RankPvpReq) Reset() { @@ -141,11 +63,11 @@ func (*RankPvpReq) Descriptor() ([]byte, []int) { return file_game_zhg_rank_proto_rawDescGZIP(), []int{0} } -func (x *RankPvpReq) GetType() int32 { +func (x *RankPvpReq) GetType() vars.RankType { if x != nil { return x.Type } - return 0 + return vars.RankType(0) } func (x *RankPvpReq) GetTopN() int32 { @@ -161,8 +83,8 @@ type RankPvpResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // rank类型 - Items []*RankPvpResp_Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // rank数据 + Type vars.RankType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.vars.RankType" json:"type,omitempty"` // rank类型 + Items []*RankPvpResp_Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // rank数据 } func (x *RankPvpResp) Reset() { @@ -197,11 +119,11 @@ func (*RankPvpResp) Descriptor() ([]byte, []int) { return file_game_zhg_rank_proto_rawDescGZIP(), []int{1} } -func (x *RankPvpResp) GetType() int32 { +func (x *RankPvpResp) GetType() vars.RankType { if x != nil { return x.Type } - return 0 + return vars.RankType(0) } func (x *RankPvpResp) GetItems() []*RankPvpResp_Item { @@ -408,8 +330,8 @@ type RankRvpSubmitResult_Item struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // 榜单类型 - Rewards []*RankRvpSubmitResult_Reward `protobuf:"bytes,2,rep,name=rewards,proto3" json:"rewards,omitempty"` // 奖励项 + Type vars.RankType `protobuf:"varint,1,opt,name=type,proto3,enum=pb.vars.RankType" json:"type,omitempty"` // 榜单类型 + Rewards []*RankRvpSubmitResult_Reward `protobuf:"bytes,2,rep,name=rewards,proto3" json:"rewards,omitempty"` // 奖励项 } func (x *RankRvpSubmitResult_Item) Reset() { @@ -444,11 +366,11 @@ func (*RankRvpSubmitResult_Item) Descriptor() ([]byte, []int) { return file_game_zhg_rank_proto_rawDescGZIP(), []int{2, 1} } -func (x *RankRvpSubmitResult_Item) GetType() int32 { +func (x *RankRvpSubmitResult_Item) GetType() vars.RankType { if x != nil { return x.Type } - return 0 + return vars.RankType(0) } func (x *RankRvpSubmitResult_Item) GetRewards() []*RankRvpSubmitResult_Reward { @@ -463,54 +385,46 @@ var File_game_zhg_rank_proto protoreflect.FileDescriptor var file_game_zhg_rank_proto_rawDesc = []byte{ 0x0a, 0x13, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x2f, 0x72, 0x61, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, - 0x68, 0x67, 0x22, 0x34, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x22, 0xb4, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x6e, - 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x62, - 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, - 0x95, 0x02, 0x0a, 0x13, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, - 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x62, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 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, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, - 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x1a, 0x5d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, - 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, - 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2a, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, - 0x08, 0x44, 0x65, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, - 0x6e, 0x69, 0x74, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, - 0x6e, 0x69, 0x74, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x10, 0x08, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, - 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, - 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, - 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0c, 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, + 0x68, 0x67, 0x1a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, + 0x71, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x4e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x22, 0xc7, 0x01, 0x0a, + 0x0b, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, + 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, + 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, + 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0xa8, 0x02, 0x0a, 0x13, 0x52, 0x61, 0x6e, 0x6b, 0x52, + 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, + 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x62, 0x0a, 0x06, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 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, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x1a, + 0x70, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, + 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x41, + 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, 0x68, 0x67, 0x2e, 0x52, 0x61, + 0x6e, 0x6b, 0x52, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 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 ( @@ -525,26 +439,28 @@ func file_game_zhg_rank_proto_rawDescGZIP() []byte { return file_game_zhg_rank_proto_rawDescData } -var file_game_zhg_rank_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_game_zhg_rank_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_game_zhg_rank_proto_goTypes = []interface{}{ - (RankType)(0), // 0: pb.game.zhg.RankType - (*RankPvpReq)(nil), // 1: pb.game.zhg.RankPvpReq - (*RankPvpResp)(nil), // 2: pb.game.zhg.RankPvpResp - (*RankRvpSubmitResult)(nil), // 3: pb.game.zhg.RankRvpSubmitResult - (*RankPvpResp_Item)(nil), // 4: pb.game.zhg.RankPvpResp.Item - (*RankRvpSubmitResult_Reward)(nil), // 5: pb.game.zhg.RankRvpSubmitResult.Reward - (*RankRvpSubmitResult_Item)(nil), // 6: pb.game.zhg.RankRvpSubmitResult.Item + (*RankPvpReq)(nil), // 0: pb.game.zhg.RankPvpReq + (*RankPvpResp)(nil), // 1: pb.game.zhg.RankPvpResp + (*RankRvpSubmitResult)(nil), // 2: pb.game.zhg.RankRvpSubmitResult + (*RankPvpResp_Item)(nil), // 3: pb.game.zhg.RankPvpResp.Item + (*RankRvpSubmitResult_Reward)(nil), // 4: pb.game.zhg.RankRvpSubmitResult.Reward + (*RankRvpSubmitResult_Item)(nil), // 5: pb.game.zhg.RankRvpSubmitResult.Item + (vars.RankType)(0), // 6: pb.vars.RankType } var file_game_zhg_rank_proto_depIdxs = []int32{ - 4, // 0: pb.game.zhg.RankPvpResp.items:type_name -> pb.game.zhg.RankPvpResp.Item - 6, // 1: pb.game.zhg.RankRvpSubmitResult.items:type_name -> pb.game.zhg.RankRvpSubmitResult.Item - 5, // 2: pb.game.zhg.RankRvpSubmitResult.Item.rewards:type_name -> pb.game.zhg.RankRvpSubmitResult.Reward - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 6, // 0: pb.game.zhg.RankPvpReq.type:type_name -> pb.vars.RankType + 6, // 1: pb.game.zhg.RankPvpResp.type:type_name -> pb.vars.RankType + 3, // 2: pb.game.zhg.RankPvpResp.items:type_name -> pb.game.zhg.RankPvpResp.Item + 5, // 3: pb.game.zhg.RankRvpSubmitResult.items:type_name -> pb.game.zhg.RankRvpSubmitResult.Item + 6, // 4: pb.game.zhg.RankRvpSubmitResult.Item.type:type_name -> pb.vars.RankType + 4, // 5: pb.game.zhg.RankRvpSubmitResult.Item.rewards:type_name -> pb.game.zhg.RankRvpSubmitResult.Reward + 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 } func init() { file_game_zhg_rank_proto_init() } @@ -631,14 +547,13 @@ func file_game_zhg_rank_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_zhg_rank_proto_rawDesc, - NumEnums: 1, + NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 0, }, GoTypes: file_game_zhg_rank_proto_goTypes, DependencyIndexes: file_game_zhg_rank_proto_depIdxs, - EnumInfos: file_game_zhg_rank_proto_enumTypes, MessageInfos: file_game_zhg_rank_proto_msgTypes, }.Build() File_game_zhg_rank_proto = out.File diff --git a/game/pb/game/zhg/rank.proto b/game/pb/game/zhg/rank.proto index 385b3e1..d9e241e 100644 --- a/game/pb/game/zhg/rank.proto +++ b/game/pb/game/zhg/rank.proto @@ -2,27 +2,13 @@ syntax = "proto3"; package pb.game.zhg; -option go_package = "dcg/game/pb/game/zhg;pbGameZhg"; +import "vars/vars.proto"; -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; // 被拿一血榜 -} +option go_package = "dcg/game/pb/game/zhg;pbGameZhg"; // RankPvpReq 获取排行榜 request > rank.pvp message RankPvpReq { - int32 type = 1; // rank类型 + pb.vars.RankType type = 1; // rank类型 int32 topN = 2; // TopN } @@ -34,7 +20,7 @@ message RankPvpResp { int64 score = 3; string avatar = 4; } - int32 type = 1; // rank类型 + pb.vars.RankType type = 1; // rank类型 repeated Item items = 2; // rank数据 } @@ -49,7 +35,7 @@ message RankRvpSubmitResult { } // Item 奖励项 message Item { - int32 type = 1; // 榜单类型 + pb.vars.RankType type = 1; // 榜单类型 repeated Reward rewards = 2; // 奖励项 } repeated Item items = 1; diff --git a/game/pb/game/zhg/stat.pb.go b/game/pb/game/zhg/stat.pb.go index 6c8c071..cbe037a 100644 --- a/game/pb/game/zhg/stat.pb.go +++ b/game/pb/game/zhg/stat.pb.go @@ -20,133 +20,14 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// 通知-PvP杀兵营(人) statistics.pvp.kill -type StatPvPKill struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - TargetUid int64 `protobuf:"varint,2,opt,name=targetUid,proto3" json:"targetUid,omitempty"` // 目标用户 - IsGeneral bool `protobuf:"varint,3,opt,name=isGeneral,proto3" json:"isGeneral,omitempty"` // targetUid是否名将 -} - -func (x *StatPvPKill) Reset() { - *x = StatPvPKill{} - if protoimpl.UnsafeEnabled { - mi := &file_game_zhg_stat_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatPvPKill) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatPvPKill) ProtoMessage() {} - -func (x *StatPvPKill) ProtoReflect() protoreflect.Message { - mi := &file_game_zhg_stat_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 StatPvPKill.ProtoReflect.Descriptor instead. -func (*StatPvPKill) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{0} -} - -func (x *StatPvPKill) GetUid() int64 { - if x != nil { - return x.Uid - } - return 0 -} - -func (x *StatPvPKill) GetTargetUid() int64 { - if x != nil { - return x.TargetUid - } - return 0 -} - -func (x *StatPvPKill) GetIsGeneral() bool { - if x != nil { - return x.IsGeneral - } - return false -} - -// 通知-PvP一血 statistics.pvp.first -type StatPvPFirstBlood struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` // 1-拿到一血 2-被破一血 -} - -func (x *StatPvPFirstBlood) Reset() { - *x = StatPvPFirstBlood{} - if protoimpl.UnsafeEnabled { - mi := &file_game_zhg_stat_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StatPvPFirstBlood) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatPvPFirstBlood) ProtoMessage() {} - -func (x *StatPvPFirstBlood) ProtoReflect() protoreflect.Message { - mi := &file_game_zhg_stat_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 StatPvPFirstBlood.ProtoReflect.Descriptor instead. -func (*StatPvPFirstBlood) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{1} -} - -func (x *StatPvPFirstBlood) GetUid() int64 { - if x != nil { - return x.Uid - } - return 0 -} - -func (x *StatPvPFirstBlood) GetType() int32 { - if x != nil { - return x.Type - } - return 0 -} - -// 通知-PvP战报 statistics.pvp.report +// PvP战报 request -> statistics.pvp.report type StatPvPReportReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID WinItems []*StatPvPReportReq_Item `protobuf:"bytes,10,rep,name=winItems,proto3" json:"winItems,omitempty"` // 获胜方数据 LostItems []*StatPvPReportReq_Item `protobuf:"bytes,11,rep,name=lostItems,proto3" json:"lostItems,omitempty"` // 战败方数据 } @@ -154,7 +35,7 @@ type StatPvPReportReq struct { func (x *StatPvPReportReq) Reset() { *x = StatPvPReportReq{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhg_stat_proto_msgTypes[2] + mi := &file_game_zhg_stat_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -167,7 +48,7 @@ func (x *StatPvPReportReq) String() string { func (*StatPvPReportReq) ProtoMessage() {} func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { - mi := &file_game_zhg_stat_proto_msgTypes[2] + mi := &file_game_zhg_stat_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -180,7 +61,7 @@ func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportReq.ProtoReflect.Descriptor instead. func (*StatPvPReportReq) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{2} + return file_game_zhg_stat_proto_rawDescGZIP(), []int{0} } func (x *StatPvPReportReq) GetWinCamp() int32 { @@ -190,6 +71,13 @@ func (x *StatPvPReportReq) GetWinCamp() int32 { return 0 } +func (x *StatPvPReportReq) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 +} + func (x *StatPvPReportReq) GetWinItems() []*StatPvPReportReq_Item { if x != nil { return x.WinItems @@ -204,20 +92,22 @@ func (x *StatPvPReportReq) GetLostItems() []*StatPvPReportReq_Item { return nil } -// 通知-PvP战报 回复 +// PvP战报 回复 response -> statistics.pvp.report type StatPvPReportResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - 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"` // 战败方数据 + WinCamp int32 `protobuf:"varint,1,opt,name=winCamp,proto3" json:"winCamp,omitempty"` // 获胜阵营 1-蓝 2-红 + BattleId int64 `protobuf:"varint,2,opt,name=battleId,proto3" json:"battleId,omitempty"` // 战斗ID + WinItems []*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"` // 战败方数据 } func (x *StatPvPReportResp) Reset() { *x = StatPvPReportResp{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhg_stat_proto_msgTypes[3] + mi := &file_game_zhg_stat_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -230,7 +120,7 @@ func (x *StatPvPReportResp) String() string { func (*StatPvPReportResp) ProtoMessage() {} func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { - mi := &file_game_zhg_stat_proto_msgTypes[3] + mi := &file_game_zhg_stat_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -243,7 +133,21 @@ func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportResp.ProtoReflect.Descriptor instead. func (*StatPvPReportResp) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{3} + return file_game_zhg_stat_proto_rawDescGZIP(), []int{1} +} + +func (x *StatPvPReportResp) GetWinCamp() int32 { + if x != nil { + return x.WinCamp + } + return 0 +} + +func (x *StatPvPReportResp) GetBattleId() int64 { + if x != nil { + return x.BattleId + } + return 0 } func (x *StatPvPReportResp) GetWinItems() []*StatPvPReportResp_Item { @@ -265,19 +169,23 @@ type StatPvPReportReq_Item struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) - Damage int64 `protobuf:"varint,4,opt,name=damage,proto3" json:"damage,omitempty"` // 伤害量 - DeDamage int64 `protobuf:"varint,5,opt,name=deDamage,proto3" json:"deDamage,omitempty"` // 承受伤害 - KillUnit int64 `protobuf:"varint,6,opt,name=killUnit,proto3" json:"killUnit,omitempty"` // 击杀单位数量 - DeKillUnit int64 `protobuf:"varint,7,opt,name=deKillUnit,proto3" json:"deKillUnit,omitempty"` // 被杀单位数量 + 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"` // 被杀单位数量 + FirstBlood bool `protobuf:"varint,7,opt,name=firstBlood,proto3" json:"firstBlood,omitempty"` // 拿到一血 + DeFirstBlood bool `protobuf:"varint,8,opt,name=deFirstBlood,proto3" json:"deFirstBlood,omitempty"` // 被拿一血 + KillPlayer int64 `protobuf:"varint,9,opt,name=killPlayer,proto3" json:"killPlayer,omitempty"` // 击杀玩家数 + DeKillPlayer bool `protobuf:"varint,10,opt,name=deKillPlayer,proto3" json:"deKillPlayer,omitempty"` // 是否被击杀 + IsGeneral bool `protobuf:"varint,11,opt,name=isGeneral,proto3" json:"isGeneral,omitempty"` // 是否上一把名将? } func (x *StatPvPReportReq_Item) Reset() { *x = StatPvPReportReq_Item{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhg_stat_proto_msgTypes[4] + mi := &file_game_zhg_stat_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -290,7 +198,7 @@ func (x *StatPvPReportReq_Item) String() string { func (*StatPvPReportReq_Item) ProtoMessage() {} func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { - mi := &file_game_zhg_stat_proto_msgTypes[4] + mi := &file_game_zhg_stat_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -303,7 +211,7 @@ func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportReq_Item.ProtoReflect.Descriptor instead. func (*StatPvPReportReq_Item) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{2, 0} + return file_game_zhg_stat_proto_rawDescGZIP(), []int{0, 0} } func (x *StatPvPReportReq_Item) GetUid() int64 { @@ -320,13 +228,6 @@ 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 @@ -355,26 +256,56 @@ func (x *StatPvPReportReq_Item) GetDeKillUnit() int64 { return 0 } +func (x *StatPvPReportReq_Item) GetFirstBlood() bool { + if x != nil { + return x.FirstBlood + } + return false +} + +func (x *StatPvPReportReq_Item) GetDeFirstBlood() bool { + if x != nil { + return x.DeFirstBlood + } + return false +} + +func (x *StatPvPReportReq_Item) GetKillPlayer() int64 { + if x != nil { + return x.KillPlayer + } + return 0 +} + +func (x *StatPvPReportReq_Item) GetDeKillPlayer() bool { + if x != nil { + return x.DeKillPlayer + } + return false +} + +func (x *StatPvPReportReq_Item) GetIsGeneral() bool { + if x != nil { + return x.IsGeneral + } + return false +} + type StatPvPReportResp_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // 用户ID - Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` // 用户名 - Position int32 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"` // 名次(特指在某一方的名次) - ReturnsIntegral int64 `protobuf:"varint,4,opt,name=returnsIntegral,proto3" json:"returnsIntegral,omitempty"` // 回收的积分(获胜方才能回收,0不要展示) - RewardPoolIntegral int64 `protobuf:"varint,5,opt,name=rewardPoolIntegral,proto3" json:"rewardPoolIntegral,omitempty"` // 瓜分奖池分 - GeneralIntegral int64 `protobuf:"varint,6,opt,name=generalIntegral,proto3" json:"generalIntegral,omitempty"` // 名将 - NobilityIntegral int64 `protobuf:"varint,7,opt,name=nobilityIntegral,proto3" json:"nobilityIntegral,omitempty"` // 舰长|总督|贵族 加成分 - BattleIntegral int64 `protobuf:"varint,8,opt,name=battleIntegral,proto3" json:"battleIntegral,omitempty"` // 战斗结算奖励(普通) - TotalIntegral int64 `protobuf:"varint,10,opt,name=totalIntegral,proto3" json:"totalIntegral,omitempty"` // 总计加分 + 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"` // 名次(特指在某一方的名次) + Score float32 `protobuf:"fixed32,4,opt,name=score,proto3" json:"score,omitempty"` // 评分(一位小数) } func (x *StatPvPReportResp_Item) Reset() { *x = StatPvPReportResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhg_stat_proto_msgTypes[5] + mi := &file_game_zhg_stat_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -387,7 +318,7 @@ func (x *StatPvPReportResp_Item) String() string { func (*StatPvPReportResp_Item) ProtoMessage() {} func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_game_zhg_stat_proto_msgTypes[5] + mi := &file_game_zhg_stat_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -400,7 +331,7 @@ func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportResp_Item.ProtoReflect.Descriptor instead. func (*StatPvPReportResp_Item) Descriptor() ([]byte, []int) { - return file_game_zhg_stat_proto_rawDescGZIP(), []int{3, 0} + return file_game_zhg_stat_proto_rawDescGZIP(), []int{1, 0} } func (x *StatPvPReportResp_Item) GetUid() int64 { @@ -424,44 +355,9 @@ func (x *StatPvPReportResp_Item) GetPosition() int32 { return 0 } -func (x *StatPvPReportResp_Item) GetReturnsIntegral() int64 { +func (x *StatPvPReportResp_Item) GetScore() float32 { if x != nil { - return x.ReturnsIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetRewardPoolIntegral() int64 { - if x != nil { - return x.RewardPoolIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetGeneralIntegral() int64 { - if x != nil { - return x.GeneralIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetNobilityIntegral() int64 { - if x != nil { - return x.NobilityIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetBattleIntegral() int64 { - if x != nil { - return x.BattleIntegral - } - return 0 -} - -func (x *StatPvPReportResp_Item) GetTotalIntegral() int64 { - if x != nil { - return x.TotalIntegral + return x.Score } return 0 } @@ -471,72 +367,62 @@ var File_game_zhg_stat_proto protoreflect.FileDescriptor var file_game_zhg_stat_proto_rawDesc = []byte{ 0x0a, 0x13, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x70, 0x62, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x2e, 0x7a, - 0x68, 0x67, 0x22, 0x5b, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x4b, 0x69, 0x6c, - 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x55, 0x69, - 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x22, - 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, 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, 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, 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, + 0x68, 0x67, 0x22, 0x91, 0x04, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, + 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, + 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 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, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, + 0xc4, 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, 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, + 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, + 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x46, 0x69, 0x72, 0x73, 0x74, 0x42, + 0x6c, 0x6f, 0x6f, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x4b, 0x69, + 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x22, 0xaf, 0x02, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x74, 0x50, + 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, + 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, + 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x49, 0x64, 0x12, 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, 0x60, 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, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 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 ( @@ -551,20 +437,18 @@ 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, 6) +var file_game_zhg_stat_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 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 - (*StatPvPReportResp_Item)(nil), // 5: pb.game.zhg.StatPvPReportResp.Item + (*StatPvPReportReq)(nil), // 0: pb.game.zhg.StatPvPReportReq + (*StatPvPReportResp)(nil), // 1: pb.game.zhg.StatPvPReportResp + (*StatPvPReportReq_Item)(nil), // 2: pb.game.zhg.StatPvPReportReq.Item + (*StatPvPReportResp_Item)(nil), // 3: pb.game.zhg.StatPvPReportResp.Item } var file_game_zhg_stat_proto_depIdxs = []int32{ - 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 + 2, // 0: pb.game.zhg.StatPvPReportReq.winItems:type_name -> pb.game.zhg.StatPvPReportReq.Item + 2, // 1: pb.game.zhg.StatPvPReportReq.lostItems:type_name -> pb.game.zhg.StatPvPReportReq.Item + 3, // 2: pb.game.zhg.StatPvPReportResp.winItems:type_name -> pb.game.zhg.StatPvPReportResp.Item + 3, // 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 @@ -579,30 +463,6 @@ func file_game_zhg_stat_proto_init() { } if !protoimpl.UnsafeEnabled { file_game_zhg_stat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPKill); 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[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPFirstBlood); 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[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatPvPReportReq); i { case 0: return &v.state @@ -614,7 +474,7 @@ func file_game_zhg_stat_proto_init() { return nil } } - file_game_zhg_stat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_game_zhg_stat_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatPvPReportResp); i { case 0: return &v.state @@ -626,7 +486,7 @@ func file_game_zhg_stat_proto_init() { return nil } } - file_game_zhg_stat_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_game_zhg_stat_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatPvPReportReq_Item); i { case 0: return &v.state @@ -638,7 +498,7 @@ func file_game_zhg_stat_proto_init() { return nil } } - file_game_zhg_stat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_game_zhg_stat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatPvPReportResp_Item); i { case 0: return &v.state @@ -657,7 +517,7 @@ func file_game_zhg_stat_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_zhg_stat_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/game/zhg/stat.proto b/game/pb/game/zhg/stat.proto index cca2094..4d98742 100644 --- a/game/pb/game/zhg/stat.proto +++ b/game/pb/game/zhg/stat.proto @@ -4,48 +4,37 @@ package pb.game.zhg; option go_package = "dcg/game/pb/game/zhg;pbGameZhg"; -// 通知-PvP杀兵营(人) statistics.pvp.kill -message StatPvPKill { - int64 uid = 1; // 用户ID - int64 targetUid = 2; // 目标用户 - bool isGeneral = 3; // targetUid是否名将 -} - -// 通知-PvP一血 statistics.pvp.first -message StatPvPFirstBlood { - int64 uid = 1; // 用户ID - int32 type = 2; // 1-拿到一血 2-被破一血 -} - -// 通知-PvP战报 statistics.pvp.report +// PvP战报 request -> statistics.pvp.report message StatPvPReportReq { message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 - int32 position = 3; // 名次(特指在某一方的名次) - int64 damage = 4; // 伤害量 - int64 deDamage = 5; // 承受伤害 - int64 killUnit = 6; // 击杀单位数量 - int64 deKillUnit = 7; // 被杀单位数量 + int64 damage = 3; // 伤害量 + int64 deDamage = 4; // 承受伤害 + int64 killUnit = 5; // 击杀单位数量 + int64 deKillUnit = 6; // 被杀单位数量 + bool firstBlood = 7; // 拿到一血 + bool deFirstBlood = 8; // 被拿一血 + int64 killPlayer = 9; // 击杀玩家数 + bool deKillPlayer = 10; // 是否被击杀 + bool isGeneral = 11; // 是否上一把名将? } int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 + int64 battleId = 2; // 战斗ID repeated Item winItems = 10; // 获胜方数据 repeated Item lostItems = 11; // 战败方数据 } -// 通知-PvP战报 回复 +// PvP战报 回复 response -> statistics.pvp.report message StatPvPReportResp { message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 int32 position = 3; // 名次(特指在某一方的名次) - int64 returnsIntegral = 4; // 回收的积分(获胜方才能回收,0不要展示) - int64 rewardPoolIntegral = 5; // 瓜分奖池分 - int64 generalIntegral = 6; // 名将 - int64 nobilityIntegral = 7; // 舰长|总督|贵族 加成分 - int64 battleIntegral = 8; // 战斗结算奖励(普通) - int64 totalIntegral = 10; // 总计加分 + float score = 4; // 评分(一位小数) } - repeated Item winItems = 1; // 获胜方数据 - repeated Item lostItems = 2; // 战败方数据 + int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 + int64 battleId = 2; // 战斗ID + repeated Item winItems = 10; // 获胜方数据 + repeated Item lostItems = 11; // 战败方数据 } \ No newline at end of file diff --git a/game/pb/game/zhghz/Command.cs b/game/pb/game/zhghz/Command.cs index 848c19a..2a8c66a 100644 --- a/game/pb/game/zhghz/Command.cs +++ b/game/pb/game/zhghz/Command.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: command.proto +// source: game/zhghz/command.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Game.Zhghz { - /// Holder for reflection information generated from command.proto + /// Holder for reflection information generated from game/zhghz/command.proto public static partial class CommandReflection { #region Descriptor - /// File descriptor for command.proto + /// File descriptor for game/zhghz/command.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,16 +24,16 @@ namespace Pb.Game.Zhghz { static CommandReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cg1jb21tYW5kLnByb3RvEg1wYi5nYW1lLnpoZ2h6GhNjb21tb24vY29tbW9u", - "LnByb3RvIjkKCEpvaW5HYW1lEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24u", - "UGJVc2VyEgwKBHRlYW0YAiABKAUiOgoETW92ZRIfCgR1c2VyGAEgASgLMhEu", - "cGIuY29tbW9uLlBiVXNlchIRCglkaXJlY3Rpb24YAiABKAUiPAoJR2lmdFNo", - "b290Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmFtb3Vu", - "dBgCIAEoBSIoCgVTaG9vdBIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBi", - "VXNlciI/CgxDaGFyZ2VTaGllbGQSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1v", - "bi5QYlVzZXISDgoGcG9pbnRzGAIgASgFIigKBVdoZXJlEh8KBHVzZXIYASAB", - "KAsyES5wYi5jb21tb24uUGJVc2VyQiRaImRjZy9nYW1lL3BiL2dhbWUvemhn", - "aHo7cGJHYW1lWmhnaHpiBnByb3RvMw==")); + "ChhnYW1lL3poZ2h6L2NvbW1hbmQucHJvdG8SDXBiLmdhbWUuemhnaHoaE2Nv", + "bW1vbi9jb21tb24ucHJvdG8iOQoISm9pbkdhbWUSHwoEdXNlchgBIAEoCzIR", + "LnBiLmNvbW1vbi5QYlVzZXISDAoEdGVhbRgCIAEoBSI6CgRNb3ZlEh8KBHVz", + "ZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEhEKCWRpcmVjdGlvbhgCIAEo", + "BSI8CglHaWZ0U2hvb3QSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVz", + "ZXISDgoGYW1vdW50GAIgASgFIigKBVNob290Eh8KBHVzZXIYASABKAsyES5w", + "Yi5jb21tb24uUGJVc2VyIj8KDENoYXJnZVNoaWVsZBIfCgR1c2VyGAEgASgL", + "MhEucGIuY29tbW9uLlBiVXNlchIOCgZwb2ludHMYAiABKAUiKAoFV2hlcmUS", + "HwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXJCJFoiZGNnL2dhbWUv", + "cGIvZ2FtZS96aGdoejtwYkdhbWVaaGdoemIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Pb.Common.CommonReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { diff --git a/game/pb/game/zhghz/Rank.cs b/game/pb/game/zhghz/Rank.cs index 85a6d0b..e653255 100644 --- a/game/pb/game/zhghz/Rank.cs +++ b/game/pb/game/zhghz/Rank.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: rank.proto +// source: game/zhghz/rank.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Game.Zhghz { - /// Holder for reflection information generated from rank.proto + /// Holder for reflection information generated from game/zhghz/rank.proto public static partial class RankReflection { #region Descriptor - /// File descriptor for rank.proto + /// File descriptor for game/zhghz/rank.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,13 +24,14 @@ namespace Pb.Game.Zhghz { static RankReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "CgpyYW5rLnByb3RvEg1wYi5nYW1lLnpoZ2h6IigKClJhbmtQdnBSZXESDAoE", - "dHlwZRgBIAEoBRIMCgR0b3BOGAIgASgFIo4BCgtSYW5rUHZwUmVzcBIMCgR0", - "eXBlGAEgASgFEi4KBWl0ZW1zGAIgAygLMh8ucGIuZ2FtZS56aGdoei5SYW5r", - "UHZwUmVzcC5JdGVtGkEKBEl0ZW0SCwoDdWlkGAEgASgDEg0KBXVuYW1lGAIg", - "ASgJEg0KBXNjb3JlGAMgASgDEg4KBmF2YXRhchgEIAEoCSosCghSYW5rVHlw", - "ZRILCgdVbmtub3duEAASBwoDV2luEAESCgoGRGFtYWdlEAJCJFoiZGNnL2dh", - "bWUvcGIvZ2FtZS96aGdoejtwYkdhbWVaaGdoemIGcHJvdG8z")); + "ChVnYW1lL3poZ2h6L3JhbmsucHJvdG8SDXBiLmdhbWUuemhnaHoiKAoKUmFu", + "a1B2cFJlcRIMCgR0eXBlGAEgASgFEgwKBHRvcE4YAiABKAUijgEKC1JhbmtQ", + "dnBSZXNwEgwKBHR5cGUYASABKAUSLgoFaXRlbXMYAiADKAsyHy5wYi5nYW1l", + "LnpoZ2h6LlJhbmtQdnBSZXNwLkl0ZW0aQQoESXRlbRILCgN1aWQYASABKAMS", + "DQoFdW5hbWUYAiABKAkSDQoFc2NvcmUYAyABKAMSDgoGYXZhdGFyGAQgASgJ", + "KiwKCFJhbmtUeXBlEgsKB1Vua25vd24QABIHCgNXaW4QARIKCgZEYW1hZ2UQ", + "AkIkWiJkY2cvZ2FtZS9wYi9nYW1lL3poZ2h6O3BiR2FtZVpoZ2h6YgZwcm90", + "bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Game.Zhghz.RankType), }, null, new pbr::GeneratedClrTypeInfo[] { diff --git a/game/pb/game/zhghz/genCSharp.bat b/game/pb/game/zhghz/genCSharp.bat deleted file mode 100644 index 61ff858..0000000 --- a/game/pb/game/zhghz/genCSharp.bat +++ /dev/null @@ -1 +0,0 @@ -protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto \ No newline at end of file diff --git a/game/pb/game/zhgzd/Command.cs b/game/pb/game/zhgzd/Command.cs index 9c31ad9..7d38277 100644 --- a/game/pb/game/zhgzd/Command.cs +++ b/game/pb/game/zhgzd/Command.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: command.proto +// source: game/zhgzd/command.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Game.Zhgzd { - /// Holder for reflection information generated from command.proto + /// Holder for reflection information generated from game/zhgzd/command.proto public static partial class CommandReflection { #region Descriptor - /// File descriptor for command.proto + /// File descriptor for game/zhgzd/command.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,22 +24,25 @@ namespace Pb.Game.Zhgzd { static CommandReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cg1jb21tYW5kLnByb3RvEg1wYi5nYW1lLnpoZ3pkGhNjb21tb24vY29tbW9u", - "LnByb3RvIisKCEpvaW5HYW1lEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24u", - "UGJVc2VyIloKDERpc3BhdGNoVW5pdBIfCgR1c2VyGAEgASgLMhEucGIuY29t", - "bW9uLlBiVXNlchIOCgZjb3N0U3AYAiABKAUSCgoCaWQYAyABKAkSDQoFY291", - "bnQYBCABKAUiSQoKQ2hhbmdlVW5pdBIfCgR1c2VyGAEgASgLMhEucGIuY29t", - "bW9uLlBiVXNlchIOCgZjb3N0U3AYAiABKAUSCgoCaWQYAyABKAkiOwoIT3V0", - "YnJlYWsSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXISDgoGY29z", - "dFNwGAIgASgFIk0KCFBvc2l0aW9uEh8KBHVzZXIYASABKAsyES5wYi5jb21t", - "b24uUGJVc2VyEg4KBmNvc3RTcBgCIAEoBRIQCghwb3NpdGlvbhgDIAEoCSIo", - "CgVXaGVyZRIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlciJLCgpQ", - "bGF5ZXJNb2RlEh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEg4K", - "BmNvc3RTcBgCIAEoBRIMCgRtb2RlGAMgASgJIm8KDlN0cmF0ZWdpY1BvaW50", - "Eh8KBHVzZXIYASABKAsyES5wYi5jb21tb24uUGJVc2VyEhAKCGFkZExpbWl0", - "GAIgASgFEhAKCGFkZFNwZWVkGAMgASgFEhgKEGFkZFNwZWVkRHVyYXRpb24Y", - "BCABKAUiOwoMU3VwcG9ydFNraWxsEh8KBHVzZXIYASABKAsyES5wYi5jb21t", - "b24uUGJVc2VyEgoKAmlkGAIgASgJQiRaImRjZy9nYW1lL3BiL2dhbWUvemhn", + "ChhnYW1lL3poZ3pkL2NvbW1hbmQucHJvdG8SDXBiLmdhbWUuemhnemQaE2Nv", + "bW1vbi9jb21tb24ucHJvdG8iKwoISm9pbkdhbWUSHwoEdXNlchgBIAEoCzIR", + "LnBiLmNvbW1vbi5QYlVzZXIiWgoMRGlzcGF0Y2hVbml0Eh8KBHVzZXIYASAB", + "KAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmNvc3RTcBgCIAEoBRIKCgJpZBgD", + "IAEoCRINCgVjb3VudBgEIAEoBSJJCgpDaGFuZ2VVbml0Eh8KBHVzZXIYASAB", + "KAsyES5wYi5jb21tb24uUGJVc2VyEg4KBmNvc3RTcBgCIAEoBRIKCgJpZBgD", + "IAEoCSI7CghPdXRicmVhaxIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBi", + "VXNlchIOCgZjb3N0U3AYAiABKAUiTQoIUG9zaXRpb24SHwoEdXNlchgBIAEo", + "CzIRLnBiLmNvbW1vbi5QYlVzZXISDgoGY29zdFNwGAIgASgFEhAKCHBvc2l0", + "aW9uGAMgASgJIksKCkNoYW5nZUxpbmUSHwoEdXNlchgBIAEoCzIRLnBiLmNv", + "bW1vbi5QYlVzZXISDgoGY29zdFNwGAIgASgFEgwKBGxpbmUYAyABKAkiKAoF", + "V2hlcmUSHwoEdXNlchgBIAEoCzIRLnBiLmNvbW1vbi5QYlVzZXIiSwoKUGxh", + "eWVyTW9kZRIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlchIOCgZj", + "b3N0U3AYAiABKAUSDAoEbW9kZRgDIAEoCSJvCg5TdHJhdGVnaWNQb2ludBIf", + "CgR1c2VyGAEgASgLMhEucGIuY29tbW9uLlBiVXNlchIQCghhZGRMaW1pdBgC", + "IAEoBRIQCghhZGRTcGVlZBgDIAEoBRIYChBhZGRTcGVlZER1cmF0aW9uGAQg", + "ASgFIjsKDFN1cHBvcnRTa2lsbBIfCgR1c2VyGAEgASgLMhEucGIuY29tbW9u", + "LlBiVXNlchIKCgJpZBgCIAEoCSItCgpTdXBlclNraWxsEh8KBHVzZXIYASAB", + "KAsyES5wYi5jb21tb24uUGJVc2VyQiRaImRjZy9nYW1lL3BiL2dhbWUvemhn", "emQ7cGJHYW1lWmhnemRiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Pb.Common.CommonReflection.Descriptor, }, @@ -49,10 +52,12 @@ namespace Pb.Game.Zhgzd { new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.ChangeUnit), global::Pb.Game.Zhgzd.ChangeUnit.Parser, new[]{ "User", "CostSp", "Id" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.Outbreak), global::Pb.Game.Zhgzd.Outbreak.Parser, new[]{ "User", "CostSp" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.Position), global::Pb.Game.Zhgzd.Position.Parser, new[]{ "User", "CostSp", "Position_" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.ChangeLine), global::Pb.Game.Zhgzd.ChangeLine.Parser, new[]{ "User", "CostSp", "Line" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.Where), global::Pb.Game.Zhgzd.Where.Parser, new[]{ "User" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.PlayerMode), global::Pb.Game.Zhgzd.PlayerMode.Parser, new[]{ "User", "CostSp", "Mode" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.StrategicPoint), global::Pb.Game.Zhgzd.StrategicPoint.Parser, new[]{ "User", "AddLimit", "AddSpeed", "AddSpeedDuration" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.SupportSkill), global::Pb.Game.Zhgzd.SupportSkill.Parser, new[]{ "User", "Id" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.SupportSkill), global::Pb.Game.Zhgzd.SupportSkill.Parser, new[]{ "User", "Id" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Pb.Game.Zhgzd.SuperSkill), global::Pb.Game.Zhgzd.SuperSkill.Parser, new[]{ "User" }, null, null, null, null) })); } #endregion @@ -1104,7 +1109,7 @@ namespace Pb.Game.Zhgzd { } /// - /// 移动自己位置 push -> game.pos -> p1/p2/p3/p4/p5 + /// 移动自己位置 push -> game.pos -> p0/p1/p2/p3/p4/p5 /// public sealed partial class Position : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE @@ -1183,7 +1188,7 @@ namespace Pb.Game.Zhgzd { public const int Position_FieldNumber = 3; private string position_ = ""; /// - /// 1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 + /// 0-主基地,1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -1384,6 +1389,287 @@ namespace Pb.Game.Zhgzd { } + /// + /// 玩家在基地时选择出兵路线 push -> game.line -> m1/m2/m3 + /// + public sealed partial class ChangeLine : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeLine()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeLine() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeLine(ChangeLine other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + costSp_ = other.costSp_; + line_ = other.line_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeLine Clone() { + return new ChangeLine(this); + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 1; + private global::Pb.Common.PbUser user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.PbUser User { + get { return user_; } + set { + user_ = value; + } + } + + /// Field number for the "costSp" field. + public const int CostSpFieldNumber = 2; + private int costSp_; + /// + /// 消耗战略点量 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CostSp { + get { return costSp_; } + set { + costSp_ = value; + } + } + + /// Field number for the "line" field. + public const int LineFieldNumber = 3; + private string line_ = ""; + /// + /// 1-上,2-中,3-下 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Line { + get { return line_; } + set { + line_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeLine); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeLine other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + if (CostSp != other.CostSp) return false; + if (Line != other.Line) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (user_ != null) hash ^= User.GetHashCode(); + if (CostSp != 0) hash ^= CostSp.GetHashCode(); + if (Line.Length != 0) hash ^= Line.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Line.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Line); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (CostSp != 0) { + output.WriteRawTag(16); + output.WriteInt32(CostSp); + } + if (Line.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Line); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + if (CostSp != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CostSp); + } + if (Line.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Line); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeLine other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + if (other.CostSp != 0) { + CostSp = other.CostSp; + } + if (other.Line.Length != 0) { + Line = other.Line; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 16: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Line = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + case 16: { + CostSp = input.ReadInt32(); + break; + } + case 26: { + Line = input.ReadString(); + break; + } + } + } + } + #endif + + } + /// /// 查询位置 push -> game.where -> w /// @@ -1401,7 +1687,7 @@ namespace Pb.Game.Zhgzd { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[5]; } + get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1602,7 +1888,7 @@ namespace Pb.Game.Zhgzd { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[6]; } + get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1883,7 +2169,7 @@ namespace Pb.Game.Zhgzd { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[7]; } + get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2204,7 +2490,7 @@ namespace Pb.Game.Zhgzd { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[8]; } + get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2428,6 +2714,207 @@ namespace Pb.Game.Zhgzd { } + /// + /// 超级技能 push -> game.superSkill -> 礼物效果 + /// + public sealed partial class SuperSkill : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SuperSkill()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Pb.Game.Zhgzd.CommandReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SuperSkill() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SuperSkill(SuperSkill other) : this() { + user_ = other.user_ != null ? other.user_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SuperSkill Clone() { + return new SuperSkill(this); + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 1; + private global::Pb.Common.PbUser user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Pb.Common.PbUser User { + get { return user_; } + set { + user_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SuperSkill); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SuperSkill other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(User, other.User)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (user_ != null) hash ^= User.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (user_ != null) { + output.WriteRawTag(10); + output.WriteMessage(User); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (user_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(User); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SuperSkill other) { + if (other == null) { + return; + } + if (other.user_ != null) { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + User.MergeFrom(other.User); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (user_ == null) { + User = new global::Pb.Common.PbUser(); + } + input.ReadMessage(User); + break; + } + } + } + } + #endif + + } + #endregion } diff --git a/game/pb/game/zhgzd/command.pb.go b/game/pb/game/zhgzd/command.pb.go index c76a07a..fddf974 100644 --- a/game/pb/game/zhgzd/command.pb.go +++ b/game/pb/game/zhgzd/command.pb.go @@ -261,7 +261,7 @@ func (x *Outbreak) GetCostSp() int32 { return 0 } -// 移动自己位置 push -> game.pos -> p1/p2/p3/p4/p5 +// 移动自己位置 push -> game.pos -> p0/p1/p2/p3/p4/p5 type Position struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -269,7 +269,7 @@ type Position struct { User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` CostSp int32 `protobuf:"varint,2,opt,name=costSp,proto3" json:"costSp,omitempty"` // 消耗战略点量 - Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` // 1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 + Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` // 0-主基地,1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 } func (x *Position) Reset() { @@ -325,6 +325,70 @@ func (x *Position) GetPosition() string { return "" } +// 玩家在基地时选择出兵路线 push -> game.line -> m1/m2/m3 +type ChangeLine struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + CostSp int32 `protobuf:"varint,2,opt,name=costSp,proto3" json:"costSp,omitempty"` // 消耗战略点量 + Line string `protobuf:"bytes,3,opt,name=line,proto3" json:"line,omitempty"` // 1-上,2-中,3-下 +} + +func (x *ChangeLine) Reset() { + *x = ChangeLine{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangeLine) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeLine) ProtoMessage() {} + +func (x *ChangeLine) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeLine.ProtoReflect.Descriptor instead. +func (*ChangeLine) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{5} +} + +func (x *ChangeLine) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + +func (x *ChangeLine) GetCostSp() int32 { + if x != nil { + return x.CostSp + } + return 0 +} + +func (x *ChangeLine) GetLine() string { + if x != nil { + return x.Line + } + return "" +} + // 查询位置 push -> game.where -> w type Where struct { state protoimpl.MessageState @@ -337,7 +401,7 @@ type Where struct { func (x *Where) Reset() { *x = Where{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgzd_command_proto_msgTypes[5] + mi := &file_game_zhgzd_command_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -350,7 +414,7 @@ func (x *Where) String() string { func (*Where) ProtoMessage() {} func (x *Where) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgzd_command_proto_msgTypes[5] + mi := &file_game_zhgzd_command_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -363,7 +427,7 @@ func (x *Where) ProtoReflect() protoreflect.Message { // Deprecated: Use Where.ProtoReflect.Descriptor instead. func (*Where) Descriptor() ([]byte, []int) { - return file_game_zhgzd_command_proto_rawDescGZIP(), []int{5} + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{6} } func (x *Where) GetUser() *common.PbUser { @@ -387,7 +451,7 @@ type PlayerMode struct { func (x *PlayerMode) Reset() { *x = PlayerMode{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgzd_command_proto_msgTypes[6] + mi := &file_game_zhgzd_command_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -400,7 +464,7 @@ func (x *PlayerMode) String() string { func (*PlayerMode) ProtoMessage() {} func (x *PlayerMode) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgzd_command_proto_msgTypes[6] + mi := &file_game_zhgzd_command_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -413,7 +477,7 @@ func (x *PlayerMode) ProtoReflect() protoreflect.Message { // Deprecated: Use PlayerMode.ProtoReflect.Descriptor instead. func (*PlayerMode) Descriptor() ([]byte, []int) { - return file_game_zhgzd_command_proto_rawDescGZIP(), []int{6} + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{7} } func (x *PlayerMode) GetUser() *common.PbUser { @@ -452,7 +516,7 @@ type StrategicPoint struct { func (x *StrategicPoint) Reset() { *x = StrategicPoint{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgzd_command_proto_msgTypes[7] + mi := &file_game_zhgzd_command_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -465,7 +529,7 @@ func (x *StrategicPoint) String() string { func (*StrategicPoint) ProtoMessage() {} func (x *StrategicPoint) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgzd_command_proto_msgTypes[7] + mi := &file_game_zhgzd_command_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -478,7 +542,7 @@ func (x *StrategicPoint) ProtoReflect() protoreflect.Message { // Deprecated: Use StrategicPoint.ProtoReflect.Descriptor instead. func (*StrategicPoint) Descriptor() ([]byte, []int) { - return file_game_zhgzd_command_proto_rawDescGZIP(), []int{7} + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{8} } func (x *StrategicPoint) GetUser() *common.PbUser { @@ -522,7 +586,7 @@ type SupportSkill struct { func (x *SupportSkill) Reset() { *x = SupportSkill{} if protoimpl.UnsafeEnabled { - mi := &file_game_zhgzd_command_proto_msgTypes[8] + mi := &file_game_zhgzd_command_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -535,7 +599,7 @@ func (x *SupportSkill) String() string { func (*SupportSkill) ProtoMessage() {} func (x *SupportSkill) ProtoReflect() protoreflect.Message { - mi := &file_game_zhgzd_command_proto_msgTypes[8] + mi := &file_game_zhgzd_command_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -548,7 +612,7 @@ func (x *SupportSkill) ProtoReflect() protoreflect.Message { // Deprecated: Use SupportSkill.ProtoReflect.Descriptor instead. func (*SupportSkill) Descriptor() ([]byte, []int) { - return file_game_zhgzd_command_proto_rawDescGZIP(), []int{8} + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{9} } func (x *SupportSkill) GetUser() *common.PbUser { @@ -565,6 +629,54 @@ func (x *SupportSkill) GetId() string { return "" } +// 超级技能 push -> game.superSkill -> 礼物效果 +type SuperSkill struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *common.PbUser `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` +} + +func (x *SuperSkill) Reset() { + *x = SuperSkill{} + if protoimpl.UnsafeEnabled { + mi := &file_game_zhgzd_command_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuperSkill) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuperSkill) ProtoMessage() {} + +func (x *SuperSkill) ProtoReflect() protoreflect.Message { + mi := &file_game_zhgzd_command_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuperSkill.ProtoReflect.Descriptor instead. +func (*SuperSkill) Descriptor() ([]byte, []int) { + return file_game_zhgzd_command_proto_rawDescGZIP(), []int{10} +} + +func (x *SuperSkill) GetUser() *common.PbUser { + if x != nil { + return x.User + } + return nil +} + var File_game_zhgzd_command_proto protoreflect.FileDescriptor var file_game_zhgzd_command_proto_rawDesc = []byte{ @@ -599,33 +711,42 @@ var file_game_zhgzd_command_proto_rawDesc = []byte{ 0x72, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 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, 0x5f, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4d, - 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x0a, 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, + 0x69, 0x6e, 0x65, 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, 0x6f, 0x73, 0x74, 0x53, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, 0x74, - 0x53, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x61, 0x74, - 0x65, 0x67, 0x69, 0x63, 0x50, 0x6f, 0x69, 0x6e, 0x74, 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, 0x1a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x61, 0x64, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x53, - 0x70, 0x65, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x10, 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x53, - 0x6b, 0x69, 0x6c, 0x6c, 0x12, 0x25, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x53, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x2e, 0x0a, 0x05, 0x57, 0x68, 0x65, 0x72, 0x65, 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, 0x5f, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x65, 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, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x42, 0x24, 0x5a, 0x22, 0x64, - 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, - 0x7a, 0x68, 0x67, 0x7a, 0x64, 0x3b, 0x70, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x7a, - 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x63, + 0x6f, 0x73, 0x74, 0x53, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x63, 0x6f, 0x73, + 0x74, 0x53, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x61, + 0x74, 0x65, 0x67, 0x69, 0x63, 0x50, 0x6f, 0x69, 0x6e, 0x74, 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, 0x1a, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x64, 0x64, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x10, 0x61, 0x64, 0x64, + 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x10, 0x61, 0x64, 0x64, 0x53, 0x70, 0x65, 0x65, 0x64, 0x44, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x0c, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x53, 0x6b, 0x69, 0x6c, 0x6c, 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, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x33, 0x0a, 0x0a, + 0x53, 0x75, 0x70, 0x65, 0x72, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 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, 0x42, 0x24, 0x5a, 0x22, 0x64, 0x63, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, + 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x7a, 0x68, 0x67, 0x7a, 0x64, 0x3b, 0x70, 0x62, 0x47, 0x61, + 0x6d, 0x65, 0x5a, 0x68, 0x67, 0x7a, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -640,34 +761,38 @@ func file_game_zhgzd_command_proto_rawDescGZIP() []byte { return file_game_zhgzd_command_proto_rawDescData } -var file_game_zhgzd_command_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_game_zhgzd_command_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_game_zhgzd_command_proto_goTypes = []interface{}{ (*JoinGame)(nil), // 0: pb.game.zhgzd.JoinGame (*DispatchUnit)(nil), // 1: pb.game.zhgzd.DispatchUnit (*ChangeUnit)(nil), // 2: pb.game.zhgzd.ChangeUnit (*Outbreak)(nil), // 3: pb.game.zhgzd.Outbreak (*Position)(nil), // 4: pb.game.zhgzd.Position - (*Where)(nil), // 5: pb.game.zhgzd.Where - (*PlayerMode)(nil), // 6: pb.game.zhgzd.PlayerMode - (*StrategicPoint)(nil), // 7: pb.game.zhgzd.StrategicPoint - (*SupportSkill)(nil), // 8: pb.game.zhgzd.SupportSkill - (*common.PbUser)(nil), // 9: pb.common.PbUser + (*ChangeLine)(nil), // 5: pb.game.zhgzd.ChangeLine + (*Where)(nil), // 6: pb.game.zhgzd.Where + (*PlayerMode)(nil), // 7: pb.game.zhgzd.PlayerMode + (*StrategicPoint)(nil), // 8: pb.game.zhgzd.StrategicPoint + (*SupportSkill)(nil), // 9: pb.game.zhgzd.SupportSkill + (*SuperSkill)(nil), // 10: pb.game.zhgzd.SuperSkill + (*common.PbUser)(nil), // 11: pb.common.PbUser } var file_game_zhgzd_command_proto_depIdxs = []int32{ - 9, // 0: pb.game.zhgzd.JoinGame.user:type_name -> pb.common.PbUser - 9, // 1: pb.game.zhgzd.DispatchUnit.user:type_name -> pb.common.PbUser - 9, // 2: pb.game.zhgzd.ChangeUnit.user:type_name -> pb.common.PbUser - 9, // 3: pb.game.zhgzd.Outbreak.user:type_name -> pb.common.PbUser - 9, // 4: pb.game.zhgzd.Position.user:type_name -> pb.common.PbUser - 9, // 5: pb.game.zhgzd.Where.user:type_name -> pb.common.PbUser - 9, // 6: pb.game.zhgzd.PlayerMode.user:type_name -> pb.common.PbUser - 9, // 7: pb.game.zhgzd.StrategicPoint.user:type_name -> pb.common.PbUser - 9, // 8: pb.game.zhgzd.SupportSkill.user:type_name -> pb.common.PbUser - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 11, // 0: pb.game.zhgzd.JoinGame.user:type_name -> pb.common.PbUser + 11, // 1: pb.game.zhgzd.DispatchUnit.user:type_name -> pb.common.PbUser + 11, // 2: pb.game.zhgzd.ChangeUnit.user:type_name -> pb.common.PbUser + 11, // 3: pb.game.zhgzd.Outbreak.user:type_name -> pb.common.PbUser + 11, // 4: pb.game.zhgzd.Position.user:type_name -> pb.common.PbUser + 11, // 5: pb.game.zhgzd.ChangeLine.user:type_name -> pb.common.PbUser + 11, // 6: pb.game.zhgzd.Where.user:type_name -> pb.common.PbUser + 11, // 7: pb.game.zhgzd.PlayerMode.user:type_name -> pb.common.PbUser + 11, // 8: pb.game.zhgzd.StrategicPoint.user:type_name -> pb.common.PbUser + 11, // 9: pb.game.zhgzd.SupportSkill.user:type_name -> pb.common.PbUser + 11, // 10: pb.game.zhgzd.SuperSkill.user:type_name -> pb.common.PbUser + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_game_zhgzd_command_proto_init() } @@ -737,7 +862,7 @@ func file_game_zhgzd_command_proto_init() { } } file_game_zhgzd_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Where); i { + switch v := v.(*ChangeLine); i { case 0: return &v.state case 1: @@ -749,7 +874,7 @@ func file_game_zhgzd_command_proto_init() { } } file_game_zhgzd_command_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerMode); i { + switch v := v.(*Where); i { case 0: return &v.state case 1: @@ -761,7 +886,7 @@ func file_game_zhgzd_command_proto_init() { } } file_game_zhgzd_command_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StrategicPoint); i { + switch v := v.(*PlayerMode); i { case 0: return &v.state case 1: @@ -773,6 +898,18 @@ func file_game_zhgzd_command_proto_init() { } } file_game_zhgzd_command_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StrategicPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_game_zhgzd_command_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SupportSkill); i { case 0: return &v.state @@ -784,6 +921,18 @@ func file_game_zhgzd_command_proto_init() { return nil } } + file_game_zhgzd_command_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuperSkill); 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{ @@ -791,7 +940,7 @@ func file_game_zhgzd_command_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_game_zhgzd_command_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/game/zhgzd/command.proto b/game/pb/game/zhgzd/command.proto index 6a15e70..5ff9e61 100644 --- a/game/pb/game/zhgzd/command.proto +++ b/game/pb/game/zhgzd/command.proto @@ -34,12 +34,20 @@ message Outbreak { int32 costSp = 2; // 消耗战略点量 } -// 移动自己位置 push -> game.pos -> p1/p2/p3/p4/p5 +// 移动自己位置 push -> game.pos -> p0/p1/p2/p3/p4/p5 message Position { pb.common.PbUser user = 1; int32 costSp = 2; // 消耗战略点量 - string position = 3;// 1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 + string position = 3;// 0-主基地,1-上兵营,2-中兵营,3-下兵营,4-上前哨战,5-下前哨战 +} + +// 玩家在基地时选择出兵路线 push -> game.line -> m1/m2/m3 +message ChangeLine { + pb.common.PbUser user = 1; + int32 costSp = 2; // 消耗战略点量 + + string line = 3;// 1-上,2-中,3-下 } // 查询位置 push -> game.where -> w @@ -70,4 +78,9 @@ message StrategicPoint { message SupportSkill { pb.common.PbUser user = 1; string id = 2; // 技能ID S0001/S0002/S0003/S0005 +} + +// 超级技能 push -> game.superSkill -> 礼物效果 +message SuperSkill { + pb.common.PbUser user = 1; } \ No newline at end of file diff --git a/game/pb/game/zhgzd/genCSharp.bat b/game/pb/game/zhgzd/genCSharp.bat deleted file mode 100644 index 61ff858..0000000 --- a/game/pb/game/zhgzd/genCSharp.bat +++ /dev/null @@ -1 +0,0 @@ -protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto \ No newline at end of file diff --git a/game/pb/gen.bat b/game/pb/gen.bat index f00f141..07d6d71 100644 --- a/game/pb/gen.bat +++ b/game/pb/gen.bat @@ -1,5 +1,5 @@ protoc --go_opt=paths=source_relative ^ --go-grpc_opt=paths=source_relative ^ --go-grpc_opt=require_unimplemented_servers=false ^ - --go_out=. --go-grpc_out=. --proto_path=. ^ - ./mq/*.proto ./common/*.proto ./room/*.proto ./game/zhg/*.proto ./game/zhghz/*.proto ./game/zhgzd/*.proto \ No newline at end of file + --go_out=. --go-grpc_out=. --proto_path=. ^ + ./vars/*.proto ./mq/*.proto ./common/*.proto ./room/*.proto ./game/zhg/*.proto ./game/zhghz/*.proto ./game/zhgzd/*.proto \ No newline at end of file diff --git a/game/pb/genCSharp.bat b/game/pb/genCSharp.bat new file mode 100644 index 0000000..cba79a2 --- /dev/null +++ b/game/pb/genCSharp.bat @@ -0,0 +1,7 @@ +protoc --csharp_out=./common --proto_path=. --proto_path=./common --proto_path=./vars ./common/*.proto +protoc --csharp_out=./vars --proto_path=. --proto_path=./common --proto_path=./vars ./vars/*.proto +protoc --csharp_out=./room --proto_path=. --proto_path=./room --proto_path=./vars ./room/*.proto +::games +protoc --csharp_out=./game/zhg --proto_path=. --proto_path=./vars --proto_path=./game/zhg ./game/zhg/*.proto +protoc --csharp_out=./game/zhghz --proto_path=. --proto_path=./vars --proto_path=./game/zhghz ./game/zhghz/*.proto +protoc --csharp_out=./game/zhgzd --proto_path=. --proto_path=./vars --proto_path=./game/zhgzd ./game/zhgzd/*.proto \ No newline at end of file diff --git a/game/pb/mq/mq.pb.go b/game/pb/mq/mq.pb.go index c13287f..dee25ef 100644 --- a/game/pb/mq/mq.pb.go +++ b/game/pb/mq/mq.pb.go @@ -7,6 +7,7 @@ package pbMq import ( + vars "dcg/game/pb/vars" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -492,74 +493,176 @@ func (x *MqRewardPool) GetAllRewards() int64 { return 0 } +// 用户金币变动通知 +type MqUserCoinChanged struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Avatar string `protobuf:"bytes,3,opt,name=avatar,proto3" json:"avatar,omitempty"` + Reason vars.UserCoinChangedReason `protobuf:"varint,4,opt,name=reason,proto3,enum=pb.vars.UserCoinChangedReason" json:"reason,omitempty"` // 变动原因 + Change int64 `protobuf:"varint,10,opt,name=change,proto3" json:"change,omitempty"` // 变动量 + Current int64 `protobuf:"varint,11,opt,name=current,proto3" json:"current,omitempty"` // 当前量 +} + +func (x *MqUserCoinChanged) Reset() { + *x = MqUserCoinChanged{} + if protoimpl.UnsafeEnabled { + mi := &file_mq_mq_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MqUserCoinChanged) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MqUserCoinChanged) ProtoMessage() {} + +func (x *MqUserCoinChanged) ProtoReflect() protoreflect.Message { + mi := &file_mq_mq_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MqUserCoinChanged.ProtoReflect.Descriptor instead. +func (*MqUserCoinChanged) Descriptor() ([]byte, []int) { + return file_mq_mq_proto_rawDescGZIP(), []int{4} +} + +func (x *MqUserCoinChanged) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *MqUserCoinChanged) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *MqUserCoinChanged) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *MqUserCoinChanged) GetReason() vars.UserCoinChangedReason { + if x != nil { + return x.Reason + } + return vars.UserCoinChangedReason(0) +} + +func (x *MqUserCoinChanged) GetChange() int64 { + if x != nil { + return x.Change + } + return 0 +} + +func (x *MqUserCoinChanged) GetCurrent() int64 { + if x != nil { + return x.Current + } + 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, 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, + 0x62, 0x1a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 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, 0x22, 0xc9, 0x01, 0x0a, 0x11, 0x4d, 0x71, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x70, 0x62, + 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 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 ( @@ -575,20 +678,23 @@ 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, 4) +var file_mq_mq_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_mq_mq_proto_goTypes = []interface{}{ - (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 + (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 + (*MqUserCoinChanged)(nil), // 5: pb.MqUserCoinChanged + (vars.UserCoinChangedReason)(0), // 6: pb.vars.UserCoinChangedReason } var file_mq_mq_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 6, // 0: pb.MqUserCoinChanged.reason:type_name -> pb.vars.UserCoinChangedReason + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_mq_mq_proto_init() } @@ -645,6 +751,18 @@ func file_mq_mq_proto_init() { return nil } } + file_mq_mq_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MqUserCoinChanged); 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{ @@ -652,7 +770,7 @@ func file_mq_mq_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_mq_mq_proto_rawDesc, NumEnums: 1, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/game/pb/mq/mq.proto b/game/pb/mq/mq.proto index cd52905..f52b0f8 100644 --- a/game/pb/mq/mq.proto +++ b/game/pb/mq/mq.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package pb; +import "vars/vars.proto"; + option go_package = "/pbMq"; enum Platform { @@ -54,4 +56,16 @@ message MqRewardPool { int64 battleReward = 5; // 战斗奖池 int64 otherReward = 6; // 其它奖池 int64 allRewards = 10; // 所有奖池 +} + +// 用户金币变动通知 +message MqUserCoinChanged { + int64 userId = 1; + string username = 2; + string avatar = 3; + + pb.vars.UserCoinChangedReason reason = 4; // 变动原因 + + int64 change = 10; // 变动量 + int64 current = 11; // 当前量 } \ No newline at end of file diff --git a/game/pb/room/Room.cs b/game/pb/room/Room.cs index 0056161..2f1b207 100644 --- a/game/pb/room/Room.cs +++ b/game/pb/room/Room.cs @@ -1,6 +1,6 @@ // // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: room.proto +// source: room/room.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -11,11 +11,11 @@ using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Pb.Room { - /// Holder for reflection information generated from room.proto + /// Holder for reflection information generated from room/room.proto public static partial class RoomReflection { #region Descriptor - /// File descriptor for room.proto + /// File descriptor for room/room.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } @@ -24,13 +24,13 @@ namespace Pb.Room { static RoomReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cgpyb29tLnByb3RvEgdwYi5yb29tIkYKC0pvaW5Sb29tUmVxEhIKCkxpdmVS", - "b29tSWQYASABKAMSIwoIR2FtZVR5cGUYAiABKA4yES5wYi5yb29tLkdhbWVU", - "eXBlIiwKDEpvaW5Sb29tUmVzcBIMCgRDb2RlGAEgASgDEg4KBlJlc3VsdBgC", - "IAEoCSI5CgZDbGllbnQSCgoCSWQYASABKAMSIwoIR2FtZVR5cGUYAiABKA4y", - "ES5wYi5yb29tLkdhbWVUeXBlKjQKCEdhbWVUeXBlEgcKA1pIRxAAEgkKBVpI", - "R0haEAESCQoFWkhHRkIQAhIJCgVaSEdaRBADQhlaF2RjZy9nYW1lL3BiL3Jv", - "b207cGJSb29tYgZwcm90bzM=")); + "Cg9yb29tL3Jvb20ucHJvdG8SB3BiLnJvb20iRgoLSm9pblJvb21SZXESEgoK", + "TGl2ZVJvb21JZBgBIAEoAxIjCghHYW1lVHlwZRgCIAEoDjIRLnBiLnJvb20u", + "R2FtZVR5cGUiLAoMSm9pblJvb21SZXNwEgwKBENvZGUYASABKAMSDgoGUmVz", + "dWx0GAIgASgJIjkKBkNsaWVudBIKCgJJZBgBIAEoAxIjCghHYW1lVHlwZRgC", + "IAEoDjIRLnBiLnJvb20uR2FtZVR5cGUqNAoIR2FtZVR5cGUSBwoDWkhHEAAS", + "CQoFWkhHSFoQARIJCgVaSEdGQhACEgkKBVpIR1pEEANCGVoXZGNnL2dhbWUv", + "cGIvcm9vbTtwYlJvb21iBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Room.GameType), }, null, new pbr::GeneratedClrTypeInfo[] { diff --git a/game/pb/room/genCSharp.bat b/game/pb/room/genCSharp.bat deleted file mode 100644 index 61ff858..0000000 --- a/game/pb/room/genCSharp.bat +++ /dev/null @@ -1 +0,0 @@ -protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto \ No newline at end of file diff --git a/game/pb/routes.go b/game/pb/routes.go new file mode 100644 index 0000000..76c619c --- /dev/null +++ b/game/pb/routes.go @@ -0,0 +1,41 @@ +package pb + +// common通用消息路由 + +const ( + PushCoinChanged = "user.coin.change" + PushCheckIn = "user.checkIn" + PushDrawGiftPack = "user.giftPack" + PushBuyGoods = "user.buy" + PushUserQuery = "user.query" + PushDanmaku = "live.danmaku" + PushGift = "live.gift.common" + PushGiftNobility = "live.gift.nobility" +) + +// zhg + +const ( + PushZhgJoinGame = "game.join" + PushZhgCreateUnit = "game.createUnit" + PushZhgMove = "game.move" + PushZhgOutbreak = "game.outbreak" + PushZhgOutbreakFood = "game.outbreak.food" + PushZhgWhere = "game.wai" + PushZhgMode = "game.mode" + PushZhgChangeElite = "game.change.elite" + PushZhgChangeTitle = "game.change.title" + PushZhgBuyFood = "game.buy.food" +) + +// zhgzd +const ( + PushZhgzdJoinGame = "game.join" + PushZhgzdChangeUnit = "game.unit.change" + PushZhgzdMove = "game.line" + PushZhgzdPosition = "game.pos" + PushZhgzdOutbreak = "game.outbreak" + PushZhgzdDispatch = "game.unit.dispatch" + PushZhgzdWhere = "game.where" + PushZhgzdMode = "game.mode" +) diff --git a/game/pb/vars/Vars.cs b/game/pb/vars/Vars.cs new file mode 100644 index 0000000..882b65c --- /dev/null +++ b/game/pb/vars/Vars.cs @@ -0,0 +1,160 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: vars/vars.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Pb.Vars { + + /// Holder for reflection information generated from vars/vars.proto + public static partial class VarsReflection { + + #region Descriptor + /// File descriptor for vars/vars.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static VarsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cg92YXJzL3ZhcnMucHJvdG8SB3BiLnZhcnMqyAEKFVVzZXJDb2luQ2hhbmdl", + "ZFJlYXNvbhIHCgNQYXkQABIRCg1CdXlCYXR0bGVGb29kEAESEAoMQnV5RWxp", + "dGVVbml0EAISDAoIQnV5VGl0bGUQAxIMCghTZW5kR2lmdBAEEg8KC0J1eU5v", + "YmlsaXR5EAUSEAoMRHJhd0dpZnRQYWNrEAoSCwoHQ2hlY2tJbhALEhMKD0V2", + "ZW50UmFua1N1Ym1pdBAUEhIKDkV2ZW50QmF0dGxlRW5kEBUSDAoIVHJhbnNm", + "ZXIQHiodCgVHb29kcxIJCgVUaXRsZRAAEgkKBUVsaXRlEAEqwgEKCFJhbmtU", + "eXBlEgsKB1Vua25vd24QABIKCgZEYW1hZ2UQARIMCghEZURhbWFnZRACEgsK", + "B0dlbmVyYWwQAxINCglEZUdlbmVyYWwQBBIMCghLaWxsVW5pdBAFEg4KCkRl", + "S2lsbFVuaXQQBhIOCgpLaWxsUGxheWVyEAcSEAoMRGVLaWxsUGxheWVyEAgS", + "BwoDV2luEAkSCAoETG9zdBAKEg4KCkZpcnN0Qmxvb2QQCxIQCgxEZUZpcnN0", + "Qmxvb2QQDEIZWhdkY2cvZ2FtZS9wYi92YXJzO3BiVmFyc2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Pb.Vars.UserCoinChangedReason), typeof(global::Pb.Vars.Goods), typeof(global::Pb.Vars.RankType), }, null, null)); + } + #endregion + + } + #region Enums + public enum UserCoinChangedReason { + /// + ////// 消费 + /// + [pbr::OriginalName("Pay")] Pay = 0, + /// + /// 购买粮草 + /// + [pbr::OriginalName("BuyBattleFood")] BuyBattleFood = 1, + /// + /// 购买精英单位 + /// + [pbr::OriginalName("BuyEliteUnit")] BuyEliteUnit = 2, + /// + /// 购买称号 + /// + [pbr::OriginalName("BuyTitle")] BuyTitle = 3, + /// + ////// 礼物 + /// + [pbr::OriginalName("SendGift")] SendGift = 4, + /// + /// 购买贵族 + /// + [pbr::OriginalName("BuyNobility")] BuyNobility = 5, + /// + ////// 领取 + /// + [pbr::OriginalName("DrawGiftPack")] DrawGiftPack = 10, + /// + /// 签到打卡 + /// + [pbr::OriginalName("CheckIn")] CheckIn = 11, + /// + ////// 游戏事件 + /// + [pbr::OriginalName("EventRankSubmit")] EventRankSubmit = 20, + /// + /// 战局结束奖励 + /// + [pbr::OriginalName("EventBattleEnd")] EventBattleEnd = 21, + /// + ////// 其它事件 + /// + [pbr::OriginalName("Transfer")] Transfer = 30, + } + + public enum Goods { + /// + /// 称号 + /// + [pbr::OriginalName("Title")] Title = 0, + /// + /// 精英单位 + /// + [pbr::OriginalName("Elite")] Elite = 1, + } + + public enum RankType { + [pbr::OriginalName("Unknown")] Unknown = 0, + /// + /// 伤害榜 + /// + [pbr::OriginalName("Damage")] Damage = 1, + /// + /// 受伤榜 + /// + [pbr::OriginalName("DeDamage")] DeDamage = 2, + /// + /// 名将榜 + /// + [pbr::OriginalName("General")] General = 3, + /// + /// 落马榜 + /// + [pbr::OriginalName("DeGeneral")] DeGeneral = 4, + /// + /// 小兵击杀 + /// + [pbr::OriginalName("KillUnit")] KillUnit = 5, + /// + /// 小兵被杀 + /// + [pbr::OriginalName("DeKillUnit")] DeKillUnit = 6, + /// + /// 击杀玩家 + /// + [pbr::OriginalName("KillPlayer")] KillPlayer = 7, + /// + /// 被杀榜 + /// + [pbr::OriginalName("DeKillPlayer")] DeKillPlayer = 8, + /// + /// 获胜榜 + /// + [pbr::OriginalName("Win")] Win = 9, + /// + /// 战败榜 + /// + [pbr::OriginalName("Lost")] Lost = 10, + /// + /// 一血榜 + /// + [pbr::OriginalName("FirstBlood")] FirstBlood = 11, + /// + /// 被拿一血榜 + /// + [pbr::OriginalName("DeFirstBlood")] DeFirstBlood = 12, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/game/pb/vars/vars.pb.go b/game/pb/vars/vars.pb.go new file mode 100644 index 0000000..34bf457 --- /dev/null +++ b/game/pb/vars/vars.pb.go @@ -0,0 +1,311 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.4 +// source: vars/vars.proto + +package pbVars + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type UserCoinChangedReason int32 + +const ( + ///// 消费 + UserCoinChangedReason_Pay UserCoinChangedReason = 0 // 通用消费 + UserCoinChangedReason_BuyBattleFood UserCoinChangedReason = 1 // 购买粮草 + UserCoinChangedReason_BuyEliteUnit UserCoinChangedReason = 2 // 购买精英单位 + UserCoinChangedReason_BuyTitle UserCoinChangedReason = 3 // 购买称号 + ///// 礼物 + UserCoinChangedReason_SendGift UserCoinChangedReason = 4 // 赠送礼物 + UserCoinChangedReason_BuyNobility UserCoinChangedReason = 5 // 购买贵族 + ///// 领取 + UserCoinChangedReason_DrawGiftPack UserCoinChangedReason = 10 // 领取礼包 + UserCoinChangedReason_CheckIn UserCoinChangedReason = 11 // 签到打卡 + ///// 游戏事件 + UserCoinChangedReason_EventRankSubmit UserCoinChangedReason = 20 // 排行榜结算变动 + UserCoinChangedReason_EventBattleEnd UserCoinChangedReason = 21 // 战局结束奖励 + ///// 其它事件 + UserCoinChangedReason_Transfer UserCoinChangedReason = 30 // 转账 +) + +// Enum value maps for UserCoinChangedReason. +var ( + UserCoinChangedReason_name = map[int32]string{ + 0: "Pay", + 1: "BuyBattleFood", + 2: "BuyEliteUnit", + 3: "BuyTitle", + 4: "SendGift", + 5: "BuyNobility", + 10: "DrawGiftPack", + 11: "CheckIn", + 20: "EventRankSubmit", + 21: "EventBattleEnd", + 30: "Transfer", + } + UserCoinChangedReason_value = map[string]int32{ + "Pay": 0, + "BuyBattleFood": 1, + "BuyEliteUnit": 2, + "BuyTitle": 3, + "SendGift": 4, + "BuyNobility": 5, + "DrawGiftPack": 10, + "CheckIn": 11, + "EventRankSubmit": 20, + "EventBattleEnd": 21, + "Transfer": 30, + } +) + +func (x UserCoinChangedReason) Enum() *UserCoinChangedReason { + p := new(UserCoinChangedReason) + *p = x + return p +} + +func (x UserCoinChangedReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UserCoinChangedReason) Descriptor() protoreflect.EnumDescriptor { + return file_vars_vars_proto_enumTypes[0].Descriptor() +} + +func (UserCoinChangedReason) Type() protoreflect.EnumType { + return &file_vars_vars_proto_enumTypes[0] +} + +func (x UserCoinChangedReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UserCoinChangedReason.Descriptor instead. +func (UserCoinChangedReason) EnumDescriptor() ([]byte, []int) { + return file_vars_vars_proto_rawDescGZIP(), []int{0} +} + +type Goods int32 + +const ( + Goods_Title Goods = 0 // 称号 + Goods_Elite Goods = 1 // 精英单位 +) + +// Enum value maps for Goods. +var ( + Goods_name = map[int32]string{ + 0: "Title", + 1: "Elite", + } + Goods_value = map[string]int32{ + "Title": 0, + "Elite": 1, + } +) + +func (x Goods) Enum() *Goods { + p := new(Goods) + *p = x + return p +} + +func (x Goods) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Goods) Descriptor() protoreflect.EnumDescriptor { + return file_vars_vars_proto_enumTypes[1].Descriptor() +} + +func (Goods) Type() protoreflect.EnumType { + return &file_vars_vars_proto_enumTypes[1] +} + +func (x Goods) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Goods.Descriptor instead. +func (Goods) EnumDescriptor() ([]byte, []int) { + return file_vars_vars_proto_rawDescGZIP(), []int{1} +} + +type RankType int32 + +const ( + RankType_Unknown RankType = 0 + RankType_Damage RankType = 1 // 伤害榜 + RankType_DeDamage RankType = 2 // 受伤榜 + RankType_General RankType = 3 // 名将榜 + RankType_DeGeneral RankType = 4 // 落马榜 + RankType_KillUnit RankType = 5 // 小兵击杀 + RankType_DeKillUnit RankType = 6 // 小兵被杀 + RankType_KillPlayer RankType = 7 // 击杀玩家 + RankType_DeKillPlayer RankType = 8 // 被杀榜 + RankType_Win RankType = 9 // 获胜榜 + RankType_Lost RankType = 10 // 战败榜 + RankType_FirstBlood RankType = 11 // 一血榜 + RankType_DeFirstBlood RankType = 12 // 被拿一血榜 +) + +// Enum value maps for RankType. +var ( + RankType_name = map[int32]string{ + 0: "Unknown", + 1: "Damage", + 2: "DeDamage", + 3: "General", + 4: "DeGeneral", + 5: "KillUnit", + 6: "DeKillUnit", + 7: "KillPlayer", + 8: "DeKillPlayer", + 9: "Win", + 10: "Lost", + 11: "FirstBlood", + 12: "DeFirstBlood", + } + RankType_value = map[string]int32{ + "Unknown": 0, + "Damage": 1, + "DeDamage": 2, + "General": 3, + "DeGeneral": 4, + "KillUnit": 5, + "DeKillUnit": 6, + "KillPlayer": 7, + "DeKillPlayer": 8, + "Win": 9, + "Lost": 10, + "FirstBlood": 11, + "DeFirstBlood": 12, + } +) + +func (x RankType) Enum() *RankType { + p := new(RankType) + *p = x + return p +} + +func (x RankType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RankType) Descriptor() protoreflect.EnumDescriptor { + return file_vars_vars_proto_enumTypes[2].Descriptor() +} + +func (RankType) Type() protoreflect.EnumType { + return &file_vars_vars_proto_enumTypes[2] +} + +func (x RankType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RankType.Descriptor instead. +func (RankType) EnumDescriptor() ([]byte, []int) { + return file_vars_vars_proto_rawDescGZIP(), []int{2} +} + +var File_vars_vars_proto protoreflect.FileDescriptor + +var file_vars_vars_proto_rawDesc = []byte{ + 0x0a, 0x0f, 0x76, 0x61, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x07, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2a, 0xc8, 0x01, 0x0a, 0x15, 0x55, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x61, 0x79, 0x10, 0x00, 0x12, 0x11, 0x0a, + 0x0d, 0x42, 0x75, 0x79, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x6f, 0x64, 0x10, 0x01, + 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, + 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x03, + 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x10, 0x04, 0x12, 0x0f, + 0x0a, 0x0b, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x10, 0x05, 0x12, + 0x10, 0x0a, 0x0c, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x10, + 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x10, 0x0b, 0x12, 0x13, + 0x0a, 0x0f, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x10, 0x14, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x10, 0x1e, 0x2a, 0x1d, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x09, + 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6c, 0x69, + 0x74, 0x65, 0x10, 0x01, 0x2a, 0xc2, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0a, + 0x0a, 0x06, 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x65, + 0x44, 0x61, 0x6d, 0x61, 0x67, 0x65, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x6c, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x6c, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, + 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x55, 0x6e, 0x69, 0x74, + 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x4b, 0x69, 0x6c, 0x6c, 0x50, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x10, 0x08, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x09, 0x12, 0x08, 0x0a, + 0x04, 0x4c, 0x6f, 0x73, 0x74, 0x10, 0x0a, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x72, 0x73, 0x74, + 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0b, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x65, 0x46, 0x69, 0x72, + 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x6f, 0x64, 0x10, 0x0c, 0x42, 0x19, 0x5a, 0x17, 0x64, 0x63, 0x67, + 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x61, 0x72, 0x73, 0x3b, 0x70, 0x62, + 0x56, 0x61, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_vars_vars_proto_rawDescOnce sync.Once + file_vars_vars_proto_rawDescData = file_vars_vars_proto_rawDesc +) + +func file_vars_vars_proto_rawDescGZIP() []byte { + file_vars_vars_proto_rawDescOnce.Do(func() { + file_vars_vars_proto_rawDescData = protoimpl.X.CompressGZIP(file_vars_vars_proto_rawDescData) + }) + return file_vars_vars_proto_rawDescData +} + +var file_vars_vars_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_vars_vars_proto_goTypes = []interface{}{ + (UserCoinChangedReason)(0), // 0: pb.vars.UserCoinChangedReason + (Goods)(0), // 1: pb.vars.Goods + (RankType)(0), // 2: pb.vars.RankType +} +var file_vars_vars_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_vars_vars_proto_init() } +func file_vars_vars_proto_init() { + if File_vars_vars_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_vars_vars_proto_rawDesc, + NumEnums: 3, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_vars_vars_proto_goTypes, + DependencyIndexes: file_vars_vars_proto_depIdxs, + EnumInfos: file_vars_vars_proto_enumTypes, + }.Build() + File_vars_vars_proto = out.File + file_vars_vars_proto_rawDesc = nil + file_vars_vars_proto_goTypes = nil + file_vars_vars_proto_depIdxs = nil +} diff --git a/game/pb/vars/vars.proto b/game/pb/vars/vars.proto new file mode 100644 index 0000000..a5bd7a4 --- /dev/null +++ b/game/pb/vars/vars.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +package pb.vars; + +option go_package = "dcg/game/pb/vars;pbVars"; + +enum UserCoinChangedReason { + ///// 消费 + Pay = 0; // 通用消费 + BuyBattleFood = 1; // 购买粮草 + BuyEliteUnit = 2; // 购买精英单位 + BuyTitle = 3; // 购买称号 + ///// 礼物 + SendGift = 4; // 赠送礼物 + BuyNobility = 5; // 购买贵族 + ///// 领取 + DrawGiftPack = 10; // 领取礼包 + CheckIn = 11; // 签到打卡 + ///// 游戏事件 + EventRankSubmit = 20; // 排行榜结算变动 + EventBattleEnd = 21; // 战局结束奖励 + ///// 其它事件 + Transfer = 30; // 转账 +} + +enum Goods { + Title = 0; // 称号 + Elite = 1; // 精英单位 +} + +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; // 被拿一血榜 +} \ No newline at end of file diff --git a/go.mod b/go.mod index 5c20fb0..8fd2c95 100644 --- a/go.mod +++ b/go.mod @@ -9,8 +9,10 @@ require ( 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/gookit/config/v2 v2.1.0 + github.com/golang/protobuf v1.5.2 + github.com/knadh/koanf v1.4.1 github.com/pkg/errors v0.9.1 + github.com/shopspring/decimal v1.3.1 github.com/zeromicro/go-zero v1.3.3 google.golang.org/grpc v1.46.2 google.golang.org/protobuf v1.28.0 @@ -26,21 +28,19 @@ require ( github.com/eapache/go-resiliency v1.2.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect github.com/eapache/queue v1.1.0 // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect github.com/go-logr/logr v1.2.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-redis/redis/v8 v8.11.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.7 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/googleapis/gnostic v0.4.1 // indirect - github.com/gookit/goutil v0.5.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/golang-lru v0.5.1 // indirect - github.com/imdario/mergo v0.3.12 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.0.0 // indirect @@ -48,10 +48,10 @@ require ( github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.15.1 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/natefinch/lumberjack v2.0.0+incompatible // indirect @@ -63,6 +63,7 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect + github.com/stretchr/testify v1.7.1 // indirect go.etcd.io/etcd/api/v3 v3.5.2 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.2 // indirect go.etcd.io/etcd/client/v3 v3.5.2 // indirect diff --git a/go.sum b/go.sum index d5f7bdd..b9d66a1 100644 --- a/go.sum +++ b/go.sum @@ -31,12 +31,6 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -git.noahlan.cn/northlan/ngs v0.1.2 h1:0+cZIAff14VgGBqkCw5Hur9gVD6HzxTmFIvuoWvFphQ= -git.noahlan.cn/northlan/ngs v0.1.2/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs= -git.noahlan.cn/northlan/ngs v1.0.0 h1:u2VREPozM/+e4Pqt2+3+g0CVDBuL02UNv2Mq73xkGP0= -git.noahlan.cn/northlan/ngs v1.0.0/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs= -git.noahlan.cn/northlan/ngs v1.0.1 h1:Jf0mT7N9pHTt3tgq5IhL7DxvjudJUBaH6iSS5+KB9FI= -git.noahlan.cn/northlan/ngs v1.0.1/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs= git.noahlan.cn/northlan/ngs v1.0.2 h1:ulEnuEQ/RTrsY6xbYJnQtg8Q8conCnF+/bmOFBfle4I= git.noahlan.cn/northlan/ngs v1.0.2/go.mod h1:dWoj94sHXJPFE1BbCvF8hOLtMRUe0V6v7RGpGs4+iAs= git.noahlan.cn/northlan/ntools-go/kafka v1.0.1 h1:SDUwYRzksZ3Vcu7PTZxk+TEMF2f3gBiQEboKOhi1yfI= @@ -58,7 +52,6 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= -github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ClickHouse/clickhouse-go v1.5.1/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -71,7 +64,6 @@ github.com/Shopify/sarama v1.32.0/go.mod h1:+EmJJKZWVT/faR9RcOxJerP+LId4iWdQPBGL github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= github.com/Shopify/toxiproxy/v2 v2.3.0 h1:62YkpiP4bzdhKMH+6uC5E95y608k3zDwdzuBMsnn3uQ= github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -82,16 +74,26 @@ github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGn github.com/alicebob/miniredis/v2 v2.17.0 h1:EwLdrIS50uczw71Jc7iVSxZluTKj5nfSP8n7ARRnJy0= github.com/alicebob/miniredis/v2 v2.17.0/go.mod h1:gquAfGbzn92jvtrSC69+6zZnwSODVXVpYDRaGhWaL6I= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -141,7 +143,9 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -160,6 +164,7 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -185,7 +190,7 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -205,7 +210,6 @@ github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -263,14 +267,6 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/gookit/color v1.5.0 h1:1Opow3+BWDwqor78DcJkJCIwnkviFi+rrOANki9BUFw= -github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= -github.com/gookit/config/v2 v2.1.0 h1:RNiT4tsAkDBP5QPhxGk/vEcQO4ET1xdRBd9BStL4G1E= -github.com/gookit/config/v2 v2.1.0/go.mod h1:2qFkfHkS7Aj4T1LaJh5jxejxhO34NM/eJj4/DY/C9Zs= -github.com/gookit/goutil v0.5.0 h1:SrbfjqZ8iprxJOfKZVT0yGJ4/82afr4Qa0RQwON19I4= -github.com/gookit/goutil v0.5.0/go.mod h1:pq1eTibwb2wN96jrci0xy7xogWzzo9CihOQJEAvz4yQ= -github.com/gookit/ini/v2 v2.1.0 h1:L1qn8CfP1KYlbogKuMsJ3FiDdKDwvABCKeeuMWDlQzQ= -github.com/gookit/ini/v2 v2.1.0/go.mod h1:r06awbwBtIHxjA7ndqWJkRgCAvSG+5FdSGrrbGfigtY= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -281,19 +277,35 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.11.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= @@ -306,7 +318,11 @@ github.com/jcmturner/gokrb5/v8 v8.4.2 h1:6ZIM6b/JJN0X8UM43ZOM6Z4SJzla+a/u7scXFJz github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -324,6 +340,8 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= +github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -337,27 +355,35 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -373,9 +399,11 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/natefinch/lumberjack v2.0.0+incompatible h1:4QJd3OLAMgj7ph+yZTuX13Ld4UpgHp07nNdFX7mqFfM= github.com/natefinch/lumberjack v2.0.0+incompatible/go.mod h1:Wi9p2TTF5DG5oU+6YfsmYQpsTIOm0B1VNzQg9Mw6nPk= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= +github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -393,6 +421,9 @@ github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl github.com/openzipkin/zipkin-go v0.3.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= github.com/openzipkin/zipkin-go v0.4.0 h1:CtfRrOVZtbDj8rt1WXjklw0kqqJQwICrCKmlfUuBUUw= github.com/openzipkin/zipkin-go v0.4.0/go.mod h1:4c3sLeE8xjNqehmF5RpAFLPLJxXscc0R4l6Zg0P1tTQ= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= @@ -403,6 +434,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -427,13 +459,17 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -443,7 +479,6 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -460,16 +495,10 @@ github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMT github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.0/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/yosuke-furukawa/json5 v0.1.1/go.mod h1:sw49aWDqNdRJ6DYUtIQiaA3xyj2IL9tjeNYmX2ixwcU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -478,11 +507,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da h1:NimzV1aGyq29m5ukMK0AMWEhFaL/lrEOaephfuoiARg= github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= -github.com/zeromicro/go-zero v1.3.2 h1:2HcmceZDEGwZWvofCG+0GXyh+Gtz/wKCW4Fq8Mb7KIg= -github.com/zeromicro/go-zero v1.3.2/go.mod h1:DEj3Fwj1Ui1ltsgf6YqwTL9nD4+tYzIRX0c1pWtQo1E= github.com/zeromicro/go-zero v1.3.3 h1:6qv9PcfqfB1tMgp1FJlP1LfWSZ4XD+FwojvA2h5LL2k= github.com/zeromicro/go-zero v1.3.3/go.mod h1:LwuYc2V04ZHhWPWGJYQ+kJ5DT4QSkeaZGqXiQcpkfks= go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI= @@ -524,7 +548,6 @@ go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -533,7 +556,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= @@ -571,7 +593,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -611,7 +632,6 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220421235706-1d1ef9303861/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -634,17 +654,19 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -687,10 +709,7 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -701,6 +720,7 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -792,6 +812,7 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6 google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -821,13 +842,14 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20220228195345-15d65a4533f7/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220422154200-b37d22cd5731/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220526192754-51939a95c655 h1:56rmjc5LUAanErbiNrY+s/Nd47wDQEJkpqS7i43M1I0= google.golang.org/genproto v0.0.0-20220526192754-51939a95c655/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -841,7 +863,6 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= @@ -862,6 +883,7 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -875,6 +897,7 @@ gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaD gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/main.go b/main.go index 957ffb2..389642b 100644 --- a/main.go +++ b/main.go @@ -30,7 +30,6 @@ func main() { live_logic.InitLiveManager(ctx) msg_transfer.Init(ctx) - msg_transfer.Run() opts := make([]ngs.Option, 0) opts = append(opts, ngs.WithComponents(logic.GameLogic.Services)) diff --git a/pkg/cmd/cmd_parser.go b/pkg/cmd/cmd_parser.go index dca6fbf..a9543df 100644 --- a/pkg/cmd/cmd_parser.go +++ b/pkg/cmd/cmd_parser.go @@ -6,40 +6,68 @@ import ( ) type ( + Match struct { + Prefix string // 匹配前缀 + Content []rune // 内容 + } CMD struct { - IsCMD bool // 是否CMD - Arr []string // 具体CMD []string + IsCMD bool // 是否CMD + Matches []Match // 匹配项 } Parser struct { - ac ac.AhoCorasick - distinct bool // 命令是否去重 - allKeyArr []string - keywordMap map[string]struct{} + ac ac.AhoCorasick // ac自动机 + distinct bool // 命令是否去重 + + patterns []Pattern // 匹配规则 } - ParserBuilder struct { + Pattern struct { + Prefix string // 前缀 + Alias []string // 前缀别名 + ContentMaxLen int // 内容最大长度,以rune数组长度计算 + isAlias bool // alias + realPattern *Pattern // 作为Alias时指向的实际Pattern } ) -func NewCMDParser(distinct bool, keys ...string) *Parser { - p := &Parser{ - distinct: distinct, - keywordMap: make(map[string]struct{}), - allKeyArr: make([]string, 0, len(keys)), - } - for _, keyword := range keys { - p.keywordMap[keyword] = struct{}{} - p.allKeyArr = append(p.allKeyArr, keyword) - } +func NewCMDParser(patterns ...Pattern) *Parser { + p := &Parser{} + + keyPrefixArr := p.initPattern(patterns) + builder := ac.NewAhoCorasickBuilder(ac.Opts{ AsciiCaseInsensitive: true, MatchOnlyWholeWords: false, MatchKind: ac.LeftMostLongestMatch, DFA: true, }) - p.ac = builder.Build(p.allKeyArr) + + p.ac = builder.Build(keyPrefixArr) return p } +func (p *Parser) initPattern(patterns []Pattern) []string { + p.patterns = make([]Pattern, 0, len(patterns)) + + result := make([]string, 0, len(patterns)) + for _, pattern := range patterns { + p.patterns = append(p.patterns, pattern) + result = append(result, pattern.Prefix) + for _, alias := range pattern.Alias { + p.patterns = append(p.patterns, Pattern{ + Prefix: alias, + isAlias: true, + realPattern: &Pattern{ + Prefix: pattern.Prefix, + Alias: pattern.Alias, + ContentMaxLen: pattern.ContentMaxLen, + }, + }) + result = append(result, alias) + } + } + return result +} + func (p *Parser) ParseTest(content string) []ac.Match { return p.ac.FindAll(content) } @@ -50,37 +78,53 @@ func (p *Parser) SetDistinct(distinct bool) { } // Parse 从弹幕内容解析命令 -func (p *Parser) Parse(content string) *CMD { - // 移除多余空格,小写 - tmpContent := strings.ToLower(strings.TrimSpace(content)) - - allKeyLen := 0 - matchedKeys := make([]string, 0) +func (p *Parser) Parse(msg string) CMD { + // 移除多余空格 + tmpContent := strings.TrimSpace(msg) + resp := CMD{ + Matches: make([]Match, 0), + } iter := p.ac.Iter(tmpContent) - for next := iter.Next(); next != nil; next = iter.Next() { - tmp := p.allKeyArr[next.Pattern()] - matchedKeys = append(matchedKeys, tmp) - allKeyLen += len(tmp) - } - isCMD := len(tmpContent) <= allKeyLen + for match := iter.Next(); match != nil; { + resp.IsCMD = true + pattern := p.patterns[match.Pattern()] + if pattern.isAlias { + pattern = *pattern.realPattern + } + m := Match{ + Prefix: pattern.Prefix, + } + tmpNext := iter.Next() - // 避免同类型指令重复 - arrMap := make(map[rune]struct{}) - var matchedCmdArr []string - if p.distinct && isCMD { - matchedCmdArr = make([]string, 0, len(matchedKeys)) - for _, s := range matchedKeys { - sRune := []rune(s) - if _, ok := arrMap[sRune[0]]; !ok { - arrMap[sRune[0]] = struct{}{} - matchedCmdArr = append(matchedCmdArr, s) + // 避免同类型指令重复 + if p.distinct { + for _, m := range resp.Matches { + if m.Prefix == pattern.Prefix { + goto end // continue out for + } } } - } - resp := &CMD{IsCMD: isCMD, Arr: matchedKeys} - if p.distinct { - resp.Arr = matchedCmdArr + + if tmpNext != nil { + //nextPattern := p.patterns[tmpNext.Pattern()] + content := []rune(tmpContent[match.End():tmpNext.Start()]) + if len(content) > pattern.ContentMaxLen { + resp.IsCMD = false + break + } + m.Content = content + } else { + content := []rune(tmpContent[match.End():]) + if len(content) > pattern.ContentMaxLen { + resp.IsCMD = false + break + } + m.Content = content + } + resp.Matches = append(resp.Matches, m) + end: + match = tmpNext } return resp } diff --git a/pkg/cmd/cmd_parser_test.go b/pkg/cmd/cmd_parser_test.go index 7b1e093..7c7e719 100644 --- a/pkg/cmd/cmd_parser_test.go +++ b/pkg/cmd/cmd_parser_test.go @@ -5,51 +5,95 @@ import ( "testing" ) -func TestParse(t *testing.T) { - contents := []string{ - "jc2m2b1s", - "jjjjjjjjjjjj", - "c1c1c1c1c1c1c1c1c1c1", - "c5c6c7c8c9c2c3c4c1c2c3c4c5c6c2c3c4c5c6c1", - "j2jjjjjjjj", - "j", - "加入游戏", - "加入", - "没有什么意义的弹幕", - "92813182798dsjks8923kjhsddfh892h3jkl214", - "昵称为什么可以这么长", - "六十九的覅哦我就法拉盛就发链接我i苏联空军弗拉放假 ", - "一堆乱七八糟的弹幕来袭", - "不服你咬我啊?", - "红方前排速度m2b2", - "c1c2c3c4c1c2c3c4", - "m2", - "b2", - "c2", - } +var p = NewCMDParser(Pattern{ + Prefix: "j", + Alias: []string{"加入", "加入游戏", "加入蓝方", "加入红方"}, + ContentMaxLen: 0, +}, Pattern{ + Prefix: "c", + Alias: []string{"切换"}, + ContentMaxLen: 1, +}, Pattern{ + Prefix: "w", + Alias: []string{"我在哪"}, + ContentMaxLen: 0, +}, Pattern{ + Prefix: "s", + ContentMaxLen: 1, +}, Pattern{ + Prefix: "m", + ContentMaxLen: 1, +}, Pattern{ + Prefix: "r", + ContentMaxLen: 1, +}, Pattern{ + Prefix: "dq", + Alias: []string{"购买粮草", "买粮草"}, + ContentMaxLen: 4, +}, Pattern{ + Prefix: "dw", + Alias: []string{"购买精英"}, + ContentMaxLen: 1, +}, Pattern{ + Prefix: "zw", + Alias: []string{"使用精英"}, + ContentMaxLen: 1, +}, Pattern{ + Prefix: "zz", + Alias: []string{"使用称号"}, + ContentMaxLen: 1, +}) - p := NewCMDParser(true, "j", "c1", "c2", "c3", "c4", "b1", "b2", "b3", "s", "b2", "b3", "w", "m1", "m2", "m3", "加入", "加入游戏") +func TestParse(t *testing.T) { + //contents := []string{ + // "jc2m2b1s", + // "jjjjjjjjjjjj", + // "c1c1c1c1c1c1c1c1c1c1", + // "c5c6c7c8c9c2c3c4c1c2c3c4c5c6c2c3c4c5c6c1", + // "j2jjjjjjjj", + // "j", + // "加入游戏", + // "加入", + // "没有什么意义的弹幕", + // "92813182798dsjks8923kjhsddfh892h3jkl214", + // "昵称为什么可以这么长", + // "六十九的覅哦我就法拉盛就发链接我i苏联空军弗拉放假 ", + // "一堆乱七八糟的弹幕来袭", + // "不服你咬我啊?", + // "红方前排速度m2b2", + // "c1c2c3c4c1c2c3c4", + // "m2", + // "b2", + // "c2", + //} - for _, content := range contents { - cmdStruct := p.Parse(content) - fmt.Printf("弹幕: [%s] 是命令否? [%v]\n", content, cmdStruct.IsCMD) - fmt.Printf("清洗后的真实命令为:%s len:%d\n\n", cmdStruct.Arr, len(cmdStruct.Arr)) - } + //p := NewCMDParser(true, "j", "c1", "c2", "c3", "c4", "b1", "b2", "b3", "s", "b2", "b3", "w", "m1", "m2", "m3", "加入", "加入游戏") + // + //for _, content := range contents { + // cmdStruct := p.Parse(content) + // fmt.Printf("弹幕: [%s] 是命令否? [%v]\n", content, cmdStruct.IsCMD) + // fmt.Printf("清洗后的真实命令为:%s len:%d\n\n", cmdStruct.Arr, len(cmdStruct.Arr)) + //} } func TestA(t *testing.T) { - p := NewCMDParser(false, "j", "j1", "j2", "j3", "结算1", "结算12") - c := p.Parse("结算1") - fmt.Println(c) + p.SetDistinct(false) + cmd := p.Parse("jc2j加入c2jc2加入游戏dq4654购买粮草9999购买精英1m1r2zz1zw2wss1") + + fmt.Println(cmd.IsCMD) + for _, match := range cmd.Matches { + fmt.Printf("prefix: %s, content: %s\n", match.Prefix, string(match.Content)) + } } func BenchmarkCmd(b *testing.B) { - p := NewCMDParser(false, "j", "c1", "c2", "c3", "c4", "b1", "b2", "b3", "s", "b2", "b3", "w", "m1", "m2", "m3", "加入", "加入游戏") - content := "jc2m2b1s" + content := "jc2" b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { - p.ParseTest(content) + go func() { + p.Parse(content) + }() } } diff --git a/pkg/grpcx/err_wrapper.go b/pkg/grpcx/err_wrapper.go new file mode 100644 index 0000000..74048c8 --- /dev/null +++ b/pkg/grpcx/err_wrapper.go @@ -0,0 +1,20 @@ +package grpcx + +import ( + "github.com/pkg/errors" + "google.golang.org/grpc/status" +) + +func WrapGrpcErr(e error) (code int32, msg string, err error) { + err = e + cause := errors.Cause(err) + gStatus, ok := status.FromError(cause) + if ok { + code = int32(gStatus.Code()) + msg = gStatus.Message() + } else { + code = 500 + msg = cause.Error() + } + return +} diff --git a/pkg/radar/engine.go b/pkg/radar/engine.go new file mode 100644 index 0000000..d992d0a --- /dev/null +++ b/pkg/radar/engine.go @@ -0,0 +1,18 @@ +package radar + +// Engine 简易风控引擎 +type Engine struct { + opt1 byte + opt2 byte + ratio int32 + danmakuChan chan struct{} + userId int64 + username string +} + +type Option struct { + IntervalCheck bool // 间隔检测开关 + Repeat bool // 重复性检测开关 + Violence bool // 暴力检测开关 + RuleStudy bool // 规则AI学习开关 +}