refactor: 粮草版,精英单位,称号。

main
NorthLan
parent 6c1f3c2d76
commit 5a3febc5cc

@ -0,0 +1,6 @@
Name: usercenter.rpc
ListenOn: 127.0.0.1:8080
Etcd:
Hosts:
- 127.0.0.1:2379
Key: usercenter.rpc

@ -0,0 +1,7 @@
package config
import "github.com/zeromicro/go-zero/zrpc"
type Config struct {
zrpc.RpcServerConf
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

@ -1 +0,0 @@
protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: rank.proto
// source: game/zhg/rank.proto
// </auto-generated>
#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 {
/// <summary>Holder for reflection information generated from rank.proto</summary>
/// <summary>Holder for reflection information generated from game/zhg/rank.proto</summary>
public static partial class RankReflection {
#region Descriptor
/// <summary>File descriptor for rank.proto</summary>
/// <summary>File descriptor for game/zhg/rank.proto</summary>
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,
/// <summary>
/// 伤害榜
/// </summary>
[pbr::OriginalName("Damage")] Damage = 1,
/// <summary>
/// 受伤榜
/// </summary>
[pbr::OriginalName("DeDamage")] DeDamage = 2,
/// <summary>
/// 名将榜
/// </summary>
[pbr::OriginalName("General")] General = 3,
/// <summary>
/// 落马榜
/// </summary>
[pbr::OriginalName("DeGeneral")] DeGeneral = 4,
/// <summary>
/// 小兵击杀
/// </summary>
[pbr::OriginalName("KillUnit")] KillUnit = 5,
/// <summary>
/// 小兵被杀
/// </summary>
[pbr::OriginalName("DeKillUnit")] DeKillUnit = 6,
/// <summary>
/// 击杀玩家
/// </summary>
[pbr::OriginalName("KillPlayer")] KillPlayer = 7,
/// <summary>
/// 被杀榜
/// </summary>
[pbr::OriginalName("DeKillPlayer")] DeKillPlayer = 8,
/// <summary>
/// 获胜榜
/// </summary>
[pbr::OriginalName("Win")] Win = 9,
/// <summary>
/// 战败榜
/// </summary>
[pbr::OriginalName("Lost")] Lost = 10,
/// <summary>
/// 一血榜
/// </summary>
[pbr::OriginalName("FirstBlood")] FirstBlood = 11,
/// <summary>
/// 被拿一血榜
/// </summary>
[pbr::OriginalName("DeFirstBlood")] DeFirstBlood = 12,
}
#endregion
#region Messages
/// <summary>
/// RankPvpReq 获取排行榜 request > rank.pvp
@ -158,13 +100,13 @@ namespace Pb.Game.Zhg {
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 1;
private int type_;
private global::Pb.Vars.RankType type_ = global::Pb.Vars.RankType.Unknown;
/// <summary>
/// rank类型
/// </summary>
[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 {
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 1;
private int type_;
private global::Pb.Vars.RankType type_ = global::Pb.Vars.RankType.Unknown;
/// <summary>
/// rank类型
/// </summary>
[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 {
/// <summary>Field number for the "type" field.</summary>
public const int TypeFieldNumber = 1;
private int type_;
private global::Pb.Vars.RankType type_ = global::Pb.Vars.RankType.Unknown;
/// <summary>
/// 榜单类型
/// </summary>
[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: {

File diff suppressed because it is too large Load Diff

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

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

@ -1 +0,0 @@
protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto

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

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

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

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

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: command.proto
// source: game/zhghz/command.proto
// </auto-generated>
#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 {
/// <summary>Holder for reflection information generated from command.proto</summary>
/// <summary>Holder for reflection information generated from game/zhghz/command.proto</summary>
public static partial class CommandReflection {
#region Descriptor
/// <summary>File descriptor for command.proto</summary>
/// <summary>File descriptor for game/zhghz/command.proto</summary>
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[] {

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: rank.proto
// source: game/zhghz/rank.proto
// </auto-generated>
#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 {
/// <summary>Holder for reflection information generated from rank.proto</summary>
/// <summary>Holder for reflection information generated from game/zhghz/rank.proto</summary>
public static partial class RankReflection {
#region Descriptor
/// <summary>File descriptor for rank.proto</summary>
/// <summary>File descriptor for game/zhghz/rank.proto</summary>
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[] {

@ -1 +0,0 @@
protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: command.proto
// source: game/zhgzd/command.proto
// </auto-generated>
#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 {
/// <summary>Holder for reflection information generated from command.proto</summary>
/// <summary>Holder for reflection information generated from game/zhgzd/command.proto</summary>
public static partial class CommandReflection {
#region Descriptor
/// <summary>File descriptor for command.proto</summary>
/// <summary>File descriptor for game/zhgzd/command.proto</summary>
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 {
}
/// <summary>
/// 移动自己位置 push -> game.pos -> p1/p2/p3/p4/p5
/// 移动自己位置 push -> game.pos -> p0/p1/p2/p3/p4/p5
/// </summary>
public sealed partial class Position : pb::IMessage<Position>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
@ -1183,7 +1188,7 @@ namespace Pb.Game.Zhgzd {
public const int Position_FieldNumber = 3;
private string position_ = "";
/// <summary>
/// 1-上兵营2-中兵营3-下兵营4-上前哨战5-下前哨战
/// 0-主基地,1-上兵营2-中兵营3-下兵营4-上前哨战5-下前哨战
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
@ -1384,6 +1389,287 @@ namespace Pb.Game.Zhgzd {
}
/// <summary>
/// 玩家在基地时选择出兵路线 push -> game.line -> m1/m2/m3
/// </summary>
public sealed partial class ChangeLine : pb::IMessage<ChangeLine>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<ChangeLine> _parser = new pb::MessageParser<ChangeLine>(() => new ChangeLine());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<ChangeLine> 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);
}
/// <summary>Field number for the "user" field.</summary>
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;
}
}
/// <summary>Field number for the "costSp" field.</summary>
public const int CostSpFieldNumber = 2;
private int costSp_;
/// <summary>
/// 消耗战略点量
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CostSp {
get { return costSp_; }
set {
costSp_ = value;
}
}
/// <summary>Field number for the "line" field.</summary>
public const int LineFieldNumber = 3;
private string line_ = "";
/// <summary>
/// 1-上2-中3-下
/// </summary>
[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
}
/// <summary>
/// 查询位置 push -> game.where -> w
/// </summary>
@ -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 {
}
/// <summary>
/// 超级技能 push -> game.superSkill -> 礼物效果
/// </summary>
public sealed partial class SuperSkill : pb::IMessage<SuperSkill>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<SuperSkill> _parser = new pb::MessageParser<SuperSkill>(() => new SuperSkill());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<SuperSkill> 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);
}
/// <summary>Field number for the "user" field.</summary>
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
}

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

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

@ -1 +0,0 @@
protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto

@ -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
--go_out=. --go-grpc_out=. --proto_path=. ^
./vars/*.proto ./mq/*.proto ./common/*.proto ./room/*.proto ./game/zhg/*.proto ./game/zhghz/*.proto ./game/zhgzd/*.proto

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

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

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

@ -1,6 +1,6 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: room.proto
// source: room/room.proto
// </auto-generated>
#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 {
/// <summary>Holder for reflection information generated from room.proto</summary>
/// <summary>Holder for reflection information generated from room/room.proto</summary>
public static partial class RoomReflection {
#region Descriptor
/// <summary>File descriptor for room.proto</summary>
/// <summary>File descriptor for room/room.proto</summary>
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[] {

@ -1 +0,0 @@
protoc --csharp_out=. --proto_path=. --proto_path=../../ *.proto

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

@ -0,0 +1,160 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: vars/vars.proto
// </auto-generated>
#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 {
/// <summary>Holder for reflection information generated from vars/vars.proto</summary>
public static partial class VarsReflection {
#region Descriptor
/// <summary>File descriptor for vars/vars.proto</summary>
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 {
/// <summary>
////// 消费
/// </summary>
[pbr::OriginalName("Pay")] Pay = 0,
/// <summary>
/// 购买粮草
/// </summary>
[pbr::OriginalName("BuyBattleFood")] BuyBattleFood = 1,
/// <summary>
/// 购买精英单位
/// </summary>
[pbr::OriginalName("BuyEliteUnit")] BuyEliteUnit = 2,
/// <summary>
/// 购买称号
/// </summary>
[pbr::OriginalName("BuyTitle")] BuyTitle = 3,
/// <summary>
////// 礼物
/// </summary>
[pbr::OriginalName("SendGift")] SendGift = 4,
/// <summary>
/// 购买贵族
/// </summary>
[pbr::OriginalName("BuyNobility")] BuyNobility = 5,
/// <summary>
////// 领取
/// </summary>
[pbr::OriginalName("DrawGiftPack")] DrawGiftPack = 10,
/// <summary>
/// 签到打卡
/// </summary>
[pbr::OriginalName("CheckIn")] CheckIn = 11,
/// <summary>
////// 游戏事件
/// </summary>
[pbr::OriginalName("EventRankSubmit")] EventRankSubmit = 20,
/// <summary>
/// 战局结束奖励
/// </summary>
[pbr::OriginalName("EventBattleEnd")] EventBattleEnd = 21,
/// <summary>
////// 其它事件
/// </summary>
[pbr::OriginalName("Transfer")] Transfer = 30,
}
public enum Goods {
/// <summary>
/// 称号
/// </summary>
[pbr::OriginalName("Title")] Title = 0,
/// <summary>
/// 精英单位
/// </summary>
[pbr::OriginalName("Elite")] Elite = 1,
}
public enum RankType {
[pbr::OriginalName("Unknown")] Unknown = 0,
/// <summary>
/// 伤害榜
/// </summary>
[pbr::OriginalName("Damage")] Damage = 1,
/// <summary>
/// 受伤榜
/// </summary>
[pbr::OriginalName("DeDamage")] DeDamage = 2,
/// <summary>
/// 名将榜
/// </summary>
[pbr::OriginalName("General")] General = 3,
/// <summary>
/// 落马榜
/// </summary>
[pbr::OriginalName("DeGeneral")] DeGeneral = 4,
/// <summary>
/// 小兵击杀
/// </summary>
[pbr::OriginalName("KillUnit")] KillUnit = 5,
/// <summary>
/// 小兵被杀
/// </summary>
[pbr::OriginalName("DeKillUnit")] DeKillUnit = 6,
/// <summary>
/// 击杀玩家
/// </summary>
[pbr::OriginalName("KillPlayer")] KillPlayer = 7,
/// <summary>
/// 被杀榜
/// </summary>
[pbr::OriginalName("DeKillPlayer")] DeKillPlayer = 8,
/// <summary>
/// 获胜榜
/// </summary>
[pbr::OriginalName("Win")] Win = 9,
/// <summary>
/// 战败榜
/// </summary>
[pbr::OriginalName("Lost")] Lost = 10,
/// <summary>
/// 一血榜
/// </summary>
[pbr::OriginalName("FirstBlood")] FirstBlood = 11,
/// <summary>
/// 被拿一血榜
/// </summary>
[pbr::OriginalName("DeFirstBlood")] DeFirstBlood = 12,
}
#endregion
}
#endregion Designer generated code

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

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

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

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

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

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

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

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

@ -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学习开关
}
Loading…
Cancel
Save