diff --git a/app/user_center/gen-model.bat b/app/user_center/gen-model.bat index 10e6206..abb3bfe 100644 --- a/app/user_center/gen-model.bat +++ b/app/user_center/gen-model.bat @@ -2,7 +2,7 @@ chcp 65001 @echo 开始代码生成 -set tables=user_title +set tables=user_grade set targetDir=.\model set templateDir=..\..\doc\template diff --git a/app/user_center/model/user_grade_model.go b/app/user_center/model/user_grade_model.go new file mode 100644 index 0000000..647fcc6 --- /dev/null +++ b/app/user_center/model/user_grade_model.go @@ -0,0 +1,65 @@ +package model + +import ( + "context" + "git.noahlan.cn/northlan/ntools-go/gorm-zero/gormx" + "gorm.io/gorm" +) + +var _ UserGradeModel = (*customUserGradeModel)(nil) + +const ( + DefaultUserGrade = 1 + DefaultUserGradeLevel = 1 + DefaultUserGradeStar = 0 + DefaultUserGradeBravePoint = 0 + + MaxUserGrade = 9 + MaxUserGradeLevel = 4 + MaxUserGradeStar = 5 + MaxUserGradeBravePoint = 3000 +) + +type ( + // UserGradeModel is an interface to be customized, add more methods here, + // and implement the added methods in customUserGradeModel. + UserGradeModel interface { + userGradeModel + UpdateOptimistic(ctx context.Context, tx *gorm.DB, data *UserGrade) error + } + + customUserGradeModel struct { + *defaultUserGradeModel + } +) + +// NewUserGradeModel returns a model for the database table. +func NewUserGradeModel(conn *gorm.DB) UserGradeModel { + return &customUserGradeModel{ + defaultUserGradeModel: newUserGradeModel(conn), + } +} + +func (m *customUserGradeModel) UpdateOptimistic(ctx context.Context, tx *gorm.DB, data *UserGrade) error { + if data.Grade < DefaultUserGrade { + data.Grade = DefaultUserGrade + } + if data.Level < DefaultUserGradeLevel { + data.Level = DefaultUserGradeLevel + } + if data.Star < DefaultUserGradeStar { + data.Star = DefaultUserGradeStar + } + if data.BravePoint < DefaultUserGradeBravePoint { + data.BravePoint = DefaultUserGradeBravePoint + } + db := gormx.WithTx(ctx, m.DB, tx) + result := db.Model(&data). + Updates(map[string]interface{}{ + "grade": data.Grade, + "level": data.Level, + "star": data.Star, + "brave_point": data.BravePoint, + }) + return gormx.WrapUpdateErr(result.Error, result.RowsAffected) +} diff --git a/app/user_center/model/user_grade_model_gen.go b/app/user_center/model/user_grade_model_gen.go new file mode 100644 index 0000000..26d8f0b --- /dev/null +++ b/app/user_center/model/user_grade_model_gen.go @@ -0,0 +1,92 @@ +// Code generated by goctl. DO NOT EDIT! + +package model + +import ( + "context" + "gorm.io/plugin/optimisticlock" + "strings" + "time" + + "git.noahlan.cn/northlan/ntools-go/gorm-zero/gormx" + "github.com/zeromicro/go-zero/core/stores/builder" + "github.com/zeromicro/go-zero/core/stringx" + "gorm.io/gorm" +) + +var ( + userGradeFieldNames = builder.RawFieldNames(&UserGrade{}) + userGradeRows = strings.Join(userGradeFieldNames, ",") + userGradeRowsExpectAutoSet = strings.Join(stringx.Remove(userGradeFieldNames, "`create_time`", "`update_time`"), ",") + userGradeRowsWithPlaceHolder = strings.Join(stringx.Remove(userGradeFieldNames, "`user_id`", "`create_time`", "`update_time`"), "=?,") + "=?" +) + +type ( + userGradeModel interface { + gormx.TxModel + Insert(ctx context.Context, tx *gorm.DB, data *UserGrade) error + FindOne(ctx context.Context, tx *gorm.DB, userId int64) (*UserGrade, error) + Update(ctx context.Context, tx *gorm.DB, data *UserGrade) error + Delete(ctx context.Context, tx *gorm.DB, userId int64) error + } + + defaultUserGradeModel struct { + gormx.GormConn + table string + } + + UserGrade struct { + UserId int64 `gorm:"column:user_id;primaryKey"` // 用户ID + Grade int64 `gorm:"column:grade"` // 段位 + Level int64 `gorm:"column:level"` // 段位等级 + Star int64 `gorm:"column:star"` // 等级星级 + BravePoint int64 `gorm:"column:brave_point"` // 骁勇分 + Version optimisticlock.Version `gorm:"column:version"` // 乐观锁 + CreateTime time.Time `gorm:"column:create_time;default:null"` // 创建时间 + UpdateTime time.Time `gorm:"column:update_time;default:null"` // 更新时间 + } +) + +var UserGradeTableName = "`user_grade`" + +func newUserGradeModel(conn *gorm.DB) *defaultUserGradeModel { + return &defaultUserGradeModel{ + GormConn: gormx.NewConn(conn), + table: UserGradeTableName, + } +} + +func (m *defaultUserGradeModel) Insert(ctx context.Context, tx *gorm.DB, data *UserGrade) error { + err := gormx.WithTx(ctx, m.DB, tx).Create(&data).Error + return err +} + +func (m *defaultUserGradeModel) FindOne(ctx context.Context, tx *gorm.DB, userId int64) (*UserGrade, error) { + var resp UserGrade + err := gormx.WithTx(ctx, m.DB, tx).Model(&UserGrade{}).Where("`user_id` = ?", userId).Take(&resp).Error + if err = gormx.WrapSelectErr(err); err != nil { + return nil, err + } + return &resp, nil +} + +func (m *defaultUserGradeModel) Update(ctx context.Context, tx *gorm.DB, data *UserGrade) error { + + result := gormx.WithTx(ctx, m.DB, tx).Save(data) + return gormx.WrapUpdateErr(result.Error, result.RowsAffected) + +} + +func (m *defaultUserGradeModel) Delete(ctx context.Context, tx *gorm.DB, userId int64) error { + err := gormx.WithTx(ctx, m.DB, tx).Delete(&UserGrade{}, userId).Error + + return err +} + +func (m *defaultUserGradeModel) tableName() string { + return m.table +} + +func (UserGrade) TableName() string { + return UserGradeTableName +} diff --git a/app/user_center/rpc/etc/user_center-dev.yaml b/app/user_center/rpc/etc/user_center-dev.yaml index 08eff59..f1d6c2e 100644 --- a/app/user_center/rpc/etc/user_center-dev.yaml +++ b/app/user_center/rpc/etc/user_center-dev.yaml @@ -20,7 +20,7 @@ Kafka: Topic: "notify-user-coin-dev" RankUpdate: Addr: [ "127.0.0.1:9093" ] - Topic: "rank-update-dev" + Topic: "grade-update-dev" RewardPool: Addr: [ "127.0.0.1:9093" ] Topic: "rewardPool-dev" @@ -37,7 +37,7 @@ UserRetriever: RoomShortInfoApi: https://api.live.bilibili.com/room/v1/Room/room_init TopListApi: https://api.live.bilibili.com/guard/topList Rank: - Enabled: true + Enabled: false Cron: Update: "@every 10s" # 10s一次 Persistence: "@every 10m" # 10min一次 @@ -87,7 +87,7 @@ Coin: # 签到 一周 0(周日) 1 2 3 4 5 6 Points: [ 60,10,15,20,25,30,50 ] Critical: 0.08 # 签到暴击率 - CriticalRadio: [ 1.2, 1.3, 1.5 ] # 暴击倍率 + CriticalRadio: [ 1.2, 1.3, 1.5, 1.8 ] # 暴击倍率 # RMB到弹币的转换 RMBToCoin: 10 # 平台礼物到RMB的转换 @@ -96,8 +96,13 @@ Coin: # 平台免费礼物到弹币的转换 FreeToCoin: bilibili: 0.01 # 价值1毛 +Grade: + BravePointCost: [0,300,320,350,400,450,500,600,800,1000] + MaxBravePoint: 3000 + WinScoreThreshold: 32 + MinUserCount: 8 Elite: - LiveDict: { "1": "0", "2": "1001", "3": "1002" } + LiveDict: { "1": "0", "2": "1001", "3": "1002", "4": "1003" } DefaultId: 0 Items: - Id: 1001 @@ -108,6 +113,10 @@ Elite: Sort: 3 PriceDay: 60 PriceForever: 18888 + - Id: 1003 + Sort: 4 + PriceDay: 65 + PriceForever: 18888 Title: LiveDict: { "1": "2000" } Items: @@ -132,29 +141,32 @@ Title: - Id: 6 Name: 群萌新 Type: custom + - Id: 7 + Name: 白马义从 + Type: custom - Id: 1000 Name: 军神 # 名将榜首 - Type: rank + Type: grade RankType: 3 - Id: 1001 Name: 人屠 # 小兵击杀榜首 - Type: rank + Type: grade RankType: 5 - Id: 1002 Name: 破营 # 拆迁榜首 - Type: rank + Type: grade RankType: 7 - Id: 1003 Name: 不败 # 常胜榜首 - Type: rank + Type: grade RankType: 9 - Id: 1004 Name: 勇冠三军 # 一血榜首 - Type: rank + Type: grade RankType: 11 - Id: 1005 Name: 求放过 # 被一血榜首 - Type: rank + Type: grade RankType: 12 - Id: 2000 Name: 无用之人 diff --git a/app/user_center/rpc/etc/user_center.yaml b/app/user_center/rpc/etc/user_center.yaml index cbbb770..99dadbf 100644 --- a/app/user_center/rpc/etc/user_center.yaml +++ b/app/user_center/rpc/etc/user_center.yaml @@ -21,7 +21,7 @@ Kafka: Topic: "notify-user-coin" RankUpdate: Addr: [ "127.0.0.1:9093" ] - Topic: "rank-update" + Topic: "grade-update" RewardPool: Addr: [ "127.0.0.1:9093" ] Topic: "rewardPool" @@ -135,27 +135,27 @@ Title: Type: custom - Id: 1000 Name: 军神 # 名将榜首 - Type: rank + Type: grade RankType: 3 - Id: 1001 Name: 人屠 # 小兵击杀榜首 - Type: rank + Type: grade RankType: 5 - Id: 1002 Name: 破营 # 拆迁榜首 - Type: rank + Type: grade RankType: 7 - Id: 1003 Name: 不败 # 常胜榜首 - Type: rank + Type: grade RankType: 9 - Id: 1004 Name: 勇冠三军 # 一血榜首 - Type: rank + Type: grade RankType: 11 - Id: 1005 Name: 求放过 # 被一血榜首 - Type: rank + Type: grade RankType: 12 - Id: 2000 Name: 无用之人 diff --git a/app/user_center/rpc/internal/common/grade/manager.go b/app/user_center/rpc/internal/common/grade/manager.go new file mode 100644 index 0000000..1530181 --- /dev/null +++ b/app/user_center/rpc/internal/common/grade/manager.go @@ -0,0 +1,253 @@ +package grade + +import ( + "context" + "git.noahlan.cn/northlan/ntools-go/gorm-zero/gormx" + "github.com/pkg/errors" + "gorm.io/gorm" + "live-service/app/user_center/model" + "live-service/app/user_center/rpc/internal/config" + "live-service/app/user_center/rpc/pb" +) + +// Manager 排位管理器 +// 段/二级星/星等级(5) 二级段顶级后,开始晋级赛(1次),获胜后升段。 +// 战斗积分(累计),抵扣掉段,每个大段抵扣值不同。 +// 获胜+星,失败-星 +type ( + Manager struct { + config *config.GameConfig + userGradeModel model.UserGradeModel + } + ReportReq struct { + UserId int64 + Username string + Position int32 + Score float32 + } + ReportResp struct { + ReportReq + *pb.Grade + Result pb.StatPvPReportResp_GradeResult + Reason pb.StatPvPReportResp_GradeReason + } +) + +func NewUserGradeManager(config *config.GameConfig, userGradeModel model.UserGradeModel) *Manager { + return &Manager{ + config: config, + userGradeModel: userGradeModel, + } +} + +// QueryUser 查询用户段位 +func (m *Manager) QueryUser(ctx context.Context, userId int64) (*model.UserGrade, error) { + var resp *model.UserGrade + if err := m.userGradeModel.TransactCtx(ctx, nil, func(tx *gorm.DB) error { + dbModel, err := m.userGradeModel.FindOne(ctx, nil, userId) + if err != nil { + if errors.Is(err, gormx.ErrNotFound) { + dbModel = &model.UserGrade{ + UserId: userId, + Grade: model.DefaultUserGrade, + Level: model.DefaultUserGradeLevel, + Star: model.DefaultUserGradeStar, + BravePoint: 0, + } + if err = m.userGradeModel.Insert(ctx, tx, dbModel); err != nil { + return err + } + resp = dbModel + } + return err + } + resp = dbModel + return nil + }); err != nil { + return nil, err + } + return resp, nil +} + +// Report 战斗记录 +func (m *Manager) Report(ctx context.Context, winItems, lostItems []ReportReq) ([]ReportResp, error) { + // 1. 查询现有段位信息 + // 2. 计算段位结果 + // 3. 更新并返回 + userCountSatisfied := len(winItems)+len(lostItems) >= m.config.Grade.MinUserCount + resp := make([]ReportResp, 0, len(winItems)+len(lostItems)) + if err := m.userGradeModel.TransactCtx(ctx, nil, func(tx *gorm.DB) error { + for _, item := range winItems { + if itemResp, err := m.reportItem(ctx, tx, item, true, userCountSatisfied); err != nil { + return err + } else { + resp = append(resp, *itemResp) + } + } + for _, item := range lostItems { + if itemResp, err := m.reportItem(ctx, tx, item, false, userCountSatisfied); err != nil { + return err + } else { + resp = append(resp, *itemResp) + } + } + return nil + }); err != nil { + return nil, err + } + return resp, nil +} + +func (m *Manager) reportItem(ctx context.Context, tx *gorm.DB, item ReportReq, win bool, userCountSatisfied bool) (*ReportResp, error) { + var resp *ReportResp + dbModel, err := m.userGradeModel.FindOne(ctx, tx, item.UserId) + if err != nil { + if !errors.Is(err, gormx.ErrNotFound) { + return nil, err + } + } + if dbModel == nil { + // insert + dbModel = &model.UserGrade{ + UserId: item.UserId, + } + grade, result, reason := m.calcRank(win, userCountSatisfied, + model.DefaultUserGrade, + model.DefaultUserGradeLevel, + model.DefaultUserGradeStar, + 0, + item.Score) + dbModel.Grade = int64(grade.Grade) + dbModel.Level = int64(grade.Level) + dbModel.Star = int64(grade.Star) + dbModel.BravePoint = grade.BravePoint + if err = m.userGradeModel.Insert(ctx, tx, dbModel); err != nil { + return nil, err + } + resp = &ReportResp{ + ReportReq: ReportReq{ + UserId: dbModel.UserId, + Username: item.Username, + Position: item.Position, + Score: item.Score, + }, + Grade: &grade, + Result: result, + Reason: reason, + } + return resp, nil + } + grade, result, reason := m.calcRank(win, userCountSatisfied, + dbModel.Grade, + dbModel.Level, + dbModel.Star, + dbModel.BravePoint, + item.Score) + dbModel.Grade = int64(grade.Grade) + dbModel.Level = int64(grade.Level) + dbModel.Star = int64(grade.Star) + dbModel.BravePoint = grade.BravePoint + if err = m.userGradeModel.UpdateOptimistic(ctx, tx, dbModel); err != nil { + return nil, err + } + resp = &ReportResp{ + ReportReq: ReportReq{ + UserId: dbModel.UserId, + Username: item.Username, + Position: item.Position, + Score: item.Score, + }, + Grade: &grade, + Result: result, + Reason: reason, + } + return resp, nil +} + +func (m *Manager) calcRank(win bool, userCountSatisfied bool, grade, level, star, bravePoint int64, score float32) (g pb.Grade, result pb.StatPvPReportResp_GradeResult, reason pb.StatPvPReportResp_GradeReason) { + g.Grade = int32(grade) + g.Level = int32(level) + g.Star = int32(star) + g.BravePoint = bravePoint + int64(score) + if g.BravePoint > m.config.Grade.MaxBravePoint { + g.BravePoint = m.config.Grade.MaxBravePoint + } + if score < m.config.Grade.WinScoreThreshold { + result = pb.StatPvPReportResp_Keep + reason = pb.StatPvPReportResp_Win + return + } + if !userCountSatisfied { + result = pb.StatPvPReportResp_Keep + reason = pb.StatPvPReportResp_Win + return + } + if win { + reason = pb.StatPvPReportResp_Win // 获胜 + if grade != model.MaxUserGrade || level != model.MaxUserGradeLevel-1 || star != model.MaxUserGradeStar { + // 非最高段位 + if star == model.MaxUserGradeStar { + g.Star = model.DefaultUserGradeStar + if level == model.MaxUserGradeLevel { + g.Level = model.DefaultUserGradeLevel + // grade + if grade == model.MaxUserGrade { + g.Grade = int32(grade) + result = pb.StatPvPReportResp_Keep + } else { + g.Grade = int32(grade + 1) + result = pb.StatPvPReportResp_GradeUp + } + } else { + g.Level = int32(level + 1) + result = pb.StatPvPReportResp_LevelUp + } + } else { + g.Star = int32(star + 1) + result = pb.StatPvPReportResp_StarUp // 升星 + } + } + } else { + // 段位的骁勇分减扣规则 + bravePointCost := m.config.Grade.BravePointCost[grade] + if bravePoint >= bravePointCost { + g.Grade = int32(grade) + g.Level = int32(level) + g.Star = int32(star) + g.BravePoint = bravePoint - bravePointCost + if g.BravePoint < 0 { + g.BravePoint = 0 + } + reason = pb.StatPvPReportResp_BravePoint + result = pb.StatPvPReportResp_Keep + return + } + reason = pb.StatPvPReportResp_Lost + if star != model.DefaultUserGradeStar || level != model.DefaultUserGradeLevel || grade != model.DefaultUserGrade { + if star == model.DefaultUserGradeStar { + g.Star = model.MaxUserGradeStar - 1 // 掉小段或掉大段,星星变 max-1 + if level == model.DefaultUserGradeLevel { + g.Level = model.MaxUserGradeLevel + if grade == model.DefaultUserGrade { + g.Grade = model.DefaultUserGrade + result = pb.StatPvPReportResp_Keep + } else { + g.Grade = int32(grade - 1) + result = pb.StatPvPReportResp_GradeDown + } + } else { + g.Level = int32(level - 1) + result = pb.StatPvPReportResp_LevelDown + } + } else { + g.Star = int32(star - 1) + result = pb.StatPvPReportResp_StarDown + } + } + } + g.BravePoint = bravePoint + int64(score) + if g.BravePoint > m.config.Grade.MaxBravePoint { + g.BravePoint = m.config.Grade.MaxBravePoint + } + return +} diff --git a/app/user_center/rpc/internal/config/config_game.go b/app/user_center/rpc/internal/config/config_game.go index 90e51e0..9ea8d3a 100644 --- a/app/user_center/rpc/internal/config/config_game.go +++ b/app/user_center/rpc/internal/config/config_game.go @@ -99,6 +99,13 @@ type ( GiftToRMB map[string]float64 // 平台礼物到RMB的转换 FreeToCoin map[string]float64 // 平台免费礼物到弹币的转换 } + // 段位 + Grade struct { + BravePointCost []int64 // 骁勇分抵扣规则,对于grade等级 + MaxBravePoint int64 // 最大骁勇分 + WinScoreThreshold float32 // 获胜升段分数阈值 + MinUserCount int // 最小段位计算用户量 + } // 精英单位 Elite Elite // 称号 diff --git a/app/user_center/rpc/internal/logic/rank/rank_job.go b/app/user_center/rpc/internal/logic/statistics/rank_job.go similarity index 99% rename from app/user_center/rpc/internal/logic/rank/rank_job.go rename to app/user_center/rpc/internal/logic/statistics/rank_job.go index 1d545a6..87ac04e 100644 --- a/app/user_center/rpc/internal/logic/rank/rank_job.go +++ b/app/user_center/rpc/internal/logic/statistics/rank_job.go @@ -1,4 +1,4 @@ -package rank +package statistics import ( "context" diff --git a/app/user_center/rpc/internal/logic/rank/rank_job_test.go b/app/user_center/rpc/internal/logic/statistics/rank_job_test.go similarity index 95% rename from app/user_center/rpc/internal/logic/rank/rank_job_test.go rename to app/user_center/rpc/internal/logic/statistics/rank_job_test.go index 6571c7a..4875b5f 100644 --- a/app/user_center/rpc/internal/logic/rank/rank_job_test.go +++ b/app/user_center/rpc/internal/logic/statistics/rank_job_test.go @@ -1,4 +1,4 @@ -package rank +package statistics import ( "fmt" diff --git a/app/user_center/rpc/internal/logic/rank/rank_pvp_logic.go b/app/user_center/rpc/internal/logic/statistics/rank_pvp_logic.go similarity index 98% rename from app/user_center/rpc/internal/logic/rank/rank_pvp_logic.go rename to app/user_center/rpc/internal/logic/statistics/rank_pvp_logic.go index d9b3b3e..b32cd1d 100644 --- a/app/user_center/rpc/internal/logic/rank/rank_pvp_logic.go +++ b/app/user_center/rpc/internal/logic/statistics/rank_pvp_logic.go @@ -1,4 +1,4 @@ -package rank +package statistics import ( "context" diff --git a/app/user_center/rpc/internal/logic/rank/rank_pvp_submit_logic.go b/app/user_center/rpc/internal/logic/statistics/rank_pvp_submit_logic.go similarity index 99% rename from app/user_center/rpc/internal/logic/rank/rank_pvp_submit_logic.go rename to app/user_center/rpc/internal/logic/statistics/rank_pvp_submit_logic.go index 0130f6c..b1698d4 100644 --- a/app/user_center/rpc/internal/logic/rank/rank_pvp_submit_logic.go +++ b/app/user_center/rpc/internal/logic/statistics/rank_pvp_submit_logic.go @@ -1,4 +1,4 @@ -package rank +package statistics import ( "context" diff --git a/app/user_center/rpc/internal/logic/rank/rank_pvp_submit_logic_test.go b/app/user_center/rpc/internal/logic/statistics/rank_pvp_submit_logic_test.go similarity index 91% rename from app/user_center/rpc/internal/logic/rank/rank_pvp_submit_logic_test.go rename to app/user_center/rpc/internal/logic/statistics/rank_pvp_submit_logic_test.go index 02d54b1..ac10fbb 100644 --- a/app/user_center/rpc/internal/logic/rank/rank_pvp_submit_logic_test.go +++ b/app/user_center/rpc/internal/logic/statistics/rank_pvp_submit_logic_test.go @@ -1,4 +1,4 @@ -package rank +package statistics import ( "fmt" diff --git a/app/user_center/rpc/internal/logic/statistics/stat_pvp_report_logic.go b/app/user_center/rpc/internal/logic/statistics/stat_pvp_report_logic.go index d567dfe..3e53256 100644 --- a/app/user_center/rpc/internal/logic/statistics/stat_pvp_report_logic.go +++ b/app/user_center/rpc/internal/logic/statistics/stat_pvp_report_logic.go @@ -8,6 +8,7 @@ import ( "github.com/zeromicro/go-zero/core/logx" "gorm.io/gorm" "live-service/app/user_center/model" + "live-service/app/user_center/rpc/internal/common/grade" "live-service/app/user_center/rpc/internal/svc" "live-service/app/user_center/rpc/pb" "sort" @@ -82,6 +83,46 @@ func (l *StatPvpReportLogic) StatPvpReport(in *pb.StatPvPReportReq) (*pb.StatPvP l.Logger.Errorf("战败PvP记录失败, err:%+v", err) } + // 4. 段位 + winGradeItems := make([]grade.ReportReq, 0, len(winItems)) + lostGradeItems := make([]grade.ReportReq, 0, len(lostItems)) + for _, item := range winItems { + winGradeItems = append(winGradeItems, grade.ReportReq{ + UserId: item.uid, + Username: item.uname, + Position: item.respItem.Position, + Score: item.respItem.Score, + }) + } + for _, item := range lostItems { + lostGradeItems = append(lostGradeItems, grade.ReportReq{ + UserId: item.uid, + Username: item.uname, + Position: item.respItem.Position, + Score: item.respItem.Score, + }) + } + if gradeReported, err := l.svcCtx.GradeManager.Report(l.ctx, winGradeItems, lostGradeItems); err != nil { + l.Logger.Errorf("计算段位时发生错误", err) + } else { + for _, reportResp := range gradeReported { + for _, item := range winItems { + if item.uid == reportResp.UserId { + item.respItem.Grade = reportResp.Grade + item.respItem.GradeResult = reportResp.Result + item.respItem.GradeReason = reportResp.Reason + } + } + for _, item := range lostItems { + if item.uid == reportResp.UserId { + item.respItem.Grade = reportResp.Grade + item.respItem.GradeResult = reportResp.Result + item.respItem.GradeReason = reportResp.Reason + } + } + } + } + // resp resp.WinItems = make([]*pb.StatPvPReportResp_Item, 0, len(winItems)) resp.LostItems = make([]*pb.StatPvPReportResp_Item, 0, len(lostItems)) @@ -126,6 +167,7 @@ func (l *StatPvpReportLogic) calcScoreResponse(sum sumType, items []*statPvPRepo Uid: item.uid, Uname: item.uname, Score: 0, + Grade: &pb.Grade{}, } var tmpScore float64 if sum.damage != 0 { @@ -182,7 +224,7 @@ func (l *StatPvpReportLogic) calcScoreResponse(sum sumType, items []*statPvPRepo itemResp.Score = 0 } // 最终进行四舍五入 - tmp, _ := decimal.NewFromFloat32(itemResp.Score).Round(1).Float64() + tmp, _ := decimal.NewFromFloat32(itemResp.Score).Round(0).Float64() itemResp.Score = float32(tmp) item.respItem = itemResp diff --git a/app/user_center/rpc/internal/logic/rank/user_rank_pvp_logic.go b/app/user_center/rpc/internal/logic/statistics/user_rank_pvp_logic.go similarity index 99% rename from app/user_center/rpc/internal/logic/rank/user_rank_pvp_logic.go rename to app/user_center/rpc/internal/logic/statistics/user_rank_pvp_logic.go index a891458..98b6a66 100644 --- a/app/user_center/rpc/internal/logic/rank/user_rank_pvp_logic.go +++ b/app/user_center/rpc/internal/logic/statistics/user_rank_pvp_logic.go @@ -1,4 +1,4 @@ -package rank +package statistics import ( "context" diff --git a/app/user_center/rpc/internal/logic/user/get_user_grade_logic.go b/app/user_center/rpc/internal/logic/user/get_user_grade_logic.go new file mode 100644 index 0000000..662ed46 --- /dev/null +++ b/app/user_center/rpc/internal/logic/user/get_user_grade_logic.go @@ -0,0 +1,44 @@ +package user + +import ( + "context" + "github.com/pkg/errors" + "live-service/common/nerr" + + "live-service/app/user_center/rpc/internal/svc" + "live-service/app/user_center/rpc/pb" + + "github.com/zeromicro/go-zero/core/logx" +) + +type GetUserGradeLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewGetUserGradeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserGradeLogic { + return &GetUserGradeLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +// @ZeroGroup: grade +func (l *GetUserGradeLogic) GetUserGrade(in *pb.UserIdReq) (*pb.UserGradeResp, error) { + gradeResp, err := l.svcCtx.GradeManager.QueryUser(l.ctx, in.UserId) + if err != nil { + return nil, errors.Wrapf(nerr.NewWithErr(err), "获取用户段位信息失败, err:%v", err) + } + + return &pb.UserGradeResp{ + UserId: in.UserId, + Grade: &pb.Grade{ + Grade: int32(gradeResp.Grade), + Level: int32(gradeResp.Level), + Star: int32(gradeResp.Star), + BravePoint: gradeResp.BravePoint, + }, + }, nil +} diff --git a/app/user_center/rpc/internal/logic/user/retrieve_platform_user_logic.go b/app/user_center/rpc/internal/logic/user/retrieve_platform_user_logic.go index 763bb6f..18ad3ec 100644 --- a/app/user_center/rpc/internal/logic/user/retrieve_platform_user_logic.go +++ b/app/user_center/rpc/internal/logic/user/retrieve_platform_user_logic.go @@ -74,7 +74,10 @@ func (l *RetrievePlatformUserLogic) RetrievePlatformUser(in *pb.PlatformUserReq) return nerr.NewWithCode(nerr.DBError) } displayUser = &model.UserForDisplay{ - UserId: newId, + Id: dbPlatformUser.Id, + UserId: newId, + PUname: in.PUname, + PAvatar: in.PAvatar, } return nil }); err != nil { diff --git a/app/user_center/rpc/internal/server/user_center_server.go b/app/user_center/rpc/internal/server/user_center_server.go index 88d310c..beb017f 100644 --- a/app/user_center/rpc/internal/server/user_center_server.go +++ b/app/user_center/rpc/internal/server/user_center_server.go @@ -7,7 +7,6 @@ import ( "context" "live-service/app/user_center/rpc/internal/logic/coin" "live-service/app/user_center/rpc/internal/logic/gift" - "live-service/app/user_center/rpc/internal/logic/rank" "live-service/app/user_center/rpc/internal/logic/statistics" "live-service/app/user_center/rpc/internal/logic/user" "live-service/app/user_center/rpc/internal/logic/zhg" @@ -90,19 +89,25 @@ func (s *UserCenterServer) DrawGiftPack(ctx context.Context, in *pb.DrawGiftPack return l.DrawGiftPack(in) } +// @ZeroGroup: grade +func (s *UserCenterServer) GetUserGrade(ctx context.Context, in *pb.UserIdReq) (*pb.UserGradeResp, error) { + l := user.NewGetUserGradeLogic(ctx, s.svcCtx) + return l.GetUserGrade(in) +} + // rankPvp pvp排行 func (s *UserCenterServer) RankPvp(ctx context.Context, in *pb.RankPvpReq) (*pb.RankPvpResp, error) { - l := rank.NewRankPvpLogic(ctx, s.svcCtx) + l := statistics.NewRankPvpLogic(ctx, s.svcCtx) return l.RankPvp(in) } func (s *UserCenterServer) RankPvpSubmit(ctx context.Context, in *pb.RankPvpSubmitReq) (*pb.RankPvpSubmitResp, error) { - l := rank.NewRankPvpSubmitLogic(ctx, s.svcCtx) + l := statistics.NewRankPvpSubmitLogic(ctx, s.svcCtx) return l.RankPvpSubmit(in) } func (s *UserCenterServer) UserRankPvp(ctx context.Context, in *pb.UserRankReq) (*pb.UserRankResp, error) { - l := rank.NewUserRankPvpLogic(ctx, s.svcCtx) + l := statistics.NewUserRankPvpLogic(ctx, s.svcCtx) return l.UserRankPvp(in) } diff --git a/app/user_center/rpc/internal/svc/service_context.go b/app/user_center/rpc/internal/svc/service_context.go index 74033fe..961a251 100644 --- a/app/user_center/rpc/internal/svc/service_context.go +++ b/app/user_center/rpc/internal/svc/service_context.go @@ -6,6 +6,7 @@ import ( "gorm.io/gorm/logger" "live-service/app/user_center/model" "live-service/app/user_center/rpc/internal/common/coin_manager" + "live-service/app/user_center/rpc/internal/common/grade" "live-service/app/user_center/rpc/internal/config" "live-service/app/user_center/rpc/internal/mq" "log" @@ -25,6 +26,7 @@ type ServiceContext struct { UserCoinModel model.UserCoinModel UserNobilityModel model.UserNobilityModel UserCheckInModel model.UserCheckInModel + UserGradeModel model.UserGradeModel UserEliteModel model.UserEliteModel UserTitleModel model.UserTitleModel @@ -39,7 +41,8 @@ type ServiceContext struct { RewardPoolMq *mq.RewardPool // 奖池MQ //RewardPoolManager *reward_pool.PoolManager - CoinManager *coin_manager.Manager + CoinManager *coin_manager.Manager + GradeManager *grade.Manager } func NewServiceContext(c *config.Config, cg *config.GameConfig) *ServiceContext { @@ -66,10 +69,10 @@ func NewServiceContext(c *config.Config, cg *config.GameConfig) *ServiceContext userPlatformModel := model.NewUserPlatformModel(gormDb) userIntegralModel := model.NewUserIntegralModel(gormDb) userCoinModel := model.NewUserCoinModel(gormDb) + userGradeModel := model.NewUserGradeModel(gormDb) userMq := mq.NewUserMq(userPlatformModel, c.Kafka) rewardPoolMq := mq.NewRewardPoolMq(c.Kafka) - //rewardPoolManager := reward_pool.NewRewardPoolManager( // c.Integral.RewardPool.InitReward, // reward_pool.Ratio{ @@ -93,6 +96,7 @@ func NewServiceContext(c *config.Config, cg *config.GameConfig) *ServiceContext UserCoinModel: userCoinModel, UserNobilityModel: model.NewUserNobilityModel(gormDb), UserCheckInModel: model.NewUserCheckInModel(gormDb), + UserGradeModel: userGradeModel, UserEliteModel: model.NewUserEliteModel(gormDb), UserTitleModel: model.NewUserTitleModel(gormDb), @@ -105,6 +109,7 @@ func NewServiceContext(c *config.Config, cg *config.GameConfig) *ServiceContext RewardPoolMq: rewardPoolMq, //RewardPoolManager: rewardPoolManager, - CoinManager: coin_manager.NewCoinManager(userCoinModel, userMq), + CoinManager: coin_manager.NewCoinManager(userCoinModel, userMq), + GradeManager: grade.NewUserGradeManager(cg, userGradeModel), } } diff --git a/app/user_center/rpc/pb/user_center.pb.go b/app/user_center/rpc/pb/user_center.pb.go index a15ec54..9ac61f2 100644 --- a/app/user_center/rpc/pb/user_center.pb.go +++ b/app/user_center/rpc/pb/user_center.pb.go @@ -67,6 +67,116 @@ func (GiftType) EnumDescriptor() ([]byte, []int) { return file_user_center_proto_rawDescGZIP(), []int{0} } +type StatPvPReportResp_GradeResult int32 + +const ( + StatPvPReportResp_Keep StatPvPReportResp_GradeResult = 0 // 不变(因为骁勇分抵扣) + StatPvPReportResp_GradeUp StatPvPReportResp_GradeResult = 1 // 段位提升 + StatPvPReportResp_LevelUp StatPvPReportResp_GradeResult = 2 // 段位等级提升 + StatPvPReportResp_StarUp StatPvPReportResp_GradeResult = 3 // 等级星级提升 + StatPvPReportResp_GradeDown StatPvPReportResp_GradeResult = 4 // 掉段 + StatPvPReportResp_LevelDown StatPvPReportResp_GradeResult = 5 // 降级 + StatPvPReportResp_StarDown StatPvPReportResp_GradeResult = 6 // 掉星 +) + +// Enum value maps for StatPvPReportResp_GradeResult. +var ( + StatPvPReportResp_GradeResult_name = map[int32]string{ + 0: "Keep", + 1: "GradeUp", + 2: "LevelUp", + 3: "StarUp", + 4: "GradeDown", + 5: "LevelDown", + 6: "StarDown", + } + StatPvPReportResp_GradeResult_value = map[string]int32{ + "Keep": 0, + "GradeUp": 1, + "LevelUp": 2, + "StarUp": 3, + "GradeDown": 4, + "LevelDown": 5, + "StarDown": 6, + } +) + +func (x StatPvPReportResp_GradeResult) Enum() *StatPvPReportResp_GradeResult { + p := new(StatPvPReportResp_GradeResult) + *p = x + return p +} + +func (x StatPvPReportResp_GradeResult) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StatPvPReportResp_GradeResult) Descriptor() protoreflect.EnumDescriptor { + return file_user_center_proto_enumTypes[1].Descriptor() +} + +func (StatPvPReportResp_GradeResult) Type() protoreflect.EnumType { + return &file_user_center_proto_enumTypes[1] +} + +func (x StatPvPReportResp_GradeResult) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StatPvPReportResp_GradeResult.Descriptor instead. +func (StatPvPReportResp_GradeResult) EnumDescriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{17, 0} +} + +type StatPvPReportResp_GradeReason int32 + +const ( + StatPvPReportResp_Win StatPvPReportResp_GradeReason = 0 // 因为获胜 + StatPvPReportResp_Lost StatPvPReportResp_GradeReason = 1 // 因为战败 + StatPvPReportResp_BravePoint StatPvPReportResp_GradeReason = 2 // 因为骁勇分保护,所以不掉星 +) + +// Enum value maps for StatPvPReportResp_GradeReason. +var ( + StatPvPReportResp_GradeReason_name = map[int32]string{ + 0: "Win", + 1: "Lost", + 2: "BravePoint", + } + StatPvPReportResp_GradeReason_value = map[string]int32{ + "Win": 0, + "Lost": 1, + "BravePoint": 2, + } +) + +func (x StatPvPReportResp_GradeReason) Enum() *StatPvPReportResp_GradeReason { + p := new(StatPvPReportResp_GradeReason) + *p = x + return p +} + +func (x StatPvPReportResp_GradeReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StatPvPReportResp_GradeReason) Descriptor() protoreflect.EnumDescriptor { + return file_user_center_proto_enumTypes[2].Descriptor() +} + +func (StatPvPReportResp_GradeReason) Type() protoreflect.EnumType { + return &file_user_center_proto_enumTypes[2] +} + +func (x StatPvPReportResp_GradeReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StatPvPReportResp_GradeReason.Descriptor instead. +func (StatPvPReportResp_GradeReason) EnumDescriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{17, 1} +} + // model type Empty struct { state protoimpl.MessageState @@ -1120,6 +1230,132 @@ func (x *UserBuyNobilityReq) GetEndTime() int64 { return 0 } +type Grade struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Grade int32 `protobuf:"varint,1,opt,name=grade,proto3" json:"grade,omitempty"` // 段位 + Level int32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"` // 段位等级 + Star int32 `protobuf:"varint,3,opt,name=star,proto3" json:"star,omitempty"` // 等级星级 + BravePoint int64 `protobuf:"varint,4,opt,name=bravePoint,proto3" json:"bravePoint,omitempty"` // 剩余 骁勇分(历史评分累计) +} + +func (x *Grade) Reset() { + *x = Grade{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Grade) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Grade) ProtoMessage() {} + +func (x *Grade) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Grade.ProtoReflect.Descriptor instead. +func (*Grade) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{14} +} + +func (x *Grade) GetGrade() int32 { + if x != nil { + return x.Grade + } + return 0 +} + +func (x *Grade) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *Grade) GetStar() int32 { + if x != nil { + return x.Star + } + return 0 +} + +func (x *Grade) GetBravePoint() int64 { + if x != nil { + return x.BravePoint + } + return 0 +} + +type UserGradeResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` + Grade *Grade `protobuf:"bytes,2,opt,name=grade,proto3" json:"grade,omitempty"` +} + +func (x *UserGradeResp) Reset() { + *x = UserGradeResp{} + if protoimpl.UnsafeEnabled { + mi := &file_user_center_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UserGradeResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UserGradeResp) ProtoMessage() {} + +func (x *UserGradeResp) ProtoReflect() protoreflect.Message { + mi := &file_user_center_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UserGradeResp.ProtoReflect.Descriptor instead. +func (*UserGradeResp) Descriptor() ([]byte, []int) { + return file_user_center_proto_rawDescGZIP(), []int{15} +} + +func (x *UserGradeResp) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *UserGradeResp) GetGrade() *Grade { + if x != nil { + return x.Grade + } + return nil +} + // 通知-PvP战报 statistics.pvp.report type StatPvPReportReq struct { state protoimpl.MessageState @@ -1135,7 +1371,7 @@ type StatPvPReportReq struct { func (x *StatPvPReportReq) Reset() { *x = StatPvPReportReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[14] + mi := &file_user_center_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1148,7 +1384,7 @@ func (x *StatPvPReportReq) String() string { func (*StatPvPReportReq) ProtoMessage() {} func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[14] + mi := &file_user_center_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1161,7 +1397,7 @@ func (x *StatPvPReportReq) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportReq.ProtoReflect.Descriptor instead. func (*StatPvPReportReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{14} + return file_user_center_proto_rawDescGZIP(), []int{16} } func (x *StatPvPReportReq) GetWinCamp() int32 { @@ -1207,7 +1443,7 @@ type StatPvPReportResp struct { func (x *StatPvPReportResp) Reset() { *x = StatPvPReportResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[15] + mi := &file_user_center_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1220,7 +1456,7 @@ func (x *StatPvPReportResp) String() string { func (*StatPvPReportResp) ProtoMessage() {} func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[15] + mi := &file_user_center_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1233,7 +1469,7 @@ func (x *StatPvPReportResp) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportResp.ProtoReflect.Descriptor instead. func (*StatPvPReportResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{15} + return file_user_center_proto_rawDescGZIP(), []int{17} } func (x *StatPvPReportResp) GetWinCamp() int32 { @@ -1278,7 +1514,7 @@ type GiftPackItem struct { func (x *GiftPackItem) Reset() { *x = GiftPackItem{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[16] + mi := &file_user_center_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1291,7 +1527,7 @@ func (x *GiftPackItem) String() string { func (*GiftPackItem) ProtoMessage() {} func (x *GiftPackItem) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[16] + mi := &file_user_center_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1304,7 +1540,7 @@ func (x *GiftPackItem) ProtoReflect() protoreflect.Message { // Deprecated: Use GiftPackItem.ProtoReflect.Descriptor instead. func (*GiftPackItem) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{16} + return file_user_center_proto_rawDescGZIP(), []int{18} } func (x *GiftPackItem) GetPackType() string { @@ -1349,7 +1585,7 @@ type DrawGiftPackReq struct { func (x *DrawGiftPackReq) Reset() { *x = DrawGiftPackReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[17] + mi := &file_user_center_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1362,7 +1598,7 @@ func (x *DrawGiftPackReq) String() string { func (*DrawGiftPackReq) ProtoMessage() {} func (x *DrawGiftPackReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[17] + mi := &file_user_center_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1375,7 +1611,7 @@ func (x *DrawGiftPackReq) ProtoReflect() protoreflect.Message { // Deprecated: Use DrawGiftPackReq.ProtoReflect.Descriptor instead. func (*DrawGiftPackReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{17} + return file_user_center_proto_rawDescGZIP(), []int{19} } func (x *DrawGiftPackReq) GetUid() int64 { @@ -1412,7 +1648,7 @@ type DrawGiftPackResp struct { func (x *DrawGiftPackResp) Reset() { *x = DrawGiftPackResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[18] + mi := &file_user_center_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1425,7 +1661,7 @@ func (x *DrawGiftPackResp) String() string { func (*DrawGiftPackResp) ProtoMessage() {} func (x *DrawGiftPackResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[18] + mi := &file_user_center_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1438,7 +1674,7 @@ func (x *DrawGiftPackResp) ProtoReflect() protoreflect.Message { // Deprecated: Use DrawGiftPackResp.ProtoReflect.Descriptor instead. func (*DrawGiftPackResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{18} + return file_user_center_proto_rawDescGZIP(), []int{20} } func (x *DrawGiftPackResp) GetUid() int64 { @@ -1476,7 +1712,7 @@ type IncreaseWelfareReq struct { func (x *IncreaseWelfareReq) Reset() { *x = IncreaseWelfareReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[19] + mi := &file_user_center_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1489,7 +1725,7 @@ func (x *IncreaseWelfareReq) String() string { func (*IncreaseWelfareReq) ProtoMessage() {} func (x *IncreaseWelfareReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[19] + mi := &file_user_center_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1502,7 +1738,7 @@ func (x *IncreaseWelfareReq) ProtoReflect() protoreflect.Message { // Deprecated: Use IncreaseWelfareReq.ProtoReflect.Descriptor instead. func (*IncreaseWelfareReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{19} + return file_user_center_proto_rawDescGZIP(), []int{21} } func (x *IncreaseWelfareReq) GetUid() int64 { @@ -1538,7 +1774,7 @@ type RankPvpReq struct { func (x *RankPvpReq) Reset() { *x = RankPvpReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[20] + mi := &file_user_center_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1551,7 +1787,7 @@ func (x *RankPvpReq) String() string { func (*RankPvpReq) ProtoMessage() {} func (x *RankPvpReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[20] + mi := &file_user_center_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1564,7 +1800,7 @@ func (x *RankPvpReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpReq.ProtoReflect.Descriptor instead. func (*RankPvpReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{20} + return file_user_center_proto_rawDescGZIP(), []int{22} } func (x *RankPvpReq) GetType() vars.RankType { @@ -1593,7 +1829,7 @@ type RankPvpResp struct { func (x *RankPvpResp) Reset() { *x = RankPvpResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[21] + mi := &file_user_center_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1606,7 +1842,7 @@ func (x *RankPvpResp) String() string { func (*RankPvpResp) ProtoMessage() {} func (x *RankPvpResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[21] + mi := &file_user_center_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1619,7 +1855,7 @@ func (x *RankPvpResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpResp.ProtoReflect.Descriptor instead. func (*RankPvpResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{21} + return file_user_center_proto_rawDescGZIP(), []int{23} } func (x *RankPvpResp) GetType() vars.RankType { @@ -1649,7 +1885,7 @@ type RankPvpSubmitReq struct { func (x *RankPvpSubmitReq) Reset() { *x = RankPvpSubmitReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[22] + mi := &file_user_center_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1662,7 +1898,7 @@ func (x *RankPvpSubmitReq) String() string { func (*RankPvpSubmitReq) ProtoMessage() {} func (x *RankPvpSubmitReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[22] + mi := &file_user_center_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1675,7 +1911,7 @@ func (x *RankPvpSubmitReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitReq.ProtoReflect.Descriptor instead. func (*RankPvpSubmitReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{22} + return file_user_center_proto_rawDescGZIP(), []int{24} } func (x *RankPvpSubmitReq) GetRankType() vars.RankType { @@ -1703,7 +1939,7 @@ type RankPvpSubmitResp struct { func (x *RankPvpSubmitResp) Reset() { *x = RankPvpSubmitResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[23] + mi := &file_user_center_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1716,7 +1952,7 @@ func (x *RankPvpSubmitResp) String() string { func (*RankPvpSubmitResp) ProtoMessage() {} func (x *RankPvpSubmitResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[23] + mi := &file_user_center_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1729,7 +1965,7 @@ func (x *RankPvpSubmitResp) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitResp.ProtoReflect.Descriptor instead. func (*RankPvpSubmitResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{23} + return file_user_center_proto_rawDescGZIP(), []int{25} } func (x *RankPvpSubmitResp) GetItems() []*RankPvpSubmitResp_Item { @@ -1754,7 +1990,7 @@ type UserRankReq struct { func (x *UserRankReq) Reset() { *x = UserRankReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[24] + mi := &file_user_center_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1767,7 +2003,7 @@ func (x *UserRankReq) String() string { func (*UserRankReq) ProtoMessage() {} func (x *UserRankReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[24] + mi := &file_user_center_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1780,7 +2016,7 @@ func (x *UserRankReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UserRankReq.ProtoReflect.Descriptor instead. func (*UserRankReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{24} + return file_user_center_proto_rawDescGZIP(), []int{26} } func (x *UserRankReq) GetUserId() int64 { @@ -1822,7 +2058,7 @@ type UserRankResp struct { func (x *UserRankResp) Reset() { *x = UserRankResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[25] + mi := &file_user_center_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1835,7 +2071,7 @@ func (x *UserRankResp) String() string { func (*UserRankResp) ProtoMessage() {} func (x *UserRankResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[25] + mi := &file_user_center_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1848,7 +2084,7 @@ func (x *UserRankResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UserRankResp.ProtoReflect.Descriptor instead. func (*UserRankResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{25} + return file_user_center_proto_rawDescGZIP(), []int{27} } func (x *UserRankResp) GetItems() []*UserRankResp_Item { @@ -1871,7 +2107,7 @@ type EliteReq struct { func (x *EliteReq) Reset() { *x = EliteReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[26] + mi := &file_user_center_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1884,7 +2120,7 @@ func (x *EliteReq) String() string { func (*EliteReq) ProtoMessage() {} func (x *EliteReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[26] + mi := &file_user_center_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1897,7 +2133,7 @@ func (x *EliteReq) ProtoReflect() protoreflect.Message { // Deprecated: Use EliteReq.ProtoReflect.Descriptor instead. func (*EliteReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{26} + return file_user_center_proto_rawDescGZIP(), []int{28} } func (x *EliteReq) GetUserId() int64 { @@ -1928,7 +2164,7 @@ type GiveEliteReq struct { func (x *GiveEliteReq) Reset() { *x = GiveEliteReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[27] + mi := &file_user_center_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1941,7 +2177,7 @@ func (x *GiveEliteReq) String() string { func (*GiveEliteReq) ProtoMessage() {} func (x *GiveEliteReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[27] + mi := &file_user_center_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1954,7 +2190,7 @@ func (x *GiveEliteReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GiveEliteReq.ProtoReflect.Descriptor instead. func (*GiveEliteReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{27} + return file_user_center_proto_rawDescGZIP(), []int{29} } func (x *GiveEliteReq) GetUserId() int64 { @@ -1999,7 +2235,7 @@ type BuyEliteResp struct { func (x *BuyEliteResp) Reset() { *x = BuyEliteResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[28] + mi := &file_user_center_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2012,7 +2248,7 @@ func (x *BuyEliteResp) String() string { func (*BuyEliteResp) ProtoMessage() {} func (x *BuyEliteResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[28] + mi := &file_user_center_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2025,7 +2261,7 @@ func (x *BuyEliteResp) ProtoReflect() protoreflect.Message { // Deprecated: Use BuyEliteResp.ProtoReflect.Descriptor instead. func (*BuyEliteResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{28} + return file_user_center_proto_rawDescGZIP(), []int{30} } func (x *BuyEliteResp) GetUserId() int64 { @@ -2070,7 +2306,7 @@ type GiveTitleReq struct { func (x *GiveTitleReq) Reset() { *x = GiveTitleReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[29] + mi := &file_user_center_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2083,7 +2319,7 @@ func (x *GiveTitleReq) String() string { func (*GiveTitleReq) ProtoMessage() {} func (x *GiveTitleReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[29] + mi := &file_user_center_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2096,7 +2332,7 @@ func (x *GiveTitleReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GiveTitleReq.ProtoReflect.Descriptor instead. func (*GiveTitleReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{29} + return file_user_center_proto_rawDescGZIP(), []int{31} } func (x *GiveTitleReq) GetUserId() int64 { @@ -2142,7 +2378,7 @@ type BuyTitleResp struct { func (x *BuyTitleResp) Reset() { *x = BuyTitleResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[30] + mi := &file_user_center_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2155,7 +2391,7 @@ func (x *BuyTitleResp) String() string { func (*BuyTitleResp) ProtoMessage() {} func (x *BuyTitleResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[30] + mi := &file_user_center_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2168,7 +2404,7 @@ func (x *BuyTitleResp) ProtoReflect() protoreflect.Message { // Deprecated: Use BuyTitleResp.ProtoReflect.Descriptor instead. func (*BuyTitleResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{30} + return file_user_center_proto_rawDescGZIP(), []int{32} } func (x *BuyTitleResp) GetUserId() int64 { @@ -2218,7 +2454,7 @@ type ChangeEliteResp struct { func (x *ChangeEliteResp) Reset() { *x = ChangeEliteResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[31] + mi := &file_user_center_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2231,7 +2467,7 @@ func (x *ChangeEliteResp) String() string { func (*ChangeEliteResp) ProtoMessage() {} func (x *ChangeEliteResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[31] + mi := &file_user_center_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2244,7 +2480,7 @@ func (x *ChangeEliteResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeEliteResp.ProtoReflect.Descriptor instead. func (*ChangeEliteResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{31} + return file_user_center_proto_rawDescGZIP(), []int{33} } func (x *ChangeEliteResp) GetUserId() int64 { @@ -2273,7 +2509,7 @@ type TitleReq struct { func (x *TitleReq) Reset() { *x = TitleReq{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[32] + mi := &file_user_center_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2286,7 +2522,7 @@ func (x *TitleReq) String() string { func (*TitleReq) ProtoMessage() {} func (x *TitleReq) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[32] + mi := &file_user_center_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2299,7 +2535,7 @@ func (x *TitleReq) ProtoReflect() protoreflect.Message { // Deprecated: Use TitleReq.ProtoReflect.Descriptor instead. func (*TitleReq) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{32} + return file_user_center_proto_rawDescGZIP(), []int{34} } func (x *TitleReq) GetUserId() int64 { @@ -2329,7 +2565,7 @@ type ChangeTitleResp struct { func (x *ChangeTitleResp) Reset() { *x = ChangeTitleResp{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[33] + mi := &file_user_center_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2342,7 +2578,7 @@ func (x *ChangeTitleResp) String() string { func (*ChangeTitleResp) ProtoMessage() {} func (x *ChangeTitleResp) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[33] + mi := &file_user_center_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2355,7 +2591,7 @@ func (x *ChangeTitleResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeTitleResp.ProtoReflect.Descriptor instead. func (*ChangeTitleResp) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{33} + return file_user_center_proto_rawDescGZIP(), []int{35} } func (x *ChangeTitleResp) GetUserId() int64 { @@ -2394,7 +2630,7 @@ type UserDetailsResp_TitleItem struct { func (x *UserDetailsResp_TitleItem) Reset() { *x = UserDetailsResp_TitleItem{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[34] + mi := &file_user_center_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2407,7 +2643,7 @@ func (x *UserDetailsResp_TitleItem) String() string { func (*UserDetailsResp_TitleItem) ProtoMessage() {} func (x *UserDetailsResp_TitleItem) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[34] + mi := &file_user_center_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2465,7 +2701,7 @@ type UserDetailsResp_EliteItem struct { func (x *UserDetailsResp_EliteItem) Reset() { *x = UserDetailsResp_EliteItem{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[35] + mi := &file_user_center_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2478,7 +2714,7 @@ func (x *UserDetailsResp_EliteItem) String() string { func (*UserDetailsResp_EliteItem) ProtoMessage() {} func (x *UserDetailsResp_EliteItem) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[35] + mi := &file_user_center_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2536,7 +2772,7 @@ type StatPvPReportReq_Item struct { func (x *StatPvPReportReq_Item) Reset() { *x = StatPvPReportReq_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[36] + mi := &file_user_center_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2549,7 +2785,7 @@ func (x *StatPvPReportReq_Item) String() string { func (*StatPvPReportReq_Item) ProtoMessage() {} func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[36] + mi := &file_user_center_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2562,7 +2798,7 @@ func (x *StatPvPReportReq_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportReq_Item.ProtoReflect.Descriptor instead. func (*StatPvPReportReq_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{14, 0} + return file_user_center_proto_rawDescGZIP(), []int{16, 0} } func (x *StatPvPReportReq_Item) GetUid() int64 { @@ -2651,12 +2887,16 @@ type StatPvPReportResp_Item struct { 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"` // 评分(一位小数) + // grade + Grade *Grade `protobuf:"bytes,5,opt,name=grade,proto3" json:"grade,omitempty"` + GradeResult StatPvPReportResp_GradeResult `protobuf:"varint,6,opt,name=gradeResult,proto3,enum=pb.StatPvPReportResp_GradeResult" json:"gradeResult,omitempty"` // 段位结果 + GradeReason StatPvPReportResp_GradeReason `protobuf:"varint,7,opt,name=gradeReason,proto3,enum=pb.StatPvPReportResp_GradeReason" json:"gradeReason,omitempty"` // 段位结果原因 } func (x *StatPvPReportResp_Item) Reset() { *x = StatPvPReportResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[37] + mi := &file_user_center_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2669,7 +2909,7 @@ func (x *StatPvPReportResp_Item) String() string { func (*StatPvPReportResp_Item) ProtoMessage() {} func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[37] + mi := &file_user_center_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2682,7 +2922,7 @@ func (x *StatPvPReportResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use StatPvPReportResp_Item.ProtoReflect.Descriptor instead. func (*StatPvPReportResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{15, 0} + return file_user_center_proto_rawDescGZIP(), []int{17, 0} } func (x *StatPvPReportResp_Item) GetUid() int64 { @@ -2713,6 +2953,27 @@ func (x *StatPvPReportResp_Item) GetScore() float32 { return 0 } +func (x *StatPvPReportResp_Item) GetGrade() *Grade { + if x != nil { + return x.Grade + } + return nil +} + +func (x *StatPvPReportResp_Item) GetGradeResult() StatPvPReportResp_GradeResult { + if x != nil { + return x.GradeResult + } + return StatPvPReportResp_Keep +} + +func (x *StatPvPReportResp_Item) GetGradeReason() StatPvPReportResp_GradeReason { + if x != nil { + return x.GradeReason + } + return StatPvPReportResp_Win +} + type RankPvpResp_Item struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2727,7 +2988,7 @@ type RankPvpResp_Item struct { func (x *RankPvpResp_Item) Reset() { *x = RankPvpResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[38] + mi := &file_user_center_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2740,7 +3001,7 @@ func (x *RankPvpResp_Item) String() string { func (*RankPvpResp_Item) ProtoMessage() {} func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[38] + mi := &file_user_center_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2753,7 +3014,7 @@ func (x *RankPvpResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpResp_Item.ProtoReflect.Descriptor instead. func (*RankPvpResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{21, 0} + return file_user_center_proto_rawDescGZIP(), []int{23, 0} } func (x *RankPvpResp_Item) GetUid() int64 { @@ -2799,7 +3060,7 @@ type RankPvpSubmitResp_Result struct { func (x *RankPvpSubmitResp_Result) Reset() { *x = RankPvpSubmitResp_Result{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[39] + mi := &file_user_center_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2812,7 +3073,7 @@ func (x *RankPvpSubmitResp_Result) String() string { func (*RankPvpSubmitResp_Result) ProtoMessage() {} func (x *RankPvpSubmitResp_Result) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[39] + mi := &file_user_center_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2825,7 +3086,7 @@ func (x *RankPvpSubmitResp_Result) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitResp_Result.ProtoReflect.Descriptor instead. func (*RankPvpSubmitResp_Result) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{23, 0} + return file_user_center_proto_rawDescGZIP(), []int{25, 0} } func (x *RankPvpSubmitResp_Result) GetUserId() int64 { @@ -2875,7 +3136,7 @@ type RankPvpSubmitResp_Item struct { func (x *RankPvpSubmitResp_Item) Reset() { *x = RankPvpSubmitResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[40] + mi := &file_user_center_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2888,7 +3149,7 @@ func (x *RankPvpSubmitResp_Item) String() string { func (*RankPvpSubmitResp_Item) ProtoMessage() {} func (x *RankPvpSubmitResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[40] + mi := &file_user_center_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2901,7 +3162,7 @@ func (x *RankPvpSubmitResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use RankPvpSubmitResp_Item.ProtoReflect.Descriptor instead. func (*RankPvpSubmitResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{23, 1} + return file_user_center_proto_rawDescGZIP(), []int{25, 1} } func (x *RankPvpSubmitResp_Item) GetRankType() vars.RankType { @@ -2931,7 +3192,7 @@ type UserRankResp_Item struct { func (x *UserRankResp_Item) Reset() { *x = UserRankResp_Item{} if protoimpl.UnsafeEnabled { - mi := &file_user_center_proto_msgTypes[41] + mi := &file_user_center_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2944,7 +3205,7 @@ func (x *UserRankResp_Item) String() string { func (*UserRankResp_Item) ProtoMessage() {} func (x *UserRankResp_Item) ProtoReflect() protoreflect.Message { - mi := &file_user_center_proto_msgTypes[41] + mi := &file_user_center_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2957,7 +3218,7 @@ func (x *UserRankResp_Item) ProtoReflect() protoreflect.Message { // Deprecated: Use UserRankResp_Item.ProtoReflect.Descriptor instead. func (*UserRankResp_Item) Descriptor() ([]byte, []int) { - return file_user_center_proto_rawDescGZIP(), []int{25, 0} + return file_user_center_proto_rawDescGZIP(), []int{27, 0} } func (x *UserRankResp_Item) GetRankType() vars.RankType { @@ -3123,261 +3384,296 @@ var file_user_center_proto_rawDesc = []byte{ 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xff, 0x03, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, - 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, - 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, - 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x49, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0a, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, - 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, - 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x6c, 0x6f, 0x73, - 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, - 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, - 0x6d, 0x73, 0x1a, 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, 0x9d, 0x02, 0x0a, 0x11, 0x53, 0x74, - 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x64, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x72, + 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x72, 0x61, 0x76, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x62, 0x72, 0x61, 0x76, 0x65, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x22, 0x48, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, + 0x61, 0x64, 0x65, 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0xff, 0x03, 0x0a, 0x10, 0x53, + 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x62, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, - 0x74, 0x65, 0x6d, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x38, 0x0a, - 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, - 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 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, 0x22, 0x70, 0x0a, 0x0c, 0x47, 0x69, 0x66, - 0x74, 0x50, 0x61, 0x63, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x0f, 0x44, - 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x10, + 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, + 0x65, 0x6d, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x09, + 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x65, 0x71, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x6c, 0x6f, 0x73, 0x74, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0xc4, 0x02, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x22, 0x60, 0x0a, 0x10, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, - 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, - 0x62, 0x2e, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, - 0x69, 0x74, 0x65, 0x6d, 0x22, 0x56, 0x0a, 0x12, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, - 0x57, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 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, 0xe6, 0x04, 0x0a, + 0x11, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x77, 0x69, 0x6e, 0x43, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x77, 0x69, 0x6e, 0x49, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x77, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x38, 0x0a, 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, + 0x09, 0x6c, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x8b, 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, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1f, 0x0a, + 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, + 0x62, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x65, 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x43, + 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0b, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x43, 0x0a, 0x0b, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, + 0x47, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x0b, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x69, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x65, 0x65, 0x70, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x47, 0x72, 0x61, 0x64, 0x65, 0x55, 0x70, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x72, 0x55, 0x70, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x72, 0x61, 0x64, 0x65, + 0x44, 0x6f, 0x77, 0x6e, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x44, + 0x6f, 0x77, 0x6e, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x72, 0x44, 0x6f, 0x77, + 0x6e, 0x10, 0x06, 0x22, 0x30, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, + 0x6f, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x76, 0x65, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x10, 0x02, 0x22, 0x70, 0x0a, 0x0c, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, + 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x0f, 0x44, 0x72, 0x61, 0x77, 0x47, + 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x22, 0x47, 0x0a, 0x0a, - 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x60, + 0x0a, 0x10, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x69, 0x74, + 0x65, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, + 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, + 0x22, 0x56, 0x0a, 0x12, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x57, 0x65, 0x6c, 0x66, + 0x61, 0x72, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x77, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x22, 0x47, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x6b, + 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, + 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x6f, 0x70, + 0x4e, 0x22, 0xbe, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x0a, 0x03, + 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, + 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, + 0x61, 0x72, 0x22, 0x63, 0x0a, 0x10, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, - 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x74, 0x6f, 0x70, 0x4e, 0x22, 0xbe, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, - 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, - 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, - 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5c, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x63, 0x0a, 0x10, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, - 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, - 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, - 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, - 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb4, 0x02, 0x0a, 0x11, - 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, - 0x65, 0x6d, 0x73, 0x1a, 0x7e, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x69, - 0x74, 0x6c, 0x65, 0x1a, 0x6d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, - 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, - 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, - 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, - 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x52, - 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, - 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2d, 0x0a, - 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, - 0x63, 0x6f, 0x72, 0x65, 0x22, 0x36, 0x0a, 0x08, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x76, 0x0a, 0x0c, - 0x47, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x52, + 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22, 0xb4, 0x02, 0x0a, 0x11, 0x52, 0x61, 0x6e, 0x6b, + 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, + 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, + 0x7e, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x1a, + 0x6d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, + 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, + 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x92, + 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, + 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x1a, 0x5d, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x2d, 0x0a, 0x08, 0x72, 0x61, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x70, 0x62, + 0x2e, 0x76, 0x61, 0x72, 0x73, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, + 0x72, 0x61, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, + 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x22, 0x36, 0x0a, 0x08, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1a, - 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, - 0x72, 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, - 0x65, 0x76, 0x65, 0x72, 0x22, 0x70, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, + 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x22, 0x70, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, + 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x42, + 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x43, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, - 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x54, 0x69, - 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x22, 0x84, - 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, - 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x65, 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x08, 0x54, 0x69, - 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, - 0x72, 0x74, 0x22, 0x57, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x28, 0x0a, 0x08, 0x47, - 0x69, 0x66, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x65, 0x72, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x73, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x63, 0x65, 0x10, 0x01, 0x32, 0xaf, 0x08, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, 0x65, - 0x6e, 0x74, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x70, + 0x6c, 0x69, 0x74, 0x65, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x08, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6f, + 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, 0x57, + 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x2a, 0x28, 0x0a, 0x08, 0x47, 0x69, 0x66, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x72, 0x10, 0x00, + 0x12, 0x0f, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x10, + 0x01, 0x32, 0xe1, 0x08, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, + 0x12, 0x41, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x76, 0x65, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, + 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0e, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, + 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0f, 0x67, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x79, 0x50, 0x55, 0x69, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x34, 0x0a, 0x0e, 0x67, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, - 0x0f, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, 0x79, 0x50, 0x55, 0x69, 0x64, - 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x49, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, - 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, - 0x6f, 0x69, 0x6e, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, - 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, - 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, - 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, 0x13, - 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, - 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, - 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, - 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, - 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, - 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, - 0x07, 0x72, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, - 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, - 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x0d, 0x72, 0x61, 0x6e, - 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x52, - 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, 0x69, 0x76, - 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x76, 0x65, - 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, - 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x75, - 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x54, 0x69, - 0x74, 0x6c, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, 0x69, - 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x54, 0x69, - 0x74, 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, - 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, - 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, - 0x69, 0x74, 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, - 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x31, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, + 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, + 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x31, 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, + 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x13, + 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, + 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x55, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2e, 0x0a, 0x0c, 0x75, 0x73, + 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x47, 0x69, 0x66, 0x74, 0x52, 0x65, 0x71, 0x1a, + 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x0f, 0x75, 0x73, + 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e, + 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x75, 0x79, 0x4e, 0x6f, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x3c, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x50, 0x76, 0x70, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x50, 0x76, 0x50, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, + 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x12, 0x13, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, 0x74, 0x50, 0x61, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x47, 0x69, 0x66, + 0x74, 0x50, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0c, 0x67, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x64, 0x65, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x47, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x72, + 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x50, 0x76, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, + 0x50, 0x76, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x0d, 0x72, 0x61, 0x6e, 0x6b, 0x50, + 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, + 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x50, 0x76, 0x70, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x52, 0x61, 0x6e, + 0x6b, 0x50, 0x76, 0x70, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x61, + 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x45, + 0x6c, 0x69, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x76, 0x65, 0x45, 0x6c, + 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x45, + 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x45, + 0x6c, 0x69, 0x74, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x45, 0x6c, 0x69, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x09, 0x67, 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x69, 0x76, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x08, 0x62, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, + 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x75, 0x79, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, + 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, + 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x45, 0x6c, 0x69, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, + 0x6c, 0x65, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3392,121 +3688,131 @@ func file_user_center_proto_rawDescGZIP() []byte { return file_user_center_proto_rawDescData } -var file_user_center_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_user_center_proto_msgTypes = make([]protoimpl.MessageInfo, 42) +var file_user_center_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_user_center_proto_msgTypes = make([]protoimpl.MessageInfo, 44) var file_user_center_proto_goTypes = []interface{}{ - (GiftType)(0), // 0: pb.GiftType - (*Empty)(nil), // 1: pb.Empty - (*Response)(nil), // 2: pb.Response - (*PlatformUserReq)(nil), // 3: pb.PlatformUserReq - (*PlatformUserResp)(nil), // 4: pb.PlatformUserResp - (*UserDetailsResp)(nil), // 5: pb.UserDetailsResp - (*UserIdReq)(nil), // 6: pb.UserIdReq - (*UserIdResp)(nil), // 7: pb.UserIdResp - (*GetUserCoinResp)(nil), // 8: pb.GetUserCoinResp - (*ChangeCoinReq)(nil), // 9: pb.ChangeCoinReq - (*TransferUserCoinReq)(nil), // 10: pb.TransferUserCoinReq - (*TransferUserCoinResp)(nil), // 11: pb.TransferUserCoinResp - (*UserCheckInResp)(nil), // 12: pb.UserCheckInResp - (*UserSendGiftReq)(nil), // 13: pb.UserSendGiftReq - (*UserBuyNobilityReq)(nil), // 14: pb.UserBuyNobilityReq - (*StatPvPReportReq)(nil), // 15: pb.StatPvPReportReq - (*StatPvPReportResp)(nil), // 16: pb.StatPvPReportResp - (*GiftPackItem)(nil), // 17: pb.GiftPackItem - (*DrawGiftPackReq)(nil), // 18: pb.DrawGiftPackReq - (*DrawGiftPackResp)(nil), // 19: pb.DrawGiftPackResp - (*IncreaseWelfareReq)(nil), // 20: pb.IncreaseWelfareReq - (*RankPvpReq)(nil), // 21: pb.RankPvpReq - (*RankPvpResp)(nil), // 22: pb.RankPvpResp - (*RankPvpSubmitReq)(nil), // 23: pb.RankPvpSubmitReq - (*RankPvpSubmitResp)(nil), // 24: pb.RankPvpSubmitResp - (*UserRankReq)(nil), // 25: pb.UserRankReq - (*UserRankResp)(nil), // 26: pb.UserRankResp - (*EliteReq)(nil), // 27: pb.EliteReq - (*GiveEliteReq)(nil), // 28: pb.GiveEliteReq - (*BuyEliteResp)(nil), // 29: pb.BuyEliteResp - (*GiveTitleReq)(nil), // 30: pb.GiveTitleReq - (*BuyTitleResp)(nil), // 31: pb.BuyTitleResp - (*ChangeEliteResp)(nil), // 32: pb.ChangeEliteResp - (*TitleReq)(nil), // 33: pb.TitleReq - (*ChangeTitleResp)(nil), // 34: pb.ChangeTitleResp - (*UserDetailsResp_TitleItem)(nil), // 35: pb.UserDetailsResp.TitleItem - (*UserDetailsResp_EliteItem)(nil), // 36: pb.UserDetailsResp.EliteItem - (*StatPvPReportReq_Item)(nil), // 37: pb.StatPvPReportReq.Item - (*StatPvPReportResp_Item)(nil), // 38: pb.StatPvPReportResp.Item - (*RankPvpResp_Item)(nil), // 39: pb.RankPvpResp.Item - (*RankPvpSubmitResp_Result)(nil), // 40: pb.RankPvpSubmitResp.Result - (*RankPvpSubmitResp_Item)(nil), // 41: pb.RankPvpSubmitResp.Item - (*UserRankResp_Item)(nil), // 42: pb.UserRankResp.Item - (vars.UserCoinChangedReason)(0), // 43: pb.vars.UserCoinChangedReason - (vars.RankType)(0), // 44: pb.vars.RankType + (GiftType)(0), // 0: pb.GiftType + (StatPvPReportResp_GradeResult)(0), // 1: pb.StatPvPReportResp.GradeResult + (StatPvPReportResp_GradeReason)(0), // 2: pb.StatPvPReportResp.GradeReason + (*Empty)(nil), // 3: pb.Empty + (*Response)(nil), // 4: pb.Response + (*PlatformUserReq)(nil), // 5: pb.PlatformUserReq + (*PlatformUserResp)(nil), // 6: pb.PlatformUserResp + (*UserDetailsResp)(nil), // 7: pb.UserDetailsResp + (*UserIdReq)(nil), // 8: pb.UserIdReq + (*UserIdResp)(nil), // 9: pb.UserIdResp + (*GetUserCoinResp)(nil), // 10: pb.GetUserCoinResp + (*ChangeCoinReq)(nil), // 11: pb.ChangeCoinReq + (*TransferUserCoinReq)(nil), // 12: pb.TransferUserCoinReq + (*TransferUserCoinResp)(nil), // 13: pb.TransferUserCoinResp + (*UserCheckInResp)(nil), // 14: pb.UserCheckInResp + (*UserSendGiftReq)(nil), // 15: pb.UserSendGiftReq + (*UserBuyNobilityReq)(nil), // 16: pb.UserBuyNobilityReq + (*Grade)(nil), // 17: pb.Grade + (*UserGradeResp)(nil), // 18: pb.UserGradeResp + (*StatPvPReportReq)(nil), // 19: pb.StatPvPReportReq + (*StatPvPReportResp)(nil), // 20: pb.StatPvPReportResp + (*GiftPackItem)(nil), // 21: pb.GiftPackItem + (*DrawGiftPackReq)(nil), // 22: pb.DrawGiftPackReq + (*DrawGiftPackResp)(nil), // 23: pb.DrawGiftPackResp + (*IncreaseWelfareReq)(nil), // 24: pb.IncreaseWelfareReq + (*RankPvpReq)(nil), // 25: pb.RankPvpReq + (*RankPvpResp)(nil), // 26: pb.RankPvpResp + (*RankPvpSubmitReq)(nil), // 27: pb.RankPvpSubmitReq + (*RankPvpSubmitResp)(nil), // 28: pb.RankPvpSubmitResp + (*UserRankReq)(nil), // 29: pb.UserRankReq + (*UserRankResp)(nil), // 30: pb.UserRankResp + (*EliteReq)(nil), // 31: pb.EliteReq + (*GiveEliteReq)(nil), // 32: pb.GiveEliteReq + (*BuyEliteResp)(nil), // 33: pb.BuyEliteResp + (*GiveTitleReq)(nil), // 34: pb.GiveTitleReq + (*BuyTitleResp)(nil), // 35: pb.BuyTitleResp + (*ChangeEliteResp)(nil), // 36: pb.ChangeEliteResp + (*TitleReq)(nil), // 37: pb.TitleReq + (*ChangeTitleResp)(nil), // 38: pb.ChangeTitleResp + (*UserDetailsResp_TitleItem)(nil), // 39: pb.UserDetailsResp.TitleItem + (*UserDetailsResp_EliteItem)(nil), // 40: pb.UserDetailsResp.EliteItem + (*StatPvPReportReq_Item)(nil), // 41: pb.StatPvPReportReq.Item + (*StatPvPReportResp_Item)(nil), // 42: pb.StatPvPReportResp.Item + (*RankPvpResp_Item)(nil), // 43: pb.RankPvpResp.Item + (*RankPvpSubmitResp_Result)(nil), // 44: pb.RankPvpSubmitResp.Result + (*RankPvpSubmitResp_Item)(nil), // 45: pb.RankPvpSubmitResp.Item + (*UserRankResp_Item)(nil), // 46: pb.UserRankResp.Item + (vars.UserCoinChangedReason)(0), // 47: pb.vars.UserCoinChangedReason + (vars.RankType)(0), // 48: pb.vars.RankType } var file_user_center_proto_depIdxs = []int32{ - 35, // 0: pb.UserDetailsResp.currentTitle:type_name -> pb.UserDetailsResp.TitleItem - 36, // 1: pb.UserDetailsResp.currentElite:type_name -> pb.UserDetailsResp.EliteItem - 35, // 2: pb.UserDetailsResp.titles:type_name -> pb.UserDetailsResp.TitleItem - 36, // 3: pb.UserDetailsResp.elites:type_name -> pb.UserDetailsResp.EliteItem - 43, // 4: pb.ChangeCoinReq.reason:type_name -> pb.vars.UserCoinChangedReason - 37, // 5: pb.StatPvPReportReq.winItems:type_name -> pb.StatPvPReportReq.Item - 37, // 6: pb.StatPvPReportReq.lostItems:type_name -> pb.StatPvPReportReq.Item - 38, // 7: pb.StatPvPReportResp.winItems:type_name -> pb.StatPvPReportResp.Item - 38, // 8: pb.StatPvPReportResp.lostItems:type_name -> pb.StatPvPReportResp.Item - 17, // 9: pb.DrawGiftPackResp.item:type_name -> pb.GiftPackItem - 44, // 10: pb.RankPvpReq.type:type_name -> pb.vars.RankType - 44, // 11: pb.RankPvpResp.type:type_name -> pb.vars.RankType - 39, // 12: pb.RankPvpResp.items:type_name -> pb.RankPvpResp.Item - 44, // 13: pb.RankPvpSubmitReq.rankType:type_name -> pb.vars.RankType - 41, // 14: pb.RankPvpSubmitResp.items:type_name -> pb.RankPvpSubmitResp.Item - 44, // 15: pb.UserRankReq.rankType:type_name -> pb.vars.RankType - 42, // 16: pb.UserRankResp.items:type_name -> pb.UserRankResp.Item - 44, // 17: pb.RankPvpSubmitResp.Item.rankType:type_name -> pb.vars.RankType - 40, // 18: pb.RankPvpSubmitResp.Item.results:type_name -> pb.RankPvpSubmitResp.Result - 44, // 19: pb.UserRankResp.Item.rankType:type_name -> pb.vars.RankType - 3, // 20: pb.userCenter.retrievePlatformUser:input_type -> pb.PlatformUserReq - 6, // 21: pb.userCenter.getUserDetails:input_type -> pb.UserIdReq - 3, // 22: pb.userCenter.getUserIdByPUid:input_type -> pb.PlatformUserReq - 6, // 23: pb.userCenter.userCheckIn:input_type -> pb.UserIdReq - 9, // 24: pb.userCenter.changeCoin:input_type -> pb.ChangeCoinReq - 6, // 25: pb.userCenter.getUserCoin:input_type -> pb.UserIdReq - 10, // 26: pb.userCenter.transferUserCoin:input_type -> pb.TransferUserCoinReq - 13, // 27: pb.userCenter.userSendGift:input_type -> pb.UserSendGiftReq - 14, // 28: pb.userCenter.userBuyNobility:input_type -> pb.UserBuyNobilityReq - 15, // 29: pb.userCenter.statPvpReport:input_type -> pb.StatPvPReportReq - 18, // 30: pb.userCenter.drawGiftPack:input_type -> pb.DrawGiftPackReq - 21, // 31: pb.userCenter.rankPvp:input_type -> pb.RankPvpReq - 23, // 32: pb.userCenter.rankPvpSubmit:input_type -> pb.RankPvpSubmitReq - 25, // 33: pb.userCenter.userRankPvp:input_type -> pb.UserRankReq - 28, // 34: pb.userCenter.giveElite:input_type -> pb.GiveEliteReq - 27, // 35: pb.userCenter.buyElite:input_type -> pb.EliteReq - 30, // 36: pb.userCenter.giveTitle:input_type -> pb.GiveTitleReq - 33, // 37: pb.userCenter.buyTitle:input_type -> pb.TitleReq - 27, // 38: pb.userCenter.changeElite:input_type -> pb.EliteReq - 33, // 39: pb.userCenter.changeTitle:input_type -> pb.TitleReq - 4, // 40: pb.userCenter.retrievePlatformUser:output_type -> pb.PlatformUserResp - 5, // 41: pb.userCenter.getUserDetails:output_type -> pb.UserDetailsResp - 7, // 42: pb.userCenter.getUserIdByPUid:output_type -> pb.UserIdResp - 12, // 43: pb.userCenter.userCheckIn:output_type -> pb.UserCheckInResp - 1, // 44: pb.userCenter.changeCoin:output_type -> pb.Empty - 8, // 45: pb.userCenter.getUserCoin:output_type -> pb.GetUserCoinResp - 11, // 46: pb.userCenter.transferUserCoin:output_type -> pb.TransferUserCoinResp - 1, // 47: pb.userCenter.userSendGift:output_type -> pb.Empty - 1, // 48: pb.userCenter.userBuyNobility:output_type -> pb.Empty - 16, // 49: pb.userCenter.statPvpReport:output_type -> pb.StatPvPReportResp - 19, // 50: pb.userCenter.drawGiftPack:output_type -> pb.DrawGiftPackResp - 22, // 51: pb.userCenter.rankPvp:output_type -> pb.RankPvpResp - 24, // 52: pb.userCenter.rankPvpSubmit:output_type -> pb.RankPvpSubmitResp - 26, // 53: pb.userCenter.userRankPvp:output_type -> pb.UserRankResp - 29, // 54: pb.userCenter.giveElite:output_type -> pb.BuyEliteResp - 29, // 55: pb.userCenter.buyElite:output_type -> pb.BuyEliteResp - 31, // 56: pb.userCenter.giveTitle:output_type -> pb.BuyTitleResp - 31, // 57: pb.userCenter.buyTitle:output_type -> pb.BuyTitleResp - 32, // 58: pb.userCenter.changeElite:output_type -> pb.ChangeEliteResp - 34, // 59: pb.userCenter.changeTitle:output_type -> pb.ChangeTitleResp - 40, // [40:60] is the sub-list for method output_type - 20, // [20:40] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 39, // 0: pb.UserDetailsResp.currentTitle:type_name -> pb.UserDetailsResp.TitleItem + 40, // 1: pb.UserDetailsResp.currentElite:type_name -> pb.UserDetailsResp.EliteItem + 39, // 2: pb.UserDetailsResp.titles:type_name -> pb.UserDetailsResp.TitleItem + 40, // 3: pb.UserDetailsResp.elites:type_name -> pb.UserDetailsResp.EliteItem + 47, // 4: pb.ChangeCoinReq.reason:type_name -> pb.vars.UserCoinChangedReason + 17, // 5: pb.UserGradeResp.grade:type_name -> pb.Grade + 41, // 6: pb.StatPvPReportReq.winItems:type_name -> pb.StatPvPReportReq.Item + 41, // 7: pb.StatPvPReportReq.lostItems:type_name -> pb.StatPvPReportReq.Item + 42, // 8: pb.StatPvPReportResp.winItems:type_name -> pb.StatPvPReportResp.Item + 42, // 9: pb.StatPvPReportResp.lostItems:type_name -> pb.StatPvPReportResp.Item + 21, // 10: pb.DrawGiftPackResp.item:type_name -> pb.GiftPackItem + 48, // 11: pb.RankPvpReq.type:type_name -> pb.vars.RankType + 48, // 12: pb.RankPvpResp.type:type_name -> pb.vars.RankType + 43, // 13: pb.RankPvpResp.items:type_name -> pb.RankPvpResp.Item + 48, // 14: pb.RankPvpSubmitReq.rankType:type_name -> pb.vars.RankType + 45, // 15: pb.RankPvpSubmitResp.items:type_name -> pb.RankPvpSubmitResp.Item + 48, // 16: pb.UserRankReq.rankType:type_name -> pb.vars.RankType + 46, // 17: pb.UserRankResp.items:type_name -> pb.UserRankResp.Item + 17, // 18: pb.StatPvPReportResp.Item.grade:type_name -> pb.Grade + 1, // 19: pb.StatPvPReportResp.Item.gradeResult:type_name -> pb.StatPvPReportResp.GradeResult + 2, // 20: pb.StatPvPReportResp.Item.gradeReason:type_name -> pb.StatPvPReportResp.GradeReason + 48, // 21: pb.RankPvpSubmitResp.Item.rankType:type_name -> pb.vars.RankType + 44, // 22: pb.RankPvpSubmitResp.Item.results:type_name -> pb.RankPvpSubmitResp.Result + 48, // 23: pb.UserRankResp.Item.rankType:type_name -> pb.vars.RankType + 5, // 24: pb.userCenter.retrievePlatformUser:input_type -> pb.PlatformUserReq + 8, // 25: pb.userCenter.getUserDetails:input_type -> pb.UserIdReq + 5, // 26: pb.userCenter.getUserIdByPUid:input_type -> pb.PlatformUserReq + 8, // 27: pb.userCenter.userCheckIn:input_type -> pb.UserIdReq + 11, // 28: pb.userCenter.changeCoin:input_type -> pb.ChangeCoinReq + 8, // 29: pb.userCenter.getUserCoin:input_type -> pb.UserIdReq + 12, // 30: pb.userCenter.transferUserCoin:input_type -> pb.TransferUserCoinReq + 15, // 31: pb.userCenter.userSendGift:input_type -> pb.UserSendGiftReq + 16, // 32: pb.userCenter.userBuyNobility:input_type -> pb.UserBuyNobilityReq + 19, // 33: pb.userCenter.statPvpReport:input_type -> pb.StatPvPReportReq + 22, // 34: pb.userCenter.drawGiftPack:input_type -> pb.DrawGiftPackReq + 8, // 35: pb.userCenter.getUserGrade:input_type -> pb.UserIdReq + 25, // 36: pb.userCenter.rankPvp:input_type -> pb.RankPvpReq + 27, // 37: pb.userCenter.rankPvpSubmit:input_type -> pb.RankPvpSubmitReq + 29, // 38: pb.userCenter.userRankPvp:input_type -> pb.UserRankReq + 32, // 39: pb.userCenter.giveElite:input_type -> pb.GiveEliteReq + 31, // 40: pb.userCenter.buyElite:input_type -> pb.EliteReq + 34, // 41: pb.userCenter.giveTitle:input_type -> pb.GiveTitleReq + 37, // 42: pb.userCenter.buyTitle:input_type -> pb.TitleReq + 31, // 43: pb.userCenter.changeElite:input_type -> pb.EliteReq + 37, // 44: pb.userCenter.changeTitle:input_type -> pb.TitleReq + 6, // 45: pb.userCenter.retrievePlatformUser:output_type -> pb.PlatformUserResp + 7, // 46: pb.userCenter.getUserDetails:output_type -> pb.UserDetailsResp + 9, // 47: pb.userCenter.getUserIdByPUid:output_type -> pb.UserIdResp + 14, // 48: pb.userCenter.userCheckIn:output_type -> pb.UserCheckInResp + 3, // 49: pb.userCenter.changeCoin:output_type -> pb.Empty + 10, // 50: pb.userCenter.getUserCoin:output_type -> pb.GetUserCoinResp + 13, // 51: pb.userCenter.transferUserCoin:output_type -> pb.TransferUserCoinResp + 3, // 52: pb.userCenter.userSendGift:output_type -> pb.Empty + 3, // 53: pb.userCenter.userBuyNobility:output_type -> pb.Empty + 20, // 54: pb.userCenter.statPvpReport:output_type -> pb.StatPvPReportResp + 23, // 55: pb.userCenter.drawGiftPack:output_type -> pb.DrawGiftPackResp + 18, // 56: pb.userCenter.getUserGrade:output_type -> pb.UserGradeResp + 26, // 57: pb.userCenter.rankPvp:output_type -> pb.RankPvpResp + 28, // 58: pb.userCenter.rankPvpSubmit:output_type -> pb.RankPvpSubmitResp + 30, // 59: pb.userCenter.userRankPvp:output_type -> pb.UserRankResp + 33, // 60: pb.userCenter.giveElite:output_type -> pb.BuyEliteResp + 33, // 61: pb.userCenter.buyElite:output_type -> pb.BuyEliteResp + 35, // 62: pb.userCenter.giveTitle:output_type -> pb.BuyTitleResp + 35, // 63: pb.userCenter.buyTitle:output_type -> pb.BuyTitleResp + 36, // 64: pb.userCenter.changeElite:output_type -> pb.ChangeEliteResp + 38, // 65: pb.userCenter.changeTitle:output_type -> pb.ChangeTitleResp + 45, // [45:66] is the sub-list for method output_type + 24, // [24:45] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_user_center_proto_init() } @@ -3684,7 +3990,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq); i { + switch v := v.(*Grade); i { case 0: return &v.state case 1: @@ -3696,7 +4002,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportResp); i { + switch v := v.(*UserGradeResp); i { case 0: return &v.state case 1: @@ -3708,7 +4014,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GiftPackItem); i { + switch v := v.(*StatPvPReportReq); i { case 0: return &v.state case 1: @@ -3720,7 +4026,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DrawGiftPackReq); i { + switch v := v.(*StatPvPReportResp); i { case 0: return &v.state case 1: @@ -3732,7 +4038,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DrawGiftPackResp); i { + switch v := v.(*GiftPackItem); i { case 0: return &v.state case 1: @@ -3744,7 +4050,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IncreaseWelfareReq); i { + switch v := v.(*DrawGiftPackReq); i { case 0: return &v.state case 1: @@ -3756,7 +4062,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpReq); i { + switch v := v.(*DrawGiftPackResp); i { case 0: return &v.state case 1: @@ -3768,7 +4074,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpResp); i { + switch v := v.(*IncreaseWelfareReq); i { case 0: return &v.state case 1: @@ -3780,7 +4086,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitReq); i { + switch v := v.(*RankPvpReq); i { case 0: return &v.state case 1: @@ -3792,7 +4098,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitResp); i { + switch v := v.(*RankPvpResp); i { case 0: return &v.state case 1: @@ -3804,7 +4110,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRankReq); i { + switch v := v.(*RankPvpSubmitReq); i { case 0: return &v.state case 1: @@ -3816,7 +4122,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRankResp); i { + switch v := v.(*RankPvpSubmitResp); i { case 0: return &v.state case 1: @@ -3828,7 +4134,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EliteReq); i { + switch v := v.(*UserRankReq); i { case 0: return &v.state case 1: @@ -3840,7 +4146,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GiveEliteReq); i { + switch v := v.(*UserRankResp); i { case 0: return &v.state case 1: @@ -3852,7 +4158,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuyEliteResp); i { + switch v := v.(*EliteReq); i { case 0: return &v.state case 1: @@ -3864,7 +4170,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GiveTitleReq); i { + switch v := v.(*GiveEliteReq); i { case 0: return &v.state case 1: @@ -3876,7 +4182,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BuyTitleResp); i { + switch v := v.(*BuyEliteResp); i { case 0: return &v.state case 1: @@ -3888,7 +4194,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeEliteResp); i { + switch v := v.(*GiveTitleReq); i { case 0: return &v.state case 1: @@ -3900,7 +4206,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TitleReq); i { + switch v := v.(*BuyTitleResp); i { case 0: return &v.state case 1: @@ -3912,7 +4218,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeTitleResp); i { + switch v := v.(*ChangeEliteResp); i { case 0: return &v.state case 1: @@ -3924,7 +4230,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserDetailsResp_TitleItem); i { + switch v := v.(*TitleReq); i { case 0: return &v.state case 1: @@ -3936,7 +4242,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserDetailsResp_EliteItem); i { + switch v := v.(*ChangeTitleResp); i { case 0: return &v.state case 1: @@ -3948,7 +4254,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportReq_Item); i { + switch v := v.(*UserDetailsResp_TitleItem); i { case 0: return &v.state case 1: @@ -3960,7 +4266,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatPvPReportResp_Item); i { + switch v := v.(*UserDetailsResp_EliteItem); i { case 0: return &v.state case 1: @@ -3972,7 +4278,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpResp_Item); i { + switch v := v.(*StatPvPReportReq_Item); i { case 0: return &v.state case 1: @@ -3984,7 +4290,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitResp_Result); i { + switch v := v.(*StatPvPReportResp_Item); i { case 0: return &v.state case 1: @@ -3996,7 +4302,7 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RankPvpSubmitResp_Item); i { + switch v := v.(*RankPvpResp_Item); i { case 0: return &v.state case 1: @@ -4008,6 +4314,30 @@ func file_user_center_proto_init() { } } file_user_center_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitResp_Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RankPvpSubmitResp_Item); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_user_center_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserRankResp_Item); i { case 0: return &v.state @@ -4025,8 +4355,8 @@ func file_user_center_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_user_center_proto_rawDesc, - NumEnums: 1, - NumMessages: 42, + NumEnums: 3, + NumMessages: 44, NumExtensions: 0, NumServices: 1, }, diff --git a/app/user_center/rpc/pb/user_center.proto b/app/user_center/rpc/pb/user_center.proto index 9f86a84..8b89916 100644 --- a/app/user_center/rpc/pb/user_center.proto +++ b/app/user_center/rpc/pb/user_center.proto @@ -139,6 +139,18 @@ message UserBuyNobilityReq { int64 endTime = 12; // 结束时间 } +message Grade { + int32 grade = 1; // 段位 + int32 level = 2; // 段位等级 + int32 star = 3; // 等级星级 + int64 bravePoint = 4; // 剩余 骁勇分(历史评分累计) +} + +message UserGradeResp { + int64 userId = 1; + Grade grade = 2; +} + // 通知-PvP战报 statistics.pvp.report message StatPvPReportReq { message Item { @@ -162,11 +174,29 @@ message StatPvPReportReq { // 通知-PvP战报 回复 message StatPvPReportResp { + enum GradeResult { + Keep = 0; // 不变(因为骁勇分抵扣) + GradeUp = 1; // 段位提升 + LevelUp = 2; // 段位等级提升 + StarUp = 3; // 等级星级提升 + GradeDown = 4; // 掉段 + LevelDown = 5; // 降级 + StarDown = 6; // 掉星 + } + enum GradeReason { + Win = 0; // 因为获胜 + Lost = 1; // 因为战败 + BravePoint = 2; // 因为骁勇分保护,所以不掉星 + } message Item { int64 uid = 1; // 用户ID string uname = 2; // 用户名 int32 position = 3; // 名次(特指在某一方的名次) float score = 4; // 评分(一位小数) + // grade + Grade grade = 5; + GradeResult gradeResult = 6; // 段位结果 + GradeReason gradeReason = 7; // 段位结果原因 } int32 winCamp = 1; // 获胜阵营 1-蓝 2-红 int64 battleId = 2; // 战斗ID @@ -359,6 +389,9 @@ service userCenter { // rpc increaseWelfare(IncreaseWelfareReq) returns (Empty); + /// @ZeroGroup: grade + rpc getUserGrade(UserIdReq) returns (UserGradeResp); + /// @ZeroGroup: rank // rankPvp pvp排行 diff --git a/app/user_center/rpc/pb/user_center_grpc.pb.go b/app/user_center/rpc/pb/user_center_grpc.pb.go index ea6f48d..c72e96f 100644 --- a/app/user_center/rpc/pb/user_center_grpc.pb.go +++ b/app/user_center/rpc/pb/user_center_grpc.pb.go @@ -41,6 +41,8 @@ type UserCenterClient interface { 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) + /// @ZeroGroup: grade + GetUserGrade(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserGradeResp, 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) @@ -160,6 +162,15 @@ func (c *userCenterClient) DrawGiftPack(ctx context.Context, in *DrawGiftPackReq return out, nil } +func (c *userCenterClient) GetUserGrade(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserGradeResp, error) { + out := new(UserGradeResp) + err := c.cc.Invoke(ctx, "/pb.userCenter/getUserGrade", 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...) @@ -264,6 +275,8 @@ type UserCenterServer interface { UserBuyNobility(context.Context, *UserBuyNobilityReq) (*Empty, error) StatPvpReport(context.Context, *StatPvPReportReq) (*StatPvPReportResp, error) DrawGiftPack(context.Context, *DrawGiftPackReq) (*DrawGiftPackResp, error) + /// @ZeroGroup: grade + GetUserGrade(context.Context, *UserIdReq) (*UserGradeResp, error) // rankPvp pvp排行 RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error) RankPvpSubmit(context.Context, *RankPvpSubmitReq) (*RankPvpSubmitResp, error) @@ -314,6 +327,9 @@ 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) GetUserGrade(context.Context, *UserIdReq) (*UserGradeResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserGrade not implemented") +} func (UnimplementedUserCenterServer) RankPvp(context.Context, *RankPvpReq) (*RankPvpResp, error) { return nil, status.Errorf(codes.Unimplemented, "method RankPvp not implemented") } @@ -552,6 +568,24 @@ func _UserCenter_DrawGiftPack_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _UserCenter_GetUserGrade_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).GetUserGrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.userCenter/getUserGrade", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserCenterServer).GetUserGrade(ctx, req.(*UserIdReq)) + } + return interceptor(ctx, in, info, handler) +} + func _UserCenter_RankPvp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RankPvpReq) if err := dec(in); err != nil { @@ -765,6 +799,10 @@ var UserCenter_ServiceDesc = grpc.ServiceDesc{ MethodName: "drawGiftPack", Handler: _UserCenter_DrawGiftPack_Handler, }, + { + MethodName: "getUserGrade", + Handler: _UserCenter_GetUserGrade_Handler, + }, { MethodName: "rankPvp", Handler: _UserCenter_RankPvp_Handler, diff --git a/app/user_center/rpc/user_center.go b/app/user_center/rpc/user_center.go index b8f15c1..a0d155e 100644 --- a/app/user_center/rpc/user_center.go +++ b/app/user_center/rpc/user_center.go @@ -7,7 +7,7 @@ import ( "live-service/app/user_center/rpc/internal/config" "live-service/app/user_center/rpc/internal/logic/gift_collect" "live-service/app/user_center/rpc/internal/logic/platform_user" - "live-service/app/user_center/rpc/internal/logic/rank" + "live-service/app/user_center/rpc/internal/logic/statistics" "live-service/app/user_center/rpc/internal/server" "live-service/app/user_center/rpc/internal/svc" "live-service/app/user_center/rpc/pb" @@ -34,7 +34,7 @@ func main() { svr := server.NewUserCenterServer(ctx) platform_user.InitUserRetriever(ctx) - rank.InitRankJob(ctx) + statistics.InitRankJob(ctx) gift_collect.InitCollector(ctx) s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { diff --git a/app/user_center/rpc/usercenter/user_center.go b/app/user_center/rpc/usercenter/user_center.go index 43eae36..f3f13f5 100644 --- a/app/user_center/rpc/usercenter/user_center.go +++ b/app/user_center/rpc/usercenter/user_center.go @@ -26,6 +26,7 @@ type ( GiftPackItem = pb.GiftPackItem GiveEliteReq = pb.GiveEliteReq GiveTitleReq = pb.GiveTitleReq + Grade = pb.Grade IncreaseWelfareReq = pb.IncreaseWelfareReq PlatformUserReq = pb.PlatformUserReq PlatformUserResp = pb.PlatformUserResp @@ -49,6 +50,7 @@ type ( UserDetailsResp = pb.UserDetailsResp UserDetailsResp_EliteItem = pb.UserDetailsResp_EliteItem UserDetailsResp_TitleItem = pb.UserDetailsResp_TitleItem + UserGradeResp = pb.UserGradeResp UserIdReq = pb.UserIdReq UserIdResp = pb.UserIdResp UserRankReq = pb.UserRankReq @@ -76,6 +78,8 @@ type ( 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) + // @ZeroGroup: grade + GetUserGrade(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserGradeResp, 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) @@ -162,6 +166,12 @@ func (m *defaultUserCenter) DrawGiftPack(ctx context.Context, in *DrawGiftPackRe return client.DrawGiftPack(ctx, in, opts...) } +// @ZeroGroup: grade +func (m *defaultUserCenter) GetUserGrade(ctx context.Context, in *UserIdReq, opts ...grpc.CallOption) (*UserGradeResp, error) { + client := pb.NewUserCenterClient(m.cli.Conn()) + return client.GetUserGrade(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())