Merge branch 'develop' into release

This commit is contained in:
sk 2024-10-12 16:00:57 +08:00
commit 16c5dbcab6
47 changed files with 4074 additions and 4064 deletions

29
common/functions.go Normal file
View File

@ -0,0 +1,29 @@
package common
import (
"fmt"
"github.com/spf13/viper"
)
var paths = []string{
".",
"./etc",
"./config",
}
func GetViper(name, filetype string) *viper.Viper {
vp := viper.New()
// 配置文件
vp.SetConfigName(name)
vp.SetConfigType(filetype)
for _, v := range paths {
vp.AddConfigPath(v)
}
err := vp.ReadInConfig()
if err != nil {
panic(fmt.Errorf("fatal error config file: %w", err))
}
return vp
}

View File

@ -9,5 +9,7 @@
"MatchAwardTitle": "{\"zh\":\"话费充值兑换码\",\"vi\":\"Mã nạp tiền ĐT\",\"en\":\"Phone recharge code\",\"kh\":\"កូដបញ្ចូលទូរស័ព្ទ\"}", "MatchAwardTitle": "{\"zh\":\"话费充值兑换码\",\"vi\":\"Mã nạp tiền ĐT\",\"en\":\"Phone recharge code\",\"kh\":\"កូដបញ្ចូលទូរស័ព្ទ\"}",
"MatchAward": "{\"zh\":\"恭喜您获得电话预付卡“%v$”话费充值奖励,兑换码:%v,请尽快使用\",\"vi\":\"Chúc mừng bạn đã nhận được Thẻ trả trước ĐT “%v$” phần thưởng nạp tiền tín dụng ĐT, mã đổi thưởng %v xin sử dụng ngay lập tức\",\"en\":\"Congratulations, you have received the phone prepaid card “%v$” mobile credit top-up reward, redemption code: %v please use it immediately.\",\"kh\":\"សូមអបអរសាទរ អ្នកទទួលបានរង្វាន់កាតបញ្ចូលទូរស័ព្ទ កាតទូរស័ព្ទបង់ប្រាក់ជាមុន “%v$”លេខកូដដោះដូរ %v សូមប្រើវាភ្លាមៗ\"}", "MatchAward": "{\"zh\":\"恭喜您获得电话预付卡“%v$”话费充值奖励,兑换码:%v,请尽快使用\",\"vi\":\"Chúc mừng bạn đã nhận được Thẻ trả trước ĐT “%v$” phần thưởng nạp tiền tín dụng ĐT, mã đổi thưởng %v xin sử dụng ngay lập tức\",\"en\":\"Congratulations, you have received the phone prepaid card “%v$” mobile credit top-up reward, redemption code: %v please use it immediately.\",\"kh\":\"សូមអបអរសាទរ អ្នកទទួលបានរង្វាន់កាតបញ្ចូលទូរស័ព្ទ កាតទូរស័ព្ទបង់ប្រាក់ជាមុន “%v$”លេខកូដដោះដូរ %v សូមប្រើវាភ្លាមៗ\"}",
"PermitAwardTitle": "{\"zh\":\"通行证排行奖励\",\"vi\":\"Vượt qua phần thưởng xếp hạng\",\"en\":\"Pass Ranking Rewards\",\"kh\":\"រង្វាន់ចំណាត់ថ្នាក់ឆ្លងកាត់\"}", "PermitAwardTitle": "{\"zh\":\"通行证排行奖励\",\"vi\":\"Vượt qua phần thưởng xếp hạng\",\"en\":\"Pass Ranking Rewards\",\"kh\":\"រង្វាន់ចំណាត់ថ្នាក់ឆ្លងកាត់\"}",
"PermitAward": "{\"zh\":\"恭喜您在上个赛季通行证排行中名次达到%v名排行奖励已发放请查收\",\"vi\":\"Chúc mừng bạn đã đạt được %v trong bảng xếp hạng vượt qua. Phần thưởng xếp hạng đã được phân phối, vui lòng kiểm tra.\",\"en\":\"Congratulations on reaching %vth place in the pass ranking. Ranking rewards have been issued. Please check.\",\"kh\":\"សូមអបអរសាទរចំពោះការឈានដល់ចំណាត់ថ្នាក់ទី %v ក្នុងចំណាត់ថ្នាក់ឆ្លងកាត់។ រង្វាន់ចំណាត់ថ្នាក់ត្រូវបានចេញ។ សូមត្រួតពិនិត្យ។\"}" "PermitAward": "{\"zh\":\"恭喜您在上个赛季通行证排行中名次达到%v名排行奖励已发放请查收\",\"vi\":\"Chúc mừng bạn đã đạt được %v trong bảng xếp hạng vượt qua. Phần thưởng xếp hạng đã được phân phối, vui lòng kiểm tra.\",\"en\":\"Congratulations on reaching %vth place in the pass ranking. Ranking rewards have been issued. Please check.\",\"kh\":\"សូមអបអរសាទរចំពោះការឈានដល់ចំណាត់ថ្នាក់ទី %v ក្នុងចំណាត់ថ្នាក់ឆ្លងកាត់។ រង្វាន់ចំណាត់ថ្នាក់ត្រូវបានចេញ។ សូមត្រួតពិនិត្យ។\"}",
"UpgradeTitle": "{\"zh\":\"更新奖励\",\"vi\":\"Phần thưởng cập nhật\",\"en\":\"Update Rewards\",\"kh\":\"រង្វាន់ដំឡើង\"}",
"Upgrade": "{\"zh\":\"感谢您更新客户端,更新奖励已发放至附近,请注意查收\",\"vi\":\"Cảm ơn bạn đã cập nhật ứng dụng khách. Phần thưởng cập nhật đã được phân phối gần đó, vui lòng chú ý kiểm tra nhận\",\"en\":\"Thank you for updating the client. The update reward has been distributed to everyone. Please check it carefully.\",\"kh\":\"អរគុណសម្រាប់ការធ្វើបច្ចុប្បន្នភាពហ្គេម។ រង្វាន់នៃការធ្វើបច្ចុប្បន្នភាពត្រូវបានចែកចាយទៅគ្រប់គ្នា។ សូមពិនិត្យអោយបានច្បាស់លាស់។\"}"
} }

View File

@ -9,8 +9,23 @@ import (
newMongo "go.mongodb.org/mongo-driver/mongo" newMongo "go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/options"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
"mongo.games.com/game/common"
"mongo.games.com/game/mongo"
) )
func init() {
// 读取配置文件
vp := common.GetViper("mgo", "json")
// mongo初始化
conf := &mongo.Config{}
err := vp.Unmarshal(conf)
if err != nil {
panic(fmt.Errorf("mongo config error: %v", err))
}
mongo.Init(conf)
}
var globalMongoSession *newMongo.Client var globalMongoSession *newMongo.Client
func mongoURI(user, password, host string, port int32, options string) string { func mongoURI(user, password, host string, port int32, options string) string {
@ -31,6 +46,8 @@ func mongoURI(user, password, host string, port int32, options string) string {
return url return url
} }
// NewMongoClient 创建mongo客户端
// Deprecated: use [mongo.games.com/game/mongo] instead
func NewMongoClient() (*newMongo.Client, error) { func NewMongoClient() (*newMongo.Client, error) {
if globalMongoSession != nil { if globalMongoSession != nil {
return globalMongoSession, nil return globalMongoSession, nil

View File

@ -69,7 +69,10 @@ func (svc *AnnouncerLogSvc) InsertAnnouncerLog(args []*model.AnnouncerLog, ret *
func (svc *AnnouncerLogSvc) FetchAnnouncerLog(args *model.FetchAnnouncerLogArgs, ret *[]model.AnnouncerLog) (err error) { func (svc *AnnouncerLogSvc) FetchAnnouncerLog(args *model.FetchAnnouncerLogArgs, ret *[]model.AnnouncerLog) (err error) {
*ret, err = FetchAnnouncerLog(args.Plt) *ret, err = FetchAnnouncerLog(args.Plt)
return if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return err
}
return nil
} }
func (svc *AwardLogSvc) UpsertAnnouncerLog(args *model.FetchAnnouncerLogArgs, ret *model.AnnouncerLog) error { func (svc *AwardLogSvc) UpsertAnnouncerLog(args *model.FetchAnnouncerLogArgs, ret *model.AnnouncerLog) error {

View File

@ -2,6 +2,7 @@ package svc
import ( import (
"errors" "errors"
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson" "github.com/globalsign/mgo/bson"
"mongo.games.com/game/dbproxy/mongo" "mongo.games.com/game/dbproxy/mongo"
"mongo.games.com/game/model" "mongo.games.com/game/model"
@ -34,7 +35,10 @@ type AwardLogSvc struct {
func (svc *AwardLogSvc) FetchAwardLog(args *model.FetchAwardLogArgs, ret *model.AwardLog) (err error) { func (svc *AwardLogSvc) FetchAwardLog(args *model.FetchAwardLogArgs, ret *model.AwardLog) (err error) {
*ret, err = FetchAwardLog(args.Plt) *ret, err = FetchAwardLog(args.Plt)
return if err != nil && !errors.Is(err, mgo.ErrNotFound) {
return err
}
return nil
} }
func (svc *AwardLogSvc) UpsertAwardLog(args *model.FetchAwardLogArgs, ret *model.AwardLog) error { func (svc *AwardLogSvc) UpsertAwardLog(args *model.FetchAwardLogArgs, ret *model.AwardLog) error {

View File

@ -1,315 +0,0 @@
package svc
import (
"errors"
"math"
"net/rpc"
"time"
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"
"mongo.games.com/game/dbproxy/mongo"
"mongo.games.com/game/model"
"mongo.games.com/goserver/core/logger"
)
var (
GradeLogErr = errors.New("log_grade open failed.")
BillGradeLogErr = errors.New("User billgradelog open failed.")
)
const GradeLogMaxLimitPerQuery = 100
func GradeLogsCollection(plt string) *mongo.Collection {
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.GradeLogDBName)
if s != nil {
c, first := s.DB().C(model.GradeLogCollName)
if first {
c.EnsureIndex(mgo.Index{Key: []string{"channel"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"promoter"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"inviterid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
}
return c
}
return nil
}
func InsertGradeLog(log *model.GradeLog) error {
err := GradeLogsCollection(log.Platform).Insert(log)
if err != nil {
logger.Logger.Info("InsertGradeLog error:", err)
return err
}
return nil
}
func InsertGradeLogs(logs ...*model.GradeLog) (err error) {
if len(logs) == 0 {
return nil
}
clog := GradeLogsCollection(logs[0].Platform)
if clog == nil {
return
}
switch len(logs) {
case 0:
return errors.New("no data")
case 1:
err = clog.Insert(logs[0])
default:
docs := make([]interface{}, 0, len(logs))
for _, log := range logs {
docs = append(docs, log)
}
err = clog.Insert(docs...)
}
if err != nil {
logger.Logger.Warn("InsertGradeLogs error:", err)
return
}
return
}
func UpdateGradeLogStatus(plt string, id bson.ObjectId, status int32) error {
glc := GradeLogsCollection(plt)
if glc == nil {
return GradeLogErr
}
return glc.UpdateId(id, bson.M{"$set": bson.M{"status": status}})
}
func GetGradeLogByPageAndSnId(plt string, snid, pageNo, pageSize int32) (ret *model.GradeLogLog) {
clog := GradeLogsCollection(plt)
if clog == nil {
return nil
}
selecter := bson.M{"snid": snid}
//selecter := bson.M{"snid": snid, "logtype": common.GainWay_GradeMatchGet}
total, err := clog.Find(selecter).Count()
if err != nil || total == 0 {
return nil
}
ret = new(model.GradeLogLog)
ret.PageNum = int32(math.Ceil(float64(total) / float64(pageSize)))
if pageNo > ret.PageNum {
pageNo = ret.PageNum
}
if pageNo <= 0 {
pageNo = 1
}
limitNum := (pageNo - 1) * pageSize
err = clog.Find(selecter).Skip(int(limitNum)).Limit(int(pageSize)).Sort("-time").All(&ret.Logs)
if err != nil {
logger.Logger.Error("Find gradelog data eror.", err)
return nil
}
ret.PageNo = pageNo
ret.PageSize = pageSize
return
}
func RemoveGradeLog(plt string, id bson.ObjectId) error {
glc := GradeLogsCollection(plt)
if glc == nil {
return GradeLogErr
}
return glc.RemoveId(id)
}
func GetGradeLogBySnidAndLessTs(plt string, id int32, ts time.Time) (ret []model.GradeLog, err error) {
err = GradeLogsCollection(plt).Find(bson.M{"snid": id, "time": bson.M{"$lt": ts}}).Sort("-time", "-count").Limit(GradeLogMaxLimitPerQuery).All(&ret)
return
}
func BillGradeLogsCollection(plt string) *mongo.Collection {
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.BillGradeLogDBName)
if s != nil {
c, first := s.DB().C(model.BillGradeLogCollName)
if first {
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"logid"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"timestamp"}, Background: true, Sparse: true})
c.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
}
return c
}
return nil
}
func InsertBillGradeLogs(logs ...*model.BillGradeLog) (err error) {
cpay := BillGradeLogsCollection(logs[0].Platform)
if cpay == nil {
return
}
switch len(logs) {
case 0:
return errors.New("no data")
case 1:
err = cpay.Insert(logs[0])
default:
docs := make([]interface{}, 0, len(logs))
for _, log := range logs {
docs = append(docs, log)
}
err = cpay.Insert(docs...)
}
if err != nil {
logger.Logger.Warn("InsertBillGradeLogs error:", err)
return
}
return
}
func InsertBillGradeLog(log *model.BillGradeLog) error {
cpay := BillGradeLogsCollection(log.Platform)
if cpay == nil {
return BillGradeLogErr
}
return cpay.Insert(log)
}
func RemoveBillGradeLog(plt, logid string) error {
bglc := BillGradeLogsCollection(plt)
if bglc == nil {
return BillGradeLogErr
}
return bglc.Remove(bson.M{"logid": logid})
}
func UpdateBillGradeLogStatus(plt, logId string, status int32) error {
bglc := BillGradeLogsCollection(plt)
if bglc == nil {
return BillGradeLogErr
}
var conds []bson.M
conds = append(conds, bson.M{"status": bson.M{"$ne": 3}})
conds = append(conds, bson.M{"status": bson.M{"$ne": 9}})
sql := bson.M{"logid": logId,
"$and": conds,
}
return bglc.Update(sql, bson.M{"$set": bson.M{"status": status}})
}
func GetAllBillGradeLog(plt string, snid int32, ts int64) (ret []model.BillGradeLog, err error) {
err = BillGradeLogsCollection(plt).Find(bson.M{"snid": snid, "timestamp": bson.M{"$gt": ts}}).All(&ret)
return
}
func GetBillGradeLogByLogId(plt, logId string) (ret *model.BillGradeLog, err error) {
var conds []bson.M
conds = append(conds, bson.M{"status": bson.M{"$ne": 3}})
conds = append(conds, bson.M{"status": bson.M{"$ne": 9}})
sql := bson.M{"logid": logId,
"$and": conds,
}
err = BillGradeLogsCollection(plt).Find(sql).One(&ret)
return
}
func GetBillGradeLogByBillNo(plt string, snid int32, billNo int64) (*model.BillGradeLog, error) {
var log model.BillGradeLog
err := BillGradeLogsCollection(plt).Find(bson.M{"snid": snid, "billno": billNo}).One(&log)
return &log, err
}
type GradeLogSvc struct {
}
func (svc *GradeLogSvc) InsertGradeLog(args *model.GradeLog, ret *bool) (err error) {
err = InsertGradeLog(args)
if err == nil {
*ret = true
}
return
}
func (svc *GradeLogSvc) InsertGradeLogs(args []*model.GradeLog, ret *bool) (err error) {
err = InsertGradeLogs(args...)
if err == nil {
*ret = true
}
return
}
func (svc *GradeLogSvc) UpdateGradeLogStatus(args *model.UpdateGradeLogStatusArgs, ret *bool) (err error) {
err = UpdateGradeLogStatus(args.Plt, args.Id, args.Status)
if err == nil {
*ret = true
}
return
}
func (svc *GradeLogSvc) GetGradeLogByPageAndSnId(args *model.GetGradeLogByPageAndSnIdArgs, ret **model.GradeLogLog) (err error) {
*ret = GetGradeLogByPageAndSnId(args.Plt, args.SnId, args.PageNo, args.PageSize)
return
}
func (svc *GradeLogSvc) GetGradeLogBySnidAndLessTs(args *model.GetGradeLogBySnidAndLessTsArgs, ret *[]model.GradeLog) (err error) {
*ret, err = GetGradeLogBySnidAndLessTs(args.Plt, args.SnId, args.Ts)
return
}
func (svc *GradeLogSvc) RemoveGradeLog(args *model.RemoveGradeLogArgs, ret *bool) (err error) {
err = RemoveGradeLog(args.Plt, args.Id)
if err == nil {
*ret = true
}
return
}
type BillGradeLogSvc struct {
}
func (svc *BillGradeLogSvc) InsertBillGradeLogs(args []*model.BillGradeLog, ret *bool) (err error) {
err = InsertBillGradeLogs(args...)
if err == nil {
*ret = true
}
return
}
func (svc *BillGradeLogSvc) InsertBillGradeLog(args *model.BillGradeLog, ret *bool) (err error) {
err = InsertBillGradeLog(args)
if err == nil {
*ret = true
}
return
}
func (svc *BillGradeLogSvc) RemoveBillGradeLog(args *model.RemoveBillGradeLogArgs, ret *bool) (err error) {
err = RemoveBillGradeLog(args.Plt, args.LogId)
if err == nil {
*ret = true
}
return
}
func (svc *BillGradeLogSvc) UpdateBillGradeLogStatus(args *model.UpdateBillGradeLogStatusArgs, ret *bool) (err error) {
err = UpdateBillGradeLogStatus(args.Plt, args.LogId, args.Status)
if err == nil {
*ret = true
}
return
}
func (svc *BillGradeLogSvc) GetAllBillGradeLog(args *model.GetAllBillGradeLogArgs, ret *[]model.BillGradeLog) (err error) {
*ret, err = GetAllBillGradeLog(args.Plt, args.SnId, args.Ts)
return
}
func (svc *BillGradeLogSvc) GetBillGradeLogByLogId(args *model.GetBillGradeLogByLogIdArgs, ret **model.BillGradeLog) (err error) {
*ret, err = GetBillGradeLogByLogId(args.Plt, args.LogId)
return
}
func (svc *BillGradeLogSvc) GetBillGradeLogByBillNo(args *model.GetBillGradeLogByBillNoArgs, ret **model.BillGradeLog) (err error) {
*ret, err = GetBillGradeLogByBillNo(args.Plt, args.SnId, args.BillNo)
return
}
func init() {
rpc.Register(new(GradeLogSvc))
rpc.Register(new(BillGradeLogSvc))
}

View File

@ -69,7 +69,7 @@ func CheckInviteScore(req *model.InviteScore) (b bool, err error) {
psnid, err := GetPSnId(req.Platform, req.SnId) psnid, err := GetPSnId(req.Platform, req.SnId)
if err != nil || psnid == 0 { if err != nil || psnid == 0 {
// 还没有绑定上级 // 还没有绑定上级
logger.Logger.Errorf("not bind error:%v", err) //logger.Logger.Errorf("not bind error:%v", err)
return false, err return false, err
} }
} }

View File

@ -20,7 +20,11 @@ func LoginLogsCollection(plt string) *mongo.Collection {
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"logtype"}, Background: true, Sparse: true}) c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"logtype"}, Background: true, Sparse: true})
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"ip"}, Background: true, Sparse: true}) c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"ip"}, Background: true, Sparse: true})
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true}) c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"-time"}, Background: true, Sparse: true})
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true}) c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"appchannel"}, Background: true, Sparse: true})
c_loginlogrec.EnsureIndex(mgo.Index{Key: []string{"clientver"}, Background: true, Sparse: true})
} }
return c_loginlogrec return c_loginlogrec
} }

View File

@ -321,28 +321,6 @@ func (svc *AccountSvc) InsertAccount(args *model.Account, ret *model.AccRet) err
return nil return nil
} }
func (svc *AccountSvc) InsertTelAccount(args *model.Account, ret *model.AccRet) error {
caccounts := AccountCollection(args.Platform)
if caccounts == nil {
return ErrAccDBNotOpen
}
id, err := GetOnePlayerIdFromBucket()
if err == nil {
args.SnId = id
}
err = caccounts.Insert(args)
if err != nil {
logger.Logger.Info("InsertAccount error:", err)
return nil
}
ret.Acc = args
ret.Tag = common.InsertAccountOk
return nil
}
func (svc *AccountSvc) UpgradeAccount(args *model.Account, ret *model.AccRet) error { func (svc *AccountSvc) UpgradeAccount(args *model.Account, ret *model.AccRet) error {
caccounts := AccountCollection(args.Platform) caccounts := AccountCollection(args.Platform)
if caccounts == nil { if caccounts == nil {

View File

@ -70,115 +70,7 @@ func PlayerDelBackupDataCollection(plt string) *mongo.Collection {
type PlayerDataSvc struct { type PlayerDataSvc struct {
} }
//func (svc *PlayerDataSvc) SavePlayerRebate(pd *model.PlayerData, ret *bool) error { func (svc *PlayerDataSvc) InsertPlayerData(args *model.InsertPlayerDataParam, ret *model.PlayerDataRet) (err error) {
// cplayerdata := PlayerDataCollection(pd.Platform)
// if cplayerdata == nil {
// return nil
// }
// err := cplayerdata.Update(bson.M{"snid": pd.SnId}, bson.D{{"$set", bson.D{{"rebatedata", pd.RebateData}, {"totalconvertibleflow", pd.TotalConvertibleFlow}}}})
// if err != nil {
// logger.Logger.Trace("SavePlayerRebate failed:", err)
// ret.Err = err
// return err
// }
// return nil
//}
// 获取代理信息
func (svc *PlayerDataSvc) GetAgentInfo(args *model.GetAgentInfoArgs, ret *model.PlayerData) error {
cplayerdata := PlayerDataCollection(args.Plt)
if cplayerdata == nil {
return nil
}
err := cplayerdata.Find(bson.M{"tel": args.Tel}).One(ret)
if err != nil {
logger.Logger.Error("GetAgentInfo failed:", err)
return err
}
if CorrectData(ret) {
}
return nil
}
func (svc *PlayerDataSvc) GetPlayerData(args *model.GetPlayerDataArgs, ret *model.PlayerDataRet) error {
cplayerdata := PlayerDataCollection(args.Plt)
if cplayerdata == nil {
return nil
}
pd := &model.PlayerData{}
fileName := fmt.Sprintf("%v.json", args.Acc)
_, err := os.Stat(fileName)
if err == nil || os.IsExist(err) {
pd = model.RestorePlayerData(fileName)
err = os.Remove(fileName)
} else {
if args.Acc != "" {
err = cplayerdata.Find(bson.M{"accountid": args.Acc}).One(pd)
}
}
if err != nil && err.Error() == mgo.ErrNotFound.Error() {
logger.Logger.Trace("GetPlayerinfo Find failed:", err)
if !bson.IsObjectIdHex(args.Acc) {
logger.Logger.Warn("NewPlayer failed: acc is illeage ", args.Acc)
return nil
}
a, err := _AccountSvc.getAccount(args.Plt, args.Acc)
if err != nil {
logger.Logger.Warnf("model.GetAccount(%v) failed:%v", args.Acc, err)
return nil
}
id := a.SnId
if id == 0 {
id, err = GetOnePlayerIdFromBucket()
if err != nil {
logger.Logger.Warn("NewPlayer failed:", err)
return err
}
}
var dataParams model.PlayerParams
json.Unmarshal([]byte(a.Params), &dataParams)
name := dataParams.Name
if name == "" {
name = model.GameParamData.GuestDefaultName //fmt.Sprintf("Guest%v", id)
}
if name == "" {
name = "Guest"
}
pd = model.NewPlayerData(args.Acc, name, id, a.Channel, a.Platform, a.Params,
a.Tel, a.PackegeTag, dataParams.Ip, 0, dataParams.UnionId, a.DeviceInfo, a.TagKey, a.AccountType, a.ChannelId)
if pd != nil {
err = cplayerdata.Insert(pd)
if err != nil {
logger.Logger.Errorf("GetPlayerinfo Insert err:%v acc:%v snid:%v", err, args.Acc, id)
return err
}
ret.IsNew = true
ret.Pd = pd
return nil
}
return nil
}
//todo 修正玩家的离线时间,上次登录时间,创建时间
pd.LastLogoutTime = pd.LastLogoutTime.Local()
pd.LastLoginTime = pd.LastLoginTime.Local()
pd.CreateTime = pd.CreateTime.Local()
if CorrectData(pd) {
}
ret.Pd = pd
return nil
}
// 谷歌 facebook 账号数据
func (svc *PlayerDataSvc) CreatePlayerDataByThird(args *model.CreatePlayer, ret *model.PlayerDataRet) (err error) {
cplayerdata := PlayerDataCollection(args.Plt) cplayerdata := PlayerDataCollection(args.Plt)
if cplayerdata == nil { if cplayerdata == nil {
return return
@ -197,7 +89,7 @@ func (svc *PlayerDataSvc) CreatePlayerDataByThird(args *model.CreatePlayer, ret
} }
if err != nil && err.Error() == mgo.ErrNotFound.Error() { if err != nil && err.Error() == mgo.ErrNotFound.Error() {
logger.Logger.Trace("CreatePlayerDataByThird Find failed:", err) logger.Logger.Trace("InsertPlayerData Find failed:", err)
if !bson.IsObjectIdHex(acc) { if !bson.IsObjectIdHex(acc) {
logger.Logger.Warn("NewPlayer failed: acc is illeage ", acc) logger.Logger.Warn("NewPlayer failed: acc is illeage ", acc)
@ -226,79 +118,8 @@ func (svc *PlayerDataSvc) CreatePlayerDataByThird(args *model.CreatePlayer, ret
} }
var dataParams model.PlayerParams var dataParams model.PlayerParams
json.Unmarshal([]byte(a.Params), &dataParams) json.Unmarshal([]byte(a.Params), &dataParams)
pd = model.NewPlayerDataThird(acc, name, args.HeadUrl, id, a.Channel, a.Platform, a.Params, pd = model.NewPlayerData(acc, name, args.HeadUrl, id, a.Channel, a.Platform, a.Params,
a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId) a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId, a.ClientVer)
if pd != nil {
err = cplayerdata.Insert(pd)
if err != nil {
logger.Logger.Trace("CreatePlayerDataByThird Insert failed:", err)
return
}
ret.Pd = pd
ret.IsNew = true
return
}
return
}
if CorrectData(pd) {
}
ret.Pd = pd
return nil
}
func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg, ret *model.PlayerDataRet) (err error) {
cplayerdata := PlayerDataCollection(args.Plt)
if cplayerdata == nil {
return PlayerColError
}
acc := args.AccId
pd := &model.PlayerData{}
fileName := fmt.Sprintf("%v.json", acc)
_, err = os.Stat(fileName)
if err == nil || os.IsExist(err) {
pd = model.RestorePlayerData(fileName)
err = os.Remove(fileName)
} else {
if acc != "" {
err = cplayerdata.Find(bson.M{"accountid": acc}).One(pd)
}
}
if err != nil && err.Error() == mgo.ErrNotFound.Error() {
logger.Logger.Trace("CreatePlayerDataOnRegister Find failed:", err)
if !bson.IsObjectIdHex(acc) {
logger.Logger.Warn("NewPlayer failed: acc is illeage ", acc)
return errors.New("acc is illeage")
}
var a *model.Account
a, err = _AccountSvc.getAccount(args.Plt, args.AccId)
if err != nil {
logger.Logger.Warnf("_AccountSvc.getAccount(%v,%v) failed:%v", args.Plt, args.AccId, err)
return err
}
id := a.SnId
if id == 0 {
id, err = GetOnePlayerIdFromBucket()
if err != nil {
logger.Logger.Warn("NewPlayer failed:", err)
return err
}
}
name := model.GameParamData.GuestDefaultName //fmt.Sprintf("Guest%v", id)
if name == "" && args.Name != "" {
name = args.Name
}
if name == "" {
name = "Guest"
}
var dataParams model.PlayerParams
json.Unmarshal([]byte(a.Params), &dataParams)
pd = model.NewPlayerData(acc, name, id, a.Channel, a.Platform, a.Params, a.Tel, a.PackegeTag,
dataParams.Ip, int64(args.AddCoin), "", a.DeviceInfo, a.TagKey, a.AccountType, a.ChannelId)
pd.HeadUrl = args.HeadUrl
if pd != nil { if pd != nil {
if pd.ICode == "" { if pd.ICode == "" {
code, _ := GetInviteCode(pd.Platform, pd.SnId) code, _ := GetInviteCode(pd.Platform, pd.SnId)
@ -307,14 +128,14 @@ func (svc *PlayerDataSvc) CreatePlayerDataOnRegister(args *model.PlayerDataArg,
} }
err = cplayerdata.Insert(pd) err = cplayerdata.Insert(pd)
if err != nil { if err != nil {
logger.Logger.Trace("CreatePlayerDataOnRegister Insert failed:", err) logger.Logger.Trace("InsertPlayerData Insert failed:", err)
return err return
} }
ret.Pd = pd ret.Pd = pd
ret.IsNew = true ret.IsNew = true
return nil return
} }
return nil return
} }
if CorrectData(pd) { if CorrectData(pd) {
} }
@ -382,9 +203,8 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
if name == "" { if name == "" {
name = "Guest" name = "Guest"
} }
pd := model.NewPlayerData(a.AccountId.Hex(), name, "", a.SnId, a.Channel, a.Platform, a.Params,
pd := model.NewPlayerData(a.AccountId.Hex(), name, a.SnId, a.Channel, a.Platform, a.Params, a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId, a.ClientVer)
a.Tel, a.PackegeTag, dataParams.Ip, 0, dataParams.UnionId, a.DeviceInfo, a.TagKey, a.AccountType, a.ChannelId)
if pd != nil { if pd != nil {
if pd.ICode == "" { if pd.ICode == "" {
code, _ = GetInviteCode(pd.Platform, pd.SnId) code, _ = GetInviteCode(pd.Platform, pd.SnId)
@ -422,20 +242,6 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
return nil return nil
} }
//func (svc *PlayerDataSvc) UpdateCreateCreateClubNum(snId int32, ret *model.PlayerDataRet) error {
// cplayerdata := PlayerDataCollection()
// if cplayerdata == nil {
// return nil
// }
// err := cplayerdata.Update(bson.M{"snid": snId}, bson.D{{"$inc", bson.D{{"createclubnum", 1}}}})
// if err != nil {
// logger.Logger.Error("Update player safeboxcoin error:", err)
// ret.Err = err
// return err
// }
// return nil
//}
func (svc *PlayerDataSvc) GetPlayerDatasBySnIds(args *model.GetPlayerDatasBySnIdsArgs, ret *[]*model.PlayerData) (err error) { func (svc *PlayerDataSvc) GetPlayerDatasBySnIds(args *model.GetPlayerDatasBySnIdsArgs, ret *[]*model.PlayerData) (err error) {
cplayerdata := PlayerDataCollection(args.Plt) cplayerdata := PlayerDataCollection(args.Plt)
if cplayerdata == nil { if cplayerdata == nil {
@ -457,23 +263,6 @@ func (svc *PlayerDataSvc) GetPlayerDatasBySnIds(args *model.GetPlayerDatasBySnId
return return
} }
func (svc *PlayerDataSvc) GetPlayerDataByUnionId(args *model.GetPlayerDataByUnionIdArgs, ret *model.PlayerDataRet) (err error) {
cplayerdata := PlayerDataCollection(args.Plt)
if cplayerdata == nil {
return
}
err = cplayerdata.Find(bson.M{"unionid": args.UnionId}).One(&ret.Pd)
if err != nil {
logger.Logger.Tracef("GetPlayerDataByUnionId % player data error:%v", args.UnionId, err)
return
}
if args.CorrectData {
if CorrectData(ret.Pd) {
}
}
return
}
func (svc *PlayerDataSvc) GetPlayerTel(args *model.GetPlayerTelArgs, ret *model.GetPlayerTelRet) (err error) { func (svc *PlayerDataSvc) GetPlayerTel(args *model.GetPlayerTelArgs, ret *model.GetPlayerTelRet) (err error) {
cplayerdata := PlayerDataCollection(args.Plt) cplayerdata := PlayerDataCollection(args.Plt)

View File

@ -45,4 +45,5 @@ const (
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置 ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置 ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置 ETCDKEY_RoomConfigSystem = "/game/room_system" // 系统房间配置
ETCDKEY_ClientUpgrade = "/game/client_upgrade" // 客户端升级奖励配置
) )

View File

@ -6,6 +6,9 @@ import (
"mongo.games.com/game/model" "mongo.games.com/game/model"
"mongo.games.com/game/srvdata" "mongo.games.com/game/srvdata"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
"mongo.games.com/game/proto"
"mongo.games.com/game/protocol/clawdoll"
) )
type PlayerEx struct { type PlayerEx struct {
@ -225,3 +228,24 @@ func (this *PlayerEx) GetItemCount(itemID int32) int64 {
} }
return 0 return 0
} }
func (this *PlayerEx) SendPlayerGameBilled(RoundId int32) {
if this != nil {
result := 0
if this.IsWin {
result = 1
}
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{
RoundId: proto.Int32(RoundId),
ClowResult: proto.Int32(int32(result)),
Award: proto.Int64(this.gainCoin),
Balance: proto.Int64(this.Coin),
}
logger.Logger.Trace("Clawdoor -StateWaitPayCoin is pack: ", pack)
proto.SetDefaults(pack)
this.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_GAMEBILLED), pack)
}
}

View File

@ -930,19 +930,9 @@ func (this *StateWaitPayCoin) OnEnter(s *base.Scene) {
return return
} }
playerEx := sceneEx.GetPlayingEx() playingEx := sceneEx.GetPlayingEx()
if playerEx != nil { if playingEx != nil {
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{ playingEx.SendPlayerGameBilled(int32(sceneEx.RoundId))
RoundId: proto.Int32(int32(sceneEx.RoundId)),
ClowResult: proto.Int32(0),
Award: proto.Int64(playerEx.gainCoin),
Balance: proto.Int64(playerEx.Coin),
}
logger.Logger.Trace("Clawdoor -StateWaitPayCoin is pack: ", pack)
proto.SetDefaults(pack)
playerEx.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_GAMEBILLED), pack)
} }
} }

View File

@ -19,17 +19,15 @@ import (
type Account struct { type Account struct {
AccountId bson.ObjectId `bson:"_id"` AccountId bson.ObjectId `bson:"_id"`
SnId int32 // 玩家账号直接在这里生成 SnId int32 // 玩家账号直接在这里生成
UserName string //Service Provider AccountId UserName string // 账号
PassWord string // 昵称密码 PassWord string // 昵称密码
TelPassWord string // 帐号密码 TelPassWord string // 帐号密码
BackPassWord string // 备份账号密码 BackPassWord string // 备份账号密码
Platform string // 平台 Platform string // 平台
Channel string //渠道 Channel string //渠道
Tel string // 电话号码 Tel string // 电话号码
Params string // 其他参数 Params string // 其他参数
DeviceOs string // 系统 DeviceOs string // 系统
PackegeTag string //包标识
Package string //包名 android:包名 ios:bundleid
DeviceInfo string // 设备信息 DeviceInfo string // 设备信息
LoginTimes int // 登录次数 LoginTimes int // 登录次数
State int64 // 冻结到期时间戳 State int64 // 冻结到期时间戳
@ -38,11 +36,15 @@ type Account struct {
LastLogoutTime time.Time // 最后一次登出时间 LastLogoutTime time.Time // 最后一次登出时间
Flag int32 // 二次推广用户标记 Flag int32 // 二次推广用户标记
Remark string // 备注信息 Remark string // 备注信息
TagKey int32 //包标识关键字
AccountType int32 // 1.google 2.facebook AccountType int32 // 1.google 2.facebook
RegisterTs int64 // 注册时间戳 RegisterTs int64 // 注册时间戳
TelPassWordExpire int64 // 手机验证码登录过期时间戳 TelPassWordExpire int64 // 手机验证码登录过期时间戳
ChannelId string // 渠道id ChannelId string // 推广渠道
ClientVer int32 // 客户端版本
TagKey int32 //包标识关键字
PackegeTag string //包标识
Package string //包名 android:包名 ios:bundleid
} }
func NewAccount() *Account { func NewAccount() *Account {
@ -91,23 +93,22 @@ func AccountIsExist(userName, tel, passWord, platform string, ts int64, logintyp
return ret.Acc, ret.Tag return ret.Acc, ret.Tag
} }
func AccountTelIsRegiste(tel, platform string, tagkey int32) bool { type InsertAccountParam struct {
if rpcCli == nil { Platform string // 平台
return false UserName string // 用户名
Password string // 密码,编码后的
TelPassword string // 账号密码,编码后的
Channel string // 包渠道
Params string // 其它参数
DeviceOs string // 操作系统
DeviceInfo string // 设备信息
ChannelId string // 推广渠道
AccountType int32 // 账号类型
Tel string // 手机号
ClientVer int32 // 客户端版本
} }
args := &AccIsExistArg{ func InsertAccount(param *InsertAccountParam) (*Account, int) {
Tel: tel,
Platform: platform,
TagKey: tagkey,
}
var ret bool
rpcCli.CallWithTimeout("AccountSvc.AccountTelIsRegiste", args, &ret, time.Second*30)
return ret
}
func InsertAccount(userName, passWord, platform, channel, promoter, params, deviceOs string, inviterId, promoterTree int32,
packTag, packname, deviceInfo string, subPromoter string, tagkey int32, channelId string) (*Account, int) {
if rpcCli == nil { if rpcCli == nil {
return nil, 0 return nil, 0
} }
@ -118,23 +119,26 @@ func InsertAccount(userName, passWord, platform, channel, promoter, params, devi
} }
tCur := time.Now() tCur := time.Now()
acc.UserName = userName acc.UserName = param.UserName
acc.PassWord = passWord acc.PassWord = param.Password
acc.TelPassWord = passWord acc.TelPassWord = param.TelPassword
acc.Platform = platform acc.Platform = param.Platform
acc.Channel = channel acc.Channel = param.Channel
acc.Params = params acc.Params = param.Params
acc.DeviceOs = deviceOs acc.DeviceOs = param.DeviceOs
acc.DeviceInfo = param.DeviceInfo
acc.ChannelId = param.ChannelId
acc.AccountType = param.AccountType
acc.Tel = param.Tel
acc.ClientVer = param.ClientVer
acc.LastLoginTime = tCur acc.LastLoginTime = tCur
acc.RegisteTime = tCur acc.RegisteTime = tCur
acc.LoginTimes = 1 acc.LoginTimes = 1
acc.PackegeTag = packTag
acc.Package = packname
acc.DeviceInfo = deviceInfo
acc.TagKey = tagkey
acc.ChannelId = channelId
acc.RegisterTs = tCur.Unix() acc.RegisterTs = tCur.Unix()
acc.TelPassWordExpire = tCur.AddDate(0, 0, common.TelLoginValidDays).Unix()
ret := &AccRet{} ret := &AccRet{}
err := rpcCli.CallWithTimeout("AccountSvc.InsertAccount", acc, ret, time.Second*30) err := rpcCli.CallWithTimeout("AccountSvc.InsertAccount", acc, ret, time.Second*30)
if err != nil { if err != nil {
return nil, 0 return nil, 0
@ -142,67 +146,6 @@ func InsertAccount(userName, passWord, platform, channel, promoter, params, devi
return ret.Acc, ret.Tag return ret.Acc, ret.Tag
} }
func InsertTelAccount(userName, passWord, platform, channel, promoter, params string, inviterId, promoterTree int32, tel,
telpassword, packTag, packname, deviceInfo string, tagkey, accountType int32, deviceOs, channelId string) (*Account, int) {
if rpcCli == nil {
return nil, 0
}
acc := NewAccount()
if acc == nil {
return nil, 0
}
tCur := time.Now()
acc.UserName = userName
acc.PassWord = passWord
acc.Tel = tel
acc.TelPassWord = telpassword
acc.Platform = platform
acc.Channel = channel
acc.ChannelId = channelId
acc.Params = params
acc.LastLoginTime = tCur
acc.RegisteTime = tCur
acc.LoginTimes = 1
acc.PackegeTag = packTag
acc.Package = packname
acc.DeviceInfo = deviceInfo
acc.TagKey = tagkey
acc.AccountType = accountType
acc.RegisterTs = tCur.Unix()
acc.DeviceOs = deviceOs
acc.TelPassWordExpire = tCur.AddDate(0, 0, common.TelLoginValidDays).Unix()
ret := &AccRet{}
err := rpcCli.CallWithTimeout("AccountSvc.InsertTelAccount", acc, ret, time.Second*30)
if err != nil {
return nil, 0
}
return ret.Acc, ret.Tag
}
func UpgradeAccount(accId, tel, passWord, platform string, tagkey int32) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
args := &AccIsExistArg{
AccId: accId,
Password: passWord,
Tel: tel,
Platform: platform,
TagKey: tagkey,
}
ret := &AccRet{}
err := rpcCli.CallWithTimeout("AccountSvc.UpgradeAccount", args, ret, time.Second*30)
if err != nil {
return fmt.Errorf("UpgradeAccount err:%v tel:%v accid:%v", err, tel, accId)
}
if ret.Acc != nil && ret.Acc.Tel != "" {
return errors.New("Tel is Bind")
}
return nil
}
type BindTelAccountArgs struct { type BindTelAccountArgs struct {
Platform string Platform string
AccId string AccId string

View File

@ -65,6 +65,7 @@ type ShopInfo struct {
RoleAddedId int32 //加成人物ID RoleAddedId int32 //加成人物ID
PetAddedId int32 //加成宠物ID PetAddedId int32 //加成宠物ID
FirstSwitch bool // 首冲翻倍 FirstSwitch bool // 首冲翻倍
FirstGiveSwitch bool // 首冲翻倍时加赠是否翻倍
AmountFinal int64 // 实际获得数量 AmountFinal int64 // 实际获得数量
} }
@ -152,6 +153,8 @@ type AllConfig struct {
RoomTypeMap map[int32][]*webapi.RoomConfig // key: 房间类型id:房间配置 RoomTypeMap map[int32][]*webapi.RoomConfig // key: 房间类型id:房间配置
// 系统房间配置 // 系统房间配置
RoomConfigSystem map[int32]*webapi.RoomConfigSystem RoomConfigSystem map[int32]*webapi.RoomConfigSystem
// 客户端升级奖励配置
*webapi.ClientUpgrade
} }
type GlobalConfig struct { type GlobalConfig struct {
@ -257,6 +260,7 @@ func (cm *ConfigMgr) UpdateItemShop(list *webapi.ItemShopList) {
Ratio: itemShop.Ratio, Ratio: itemShop.Ratio,
EndTime: itemShop.EndTime, EndTime: itemShop.EndTime,
FirstSwitch: itemShop.FirstSwitch, FirstSwitch: itemShop.FirstSwitch,
FirstGiveSwitch: itemShop.OnFirstGiveDouble == common.On,
} }
} }
cm.GetConfig(list.Platform).ShopInfos = shopInfos cm.GetConfig(list.Platform).ShopInfos = shopInfos

View File

@ -133,10 +133,12 @@ type PlayerLoginEvent struct {
IsNew int32 //是否是新用户1是 0否 IsNew int32 //是否是新用户1是 0否
DeviceId string //设备id DeviceId string //设备id
ChannelId string //渠道id ChannelId string //渠道id
AppChannel string //包渠道
ClientVer int32 // 客户端版本
} }
func CreatePlayerLoginEvent(snid int32, channel, promoter, platform, city, os, ip string, createTime, func CreatePlayerLoginEvent(snid int32, channel, promoter, platform, city, os, ip string, createTime,
upgradeTime time.Time, isBindPhone int32, telephonePromoter int32, deviceId, channelId string) *PlayerLoginEvent { upgradeTime time.Time, isBindPhone int32, telephonePromoter int32, deviceId, channelId, appChannel string, clientVer int32) *PlayerLoginEvent {
isNew := int32(0) isNew := int32(0)
if createTime.Local().YearDay() == time.Now().Local().YearDay() && createTime.Local().Year() == time.Now().Local().Year() { if createTime.Local().YearDay() == time.Now().Local().YearDay() && createTime.Local().Year() == time.Now().Local().Year() {
isNew = 1 isNew = 1
@ -158,25 +160,11 @@ func CreatePlayerLoginEvent(snid int32, channel, promoter, platform, city, os, i
IsNew: isNew, IsNew: isNew,
DeviceId: deviceId, DeviceId: deviceId,
ChannelId: channelId, ChannelId: channelId,
AppChannel: appChannel,
ClientVer: clientVer,
} }
} }
func MarshalPlayerLoginEvent(source, snid int32, channel, promoter, platform, city, os, ip string,
createTime, upgradeTime time.Time, isBindPhone int32, telephonePromoter int32, deviceId, channelId string) (data string, err error) {
raw := &RabbitMQDataRaw{
Source: source,
Data: CreatePlayerLoginEvent(snid, channel, promoter, platform, city, os, ip, createTime,
upgradeTime, isBindPhone, telephonePromoter, deviceId, channelId),
}
d, e := json.Marshal(raw)
if e == nil {
data = string(d[:])
}
err = e
return
}
// 用户升级账号 // 用户升级账号
type PlayerBindPhoneEvent struct { type PlayerBindPhoneEvent struct {
SnId int32 //用户ID SnId int32 //用户ID

View File

@ -90,6 +90,8 @@ type GameParam struct {
AdminPassword string // 管理员密码 AdminPassword string // 管理员密码
UseAdminPassword bool // 是否使用管理员密码 UseAdminPassword bool // 是否使用管理员密码
CloseCustomRoomCreate bool // 关闭自定义房间创建 CloseCustomRoomCreate bool // 关闭自定义房间创建
ClientVersion int32 // 客户端版本号
ClientVersionChannel []string // 客户端版本号包渠道
} }
var GameParamPath = "../data/gameparam.json" var GameParamPath = "../data/gameparam.json"

View File

@ -1,323 +0,0 @@
package model
import (
"time"
"github.com/globalsign/mgo/bson"
)
var (
GradeLogDBName = "log"
GradeLogCollName = "log_grade"
)
const GradeLogMaxLimitPerQuery = 100
type GradeLog struct {
LogId bson.ObjectId `bson:"_id"`
SnId int32
Platform string //平台名称
Channel string //渠道名称
Promoter string //推广员
PackageTag string //推广包标识
InviterId int32 //邀请人id
Count int64
RestCount int64
Oper string
Remark string
Time time.Time
Ver int32
LogType int32
Status int32 //状态 0 默认 1超时
}
func NewGradeLog() *GradeLog {
log := &GradeLog{LogId: bson.NewObjectId()}
return log
}
func NewGradeLogEx(snid int32, count, restCount int64, ver, logType int32, oper, remark string, platform, channel, promoter, packageId string, inviterId int32) *GradeLog {
cl := NewGradeLog()
cl.SnId = snid
cl.Count = count
cl.RestCount = restCount
cl.Oper = oper
cl.Remark = remark
cl.Platform = platform
cl.Channel = channel
cl.Promoter = promoter
cl.PackageTag = packageId
cl.InviterId = inviterId
cl.Time = time.Now()
cl.Ver = ver
cl.LogType = logType
return cl
}
func InsertGradeLog(snid int32, count, restCount int64, ver, logType int32, oper, remark string, platform, channel, promoter, packageId string, inviterId int32) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
cl := NewGradeLog()
cl.SnId = snid
cl.Count = count
cl.RestCount = restCount
cl.Oper = oper
cl.Remark = remark
cl.Platform = platform
cl.Channel = channel
cl.Promoter = promoter
cl.PackageTag = packageId
cl.InviterId = inviterId
cl.Time = time.Now()
cl.Ver = ver
cl.LogType = logType
var ret bool
return rpcCli.CallWithTimeout("GradeLogSvc.InsertGradeLog", cl, &ret, time.Second*30)
}
func InsertGradeLogs(logs ...*GradeLog) (err error) {
if rpcCli == nil {
return ErrRPClientNoConn
}
var ret bool
return rpcCli.CallWithTimeout("GradeLogSvc.InsertGradeLogs", logs, &ret, time.Second*30)
}
type UpdateGradeLogStatusArgs struct {
Plt string
Id bson.ObjectId
Status int32
}
func UpdateGradeLogStatus(plt string, id bson.ObjectId, status int32) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
args := &UpdateGradeLogStatusArgs{
Plt: plt,
Id: id,
Status: status,
}
var ret bool
return rpcCli.CallWithTimeout("GradeLogSvc.UpdateGradeLogStatus", args, &ret, time.Second*30)
}
type GradeLogLog struct {
Logs []*GradeLog
PageNo int32
PageSize int32
PageNum int32
}
type GetGradeLogByPageAndSnIdArgs struct {
Plt string
SnId int32
PageNo int32
PageSize int32
}
func GetGradeLogByPageAndSnId(plt string, snid, pageNo, pageSize int32) (ret *GradeLogLog, err error) {
if rpcCli == nil {
return nil, ErrRPClientNoConn
}
args := &GetGradeLogByPageAndSnIdArgs{
Plt: plt,
SnId: snid,
PageNo: pageNo,
PageSize: pageSize,
}
err = rpcCli.CallWithTimeout("GradeLogSvc.GetGradeLogByPageAndSnId", args, &ret, time.Second*30)
return
}
type RemoveGradeLogArgs struct {
Plt string
Id bson.ObjectId
}
func RemoveGradeLog(plt string, id bson.ObjectId) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
args := &RemoveGradeLogArgs{
Plt: plt,
Id: id,
}
var ret bool
return rpcCli.CallWithTimeout("GradeLogSvc.RemoveGradeLog", args, &ret, time.Second*30)
}
type GetGradeLogBySnidAndLessTsArgs struct {
Plt string
SnId int32
Ts time.Time
}
func GetGradeLogBySnidAndLessTs(plt string, id int32, ts time.Time) (ret []GradeLog, err error) {
if rpcCli == nil {
return nil, ErrRPClientNoConn
}
args := &GetGradeLogBySnidAndLessTsArgs{
Plt: plt,
SnId: id,
Ts: ts,
}
err = rpcCli.CallWithTimeout("GradeLogSvc.GetGradeLogBySnidAndLessTs", args, &ret, time.Second*30)
return
}
// ///////////////////////////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////////////////////
// 积分兑换对账数据
var (
BillGradeLogDBName = "user"
BillGradeLogCollName = "user_billgradelog"
)
type BillGradeLog struct {
LogId string //账单ID
Platform string //平台号
GradeLogId string //账变对应记录id
SnId int32 //用户ID
ShopId int32 //商品id
ShopType int32 //商品类型 0.虚拟 1.实物
ShopName string //商品名称
Grade int64 //账单积分
Coin int64 //账单兑换金额
TimeStamp int64 //生效时间戳
CreateTime time.Time //账单时间
Ver int32 //账单版本号
Oper string //操作人
Status int32 //状态 0.创建 1.超时 3.取消订单 4.异常 9.已发货
}
func NewBillGradeLog(platform string, SnId, ShopId, ShopType int32, ShopName string, Grade, Coin int64, Oper, GradeLogId string) *BillGradeLog {
tNow := time.Now()
log := &BillGradeLog{
LogId: bson.NewObjectId().Hex(),
Platform: platform,
SnId: SnId,
ShopId: ShopId,
ShopType: ShopType,
ShopName: ShopName,
Grade: Grade,
Coin: Coin,
Ver: VER_PLAYER_MAX - 1,
TimeStamp: tNow.UnixNano(),
CreateTime: tNow,
Oper: Oper,
GradeLogId: GradeLogId,
Status: 0,
}
return log
}
func InsertBillGradeLogs(logs ...*BillGradeLog) (err error) {
if rpcCli == nil {
return ErrRPClientNoConn
}
var ret bool
return rpcCli.CallWithTimeout("BillGradeLogSvc.InsertBillGradeLogs", logs, &ret, time.Second*30)
}
func InsertBillGradeLog(log *BillGradeLog) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
var ret bool
return rpcCli.CallWithTimeout("BillGradeLogSvc.InsertBillGradeLog", log, &ret, time.Second*30)
}
type RemoveBillGradeLogArgs struct {
Plt string
LogId string
}
func RemoveBillGradeLog(plt string, logid string) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
args := &RemoveBillGradeLogArgs{
Plt: plt,
LogId: logid,
}
var ret bool
return rpcCli.CallWithTimeout("BillGradeLogSvc.InsertBillGradeLog", args, &ret, time.Second*30)
}
type UpdateBillGradeLogStatusArgs struct {
Plt string
LogId string
Status int32
}
func UpdateBillGradeLogStatus(plt string, logId string, status int32) error {
if rpcCli == nil {
return ErrRPClientNoConn
}
args := &UpdateBillGradeLogStatusArgs{
Plt: plt,
LogId: logId,
Status: status,
}
var ret bool
return rpcCli.CallWithTimeout("BillGradeLogSvc.UpdateBillGradeLogStatus", args, &ret, time.Second*30)
}
type GetAllBillGradeLogArgs struct {
Plt string
SnId int32
Ts int64
}
func GetAllBillGradeLog(plt string, snid int32, ts int64) (ret []BillGradeLog, err error) {
if rpcCli == nil {
return nil, ErrRPClientNoConn
}
args := &GetAllBillGradeLogArgs{
Plt: plt,
SnId: snid,
Ts: ts,
}
err = rpcCli.CallWithTimeout("BillGradeLogSvc.GetAllBillGradeLog", args, &ret, time.Second*30)
return
}
type GetBillGradeLogByLogIdArgs struct {
Plt string
LogId string
}
func GetBillGradeLogByLogId(plt string, logId string) (ret *BillGradeLog, err error) {
if rpcCli == nil {
return nil, ErrRPClientNoConn
}
args := &GetBillGradeLogByLogIdArgs{
Plt: plt,
LogId: logId,
}
err = rpcCli.CallWithTimeout("BillGradeLogSvc.GetBillGradeLogByLogId", args, &ret, time.Second*30)
return
}
type GetBillGradeLogByBillNoArgs struct {
Plt string
SnId int32
BillNo int64
}
func GetBillGradeLogByBillNo(plt string, snid int32, billNo int64) (ret *BillGradeLog, err error) {
if rpcCli == nil {
return nil, ErrRPClientNoConn
}
args := &GetBillGradeLogByBillNoArgs{
Plt: plt,
SnId: snid,
BillNo: billNo,
}
err = rpcCli.CallWithTimeout("BillGradeLogSvc.GetBillGradeLogByLogId", args, &ret, time.Second*30)
return
}

View File

@ -55,11 +55,12 @@ type LoginLog struct {
BuildVersion string BuildVersion string
AppChannel string AppChannel string
DeviceOS string DeviceOS string
ClientVer int32
} }
func NewLoginLog(snId, logType int32, tel, ip, platform, channel, promoter, packageId, city string, func NewLoginLog(snId, logType int32, tel, ip, platform, channel, promoter, packageId, city string,
clog *ClientLoginInfo, totalCoin int64, gameId, lastGameId int, clog *ClientLoginInfo, totalCoin int64, gameId, lastGameId int,
DeviceName, PackageName, AppVersion, BuildVersion, AppChannel, channelId string) *LoginLog { DeviceName, PackageName, AppVersion, BuildVersion, AppChannel, channelId string, clientVer int32) *LoginLog {
now := time.Now() now := time.Now()
cl := &LoginLog{LogId: bson.NewObjectId()} cl := &LoginLog{LogId: bson.NewObjectId()}
cl.SnId = snId cl.SnId = snId
@ -95,6 +96,7 @@ func NewLoginLog(snId, logType int32, tel, ip, platform, channel, promoter, pack
cl.AppVersion = AppVersion cl.AppVersion = AppVersion
cl.BuildVersion = BuildVersion cl.BuildVersion = BuildVersion
cl.AppChannel = AppChannel cl.AppChannel = AppChannel
cl.ClientVer = clientVer
return cl return cl
} }

View File

@ -73,14 +73,14 @@ type Message struct {
CreatTs int64 //创建时间戳 CreatTs int64 //创建时间戳
AttachState int32 //附件状态 AttachState int32 //附件状态
GiftId string // GiftId string //
Params []int32 //额外参数 Params []int64 //额外参数
Platform string //平台信息 Platform string //平台信息
ShowId int64 //区分主子游戏大厅 ShowId int64 //区分主子游戏大厅
Channel []string //渠道 Channel []string //渠道
} }
func NewMessage(pid string, srcId int32, srcName string, snid, mType int32, title, content string, coin, diamond int64, func NewMessage(pid string, srcId int32, srcName string, snid, mType int32, title, content string, coin, diamond int64,
state int32, addTime int64, attachState int32, giftId string, params []int32, platform string, showId int64, channel []string) *Message { state int32, addTime int64, attachState int32, giftId string, params []int64, platform string, showId int64, channel []string) *Message {
if srcName == "" { if srcName == "" {
srcName = "{\"zh\":\"系统\",\"vi\":\"GM\",\"en\":\"GM\",\"kh\":\"GM\"}" srcName = "{\"zh\":\"系统\",\"vi\":\"GM\",\"en\":\"GM\",\"kh\":\"GM\"}"
} }
@ -110,7 +110,7 @@ func NewMessage(pid string, srcId int32, srcName string, snid, mType int32, titl
return msg return msg
} }
func NewMessageByPlayer(pid string, oper, srcId int32, srcName string, snid, mType int32, title, content string, coin, diamond int64, func NewMessageByPlayer(pid string, oper, srcId int32, srcName string, snid, mType int32, title, content string, coin, diamond int64,
state int32, addTime int64, attachState int32, giftId string, params []int32, platform string, showId int64) *Message { state int32, addTime int64, attachState int32, giftId string, params []int64, platform string, showId int64) *Message {
msg := &Message{ msg := &Message{
Id: bson.NewObjectId(), Id: bson.NewObjectId(),

View File

@ -2,9 +2,7 @@ package model
import ( import (
"bytes" "bytes"
"crypto/md5"
"encoding/gob" "encoding/gob"
"encoding/hex"
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
@ -495,6 +493,7 @@ type PlayerData struct {
VCardCost int64 // 消耗v卡数量 VCardCost int64 // 消耗v卡数量
MoneyTotal int64 // 现金总充值金额,不包含api加币时的现金 MoneyTotal int64 // 现金总充值金额,不包含api加币时的现金
GuideStep int32 // tienlen游戏引导步骤跳过引导后该值会置为-1 GuideStep int32 // tienlen游戏引导步骤跳过引导后该值会置为-1
ClientVer int32 // 客户端版本号
} }
// 七日签到数据 // 七日签到数据
@ -794,6 +793,7 @@ func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData {
return pdfw return pdfw
} }
func (this *PlayerData) IsMarkFlag(flag int) bool { func (this *PlayerData) IsMarkFlag(flag int) bool {
return this.Flags&flag != 0 return this.Flags&flag != 0
} }
@ -901,80 +901,8 @@ func (this *PlayerData) UpdateParams(params string) *PlayerParams {
return &pp return &pp
} }
func NewPlayerData(acc string, name string, id int32, channel, platform string, params, tel string, func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform string, params, tel string,
packTag, ip string, addCoin int64, unionid, deviceInfo string, packTag, ip string, tagkey, accountType int32, deviceOS, channelId string, clientVer int32) *PlayerData {
tagkey, accountType int32, channelId string) *PlayerData {
if len(name) == 0 {
logger.Logger.Trace("New player name is empty.")
return nil
}
//logger.Logger.Trace("New player information.")
//safebox password default is '111111'
raw := fmt.Sprintf("%v%v", DEFAULT_PLAYER_SAFEBOX_PWD, common.GetAppId())
h := md5.New()
io.WriteString(h, raw)
pwd := hex.EncodeToString(h.Sum(nil))
tNow := time.Now()
isRobot := channel == common.Channel_Rob
pd := &PlayerData{
Id: bson.NewObjectId(),
AccountId: acc,
AccountType: accountType,
Name: name,
Channel: channel,
ChannelId: channelId,
Platform: platform,
SnId: id,
Head: rand.Int31n(common.HeadRange),
SafeBoxPassword: pwd,
Ip: ip,
RegIp: ip,
Params: params,
Tel: tel,
AgentType: 0,
LastLoginTime: tNow.Local(),
LastLogoutTime: tNow.AddDate(0, 0, -1).Local(),
CreateTime: tNow.Local(),
Ver: VER_PLAYER_MAX - 1,
HeadOutLine: 1,
VIP: 0,
CoinPayTotal: 0,
MoneyPayTotal: 0,
IsRob: isRobot,
PackageID: packTag,
WBLevel: 0,
WBCoinTotalOut: 0,
WBCoinTotalIn: 0,
WBCoinLimit: 0,
YesterdayGameData: NewPlayerGameCtrlData(),
TodayGameData: NewPlayerGameCtrlData(),
//TotalGameData: make(map[int][]*PlayerGameTotal),
GDatas: make(map[string]*PlayerGameInfo),
TagKey: tagkey,
ShopTotal: make(map[int32]*ShopTotal),
ShopLastLookTime: make(map[int32]int64),
IsFoolPlayer: make(map[string]bool),
//测试数据
PowerList: []int32{1}, //默认炮台
UnMaxPower: 10, //初始化炮倍最小倍数
WeekCardTime: make(map[int32]int64),
WeekCardAward: make(map[int32]bool),
WelfData: NewWelfareData(),
RequestAddFriend: make(map[int32]int64),
}
if tel != "" {
pd.UpgradeTime = time.Now()
}
pd.InitNewData(params)
return pd
}
func NewPlayerDataThird(acc string, name, headUrl string, id int32, channel, platform string, params, tel string,
packTag, ip string, tagkey, accountType int32, deviceOS, channelId string) *PlayerData {
if len(name) == 0 { if len(name) == 0 {
logger.Logger.Trace("New player name is empty.") logger.Logger.Trace("New player name is empty.")
return nil return nil
@ -990,7 +918,6 @@ func NewPlayerDataThird(acc string, name, headUrl string, id int32, channel, pla
SnId: id, SnId: id,
Head: rand.Int31n(common.HeadRange), Head: rand.Int31n(common.HeadRange),
HeadUrl: headUrl, HeadUrl: headUrl,
//Coin: int64(GameParamData.NewPlayerCoin),
Ip: ip, Ip: ip,
RegIp: ip, RegIp: ip,
Params: params, Params: params,
@ -1004,13 +931,13 @@ func NewPlayerDataThird(acc string, name, headUrl string, id int32, channel, pla
PackageID: packTag, PackageID: packTag,
YesterdayGameData: NewPlayerGameCtrlData(), YesterdayGameData: NewPlayerGameCtrlData(),
TodayGameData: NewPlayerGameCtrlData(), TodayGameData: NewPlayerGameCtrlData(),
//TotalGameData: make(map[int][]*PlayerGameTotal),
GDatas: make(map[string]*PlayerGameInfo), GDatas: make(map[string]*PlayerGameInfo),
TagKey: tagkey, TagKey: tagkey,
ShopTotal: make(map[int32]*ShopTotal), ShopTotal: make(map[int32]*ShopTotal),
ShopLastLookTime: make(map[int32]int64), ShopLastLookTime: make(map[int32]int64),
AccountType: accountType, AccountType: accountType,
DeviceOS: deviceOS, DeviceOS: deviceOS,
ClientVer: clientVer,
} }
pd.InitNewData(params) pd.InitNewData(params)
@ -1082,45 +1009,11 @@ func (this *PlayerData) InitRolesAndPets() {
f1(this.Skin) f1(this.Skin)
} }
//func SavePlayerRebate(pd *PlayerData, thirdName string) error {
// if pd == nil {
// return nil
// }
// if rpcCli == nil {
// return nil
// }
// var ret bool
// err := rpcCli.CallWithTimeout("PlayerDataSvc.SavePlayerRebate", pd, &ret, time.Second*30)
// if err != nil {
// logger.Logger.Trace("SavePlayerRebate failed:", err)
// return err
// }
// return nil
//}
type GetAgentInfoArgs struct { type GetAgentInfoArgs struct {
Plt string Plt string
Tel string Tel string
} }
// 获取代理信息
func GetAgentInfo(plt, tel string) *PlayerData {
if rpcCli == nil {
return nil
}
args := &GetAgentInfoArgs{
Plt: plt,
Tel: tel,
}
var pbi *PlayerData
err := rpcCli.CallWithTimeout("PlayerDataSvc.GetAgentInfo", args, &pbi, time.Second*30)
if err != nil {
logger.Logger.Trace("GetPlayerBaseInfo failed:", err)
return nil
}
return pbi
}
func ClonePlayerData(pd *PlayerData) *PlayerData { func ClonePlayerData(pd *PlayerData) *PlayerData {
if pd == nil { if pd == nil {
return nil return nil
@ -1148,49 +1041,27 @@ type GetPlayerDataArgs struct {
Plt string Plt string
Acc string Acc string
} }
type PlayerDataRet struct { type PlayerDataRet struct {
Pd *PlayerData Pd *PlayerData
IsNew bool IsNew bool
} }
func GetPlayerData(plt, acc string) (*PlayerData, bool) { type InsertPlayerDataParam struct {
if rpcCli == nil {
return nil, false
}
args := &GetPlayerDataArgs{
Plt: plt,
Acc: acc,
}
var ret PlayerDataRet
err := rpcCli.CallWithTimeout("PlayerDataSvc.GetPlayerData", args, &ret, time.Second*30)
if err != nil {
logger.Logger.Trace("GetPlayerData failed:", err)
return nil, false
}
return ret.Pd, ret.IsNew
}
type CreatePlayer struct {
Plt string Plt string
AccId string AccId string
NickName string NickName string
HeadUrl string HeadUrl string
} }
func CreatePlayerDataByThird(plt, acc string, nickName, headUrl string) (*PlayerData, bool) { func InsertPlayerData(param *InsertPlayerDataParam) (*PlayerData, bool) {
if rpcCli == nil { if rpcCli == nil {
return nil, false return nil, false
} }
var args = &CreatePlayer{
Plt: plt,
AccId: acc,
NickName: nickName,
HeadUrl: headUrl,
}
var ret = &PlayerDataRet{} var ret = &PlayerDataRet{}
err := rpcCli.CallWithTimeout("PlayerDataSvc.CreatePlayerDataByThird", args, ret, time.Second*30) err := rpcCli.CallWithTimeout("PlayerDataSvc.InsertPlayerData", param, ret, time.Second*30)
if err != nil { if err != nil {
logger.Logger.Trace("CreatePlayerDataByThird failed:", err) logger.Logger.Trace("InsertPlayerData failed:", err)
return nil, false return nil, false
} }
return ret.Pd, ret.IsNew return ret.Pd, ret.IsNew
@ -1204,27 +1075,6 @@ type PlayerDataArg struct {
Name string Name string
} }
func CreatePlayerDataOnRegister(plt, acc string, addCoin int32, name, headUrl string) (*PlayerData, bool) {
if rpcCli == nil {
return nil, false
}
var args = &PlayerDataArg{
Plt: plt,
AccId: acc,
AddCoin: addCoin,
Name: name,
HeadUrl: headUrl,
}
var ret = &PlayerDataRet{}
err := rpcCli.CallWithTimeout("PlayerDataSvc.CreatePlayerDataOnRegister", args, ret, time.Second*30)
if err != nil {
logger.Logger.Trace("CreatePlayerDataOnRegister failed:", err)
return nil, false
}
return ret.Pd, true
}
type GetPlayerDataBySnIdArgs struct { type GetPlayerDataBySnIdArgs struct {
Plt string Plt string
SnId int32 SnId int32
@ -1305,24 +1155,6 @@ type GetPlayerDataByUnionIdArgs struct {
CorrectData bool CorrectData bool
} }
func GetPlayerDataByUnionId(plt, unionid string, correctData bool) (*PlayerData, bool) {
if rpcCli == nil {
return nil, false
}
args := &GetPlayerDataByUnionIdArgs{
Plt: plt,
UnionId: unionid,
CorrectData: correctData,
}
var ret = &PlayerDataRet{}
err := rpcCli.CallWithTimeout("PlayerDataSvc.GetPlayerDataByUnionId", args, ret, time.Second*30)
if err != nil {
logger.Logger.Tracef("GetPlayerDataByUnionId % player data error:%v", args, err)
return nil, false
}
return ret.Pd, true
}
type GetPlayerTelArgs struct { type GetPlayerTelArgs struct {
Plt string Plt string
Tel string Tel string

81
mongo/export.go Normal file
View File

@ -0,0 +1,81 @@
package mongo
import (
"errors"
"go.mongodb.org/mongo-driver/mongo"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/game/mongo/internal"
)
type Config = internal.Config
type DatabaseConfig = internal.DatabaseConfig
type Collection = internal.Collection
type Database = internal.Database
var _manager *internal.Manager
var _conf *internal.Config
// GetConfig 获取配置
func GetConfig() *Config {
return _conf
}
// Init 初始化
func Init(conf *Config) {
_conf = conf
_manager = internal.NewManager(_conf)
}
// Restart 重启
func Restart() {
if _manager == nil {
logger.Logger.Errorf("mongo manager is nil, please call Init() first")
return
}
_manager.Restart(_conf)
}
// Close 关闭
func Close() {
internal.Close(_manager)
}
// GetGlobalCollection 获取全局库
// database: 数据库名称
// collection: 集合名称
func GetGlobalCollection(database, collection string) (*Collection, error) {
if _manager == nil {
return nil, errors.New("mongo manager is nil, please call Init() first")
}
return _manager.GetCollection("global", database, collection)
}
// GetCollection 获取平台库
// platform: 平台id
// database: 数据库名称
// collection: 集合名称
func GetCollection(platform, database, collection string) (*Collection, error) {
if _manager == nil {
return nil, errors.New("mongo manager is nil, please call Init() first")
}
return _manager.GetCollection(platform, database, collection)
}
// GetClient 获取数据库连接
// 默认获取的是 Global, log 的数据库连接
func GetClient() (*mongo.Client, error) {
if _manager == nil {
return nil, errors.New("mongo manager is nil, please call Init() first")
}
c, err := _manager.GetCollection("global", "log", "empty")
if err != nil {
return nil, err
}
return c.Database.Client, nil
}

188
mongo/internal/mongo.go Normal file
View File

@ -0,0 +1,188 @@
package internal
import (
"context"
"fmt"
"sync"
"time"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
"mongo.games.com/goserver/core/logger"
)
type Config struct {
Global map[string]*DatabaseConfig
Platforms map[string]map[string]*DatabaseConfig
}
type DatabaseConfig struct {
HostName string // 主机地址
HostPort int32 // 端口
Database string // 数据库名
Username string // 用户名
Password string // 密码
Options string // 配置
}
type Collection struct {
Database *Database
*mongo.Collection
}
type Database struct {
*DatabaseConfig
Client *mongo.Client
Database *mongo.Database
Collection sync.Map
}
func (d *Database) Connect() error {
if d.DatabaseConfig == nil {
err := fmt.Errorf("mongo Connect error, DatabaseConifg not found")
logger.Logger.Error(err)
return err
}
login := ""
if d.DatabaseConfig.Username != "" {
login = d.DatabaseConfig.Username + ":" + d.DatabaseConfig.Password + "@"
}
host := d.DatabaseConfig.HostName
if d.DatabaseConfig.HostName == "" {
host = "127.0.0.1"
}
port := d.DatabaseConfig.HostPort
if d.DatabaseConfig.HostPort == 0 {
port = 27017
}
myOptions := d.DatabaseConfig.Options
if myOptions != "" {
myOptions = "?" + myOptions
}
s := fmt.Sprintf("mongodb://%s%s:%d/admin%s", login, host, port, myOptions)
client, err := mongo.Connect(context.TODO(), options.Client().ApplyURI(s))
if err != nil {
logger.Logger.Errorf("mongo Connect %v error: %v config:%+v", s, err, *d.DatabaseConfig)
return err
}
logger.Logger.Tracef("mongo connect success %+v", *d.DatabaseConfig)
d.Client = client
d.Database = client.Database(d.DatabaseConfig.Database)
return nil
}
func (d *Database) GetCollection(name string) (*Collection, error) {
if d.Database == nil {
err := fmt.Errorf("mongo GetCollection error, collection:%v, database is nil", name)
logger.Logger.Error(err)
return nil, err
}
v, ok := d.Collection.Load(name)
if !ok {
v = &Collection{
Database: d,
Collection: d.Database.Collection(name),
}
d.Collection.Store(name, v)
}
c, _ := v.(*Collection)
return c, nil
}
type Manager struct {
conf *Config
global *sync.Map // 内部库名称:Database
platforms *sync.Map // 平台id:内部库名称:Database
}
func (m *Manager) GetCollection(key, database, collection string) (*Collection, error) {
switch key {
case "global":
v, ok := m.global.Load(database)
if !ok {
db := &Database{
DatabaseConfig: m.conf.Global[database],
Collection: sync.Map{},
}
if err := db.Connect(); err != nil {
return nil, err
}
v = db
m.global.Store(database, v)
}
d, _ := v.(*Database)
return d.GetCollection(collection)
default:
var mp *sync.Map
v, ok := m.platforms.Load(key) // 平台id
if !ok {
mp = new(sync.Map)
m.platforms.Store(key, mp)
} else {
mp = v.(*sync.Map)
}
v, ok = mp.Load(database)
if !ok {
db := &Database{
DatabaseConfig: m.conf.Platforms[key][database],
Collection: sync.Map{},
}
if err := db.Connect(); err != nil {
return nil, err
}
v = db
mp.Store(database, v)
}
d, _ := v.(*Database)
return d.GetCollection(collection)
}
}
func (m *Manager) Restart(conf *Config) {
logger.Logger.Infof("mongo manager restart...")
old := *m
time.AfterFunc(time.Minute, func() {
Close(&old)
})
m.conf = conf
m.global = &sync.Map{}
m.platforms = &sync.Map{}
}
func Close(m *Manager) {
logger.Logger.Infof("mongo manager close")
m.global.Range(func(key, value any) bool {
if v, ok := value.(*Database); ok {
v.Client.Disconnect(nil)
}
return true
})
m.platforms.Range(func(key, value any) bool {
if v, ok := value.(*sync.Map); ok {
v.Range(func(key, value any) bool {
if v, ok := value.(*Database); ok {
v.Client.Disconnect(nil)
}
return true
})
}
return true
})
}
func (m *Manager) GetConfig() *Config {
return m.conf
}
func NewManager(conf *Config) *Manager {
return &Manager{
conf: conf,
global: &sync.Map{},
platforms: &sync.Map{},
}
}

View File

@ -75,6 +75,10 @@
- 2580~2599 - 2580~2599
- 2900~2999 - 2900~2999
### upgrade.proto
- 3100~3199
## gamesrv ## gamesrv
### fish ### fish

View File

@ -325,6 +325,7 @@ type CSLogin struct {
AccountType int32 `protobuf:"varint,22,opt,name=AccountType,proto3" json:"AccountType,omitempty"` //账户类型 0.其他 1.google 2.facebook 3.手机号 AccountType int32 `protobuf:"varint,22,opt,name=AccountType,proto3" json:"AccountType,omitempty"` //账户类型 0.其他 1.google 2.facebook 3.手机号
Code string `protobuf:"bytes,23,opt,name=Code,proto3" json:"Code,omitempty"` // 验证码; 手机号验证码登录时使用 Code string `protobuf:"bytes,23,opt,name=Code,proto3" json:"Code,omitempty"` // 验证码; 手机号验证码登录时使用
ChannelID string `protobuf:"bytes,24,opt,name=ChannelID,proto3" json:"ChannelID,omitempty"` // 渠道ID ChannelID string `protobuf:"bytes,24,opt,name=ChannelID,proto3" json:"ChannelID,omitempty"` // 渠道ID
ClientVer int32 `protobuf:"varint,25,opt,name=ClientVer,proto3" json:"ClientVer,omitempty"` // 客户端版本号
} }
func (x *CSLogin) Reset() { func (x *CSLogin) Reset() {
@ -527,6 +528,13 @@ func (x *CSLogin) GetChannelID() string {
return "" return ""
} }
func (x *CSLogin) GetClientVer() int32 {
if x != nil {
return x.ClientVer
}
return 0
}
//游戏版本号 //游戏版本号
type GameVer struct { type GameVer struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -2817,7 +2825,7 @@ var File_login_proto protoreflect.FileDescriptor
var file_login_proto_rawDesc = []byte{ var file_login_proto_rawDesc = []byte{
0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c,
0x6f, 0x67, 0x69, 0x6e, 0x22, 0x99, 0x05, 0x0a, 0x07, 0x43, 0x53, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x6f, 0x67, 0x69, 0x6e, 0x22, 0xb7, 0x05, 0x0a, 0x07, 0x43, 0x53, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x28, 0x09, 0x52, 0x08, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08,
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
@ -2859,390 +2867,392 @@ var file_login_proto_rawDesc = []byte{
0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f,
0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x18,
0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x44,
0x22, 0xa5, 0x01, 0x0a, 0x07, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x18, 0x19, 0x20,
0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x01, 0x28, 0x05, 0x52, 0x09, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x22, 0xa5,
0x6d, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x01, 0x0a, 0x07, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61,
0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x69, 0x6e, 0x41, 0x70, 0x6b, 0x56, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65,
0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x70, 0x6b, 0x56, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x18,
0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x69, 0x6e, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x72,
0x41, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x72,
0x56, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x70,
0x73, 0x56, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x6b, 0x56, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x56, 0x65,
0x73, 0x56, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x56,
0x73, 0x74, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x22, 0x94, 0x03, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x56,
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x22, 0x94, 0x03, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x43,
0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18,
0x52, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a,
0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x4d,
0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x4d,
0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x08, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x69, 0x6d,
0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4c, 0x69,
0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x61, 0x78, 0x43, 0x6f,
0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x4d,
0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x42,
0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x4f, 0x74, 0x68,
0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
0x03, 0x52, 0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x09, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1e, 0x0a,
0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28,
0x05, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1c, 0x0a,
0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4c,
0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x4c,
0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0xcf, 0x02,
0x0a, 0x0f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4c,
0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x61, 0x78, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x61, 0x78,
0x43, 0x6f, 0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x43, 0x6f, 0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0c, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a, 0x0c, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1c, 0x0a,
0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x4f, 0x52, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x4f,
0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20,
0x03, 0x28, 0x03, 0x52, 0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x61, 0x72,
0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18,
0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12,
0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x07, 0x20,
0x03, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x12,
0x1c, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x1c, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x20, 0x01,
0x28, 0x05, 0x52, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a,
0x0a, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01,
0x09, 0x52, 0x0a, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x67, 0x12, 0x20, 0x0a, 0x28, 0x03, 0x52, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x12,
0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x1e, 0x0a, 0x0a, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x67, 0x18, 0x0a, 0x20,
0x28, 0x03, 0x52, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x67, 0x22,
0xcf, 0x02, 0x0a, 0x0f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x63, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f,
0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x69,
0x09, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x67, 0x69, 0x63,
0x52, 0x09, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x4d, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69,
0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79,
0x05, 0x52, 0x0c, 0x4d, 0x61, 0x78, 0x43, 0x6f, 0x69, 0x6e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0x4c, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x68, 0x72,
0x1c, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f,
0x28, 0x05, 0x52, 0x09, 0x42, 0x61, 0x73, 0x65, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x67,
0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x69,
0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x50, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x6e, 0x22, 0x3b, 0x0a, 0x0c, 0x53, 0x43, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x42, 0x65, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x07, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x18, 0x01, 0x20,
0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x61, 0x6d, 0x65,
0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x42, 0x65, 0x74, 0x43, 0x6f, 0x69, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x22,
0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x08, 0x3b, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x14,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x49,
0x20, 0x0a, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x09, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x69, 0x20, 0x03, 0x28, 0x08, 0x52, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x22, 0x92, 0x05, 0x0a,
0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x67, 0x18, 0x07, 0x53, 0x43, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65,
0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43, 0x66, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f,
0x67, 0x22, 0x63, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f,
0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x67,
0x69, 0x63, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65, 0x72, 0x79, 0x43,
0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x4c, 0x6f, 0x74, 0x74, 0x65,
0x72, 0x79, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0x4c, 0x0a, 0x12, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54,
0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07,
0x4c, 0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c,
0x6f, 0x67, 0x69, 0x63, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43,
0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4c, 0x69, 0x6d, 0x69, 0x74,
0x43, 0x6f, 0x69, 0x6e, 0x22, 0x3b, 0x0a, 0x0c, 0x53, 0x43, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x07, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x61,
0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66,
0x67, 0x22, 0x3b, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68,
0x12, 0x14, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68,
0x18, 0x02, 0x20, 0x03, 0x28, 0x08, 0x52, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x22, 0x92,
0x05, 0x0a, 0x07, 0x53, 0x43, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70,
0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e,
0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f,
0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a,
0x05, 0x41, 0x63, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x63,
0x63, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x72, 0x76, 0x54, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x03, 0x52, 0x05, 0x53, 0x72, 0x76, 0x54, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x69, 0x6e,
0x41, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x69,
0x6e, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73,
0x74, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4c,
0x61, 0x74, 0x65, 0x73, 0x74, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x4d,
0x69, 0x6e, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
0x4d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74,
0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x12, 0x2e, 0x0a,
0x0a, 0x53, 0x75, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65,
0x72, 0x52, 0x0a, 0x53, 0x75, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x12, 0x30, 0x0a,
0x08, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x47, 0x61, 0x6d,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
0x1c, 0x0a, 0x09, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x03,
0x28, 0x05, 0x52, 0x09, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a,
0x0b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x03,
0x28, 0x05, 0x52, 0x0b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12,
0x22, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18,
0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x54,
0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52,
0x61, 0x74, 0x69, 0x6f, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x43, 0x75, 0x72, 0x72,
0x65, 0x6e, 0x63, 0x79, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x70, 0x6b,
0x55, 0x72, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, 0x6b, 0x55, 0x72,
0x6c, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x70, 0x61, 0x55, 0x72, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x49, 0x70, 0x61, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
0x20, 0x0a, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x11,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x12, 0x32, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18,
0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x65, 0x78, 0x74, 0x44, 0x61, 0x79,
0x54, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4e, 0x65, 0x78, 0x74, 0x44, 0x61,
0x79, 0x54, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49,
0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x69,
0x74, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x4e, 0x6f, 0x74, 0x69,
0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6f, 0x72,
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6f, 0x72, 0x74, 0x22, 0x59, 0x0a,
0x0f, 0x53, 0x43, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64,
0x12, 0x36, 0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73,
0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e,
0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65,
0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x0f, 0x43, 0x53, 0x42, 0x75,
0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x50,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x22, 0xa8, 0x01,
0x0a, 0x08, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x65,
0x69, 0x78, 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0d, 0x77, 0x65, 0x69, 0x78, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6e,
0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e,
0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x78, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x71, 0x5f,
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71,
0x71, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x43, 0x43, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x33,
0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4c,
0x69, 0x73, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x43, 0x53, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
0x72, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x08, 0x43, 0x53, 0x4c,
0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x53, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x08, 0x53,
0x43, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74,
0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x67,
0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52,
0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x11,
0x0a, 0x0f, 0x43, 0x53, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x22, 0x5f, 0x0a, 0x0f, 0x53, 0x43, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x6c,
0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x6c,
0x61, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79,
0x70, 0x65, 0x22, 0x40, 0x0a, 0x0c, 0x53, 0x53, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64,
0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
0x54, 0x79, 0x70, 0x65, 0x22, 0x34, 0x0a, 0x10, 0x43, 0x53, 0x50, 0x6c, 0x61, 0x74, 0x46, 0x6f,
0x72, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50,
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x22, 0x79, 0x0a, 0x09, 0x52, 0x65,
0x62, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x61, 0x74,
0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x52,
0x65, 0x62, 0x61, 0x74, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x52,
0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a,
0x0e, 0x4e, 0x6f, 0x74, 0x47, 0x69, 0x76, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x64, 0x75, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x4e, 0x6f, 0x74, 0x47, 0x69, 0x76, 0x65, 0x4f, 0x76,
0x65, 0x72, 0x64, 0x75, 0x65, 0x22, 0x8f, 0x03, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x66,
0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6c, 0x75, 0x62, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x49, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6c, 0x75,
0x62, 0x12, 0x22, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x69,
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73,
0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x49, 0x6e, 0x63,
0x72, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6c, 0x75,
0x62, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x43, 0x6c, 0x75, 0x62, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c,
0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x11, 0x49, 0x6e, 0x63, 0x72, 0x65,
0x61, 0x73, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x11, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x50, 0x6c, 0x61, 0x79,
0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x38, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43,
0x6c, 0x75, 0x62, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x79, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c,
0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c,
0x75, 0x62, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x79, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12,
0x36, 0x0a, 0x16, 0x45, 0x64, 0x69, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x4e, 0x6f, 0x74, 0x69, 0x63,
0x65, 0x42, 0x79, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52,
0x16, 0x45, 0x64, 0x69, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x42,
0x79, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28,
0x03, 0x52, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6d, 0x6f,
0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x52,
0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x43,
0x6f, 0x69, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x22, 0x81, 0x05, 0x0a, 0x10, 0x53, 0x43, 0x50, 0x6c,
0x61, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08,
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65,
0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f,
0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x55, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x41,
0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x69, 0x76, 0x63, 0x63, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x41, 0x63, 0x63, 0x49,
0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x55, 0x70, 0x67, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x72, 0x76, 0x54, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x72, 0x61, 0x64, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x69, 0x76, 0x65, 0x43, 0x52, 0x05, 0x53, 0x72, 0x76, 0x54, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x41, 0x70,
0x6f, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x6b, 0x56, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x69, 0x6e, 0x41,
0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x41,
0x67, 0x65, 0x4d, 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4c, 0x61, 0x74,
0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x45, 0x78, 0x65, 0x73, 0x74, 0x41, 0x70, 0x6b, 0x56, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x69, 0x6e,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4d, 0x69,
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x6e, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x4c, 0x61, 0x74, 0x65, 0x73,
0x52, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x78, 0x12, 0x1a, 0x0a, 0x74, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4c,
0x08, 0x56, 0x69, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x0a, 0x53,
0x08, 0x56, 0x69, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x74, 0x68, 0x75, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x52,
0x4f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x0a, 0x53, 0x75, 0x62, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x08, 0x47,
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x05, 0x52, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x49,
0x22, 0x0a, 0x0c, 0x53, 0x70, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a,
0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x53, 0x70, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x09, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x05,
0x66, 0x69, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x52, 0x09, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x45,
0x76, 0x69, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05,
0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x52, 0x65, 0x62, 0x52, 0x0b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x22, 0x0a,
0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20,
0x6e, 0x2e, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x52, 0x06, 0x52, 0x65, 0x62, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x79, 0x70,
0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x43, 0x6c, 0x75, 0x62, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x61, 0x74,
0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x66, 0x69, 0x6f, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e,
0x67, 0x52, 0x04, 0x43, 0x6c, 0x75, 0x62, 0x12, 0x28, 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x63, 0x79, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x70, 0x6b, 0x55, 0x72,
0x6e, 0x67, 0x65, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x41, 0x70, 0x6b, 0x55, 0x72, 0x6c, 0x12,
0x52, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x16, 0x0a, 0x06, 0x49, 0x70, 0x61, 0x55, 0x72, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52,
0x78, 0x12, 0x2c, 0x0a, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x6c, 0x69, 0x06, 0x49, 0x70, 0x61, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
0x70, 0x61, 0x79, 0x4d, 0x61, 0x78, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x45, 0x78, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a,
0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x6c, 0x69, 0x70, 0x61, 0x79, 0x4d, 0x61, 0x78, 0x12, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x11, 0x20, 0x01,
0x2a, 0x0a, 0x10, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12,
0x70, 0x6c, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x45, 0x78, 0x63, 0x68, 0x61, 0x32, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x12, 0x20,
0x6e, 0x67, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x22, 0x44, 0x0a, 0x0f, 0x53, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x72,
0x43, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x31, 0x79, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x77, 0x69,
0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x65, 0x78, 0x74, 0x44, 0x61, 0x79, 0x54, 0x73,
0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4e, 0x65, 0x78, 0x74, 0x44, 0x61, 0x79, 0x54,
0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x65, 0x22, 0x42, 0x0a, 0x0c, 0x43, 0x53, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12,
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x20, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x69, 0x74, 0x6c,
0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65,
0x52, 0x03, 0x54, 0x65, 0x6c, 0x22, 0x61, 0x0a, 0x0c, 0x53, 0x43, 0x56, 0x65, 0x72, 0x69, 0x66, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65,
0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6f, 0x72, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6f, 0x72, 0x74, 0x22, 0x59, 0x0a, 0x0f, 0x53,
0x43, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36,
0x0a, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x42, 0x75,
0x6c, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x62, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x69,
0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x33, 0x0a, 0x0f, 0x43, 0x53, 0x42, 0x75, 0x6c, 0x6c,
0x65, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61,
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x22, 0xa8, 0x01, 0x0a, 0x08,
0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x65, 0x69, 0x78,
0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0d, 0x77, 0x65, 0x69, 0x78, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63,
0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63,
0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x65, 0x78, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x71, 0x5f, 0x61, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x71, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x43, 0x43, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0c,
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x65, 0x72, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4c, 0x69, 0x73,
0x74, 0x22, 0x14, 0x0a, 0x12, 0x43, 0x53, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49,
0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x08, 0x43, 0x53, 0x4c, 0x6f, 0x67,
0x6f, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x53, 0x69, 0x64, 0x22, 0x51, 0x0a, 0x08, 0x53, 0x43, 0x4c,
0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f,
0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e,
0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f,
0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65,
0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x56, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x22, 0x11, 0x0a, 0x0f,
0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x38, 0x0a, 0x14, 0x43, 0x53, 0x52, 0x65, 0x43, 0x53, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22,
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x0a, 0x0f, 0x53, 0x43, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69,
0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x18, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x03, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x6c, 0x61, 0x67,
0x61, 0x67, 0x22, 0x69, 0x0a, 0x14, 0x53, 0x43, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x4f, 0x70, 0x65, 0x6e, 0x46, 0x6c, 0x61, 0x67,
0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03,
0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65,
0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x22, 0x40, 0x0a, 0x0c, 0x53, 0x53, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20,
0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x28, 0x03, 0x52, 0x09, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12,
0x05, 0x52, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, 0x0a, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79,
0x0e, 0x53, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x12, 0x70, 0x65, 0x22, 0x34, 0x0a, 0x10, 0x43, 0x53, 0x50, 0x6c, 0x61, 0x74, 0x46, 0x6f, 0x72, 0x6d,
0x25, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f,
0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x6c, 0x61,
0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x34, 0x0a, 0x0e, 0x53, 0x43, 0x41, 0x63, 0x74, 0x53, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x22, 0x79, 0x0a, 0x09, 0x52, 0x65, 0x62, 0x61,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x66, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x53, 0x74, 0x65, 0x43, 0x66, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x53,
0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x66, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x52, 0x65, 0x62,
0x41, 0x63, 0x74, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x66, 0x67, 0x22, 0x47, 0x0a, 0x0f, 0x61, 0x74, 0x65, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x63,
0x43, 0x53, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x12, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x4e,
0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6f, 0x74, 0x47, 0x69, 0x76, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x64, 0x75, 0x65, 0x18, 0x03, 0x20,
0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x68, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x4e, 0x6f, 0x74, 0x47, 0x69, 0x76, 0x65, 0x4f, 0x76, 0x65, 0x72,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0x4c, 0x0a, 0x0f, 0x53, 0x43, 0x47, 0x65, 0x74, 0x54, 0x68, 0x64, 0x75, 0x65, 0x22, 0x8f, 0x03, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x66, 0x67, 0x12,
0x72, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x12, 0x39, 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x47, 0x1e, 0x0a, 0x0a, 0x49, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6c, 0x75, 0x62, 0x18, 0x01, 0x20,
0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x49, 0x73, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x6c, 0x75, 0x62, 0x12,
0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x22, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18,
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43,
0x43, 0x66, 0x67, 0x22, 0x24, 0x0a, 0x10, 0x43, 0x53, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x6f, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x43,
0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x41, 0x63, 0x63, 0x18, 0x01, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x49, 0x6e, 0x63, 0x72, 0x65,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x41, 0x63, 0x63, 0x2a, 0xf7, 0x03, 0x0a, 0x0c, 0x4f, 0x70, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6c, 0x75, 0x62, 0x49,
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01,
0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x28, 0x05, 0x52, 0x11, 0x43, 0x6c, 0x75, 0x62, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x6c, 0x61, 0x79,
0x50, 0x52, 0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x4f, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x11, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73,
0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0xe8, 0x07, 0x12, 0x16, 0x0a, 0x11, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x11, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
0x53, 0x69, 0x67, 0x6e, 0x45, 0x72, 0x72, 0x10, 0xe9, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x4e, 0x75, 0x6d, 0x12, 0x38, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75,
0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x62, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x79, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x18, 0x06,
0x63, 0x65, 0x10, 0xea, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x62,
0x67, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xeb, 0x07, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x79, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x36, 0x0a,
0x20, 0x0a, 0x1b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x43, 0x72, 0x16, 0x45, 0x64, 0x69, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x42,
0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0xec, 0x79, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x45,
0x07, 0x12, 0x1e, 0x0a, 0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x69, 0x74, 0x43, 0x6c, 0x75, 0x62, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x42, 0x79, 0x4d,
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xed, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
0x07, 0x12, 0x18, 0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x6f, 0x6d, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52,
0x4e, 0x61, 0x6d, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x10, 0xee, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x4f, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6d, 0x6f, 0x75, 0x6e,
0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x61, 0x74,
0x6d, 0x65, 0x10, 0xef, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0c, 0x47, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x69,
0x67, 0x69, 0x6e, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x07, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x22, 0x81, 0x05, 0x0a, 0x10, 0x53, 0x43, 0x50, 0x6c, 0x61, 0x74,
0x12, 0x1c, 0x0a, 0x17, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x43, 0x46, 0x6f, 0x72, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c,
0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xf1, 0x07, 0x12, 0x19, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c,
0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x65, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43,
0x46, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x10, 0xf2, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x69,
0x43, 0x5f, 0x59, 0x6f, 0x75, 0x72, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x49, 0x73, 0x4c, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09,
0x77, 0x10, 0x94, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x59, 0x6f, 0x75, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x55, 0x70, 0x67,
0x72, 0x41, 0x70, 0x70, 0x56, 0x65, 0x72, 0x49, 0x73, 0x4c, 0x6f, 0x77, 0x10, 0x95, 0x08, 0x12, 0x72, 0x61, 0x64, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x69, 0x76, 0x65, 0x43,
0x1d, 0x0a, 0x18, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x65, 0x72, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x55, 0x70, 0x67, 0x72, 0x61,
0x76, 0x65, 0x72, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x10, 0x9e, 0x08, 0x12, 0x12, 0x64, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x47, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x69,
0x0a, 0x0d, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x54, 0x65, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x69, 0x6e,
0xa9, 0x08, 0x12, 0x17, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x54, 0x65, 0x6c, 0x43, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
0x64, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x10, 0xaa, 0x08, 0x12, 0x16, 0x0a, 0x11, 0x4f, 0x4d, 0x69, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4c,
0x50, 0x52, 0x43, 0x5f, 0x54, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x45, 0x78, 0x63, 0x68,
0x10, 0xab, 0x08, 0x2a, 0xbc, 0x05, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x63, 0x61, 0x6e, 0x67, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x63,
0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x61, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x56,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x69, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x56,
0x83, 0x10, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x69, 0x70, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x74, 0x68, 0x65, 0x72,
0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x84, 0x10, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x74,
0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x4c, 0x4f, 0x47, 0x4f, 0x55, 0x54, 0x10, 0x85, 0x10, 0x12, 0x68, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x45, 0x78, 0x63,
0x15, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x4c, 0x4f, 0x47, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52,
0x4f, 0x55, 0x54, 0x10, 0x86, 0x10, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x22, 0x0a,
0x5f, 0x53, 0x43, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x87, 0x0c, 0x53, 0x70, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0a, 0x20,
0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x42, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x53, 0x70, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x55, 0x4c, 0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x88, 0x10, 0x12, 0x67, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69,
0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x42, 0x55, 0x4c, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x89, 0x10, 0x12, 0x1f, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x52, 0x65, 0x62, 0x61, 0x74,
0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e,
0x4d, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x8a, 0x10, 0x12, 0x1f, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x52, 0x06, 0x52, 0x65, 0x62, 0x61, 0x74,
0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x43, 0x6c, 0x75, 0x62, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x4f, 0x4d, 0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x8b, 0x10, 0x12, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6c, 0x75, 0x62, 0x43, 0x66, 0x67, 0x52,
0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x55, 0x53, 0x04, 0x43, 0x6c, 0x75, 0x62, 0x12, 0x28, 0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
0x54, 0x4f, 0x4d, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x8c, 0x10, 0x12, 0x1c, 0x0a, 0x65, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f,
0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x78, 0x12,
0x4d, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x8d, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x2c, 0x0a, 0x11, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x6c, 0x69, 0x70, 0x61,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x79, 0x4d, 0x61, 0x78, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x45, 0x78, 0x63, 0x68,
0x4d, 0x43, 0x46, 0x47, 0x10, 0x8e, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x6c, 0x69, 0x70, 0x61, 0x79, 0x4d, 0x61, 0x78, 0x12, 0x2a, 0x0a,
0x54, 0x5f, 0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x43, 0x46, 0x47, 0x10, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c,
0x10, 0x8f, 0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x90, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x22, 0x44, 0x0a, 0x0f, 0x53, 0x43, 0x41,
0x10, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x56, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x31, 0x0a, 0x09,
0x45, 0x52, 0x49, 0x46, 0x59, 0x54, 0x59, 0x50, 0x45, 0x10, 0x91, 0x10, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x54, 0x59, 0x50, 0x45, 0x10, 0x92, 0x10, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x22,
0x54, 0x5f, 0x43, 0x53, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x56, 0x45, 0x52, 0x42, 0x0a, 0x0c, 0x43, 0x53, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12,
0x49, 0x46, 0x59, 0x54, 0x59, 0x50, 0x45, 0x10, 0x93, 0x10, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x20, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x18, 0x01,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61,
0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x54, 0x59, 0x50, 0x45, 0x10, 0x94, 0x10, 0x12, 0x1b, 0x0a, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x47, 0x54, 0x65, 0x6c, 0x22, 0x61, 0x0a, 0x0c, 0x53, 0x43, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54,
0x41, 0x4d, 0x45, 0x46, 0x52, 0x45, 0x45, 0x10, 0x95, 0x10, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x53, 0x57, 0x49, 0x54, 0x43, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2e, 0x4f,
0x48, 0x43, 0x46, 0x47, 0x10, 0x96, 0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x4f, 0x70, 0x52,
0x54, 0x5f, 0x43, 0x53, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x48, 0x52, 0x47, 0x41, 0x4d, 0x45, 0x43, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79,
0x46, 0x47, 0x10, 0x97, 0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x56, 0x65, 0x72, 0x69,
0x53, 0x43, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x48, 0x52, 0x47, 0x41, 0x4d, 0x45, 0x43, 0x46, 0x47, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x38, 0x0a, 0x14, 0x43, 0x53, 0x52, 0x65, 0x67, 0x69,
0x10, 0x98, 0x10, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x73, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20,
0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x0a, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20,
0x99, 0x10, 0x2a, 0xbf, 0x01, 0x0a, 0x14, 0x53, 0x53, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x61, 0x67,
0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x22, 0x69, 0x0a, 0x14, 0x53, 0x43, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x56, 0x65,
0x53, 0x44, 0x54, 0x43, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65,
0x53, 0x44, 0x54, 0x43, 0x5f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x10, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f,
0x0a, 0x0c, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x10, 0x02, 0x67, 0x69, 0x6e, 0x2e, 0x4f, 0x70, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65,
0x12, 0x15, 0x0a, 0x11, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x56,
0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x53, 0x44, 0x54, 0x43, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x5f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, 0x0a, 0x0e, 0x53,
0x63, 0x65, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x52, 0x65, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x12, 0x25, 0x0a,
0x73, 0x56, 0x65, 0x72, 0x4c, 0x6f, 0x77, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x53, 0x44, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f,
0x54, 0x43, 0x5f, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x4c, 0x6f, 0x77, 0x10, 0x06, 0x12, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x04,
0x13, 0x0a, 0x0f, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, 0x44, 0x61, 0x74, 0x61, 0x22, 0x34, 0x0a, 0x0e, 0x53, 0x43, 0x41, 0x63, 0x74, 0x53, 0x77, 0x69,
0x73, 0x74, 0x10, 0x07, 0x42, 0x25, 0x5a, 0x23, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x74, 0x63, 0x68, 0x43, 0x66, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x53, 0x77, 0x69,
0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x63, 0x68, 0x43, 0x66, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x41, 0x63,
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x43, 0x66, 0x67, 0x22, 0x47, 0x0a, 0x0f, 0x43, 0x53,
0x74, 0x6f, 0x33, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x12, 0x1a, 0x0a,
0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x68, 0x61,
0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x68, 0x61, 0x6e,
0x6e, 0x65, 0x6c, 0x22, 0x4c, 0x0a, 0x0f, 0x53, 0x43, 0x47, 0x65, 0x74, 0x54, 0x68, 0x72, 0x47,
0x61, 0x6d, 0x65, 0x43, 0x66, 0x67, 0x12, 0x39, 0x0a, 0x0a, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d,
0x65, 0x43, 0x66, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x6f, 0x67,
0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x43,
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x54, 0x68, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x66,
0x67, 0x22, 0x24, 0x0a, 0x10, 0x43, 0x53, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e,
0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x41, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x41, 0x63, 0x63, 0x2a, 0xf7, 0x03, 0x0a, 0x0c, 0x4f, 0x70, 0x52, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43,
0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52,
0x43, 0x5f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x4f, 0x50, 0x52,
0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xe8, 0x07,
0x12, 0x16, 0x0a, 0x11, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x53, 0x69,
0x67, 0x6e, 0x45, 0x72, 0x72, 0x10, 0xe9, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43,
0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x63, 0x65,
0x10, 0xea, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69,
0x6e, 0x50, 0x61, 0x73, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xeb, 0x07, 0x12, 0x20, 0x0a,
0x1b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x41, 0x63, 0x63, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0xec, 0x07, 0x12,
0x1e, 0x0a, 0x19, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xed, 0x07, 0x12,
0x18, 0x0a, 0x13, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x4e, 0x61,
0x6d, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x10, 0xee, 0x07, 0x12, 0x18, 0x0a, 0x13, 0x4f, 0x50, 0x52,
0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x53, 0x61, 0x6d, 0x65,
0x10, 0xef, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69,
0x6e, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x07, 0x12, 0x1c,
0x0a, 0x17, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x5f, 0x43, 0x72, 0x65,
0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xf1, 0x07, 0x12, 0x19, 0x0a, 0x14,
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x65, 0x46, 0x72,
0x65, 0x65, 0x7a, 0x65, 0x10, 0xf2, 0x07, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43, 0x5f,
0x59, 0x6f, 0x75, 0x72, 0x52, 0x65, 0x73, 0x56, 0x65, 0x72, 0x49, 0x73, 0x4c, 0x6f, 0x77, 0x10,
0x94, 0x08, 0x12, 0x19, 0x0a, 0x14, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x59, 0x6f, 0x75, 0x72, 0x41,
0x70, 0x70, 0x56, 0x65, 0x72, 0x49, 0x73, 0x4c, 0x6f, 0x77, 0x10, 0x95, 0x08, 0x12, 0x1d, 0x0a,
0x18, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x10, 0x9e, 0x08, 0x12, 0x12, 0x0a, 0x0d,
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x54, 0x65, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa9, 0x08,
0x12, 0x17, 0x0a, 0x12, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x54, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65,
0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x10, 0xaa, 0x08, 0x12, 0x16, 0x0a, 0x11, 0x4f, 0x50, 0x52,
0x43, 0x5f, 0x54, 0x65, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xab,
0x08, 0x2a, 0xbc, 0x05, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x49, 0x44, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4c, 0x6f,
0x67, 0x69, 0x6e, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x4e, 0x10, 0x83, 0x10,
0x12, 0x14, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x4c, 0x4f,
0x47, 0x49, 0x4e, 0x10, 0x84, 0x10, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x43, 0x53, 0x5f, 0x4c, 0x4f, 0x47, 0x4f, 0x55, 0x54, 0x10, 0x85, 0x10, 0x12, 0x15, 0x0a,
0x10, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x4c, 0x4f, 0x47, 0x4f, 0x55,
0x54, 0x10, 0x86, 0x10, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
0x43, 0x5f, 0x47, 0x41, 0x4d, 0x45, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x87, 0x10, 0x12,
0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x42, 0x55, 0x4c,
0x4c, 0x45, 0x54, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x88, 0x10, 0x12, 0x1c, 0x0a,
0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x42, 0x55, 0x4c, 0x4c, 0x45,
0x54, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x89, 0x10, 0x12, 0x1f, 0x0a, 0x1a, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x45,
0x52, 0x49, 0x4e, 0x46, 0x4f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x8a, 0x10, 0x12, 0x1f, 0x0a, 0x1a,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d,
0x45, 0x52, 0x49, 0x4e, 0x46, 0x4f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x8b, 0x10, 0x12, 0x1c, 0x0a,
0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f,
0x4d, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x8c, 0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x53,
0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x8d, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x43,
0x46, 0x47, 0x10, 0x8e, 0x10, 0x12, 0x1a, 0x0a, 0x15, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x53, 0x43, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x43, 0x46, 0x47, 0x10, 0x8f,
0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x41,
0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x90, 0x10, 0x12,
0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x56, 0x45, 0x52,
0x49, 0x46, 0x59, 0x54, 0x59, 0x50, 0x45, 0x10, 0x91, 0x10, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x54, 0x59,
0x50, 0x45, 0x10, 0x92, 0x10, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x43, 0x53, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x56, 0x45, 0x52, 0x49, 0x46,
0x59, 0x54, 0x59, 0x50, 0x45, 0x10, 0x93, 0x10, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x56, 0x45,
0x52, 0x49, 0x46, 0x59, 0x54, 0x59, 0x50, 0x45, 0x10, 0x94, 0x10, 0x12, 0x1b, 0x0a, 0x16, 0x50,
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x47, 0x41, 0x4d,
0x45, 0x46, 0x52, 0x45, 0x45, 0x10, 0x95, 0x10, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x43,
0x46, 0x47, 0x10, 0x96, 0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x43, 0x53, 0x5f, 0x47, 0x45, 0x54, 0x54, 0x48, 0x52, 0x47, 0x41, 0x4d, 0x45, 0x43, 0x46, 0x47,
0x10, 0x97, 0x10, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
0x5f, 0x47, 0x45, 0x54, 0x54, 0x48, 0x52, 0x47, 0x41, 0x4d, 0x45, 0x43, 0x46, 0x47, 0x10, 0x98,
0x10, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x5f, 0x41,
0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x99, 0x10,
0x2a, 0xbf, 0x01, 0x0a, 0x14, 0x53, 0x53, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
0x74, 0x54, 0x79, 0x70, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x53, 0x44,
0x54, 0x43, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x53, 0x44,
0x54, 0x43, 0x5f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c,
0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x46, 0x72, 0x65, 0x65, 0x7a, 0x65, 0x10, 0x02, 0x12, 0x15,
0x0a, 0x11, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65,
0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x52, 0x65, 0x73, 0x56,
0x65, 0x72, 0x4c, 0x6f, 0x77, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x53, 0x44, 0x54, 0x43,
0x5f, 0x47, 0x61, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x4c, 0x6f, 0x77, 0x10, 0x06, 0x12, 0x13, 0x0a,
0x0f, 0x53, 0x53, 0x44, 0x54, 0x43, 0x5f, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x4c, 0x69, 0x73, 0x74,
0x10, 0x07, 0x42, 0x25, 0x5a, 0x23, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65,
0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x63, 0x6f, 0x6c, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
} }
var ( var (

View File

@ -78,6 +78,7 @@ message CSLogin {
int32 AccountType = 22;// 0. 1.google 2.facebook 3. int32 AccountType = 22;// 0. 1.google 2.facebook 3.
string Code = 23; // ; 使 string Code = 23; // ; 使
string ChannelID = 24; // ID string ChannelID = 24; // ID
int32 ClientVer = 25; //
} }
// //

File diff suppressed because it is too large Load Diff

View File

@ -293,6 +293,7 @@ message CSPlayerData {
string AppVersion = 9; // string AppVersion = 9; //
string BuildVersion = 10; // string BuildVersion = 10; //
string AppChannel = 11; // string AppChannel = 11; //
int32 ClientVer = 12; //
} }
message PlayerData { message PlayerData {
@ -512,6 +513,7 @@ message CSRegister {
string DeviceInfo = 18;// base64 string DeviceInfo = 18;// base64
int32 RegistType = 19;//0 1 int32 RegistType = 19;//0 1
string ChannelID = 20; // ID string ChannelID = 20; // ID
int32 ClientVer = 21; //
} }
//PACKET_SC_REGISTER //PACKET_SC_REGISTER

View File

@ -0,0 +1,360 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1-devel
// protoc v3.19.4
// source: upgrade.proto
package upgrade
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PacketID int32
const (
// 3100~3199
PacketID_PacketID_Zero PacketID = 0
PacketID_PACKET_CSClientUpgrades PacketID = 3100
PacketID_PACKET_SCClientUpgrades PacketID = 3101
)
// Enum value maps for PacketID.
var (
PacketID_name = map[int32]string{
0: "PacketID_Zero",
3100: "PACKET_CSClientUpgrades",
3101: "PACKET_SCClientUpgrades",
}
PacketID_value = map[string]int32{
"PacketID_Zero": 0,
"PACKET_CSClientUpgrades": 3100,
"PACKET_SCClientUpgrades": 3101,
}
)
func (x PacketID) Enum() *PacketID {
p := new(PacketID)
*p = x
return p
}
func (x PacketID) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PacketID) Descriptor() protoreflect.EnumDescriptor {
return file_upgrade_proto_enumTypes[0].Descriptor()
}
func (PacketID) Type() protoreflect.EnumType {
return &file_upgrade_proto_enumTypes[0]
}
func (x PacketID) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PacketID.Descriptor instead.
func (PacketID) EnumDescriptor() ([]byte, []int) {
return file_upgrade_proto_rawDescGZIP(), []int{0}
}
type PropInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ItemId int32 `protobuf:"varint,1,opt,name=ItemId,proto3" json:"ItemId,omitempty"` //物品ID
ItemNum int64 `protobuf:"varint,2,opt,name=ItemNum,proto3" json:"ItemNum,omitempty"` //物品数量
}
func (x *PropInfo) Reset() {
*x = PropInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_upgrade_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PropInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PropInfo) ProtoMessage() {}
func (x *PropInfo) ProtoReflect() protoreflect.Message {
mi := &file_upgrade_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PropInfo.ProtoReflect.Descriptor instead.
func (*PropInfo) Descriptor() ([]byte, []int) {
return file_upgrade_proto_rawDescGZIP(), []int{0}
}
func (x *PropInfo) GetItemId() int32 {
if x != nil {
return x.ItemId
}
return 0
}
func (x *PropInfo) GetItemNum() int64 {
if x != nil {
return x.ItemNum
}
return 0
}
// 客户端升级奖励
//PACKET_CSClientUpgrades
type CSClientUpgrades struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *CSClientUpgrades) Reset() {
*x = CSClientUpgrades{}
if protoimpl.UnsafeEnabled {
mi := &file_upgrade_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CSClientUpgrades) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CSClientUpgrades) ProtoMessage() {}
func (x *CSClientUpgrades) ProtoReflect() protoreflect.Message {
mi := &file_upgrade_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CSClientUpgrades.ProtoReflect.Descriptor instead.
func (*CSClientUpgrades) Descriptor() ([]byte, []int) {
return file_upgrade_proto_rawDescGZIP(), []int{1}
}
//PACKET_SCClientUpgrades
type SCClientUpgrades struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
On bool `protobuf:"varint,1,opt,name=On,proto3" json:"On,omitempty"` // 是否开启
OnForce bool `protobuf:"varint,2,opt,name=OnForce,proto3" json:"OnForce,omitempty"` // 是否强制升级(没有关闭按钮)
Award []*PropInfo `protobuf:"bytes,3,rep,name=Award,proto3" json:"Award,omitempty"` // 奖励
Version int32 `protobuf:"varint,4,opt,name=Version,proto3" json:"Version,omitempty"` // 版本号
}
func (x *SCClientUpgrades) Reset() {
*x = SCClientUpgrades{}
if protoimpl.UnsafeEnabled {
mi := &file_upgrade_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCClientUpgrades) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCClientUpgrades) ProtoMessage() {}
func (x *SCClientUpgrades) ProtoReflect() protoreflect.Message {
mi := &file_upgrade_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SCClientUpgrades.ProtoReflect.Descriptor instead.
func (*SCClientUpgrades) Descriptor() ([]byte, []int) {
return file_upgrade_proto_rawDescGZIP(), []int{2}
}
func (x *SCClientUpgrades) GetOn() bool {
if x != nil {
return x.On
}
return false
}
func (x *SCClientUpgrades) GetOnForce() bool {
if x != nil {
return x.OnForce
}
return false
}
func (x *SCClientUpgrades) GetAward() []*PropInfo {
if x != nil {
return x.Award
}
return nil
}
func (x *SCClientUpgrades) GetVersion() int32 {
if x != nil {
return x.Version
}
return 0
}
var File_upgrade_proto protoreflect.FileDescriptor
var file_upgrade_proto_rawDesc = []byte{
0x0a, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x07, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x49, 0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x49,
0x74, 0x65, 0x6d, 0x4e, 0x75, 0x6d, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x53, 0x43, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x10, 0x53, 0x43,
0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x0e,
0x0a, 0x02, 0x4f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x18,
0x0a, 0x07, 0x4f, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x07, 0x4f, 0x6e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72,
0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64,
0x65, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72,
0x64, 0x12, 0x18, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x59, 0x0a, 0x08, 0x50,
0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x49, 0x44, 0x5f, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x67,
0x72, 0x61, 0x64, 0x65, 0x73, 0x10, 0x9c, 0x18, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x53, 0x43, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x67, 0x72, 0x61,
0x64, 0x65, 0x73, 0x10, 0x9d, 0x18, 0x42, 0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e,
0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_upgrade_proto_rawDescOnce sync.Once
file_upgrade_proto_rawDescData = file_upgrade_proto_rawDesc
)
func file_upgrade_proto_rawDescGZIP() []byte {
file_upgrade_proto_rawDescOnce.Do(func() {
file_upgrade_proto_rawDescData = protoimpl.X.CompressGZIP(file_upgrade_proto_rawDescData)
})
return file_upgrade_proto_rawDescData
}
var file_upgrade_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_upgrade_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_upgrade_proto_goTypes = []interface{}{
(PacketID)(0), // 0: upgrade.PacketID
(*PropInfo)(nil), // 1: upgrade.PropInfo
(*CSClientUpgrades)(nil), // 2: upgrade.CSClientUpgrades
(*SCClientUpgrades)(nil), // 3: upgrade.SCClientUpgrades
}
var file_upgrade_proto_depIdxs = []int32{
1, // 0: upgrade.SCClientUpgrades.Award:type_name -> upgrade.PropInfo
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_upgrade_proto_init() }
func file_upgrade_proto_init() {
if File_upgrade_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_upgrade_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PropInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_upgrade_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSClientUpgrades); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_upgrade_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCClientUpgrades); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_upgrade_proto_rawDesc,
NumEnums: 1,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_upgrade_proto_goTypes,
DependencyIndexes: file_upgrade_proto_depIdxs,
EnumInfos: file_upgrade_proto_enumTypes,
MessageInfos: file_upgrade_proto_msgTypes,
}.Build()
File_upgrade_proto = out.File
file_upgrade_proto_rawDesc = nil
file_upgrade_proto_goTypes = nil
file_upgrade_proto_depIdxs = nil
}

View File

@ -0,0 +1,27 @@
syntax = "proto3";
package upgrade;
option go_package = "mongo.games.com/game/protocol/upgrade";
enum PacketID {
// 3100~3199
PacketID_Zero = 0;
PACKET_CSClientUpgrades = 3100;
PACKET_SCClientUpgrades = 3101;
}
message PropInfo{
int32 ItemId = 1;//ID
int64 ItemNum = 2;//
}
//
//PACKET_CSClientUpgrades
message CSClientUpgrades{
}
//PACKET_SCClientUpgrades
message SCClientUpgrades{
bool On = 1; //
bool OnForce = 2; // ()
repeated PropInfo Award = 3; //
int32 Version = 4; //
}

File diff suppressed because it is too large Load Diff

View File

@ -449,6 +449,7 @@ message ItemShop {
int32 Ratio = 20; // int32 Ratio = 20; //
int32 EndTime = 21; // int32 EndTime = 21; //
bool FirstSwitch = 22; // bool FirstSwitch = 22; //
int32 OnFirstGiveDouble = 23; // 1 2
} }
// etcd /game/item_shop // etcd /game/item_shop
@ -980,3 +981,11 @@ message RoomConfigSystem{
int32 AutoCreateTime = 13; // int32 AutoCreateTime = 13; //
int32 On = 14; // 1 2 int32 On = 14; // 1 2
} }
// etcd /game/client_upgrade
message ClientUpgrade{
string Platform = 1; //
int32 On = 2; // 1 2
int32 OnForce = 3; // 1 2
repeated ItemInfo Reward = 4; //
}

View File

@ -280,7 +280,10 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
if acceptPlayer != nil { if acceptPlayer != nil {
logger.Logger.Trace("道具赠送成功", msg.ItemId) logger.Logger.Trace("道具赠送成功", msg.ItemId)
remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId) remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId)
BagMgrSingleton.AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []int32{msg.ItemId, msg.ItemNum}) AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []*model.Item{{
ItemId: msg.GetItemId(),
ItemNum: int64(msg.GetItemNum()),
}})
BagMgrSingleton.AddItems(&model.AddItemParam{ BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform, Platform: p.Platform,
SnId: p.SnId, SnId: p.SnId,
@ -305,7 +308,10 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
if data != nil && aPlayer != nil { if data != nil && aPlayer != nil {
logger.Logger.Trace("道具赠送成功", msg.ItemId) logger.Logger.Trace("道具赠送成功", msg.ItemId)
remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId) remark := fmt.Sprintf("赠送给玩家(%v)", msg.AcceptSnId)
BagMgrSingleton.AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []int32{msg.ItemId, msg.ItemNum}) AddMailByItem(p.Platform, p.SnId, p.Name, msg.AcceptSnId, msg.ShowId, []*model.Item{{
ItemId: msg.GetItemId(),
ItemNum: int64(msg.GetItemNum()),
}})
BagMgrSingleton.AddItems(&model.AddItemParam{ BagMgrSingleton.AddItems(&model.AddItemParam{
Platform: p.Platform, Platform: p.Platform,
SnId: p.SnId, SnId: p.SnId,

View File

@ -1,29 +1,21 @@
package main package main
import ( import (
"mongo.games.com/game/common" "time"
"mongo.games.com/game/model"
"mongo.games.com/game/proto"
"mongo.games.com/game/protocol/chat"
"mongo.games.com/goserver/core/basic" "mongo.games.com/goserver/core/basic"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib" "mongo.games.com/goserver/core/netlib"
"mongo.games.com/goserver/core/task" "mongo.games.com/goserver/core/task"
"time"
"mongo.games.com/game/common"
"mongo.games.com/game/model"
"mongo.games.com/game/proto"
"mongo.games.com/game/protocol/chat"
) )
// 用户发送消息 // CSChatMsgHandler 用户发送消息
type CSChatMsgPacketFactory struct { func CSChatMsgHandler(s *netlib.Session, packetid int, data interface{}, sid int64) error {
}
type CSChatMsgHandler struct {
}
func (this *CSChatMsgPacketFactory) CreatePacket() interface{} {
pack := &chat.CSChatMsg{}
return pack
}
func (this *CSChatMsgHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
logger.Logger.Trace("CSChatMsgHandler Process recv ", data) logger.Logger.Trace("CSChatMsgHandler Process recv ", data)
if msg, ok := data.(*chat.CSChatMsg); ok { if msg, ok := data.(*chat.CSChatMsg); ok {
p := PlayerMgrSington.GetPlayer(sid) p := PlayerMgrSington.GetPlayer(sid)
@ -105,18 +97,8 @@ func (this *CSChatMsgHandler) Process(s *netlib.Session, packetid int, data inte
return nil return nil
} }
// 聊天记录 // CSGetChatLogHandler 聊天记录
type CSGetChatLogPacketFactory struct { func CSGetChatLogHandler(s *netlib.Session, packetid int, data interface{}, sid int64) error {
}
type CSGetChatLogHandler struct {
}
func (this *CSGetChatLogPacketFactory) CreatePacket() interface{} {
pack := &chat.CSGetChatLog{}
return pack
}
func (this *CSGetChatLogHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
logger.Logger.Trace("CSGetChatLogHandler Process recv ", data) logger.Logger.Trace("CSGetChatLogHandler Process recv ", data)
if msg, ok := data.(*chat.CSGetChatLog); ok { if msg, ok := data.(*chat.CSGetChatLog); ok {
p := PlayerMgrSington.GetPlayer(sid) p := PlayerMgrSington.GetPlayer(sid)
@ -273,18 +255,8 @@ func (this *CSGetChatLogHandler) Process(s *netlib.Session, packetid int, data i
return nil return nil
} }
// 读消息 // CSReadChatMsgHandler 读消息
type CSReadChatMsgPacketFactory struct { func CSReadChatMsgHandler(s *netlib.Session, packetid int, data interface{}, sid int64) error {
}
type CSReadChatMsgHandler struct {
}
func (this *CSReadChatMsgPacketFactory) CreatePacket() interface{} {
pack := &chat.CSReadChatMsg{}
return pack
}
func (this *CSReadChatMsgHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
logger.Logger.Trace("CSReadChatMsgHandler Process recv ", data) logger.Logger.Trace("CSReadChatMsgHandler Process recv ", data)
if msg, ok := data.(*chat.CSReadChatMsg); ok { if msg, ok := data.(*chat.CSReadChatMsg); ok {
p := PlayerMgrSington.GetPlayer(sid) p := PlayerMgrSington.GetPlayer(sid)
@ -306,18 +278,8 @@ func (this *CSReadChatMsgHandler) Process(s *netlib.Session, packetid int, data
return nil return nil
} }
// 屏蔽 // CSShieldMsgHandler 屏蔽
type CSShieldMsgPacketFactory struct { func CSShieldMsgHandler(s *netlib.Session, packetid int, data interface{}, sid int64) error {
}
type CSShieldMsgHandler struct {
}
func (this *CSShieldMsgPacketFactory) CreatePacket() interface{} {
pack := &chat.CSShieldMsg{}
return pack
}
func (this *CSShieldMsgHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
logger.Logger.Trace("CSShieldMsgHandler Process recv ", data) logger.Logger.Trace("CSShieldMsgHandler Process recv ", data)
if msg, ok := data.(*chat.CSShieldMsg); ok { if msg, ok := data.(*chat.CSShieldMsg); ok {
p := PlayerMgrSington.GetPlayer(sid) p := PlayerMgrSington.GetPlayer(sid)
@ -365,15 +327,11 @@ func (this *CSShieldMsgHandler) Process(s *netlib.Session, packetid int, data in
func init() { func init() {
//聊天消息 //聊天消息
common.RegisterHandler(int(chat.ChatPacketID_PACKET_CSChatMsg), &CSChatMsgHandler{}) common.Register(int(chat.ChatPacketID_PACKET_SCChatMsg), &chat.CSChatMsg{}, CSChatMsgHandler)
netlib.RegisterFactory(int(chat.ChatPacketID_PACKET_CSChatMsg), &CSChatMsgPacketFactory{})
//聊天记录 //聊天记录
common.RegisterHandler(int(chat.ChatPacketID_PACKET_CSGetChatLog), &CSGetChatLogHandler{}) common.Register(int(chat.ChatPacketID_PACKET_CSGetChatLog), &chat.CSGetChatLog{}, CSGetChatLogHandler)
netlib.RegisterFactory(int(chat.ChatPacketID_PACKET_CSGetChatLog), &CSGetChatLogPacketFactory{})
//读消息 //读消息
common.RegisterHandler(int(chat.ChatPacketID_PACKET_CSReadChatMsg), &CSReadChatMsgHandler{}) common.Register(int(chat.ChatPacketID_PACKET_CSReadChatMsg), &chat.CSReadChatMsg{}, CSReadChatMsgHandler)
netlib.RegisterFactory(int(chat.ChatPacketID_PACKET_CSReadChatMsg), &CSReadChatMsgPacketFactory{})
//屏蔽玩家 //屏蔽玩家
common.RegisterHandler(int(chat.ChatPacketID_PACKET_CSShieldMsg), &CSShieldMsgHandler{}) common.Register(int(chat.ChatPacketID_PACKET_SCShieldMsg), &chat.SCShieldMsg{}, CSShieldMsgHandler)
netlib.RegisterFactory(int(chat.ChatPacketID_PACKET_CSShieldMsg), &CSShieldMsgPacketFactory{})
} }

View File

@ -10,6 +10,7 @@ import (
"math/rand" "math/rand"
"net/url" "net/url"
"regexp" "regexp"
"slices"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@ -84,7 +85,7 @@ func (this *CSInviteCodePlayerHandler) Process(s *netlib.Session, packetid int,
} }
//发送邮件 //发送邮件
var otherParams []int32 var otherParams []int64
newMsg := model.NewMessage("", p.SnId, "", p.SnId, model.MSGTYPE_INVITECODE, p.Name, inviteCode, coin, 0, newMsg := model.NewMessage("", p.SnId, "", p.SnId, model.MSGTYPE_INVITECODE, p.Name, inviteCode, coin, 0,
model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", otherParams, p.Platform, model.HallAll, nil) model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", otherParams, p.Platform, model.HallAll, nil)
err = model.InsertMessage(p.Platform, newMsg) err = model.InsertMessage(p.Platform, newMsg)
@ -1317,7 +1318,6 @@ func (this *CSPlayerRegisterHandler) Process(s *netlib.Session, packetid int, da
} }
} }
amount := int32(0)
plt := PlatformMgrSingleton.GetPlatform(strPlatform) plt := PlatformMgrSingleton.GetPlatform(strPlatform)
//if plt != nil { //if plt != nil {
// amount += plt.NewAccountGiveCoin // amount += plt.NewAccountGiveCoin
@ -1380,17 +1380,36 @@ func (this *CSPlayerRegisterHandler) Process(s *netlib.Session, packetid int, da
h := md5.New() h := md5.New()
io.WriteString(h, raw) io.WriteString(h, raw)
pwd := hex.EncodeToString(h.Sum(nil)) pwd := hex.EncodeToString(h.Sum(nil))
clientVer := t.GetClientVer()
if clientVer < 0 {
clientVer = model.GameParamData.ClientVersion
}
acc = &model.Account{} acc = &model.Account{}
//可以帐号密码登录,也可以游客登录 //可以帐号密码登录,也可以游客登录
acc, code = model.InsertTelAccount(t.GetUsername(), pwd, t.GetPlatform(), t.GetChannel(), t.GetPromoter(), t.GetParams(), t.GetInviterId(), acc, code = model.InsertAccount(&model.InsertAccountParam{
t.GetPromoterTree(), t.GetTel(), t.GetTelPassword(), t.GetPlatformTag(), t.GetPackage(), Platform: t.GetPlatform(),
deviceInfo, tagkey, 0, "", t.GetChannelID()) UserName: t.GetUsername(),
Password: pwd,
TelPassword: t.GetTelPassword(),
Channel: t.GetChannel(),
Params: t.GetParams(),
DeviceOs: "",
DeviceInfo: t.GetDeviceInfo(),
ChannelId: t.GetChannelID(),
AccountType: 0,
Tel: t.GetTel(),
ClientVer: clientVer,
})
if code != common.InsertAccountOk { if code != common.InsertAccountOk {
return player_proto.OpResultCode_OPRC_Error return player_proto.OpResultCode_OPRC_Error
} }
//生成玩家数据 //生成玩家数据
pi, tf = model.CreatePlayerDataOnRegister(acc.Platform, acc.AccountId.Hex(), amount, "", niceIdMgr.GetRobHeadUrlIdx()) pi, tf = model.InsertPlayerData(&model.InsertPlayerDataParam{
Plt: acc.Platform,
AccId: acc.AccountId.Hex(),
NickName: "",
HeadUrl: niceIdMgr.GetRobHeadUrlIdx(),
})
if pi == nil || tf == false { if pi == nil || tf == false {
return player_proto.OpResultCode_OPRC_Error return player_proto.OpResultCode_OPRC_Error
} }
@ -1963,6 +1982,19 @@ func CSPlayerData(s *netlib.Session, packetid int, data interface{}, sid int64)
p.dirty = true p.dirty = true
} }
} }
// 客户端升级奖励
clientUpgradeConfig := PlatformMgrSingleton.GetConfig(p.Platform).ClientUpgrade
if clientUpgradeConfig != nil && clientUpgradeConfig.GetOn() == common.On &&
(len(model.GameParamData.ClientVersionChannel) == 0 || slices.Contains(model.GameParamData.ClientVersionChannel, p.LastChannel)) {
if p.ClientVer < model.GameParamData.ClientVersion && cspl.GetClientVer() == model.GameParamData.ClientVersion {
AddMailClientUpgrade(p.SnId, clientUpgradeConfig.GetReward())
}
}
// 客户端升级
if p.ClientVer < cspl.GetClientVer() && cspl.GetClientVer() <= model.GameParamData.ClientVersion {
p.ClientVer = cspl.GetClientVer()
}
} }
// 有缓存数据 // 有缓存数据

View File

@ -14,6 +14,7 @@ import (
"mongo.games.com/game/model" "mongo.games.com/game/model"
"mongo.games.com/game/mq" "mongo.games.com/game/mq"
"mongo.games.com/game/proto" "mongo.games.com/game/proto"
"mongo.games.com/game/protocol/upgrade"
webapiproto "mongo.games.com/game/protocol/webapi" webapiproto "mongo.games.com/game/protocol/webapi"
"mongo.games.com/game/protocol/welfare" "mongo.games.com/game/protocol/welfare"
"mongo.games.com/game/srvdata" "mongo.games.com/game/srvdata"
@ -1309,6 +1310,39 @@ func (this *CSDiamondBankTakeDiamondHandler) Process(s *netlib.Session, packetid
return nil return nil
}*/ }*/
func CSClientUpgrades(s *netlib.Session, packetid int, data interface{}, sid int64) error {
logger.Logger.Tracef("CSClientUpgrades Process recv %v", data)
_, ok := data.(*upgrade.CSClientUpgrades)
if !ok {
return nil
}
p := PlayerMgrSington.GetPlayer(sid)
if p == nil {
return nil
}
cfg := PlatformMgrSingleton.GetConfig(p.Platform).ClientUpgrade
if cfg == nil {
return nil
}
pack := &upgrade.SCClientUpgrades{
On: cfg.GetOn() == common.On,
OnForce: cfg.GetOnForce() == common.On,
Version: model.GameParamData.ClientVersion,
}
for _, v := range cfg.GetReward() {
pack.Award = append(pack.Award, &upgrade.PropInfo{
ItemId: v.GetItemId(),
ItemNum: v.GetItemNum(),
})
}
p.SendToClient(int(upgrade.PacketID_PACKET_SCClientUpgrades), pack)
logger.Logger.Tracef("SCClientUpgrades: %v", pack)
return nil
}
func init() { func init() {
// 领取救济金 // 领取救济金
common.RegisterHandler(int(welfare.SPacketID_PACKET_CS_WELF_GETRELIEFFUND), &CSGetReliefFundHandler{}) common.RegisterHandler(int(welfare.SPacketID_PACKET_CS_WELF_GETRELIEFFUND), &CSGetReliefFundHandler{})
@ -1374,4 +1408,6 @@ func init() {
common.Register(int(welfare.SPacketID_PACKET_CSPermitExchange), welfare.CSPermitExchange{}, CSPermitExchange) common.Register(int(welfare.SPacketID_PACKET_CSPermitExchange), welfare.CSPermitExchange{}, CSPermitExchange)
// 赛季典藏通行证商品信息 // 赛季典藏通行证商品信息
common.Register(int(welfare.SPacketID_PACKET_CSPermitShop), welfare.CSPermitShop{}, CSPermitShop) common.Register(int(welfare.SPacketID_PACKET_CSPermitShop), welfare.CSPermitShop{}, CSPermitShop)
// 客户端升级奖励信息
common.Register(int(upgrade.PacketID_PACKET_CSClientUpgrades), upgrade.CSClientUpgrades{}, CSClientUpgrades)
} }

127
worldsrv/addmail.go Normal file
View File

@ -0,0 +1,127 @@
package main
import (
"mongo.games.com/game/protocol/webapi"
"time"
"github.com/globalsign/mgo/bson"
"mongo.games.com/goserver/core/basic"
"mongo.games.com/goserver/core/i18n"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/task"
"mongo.games.com/game/model"
)
type AddMailParam struct {
Platform string // 平台
Tp int32 // 邮件类型
SrcId int32 // 发送人
SrcName string // 发送人名字
SnId int32 // 收件人玩家id
Title string // 标题
Content string // 内容
Items []*model.Item // 道具
ShowId int64 // 显示位置
Channel []string // 包渠道
}
func AddMail(param *AddMailParam) {
logger.Logger.Tracef("AddMail %+v", *param)
if param.SnId <= 0 || param.Title == "" || param.Content == "" {
return
}
p := PlayerMgrSington.GetPlayerBySnId(param.SnId)
if p != nil {
param.Platform = p.Platform
}
if param.Platform == "" {
return
}
opener := int32(1)
if param.SrcId <= 0 {
opener = 0
}
var params []int64
for _, v := range param.Items {
params = append(params, int64(v.ItemId))
params = append(params, v.ItemNum)
}
var msg *model.Message
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
msg = &model.Message{
Id: bson.NewObjectId(),
MType: param.Tp,
Title: param.Title,
Content: param.Content,
Oper: opener,
SrcId: param.SrcId,
SrcName: param.SrcName,
SnId: param.SnId,
State: model.MSGSTATE_UNREAD,
CreatTs: time.Now().Unix(),
AttachState: model.MSGATTACHSTATE_DEFAULT,
Params: params,
Platform: param.Platform,
ShowId: param.ShowId,
Channel: param.Channel,
}
if msg.Pid == "" {
msg.Pid = msg.Id.Hex()
}
return model.InsertMessage(param.Platform, msg)
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
if data == nil {
if p := PlayerMgrSington.GetPlayerBySnId(param.SnId); p != nil {
p.AddMessage(msg)
}
} else {
logger.Logger.Errorf("AddMail Error %v", data)
}
}), "AddMail").Start()
}
// AddMailByItem 赠送道具到邮件
// srcId 发送人 srcName发送人名字
// showId 显示位置
func AddMailByItem(platform string, srcId int32, srcName string, snid int32, showId int64, items []*model.Item) {
content := i18n.Tr("languages", "GiftMail", srcName, srcName, srcName, srcName)
title := i18n.Tr("languages", "GiftMailTitle")
AddMail(&AddMailParam{
Platform: platform,
Tp: model.MSGTYPE_ITEM,
SrcId: srcId,
SrcName: srcName,
SnId: snid,
Title: title,
Content: content,
Items: items,
ShowId: showId,
})
}
func AddMailClientUpgrade(snid int32, items []*webapi.ItemInfo) {
var arr []*model.Item
for _, v := range items {
arr = append(arr, &model.Item{
ItemId: v.ItemId,
ItemNum: v.ItemNum,
})
}
content := i18n.Tr("languages", "UpgradeTitle")
title := i18n.Tr("languages", "Upgrade")
AddMail(&AddMailParam{
Tp: model.MSGTYPE_ITEM,
SnId: snid,
Title: title,
Content: content,
Items: arr,
})
}

View File

@ -806,29 +806,6 @@ func (this *BagMgr) AddItemsOffline(param *model.AddItemParam, callback func(err
})).StartByExecutor(fmt.Sprintf("Player%v", param.SnId)) })).StartByExecutor(fmt.Sprintf("Player%v", param.SnId))
} }
// AddMailByItem 赠送道具到邮件
// srcId 发送人 srcName发送人名字
// showId 显示位置
// items[0]:道具id items[1]:道具数量 items[2]:道具id items[3]:道具数量
func (this *BagMgr) AddMailByItem(platform string, srcId int32, srcName string, snid int32, showId int64, items []int32) {
logger.Logger.Trace("AddMailByItem:", srcId, srcName, items)
var newMsg *model.Message
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
content := i18n.Tr("languages", "GiftMail", srcName, srcName, srcName, srcName)
title := i18n.Tr("languages", "GiftMailTitle")
newMsg = model.NewMessageByPlayer("", 1, srcId, srcName, snid, model.MSGTYPE_ITEM, title, content,
0, 0, model.MSGSTATE_UNREAD, time.Now().Unix(), 0, "", items, platform, showId)
return model.InsertMessage(platform, newMsg)
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
if data == nil {
p := PlayerMgrSington.GetPlayerBySnId(snid)
if p != nil {
p.AddMessage(newMsg)
}
}
}), "AddMailByItem").Start()
}
// VerifyUpJybInfo 兑换礼包 // VerifyUpJybInfo 兑换礼包
func (this *BagMgr) VerifyUpJybInfo(p *Player, args *model.VerifyUpJybInfoArgs) { func (this *BagMgr) VerifyUpJybInfo(p *Player, args *model.VerifyUpJybInfoArgs) {

View File

@ -100,6 +100,8 @@ func init() {
etcd.Register(etcd.ETCDKEY_RoomType, webapi.RoomType{}, handlerEvent) etcd.Register(etcd.ETCDKEY_RoomType, webapi.RoomType{}, handlerEvent)
//娃娃机配置 //娃娃机配置
etcd.Register(etcd.ETCDKEY_MACHINE, webapi.MachineConfig{}, platformConfigEvent) etcd.Register(etcd.ETCDKEY_MACHINE, webapi.MachineConfig{}, platformConfigEvent)
//客户端升级奖励配置
etcd.Register(etcd.ETCDKEY_ClientUpgrade, webapi.ClientUpgrade{}, platformConfigEvent)
} }
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) { func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
@ -334,6 +336,8 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
if !isInit { if !isInit {
PlayerMgrSington.BroadcastDataConfigToPlatform(config.Platform, common.DataConfigSprite) PlayerMgrSington.BroadcastDataConfigToPlatform(config.Platform, common.DataConfigSprite)
} }
case *webapi.ClientUpgrade:
PlatformMgrSingleton.GetConfig(config.Platform).ClientUpgrade = config
default: default:
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey) logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
} }

View File

@ -92,14 +92,14 @@ func (r *PermitMgr) OnDayTimer() {
rank := k + 1 rank := k + 1
for _, rankInfo := range cfg { for _, rankInfo := range cfg {
var has bool var has bool
var items []int32 var items []int64
for r := rankInfo.GetStart(); r <= rankInfo.GetEnd(); r++ { for r := rankInfo.GetStart(); r <= rankInfo.GetEnd(); r++ {
if rank == int(r) { if rank == int(r) {
has = true has = true
var awards []model.AwardItem var awards []model.AwardItem
for _, item := range rankInfo.GetItemId() { for _, item := range rankInfo.GetItemId() {
items = append(items, item.GetItemId()) items = append(items, int64(item.GetItemId()))
items = append(items, int32(item.GetItemNum())) items = append(items, item.GetItemNum())
awards = append(awards, model.AwardItem{ awards = append(awards, model.AwardItem{
Id: item.GetItemId(), Id: item.GetItemId(),
Num: item.GetItemNum(), Num: item.GetItemNum(),

View File

@ -358,7 +358,7 @@ func (this *Player) OnLogined() {
} }
mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeLogin, this.Tel, this.Ip, mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeLogin, this.Tel, this.Ip,
this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(), 0, 0, this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(), 0, 0,
this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId)) this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId, this.ClientVer))
this.OnlineLogLogin() this.OnlineLogLogin()
@ -431,7 +431,7 @@ func (this *Player) OnRehold() {
} }
mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeRehold, this.Tel, this.Ip, mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeRehold, this.Tel, this.Ip,
this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(), this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(),
gameid, 0, this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId)) gameid, 0, this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId, this.ClientVer))
this.OnlineLogRehold() this.OnlineLogRehold()
} }
@ -683,7 +683,7 @@ func (this *Player) SendMessage(showId int64) {
Grade: proto.Int64(msg.Grade), Grade: proto.Int64(msg.Grade),
State: proto.Int32(msg.State), State: proto.Int32(msg.State),
Ts: proto.Int32(int32(msg.CreatTs)), Ts: proto.Int32(int32(msg.CreatTs)),
Params: msg.Params, Params: common.CopySliceInt64ToInt32(msg.Params), //todo 修改协议
AttachState: proto.Int32(msg.AttachState), AttachState: proto.Int32(msg.AttachState),
GiftId: proto.String(msg.GiftId), GiftId: proto.String(msg.GiftId),
GiftState: proto.Int32(giftState), GiftState: proto.Int32(giftState),
@ -1039,7 +1039,7 @@ func (this *Player) TestMail() {
var newMsg *model.Message var newMsg *model.Message
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
var otherParams []int32 var otherParams []int64
otherParams = append(otherParams, 10001, 3) otherParams = append(otherParams, 10001, 3)
otherParams = append(otherParams, 20001, 3) otherParams = append(otherParams, 20001, 3)
otherParams = append(otherParams, 20002, 3) otherParams = append(otherParams, 20002, 3)
@ -1059,7 +1059,7 @@ func (this *Player) TestSubMail() {
var newMsg *model.Message var newMsg *model.Message
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
var otherParams []int32 var otherParams []int64
otherParams = append(otherParams, 10001, 3) otherParams = append(otherParams, 10001, 3)
otherParams = append(otherParams, 20001, 3) otherParams = append(otherParams, 20001, 3)
otherParams = append(otherParams, 20002, 3) otherParams = append(otherParams, 20002, 3)
@ -1106,8 +1106,8 @@ func (this *Player) GetMessageAttach(id string) {
if num := len(msg.Params); num > 0 && num%2 == 0 { if num := len(msg.Params); num > 0 && num%2 == 0 {
for i := 0; i < num; i += 2 { for i := 0; i < num; i += 2 {
items = append(items, &model.Item{ items = append(items, &model.Item{
ItemId: msg.Params[i], // 物品id ItemId: int32(msg.Params[i]), // 物品id
ItemNum: int64(msg.Params[i+1]), // 数量 ItemNum: msg.Params[i+1], // 数量
ObtainTime: time.Now().Unix(), ObtainTime: time.Now().Unix(),
}) })
if gainWay == common.GainWayItemPermitRank { if gainWay == common.GainWayItemPermitRank {
@ -1119,7 +1119,7 @@ func (this *Player) GetMessageAttach(id string) {
} }
if tp != -1 { if tp != -1 {
mq.Write(model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel, mq.Write(model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel,
model.SystemFreeGive_GiveType_TaskPermitRank, tp, int64(msg.Params[i+1]))) model.SystemFreeGive_GiveType_TaskPermitRank, tp, msg.Params[i+1]))
} }
} }
} }
@ -1283,7 +1283,7 @@ func (this *Player) DropLine() {
} }
mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeDrop, this.Tel, this.Ip, mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeDrop, this.Tel, this.Ip,
this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(), this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(),
gameid, this.LastGameId, this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId)) gameid, this.LastGameId, this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId, this.ClientVer))
this.SendPlayerCoin() this.SendPlayerCoin()
this.OnlineLogDrop() this.OnlineLogDrop()
@ -1408,7 +1408,7 @@ func (this *Player) OnLogouted() {
if !this.IsRob { if !this.IsRob {
mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeLogout, this.Tel, this.Ip, mq.Write(model.NewLoginLog(this.SnId, common.LoginLogTypeLogout, this.Tel, this.Ip,
this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(), this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, this.City, clog, this.GetTotalCoin(),
0, 0, this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId)) 0, 0, this.DeviceName, this.PackageName, this.AppVersion, this.BuildVersion, this.AppChannel, this.ChannelId, this.ClientVer))
this.OnlineLogLogout() this.OnlineLogLogout()
} }
@ -2940,7 +2940,7 @@ func (this *Player) ReportLoginEvent() {
} }
mq.Write(model.GenerateLogin(model.CreatePlayerLoginEvent(this.SnId, mq.Write(model.GenerateLogin(model.CreatePlayerLoginEvent(this.SnId,
this.Channel, this.BeUnderAgentCode, this.Platform, this.City, this.DeviceOS, this.Ip, this.Channel, this.BeUnderAgentCode, this.Platform, this.City, this.DeviceOS, this.Ip,
this.CreateTime, this.UpgradeTime, isBindPhone, this.TelephonePromoter, this.DeviceId, this.ChannelId))) this.CreateTime, this.UpgradeTime, isBindPhone, this.TelephonePromoter, this.DeviceId, this.ChannelId, this.AppChannel, this.ClientVer)))
//登录通知 //登录通知
//ActMonitorMgrSington.SendActMonitorEvent(ActState_Login, this.SnId, this.Name, this.Platform, //ActMonitorMgrSington.SendActMonitorEvent(ActState_Login, this.SnId, this.Name, this.Platform,
// 0, 0, "", 0) // 0, 0, "", 0)

View File

@ -61,7 +61,7 @@ func (this *PlayerRankSeason) sendEmailAward(rankType int32) {
var coin int64 var coin int64
var diamond int64 var diamond int64
var otherParams []int32 var otherParams []int64
for _, v := range item.Awards { for _, v := range item.Awards {
switch v.Id { switch v.Id {
case 1: // 金币 case 1: // 金币
@ -70,7 +70,7 @@ func (this *PlayerRankSeason) sendEmailAward(rankType int32) {
diamond = int64(v.Num) diamond = int64(v.Num)
default: default:
// 道具 // 道具
otherParams = []int32{v.Id, v.Num} otherParams = []int64{int64(v.Id), int64(v.Num)}
} }
} }
@ -767,12 +767,12 @@ func (r *RankMatchMgr) RankAward() {
logger.Logger.Errorf("RankMatchMgr OnDayTimer FindPlayerPermitList player is nil %v", list.List[k].SnId) logger.Logger.Errorf("RankMatchMgr OnDayTimer FindPlayerPermitList player is nil %v", list.List[k].SnId)
continue continue
} }
var items []int32 var items []int64
for _, award := range rankAward { for _, award := range rankAward {
if award.RankLevelId == rankId { if award.RankLevelId == rankId {
for _, itemInfo := range award.Item { for _, itemInfo := range award.Item {
items = append(items, itemInfo.ItemId) items = append(items, int64(itemInfo.ItemId))
items = append(items, int32(itemInfo.ItemNum)) items = append(items, itemInfo.ItemNum)
} }
break break
} }
@ -839,12 +839,12 @@ func (r *RankMatchMgr) RankAward() {
logger.Logger.Errorf("RankMatchMgr OnDayTimer FindWinCoinListTienlen player is nil %v", ret.List[k].SnId) logger.Logger.Errorf("RankMatchMgr OnDayTimer FindWinCoinListTienlen player is nil %v", ret.List[k].SnId)
continue continue
} }
var items []int32 var items []int64
for _, award := range rankAward { for _, award := range rankAward {
if award.RankLevelId == rankId { if award.RankLevelId == rankId {
for _, itemInfo := range award.Item { for _, itemInfo := range award.Item {
items = append(items, itemInfo.ItemId) items = append(items, int64(itemInfo.ItemId))
items = append(items, int32(itemInfo.ItemNum)) items = append(items, itemInfo.ItemNum)
} }
break break
} }

View File

@ -661,7 +661,11 @@ func (this *ShopMgr) GetAmountFinal(p *Player, shopId, vipShopId int32) int64 {
// 首充翻倍 // 首充翻倍
if shopInfo.FirstSwitch { if shopInfo.FirstSwitch {
if !slices.Contains(p.ShopID, int(shopInfo.Id)) { if !slices.Contains(p.ShopID, int(shopInfo.Id)) {
if shopInfo.FirstGiveSwitch {
addTotal *= 2 addTotal *= 2
} else {
addTotal += shopInfo.Amount
}
} }
} }
default: default:

View File

@ -60,15 +60,35 @@ func (t *TaskLogin) Call(o *basic.Object) interface{} {
h := md5.New() h := md5.New()
io.WriteString(h, raw) io.WriteString(h, raw)
pwd := hex.EncodeToString(h.Sum(nil)) pwd := hex.EncodeToString(h.Sum(nil))
clientVer := t.GetClientVer()
acc, retCode = model.InsertAccount(t.GetUsername(), pwd, t.GetPlatform(), t.GetChannel(), t.GetPromoter(), t.GetParams(), if clientVer < 0 {
t.GetDeviceOs(), t.GetInviterId(), t.GetPromoterTree(), t.GetPlatformTag(), t.GetPackage(), t.GetDeviceInfo(), t.BackupPromoter, t.tagkey, t.GetChannelID()) clientVer = model.GameParamData.ClientVersion
}
acc, retCode = model.InsertAccount(&model.InsertAccountParam{
Platform: t.GetPlatform(),
UserName: t.GetUsername(),
Password: pwd,
TelPassword: pwd,
Channel: t.GetChannel(),
Params: t.GetParams(),
DeviceOs: t.GetDeviceOs(),
DeviceInfo: t.GetDeviceInfo(),
ChannelId: t.GetChannelID(),
AccountType: 0,
Tel: "",
ClientVer: clientVer,
})
if retCode != common.InsertAccountOk { if retCode != common.InsertAccountOk {
return nil return nil
} }
var tf bool var tf bool
playerData, tf = model.CreatePlayerDataOnRegister(acc.Platform, acc.AccountId.Hex(), 0, "", niceIdMgr.GetRobHeadUrlIdx()) playerData, tf = model.InsertPlayerData(&model.InsertPlayerDataParam{
Plt: acc.Platform,
AccId: acc.AccountId.Hex(),
NickName: "",
HeadUrl: niceIdMgr.GetRobHeadUrlIdx(),
})
if playerData == nil || !tf { if playerData == nil || !tf {
return nil return nil
} }
@ -80,16 +100,35 @@ func (t *TaskLogin) Call(o *basic.Object) interface{} {
h := md5.New() h := md5.New()
io.WriteString(h, raw) io.WriteString(h, raw)
pwd := hex.EncodeToString(h.Sum(nil)) pwd := hex.EncodeToString(h.Sum(nil))
clientVer := t.GetClientVer()
acc, retCode = model.InsertTelAccount(t.Username, pwd, t.GetPlatform(), t.GetChannel(), t.GetPromoter(), t.GetParams(), if clientVer < 0 {
t.GetInviterId(), t.GetPromoterTree(), "", pwd, t.GetPlatformTag(), t.GetPackage(), t.DeviceInfo, clientVer = model.GameParamData.ClientVersion
t.tagkey, t.AccountType, t.GetDeviceOs(), t.GetChannelID()) }
acc, retCode = model.InsertAccount(&model.InsertAccountParam{
Platform: t.GetPlatform(),
UserName: t.GetUsername(),
Password: pwd,
TelPassword: pwd,
Channel: t.GetChannel(),
Params: t.GetParams(),
DeviceOs: t.GetDeviceOs(),
DeviceInfo: t.GetDeviceInfo(),
ChannelId: t.GetChannelID(),
AccountType: t.GetAccountType(),
Tel: "",
ClientVer: clientVer,
})
if retCode != common.InsertAccountOk { if retCode != common.InsertAccountOk {
return nil return nil
} }
var tf bool var tf bool
playerData, tf = model.CreatePlayerDataByThird(acc.Platform, acc.AccountId.Hex(), t.Name, t.HeadUrl) playerData, tf = model.InsertPlayerData(&model.InsertPlayerDataParam{
Plt: acc.Platform,
AccId: acc.AccountId.Hex(),
NickName: t.GetName(),
HeadUrl: t.GetHeadUrl(),
})
if playerData == nil || !tf { if playerData == nil || !tf {
return nil return nil
} }
@ -107,17 +146,38 @@ func (t *TaskLogin) Call(o *basic.Object) interface{} {
io.WriteString(h, raw) io.WriteString(h, raw)
pwd := hex.EncodeToString(h.Sum(nil)) pwd := hex.EncodeToString(h.Sum(nil))
clientVer := t.GetClientVer()
if clientVer < 0 {
clientVer = model.GameParamData.ClientVersion
}
// Username 就是手机号 // Username 就是手机号
acc, retCode = model.InsertTelAccount(t.Username, pwd, t.GetPlatform(), t.GetChannel(), t.GetPromoter(), t.GetParams(), acc, retCode = model.InsertAccount(&model.InsertAccountParam{
t.GetInviterId(), t.GetPromoterTree(), t.Username, pwd, t.GetPlatformTag(), t.GetPackage(), Platform: t.GetPlatform(),
t.DeviceInfo, t.tagkey, t.AccountType, t.GetDeviceOs(), t.GetChannelID()) UserName: t.GetUsername(),
Password: pwd,
TelPassword: pwd,
Channel: t.GetChannel(),
Params: t.GetParams(),
DeviceOs: t.GetDeviceOs(),
DeviceInfo: t.GetDeviceInfo(),
ChannelId: t.GetChannelID(),
AccountType: t.GetAccountType(),
Tel: t.GetUsername(),
ClientVer: clientVer,
})
if retCode != common.InsertAccountOk { if retCode != common.InsertAccountOk {
return nil return nil
} }
var tf bool var tf bool
name := fmt.Sprintf("mango%v", acc.SnId) name := fmt.Sprintf("mango%v", acc.SnId)
playerData, tf = model.CreatePlayerDataByThird(acc.Platform, acc.AccountId.Hex(), name, t.HeadUrl) playerData, tf = model.InsertPlayerData(&model.InsertPlayerDataParam{
Plt: acc.Platform,
AccId: acc.AccountId.Hex(),
NickName: name,
HeadUrl: t.GetHeadUrl(),
})
if playerData == nil || !tf { if playerData == nil || !tf {
return nil return nil
} }

View File

@ -2059,16 +2059,16 @@ func (this *Tournament) OnHourTimer() {
} }
} }
for sortId := range this.players { for sortId := range this.players {
has := false
for _, tm := range this.matches { for _, tm := range this.matches {
if _, ok := tm[sortId]; !ok { if _, ok := tm[sortId]; ok {
for _, v := range this.players[sortId] { has = true
if v != nil {
logger.Logger.Errorf("比赛异常,比赛已经不存在了 %v", v.tm)
}
break break
} }
this.StopMatch(0, sortId)
} }
if !has {
logger.Logger.Errorf("比赛异常,比赛已经不存在了 %v", sortId)
delete(this.players, sortId)
} }
} }
} }

View File

@ -1439,7 +1439,7 @@ func init() {
// var otherParams []int32 // var otherParams []int32
newMsg = model.NewMessage("", int32(srcSnid), "", int32(destSnid), int32(messageType), title, content, coin, diamond, newMsg = model.NewMessage("", int32(srcSnid), "", int32(destSnid), int32(messageType), title, content, coin, diamond,
model.MSGSTATE_UNREAD, time.Now().Unix(), model.MSGATTACHSTATE_DEFAULT, "", otherParams, platform, showId, channel) model.MSGSTATE_UNREAD, time.Now().Unix(), model.MSGATTACHSTATE_DEFAULT, "", common.CopySliceInt32ToInt64(otherParams), platform, showId, channel)
if newMsg != nil { if newMsg != nil {
err := model.InsertMessage(platform, newMsg) err := model.InsertMessage(platform, newMsg)
if err != nil { if err != nil {
@ -1452,7 +1452,7 @@ func init() {
if destSnid == 0 { if destSnid == 0 {
for _, psnid := range onlinePlayerSnid { for _, psnid := range onlinePlayerSnid {
newMsg := model.NewMessage(newMsg.Id.Hex(), newMsg.SrcId, "", psnid, newMsg.MType, newMsg.Title, newMsg.Content, newMsg.Coin, newMsg.Diamond, newMsg := model.NewMessage(newMsg.Id.Hex(), newMsg.SrcId, "", psnid, newMsg.MType, newMsg.Title, newMsg.Content, newMsg.Coin, newMsg.Diamond,
newMsg.State, newMsg.CreatTs, newMsg.AttachState, newMsg.GiftId, otherParams, platform, newMsg.ShowId, channel) newMsg.State, newMsg.CreatTs, newMsg.AttachState, newMsg.GiftId, common.CopySliceInt32ToInt64(otherParams), platform, newMsg.ShowId, channel)
if newMsg != nil { if newMsg != nil {
dbMsgs = append(dbMsgs, newMsg) dbMsgs = append(dbMsgs, newMsg)
} }

View File

@ -1705,9 +1705,17 @@ func (this *WelfareMgr) PigbankGetInfo(p *Player) {
} }
return 0 return 0
}*/ }*/
if p.WelfData.PigBank == nil {
p.WelfData.PigBank = &model.PigBankData{}
}
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
infoData := pool[0] infoData := pool[0]
for _, data := range pool { for _, data := range pool {
if data == nil {
continue
}
if p.WelfData.PigBank.DayBuyTimes+1+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax { if p.WelfData.PigBank.DayBuyTimes+1+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
infoData = data infoData = data
break break
@ -1716,6 +1724,9 @@ func (this *WelfareMgr) PigbankGetInfo(p *Player) {
BankMaxCoin := int64(0) BankMaxCoin := int64(0)
for _, data := range srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() { for _, data := range srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() {
if data == nil {
continue
}
if p.WelfData.PigBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax { if p.WelfData.PigBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
BankMaxCoin = int64(data.MaxGold) BankMaxCoin = int64(data.MaxGold)
break break
@ -1759,9 +1770,17 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
} }
return 0 return 0
}*/ }*/
if p.WelfData.PigBank == nil {
p.WelfData.PigBank = &model.PigBankData{}
}
pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() pool := srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr()
infoData := pool[0] infoData := pool[0]
for _, data := range pool { for _, data := range pool {
if data == nil {
continue
}
if p.WelfData.PigBank.DayBuyTimes+1+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax { if p.WelfData.PigBank.DayBuyTimes+1+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
infoData = data infoData = data
break break
@ -1770,6 +1789,9 @@ func (this *WelfareMgr) PigbankTakeCoin(p *Player) {
BankMaxCoin := int64(0) BankMaxCoin := int64(0)
for _, data := range srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() { for _, data := range srvdata.PBDB_PigBank_DiamondMgr.Datas.GetArr() {
if data == nil {
continue
}
if p.WelfData.PigBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax { if p.WelfData.PigBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.PigBank.DayBuyTimes+1 <= data.BuyCountMax {
BankMaxCoin = int64(data.MaxGold) BankMaxCoin = int64(data.MaxGold)
break break
@ -1873,6 +1895,9 @@ func (this *WelfareMgr) DiamondBankGetInfo(p *Player) {
p.WelfData.DiamondBank = &model.DiamondBankData{} p.WelfData.DiamondBank = &model.DiamondBankData{}
} }
for _, data := range pool { for _, data := range pool {
if data == nil {
continue
}
if p.WelfData.DiamondBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.DiamondBank.DayBuyTimes+1 <= data.BuyCountMax { if p.WelfData.DiamondBank.DayBuyTimes+1 >= data.BuyCountMin && p.WelfData.DiamondBank.DayBuyTimes+1 <= data.BuyCountMax {
infoData = data infoData = data
break break