Compare commits
No commits in common. "699596d02250b1ef5da2415c17f5d23529f66bdb" and "d7b72cd6ea5ef04a185ee52b030320fb956f37e4" have entirely different histories.
699596d022
...
d7b72cd6ea
|
@ -22,6 +22,5 @@
|
||||||
"RobotInviteIntervalMax": 1,
|
"RobotInviteIntervalMax": 1,
|
||||||
"ClosePreCreateRoom": true,
|
"ClosePreCreateRoom": true,
|
||||||
"AgoraAddress": "http://47.105.78.29:8081",
|
"AgoraAddress": "http://47.105.78.29:8081",
|
||||||
"InviteUrl": "http://47.105.78.29:8000/",
|
"InviteUrl": "http://47.105.78.29:8000/"
|
||||||
"RankTimeout": 5
|
|
||||||
}
|
}
|
|
@ -13,7 +13,6 @@ import (
|
||||||
"mongo.games.com/game/dbproxy/svc"
|
"mongo.games.com/game/dbproxy/svc"
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
"mongo.games.com/game/mq"
|
"mongo.games.com/game/mq"
|
||||||
rankproto "mongo.games.com/game/protocol/rank"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var InviteNumCache = cache.NewMemoryCache()
|
var InviteNumCache = cache.NewMemoryCache()
|
||||||
|
@ -45,7 +44,7 @@ func init() {
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
n++
|
n++
|
||||||
} else {
|
} else {
|
||||||
n, err = svc.GetInviteNum(log.Platform, log.InviteSnId, int32(rankproto.RankInvite_InviteType_Total))
|
n, err = svc.GetInviteNum(log.Platform, log.InviteSnId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Logger.Errorf("BindInviteSnId error:%v", err)
|
logger.Logger.Errorf("BindInviteSnId error:%v", err)
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -30,7 +30,6 @@ func CoinLogsCollection(plt string) *mongo.Collection {
|
||||||
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"seqno"}, Background: true, Sparse: true})
|
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"seqno"}, Background: true, Sparse: true})
|
||||||
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
||||||
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"cointype"}, Background: true, Sparse: true})
|
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"cointype"}, Background: true, Sparse: true})
|
||||||
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
|
||||||
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||||
}
|
}
|
||||||
return c_coinlogrec
|
return c_coinlogrec
|
||||||
|
|
|
@ -22,10 +22,7 @@ func GameDetailedLogsCollection(plt string) *mongo.Collection {
|
||||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
||||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"logid"}, Background: true, Sparse: true})
|
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"logid"}, Background: true, Sparse: true})
|
||||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
|
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
|
||||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-time"}, Background: true, Sparse: true})
|
|
||||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
|
||||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"matchid"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c_gamedetailed
|
return c_gamedetailed
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,8 @@ func GamePlayerListLogsCollection(plt string) *mongo.Collection {
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"gamedetailedlogid"}, Background: true, Sparse: true})
|
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"gamedetailedlogid"}, Background: true, Sparse: true})
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
|
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-time"}, Background: true, Sparse: true})
|
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
|
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"matchid"}, Background: true, Sparse: true})
|
|
||||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"matchtype"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c_gameplayerlistlog
|
return c_gameplayerlistlog
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,7 @@ func ItemLogsCollection(plt string) *mongo.Collection {
|
||||||
c_itemlog, first := s.DB().C(model.ItemLogCollName)
|
c_itemlog, first := s.DB().C(model.ItemLogCollName)
|
||||||
if first {
|
if first {
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"logtype"}, Background: true, Sparse: true})
|
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"platform"}, Background: true, Sparse: true})
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"itemid"}, Background: true, Sparse: true})
|
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"createts"}, Background: true, Sparse: true})
|
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"-createts"}, Background: true, Sparse: true})
|
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"typeid"}, Background: true, Sparse: true})
|
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"gameid"}, Background: true, Sparse: true})
|
|
||||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c_itemlog
|
return c_itemlog
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,12 +22,6 @@ func MatchLogCollection(plt string) *mongo.Collection {
|
||||||
c, first := s.DB().C(model.MatchLogCollName)
|
c, first := s.DB().C(model.MatchLogCollName)
|
||||||
if first {
|
if first {
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"matchid"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"starttime"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-starttime"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"endtime"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-endtime"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"sortid"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ func InviteScoreCollection(plt string) *mongo.Collection {
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"tp"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"tp"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"weekindex"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"weekindex"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"monthindex"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"monthindex"}, Background: true, Sparse: true})
|
||||||
}
|
}
|
||||||
|
@ -270,7 +269,7 @@ func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs
|
||||||
}
|
}
|
||||||
RankInvite.ModId = int32(roleId)
|
RankInvite.ModId = int32(roleId)
|
||||||
|
|
||||||
RankInvite.InviteNum, _ = GetInviteNum(req.Platform, inviteInfo.InviteSnId, req.RankType)
|
RankInvite.InviteNum, _ = GetInviteNum(req.Platform, inviteInfo.InviteSnId)
|
||||||
ret.List = append(ret.List, &RankInvite)
|
ret.List = append(ret.List, &RankInvite)
|
||||||
|
|
||||||
break
|
break
|
||||||
|
@ -283,86 +282,6 @@ func (b *BindScoreSvc) GetInviteRankList(req *model.FindPlayerRankInviteListArgs
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *BindScoreSvc) GetInviteScoreByType(req *model.FindPlayerRankInviteScoreArgs, ret *model.FindPlayerRankInviteScoreReply) error {
|
|
||||||
c := InviteScoreCollection(req.Platform)
|
|
||||||
if c == nil {
|
|
||||||
return InviteScoreColError
|
|
||||||
}
|
|
||||||
|
|
||||||
matchParam := bson.M{
|
|
||||||
"invitesnid": req.SnId,
|
|
||||||
"score": bson.M{"$gt": 0},
|
|
||||||
}
|
|
||||||
now := time.Now().Local()
|
|
||||||
startTime := now.AddDate(-100, 0, 0).UnixNano()
|
|
||||||
year, month, day := now.Date()
|
|
||||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
|
||||||
if req.RankType == int32(rankproto.RankInvite_InviteType_Week) {
|
|
||||||
// 本周起始日期(周日)
|
|
||||||
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
|
|
||||||
} else if req.RankType == int32(rankproto.RankInvite_InviteType_Month) {
|
|
||||||
// 本月起始日期
|
|
||||||
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
|
|
||||||
} else {
|
|
||||||
matchParam["ts"] = bson.M{"$gte": startTime, "$lte": now.UnixNano()}
|
|
||||||
}
|
|
||||||
|
|
||||||
type M struct {
|
|
||||||
InviteSnId int32 // 邀请人id
|
|
||||||
Score int64 // 积分
|
|
||||||
}
|
|
||||||
|
|
||||||
var tc []M
|
|
||||||
err := c.Pipe([]bson.M{
|
|
||||||
{"$match": matchParam},
|
|
||||||
{"$group": bson.M{
|
|
||||||
"_id": nil,
|
|
||||||
"invitesnid": bson.M{"$first": "$invitesnid"},
|
|
||||||
"score": bson.M{"$sum": "$score"},
|
|
||||||
}},
|
|
||||||
}).AllowDiskUse().All(&tc)
|
|
||||||
if err != nil {
|
|
||||||
logger.Logger.Error("GetInviteScoreByType z AllowDiskUse is error", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
type PInfo struct {
|
|
||||||
SnId int32
|
|
||||||
Name string // 昵称
|
|
||||||
Roles *model.RolePetInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
var retPlayer PInfo
|
|
||||||
u := PlayerDataCollection(req.Platform)
|
|
||||||
if u == nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = u.Find(bson.M{"snid": req.SnId}).Select(bson.M{"snid": 1, "name": 1, "roles": 1}).One(&retPlayer)
|
|
||||||
if err != nil {
|
|
||||||
logger.Logger.Error("svc.GetInviteScoreByType is error", err)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
var rankInvite model.PlayerRankInvite
|
|
||||||
rankInvite.Name = retPlayer.Name
|
|
||||||
if len(tc) > 0 {
|
|
||||||
rankInvite.Score = tc[0].Score
|
|
||||||
}
|
|
||||||
rankInvite.SnId = req.SnId
|
|
||||||
// 头像模型ID
|
|
||||||
roleId := common.DefaultRoleId
|
|
||||||
if retPlayer.Roles != nil {
|
|
||||||
roleId = int(retPlayer.Roles.ModId)
|
|
||||||
}
|
|
||||||
rankInvite.ModId = int32(roleId)
|
|
||||||
rankInvite.InviteNum, _ = GetInviteNum(req.Platform, req.SnId, req.RankType)
|
|
||||||
ret.Data = rankInvite
|
|
||||||
|
|
||||||
ret.RankType = req.RankType
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *BindScoreSvc) GetInviteList(req *model.InviteLisArgs, ret *model.InviteListRet) error {
|
func (b *BindScoreSvc) GetInviteList(req *model.InviteLisArgs, ret *model.InviteListRet) error {
|
||||||
c := InviteScoreCollection(req.Platform)
|
c := InviteScoreCollection(req.Platform)
|
||||||
if c == nil {
|
if c == nil {
|
||||||
|
|
|
@ -18,10 +18,6 @@ func MessageCollection(plt string) *mongo.Collection {
|
||||||
if first {
|
if first {
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"state"}, Background: true, Sparse: true})
|
c.EnsureIndex(mgo.Index{Key: []string{"state"}, Background: true, Sparse: true})
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"mtype"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"srcid"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"-creatts"}, Background: true, Sparse: true})
|
|
||||||
c.EnsureIndex(mgo.Index{Key: []string{"creatts"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,16 +12,13 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mongo.games.com/goserver/core/basic"
|
"mongo.games.com/goserver/core/basic"
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
"mongo.games.com/goserver/core/task"
|
"mongo.games.com/goserver/core/task"
|
||||||
|
|
||||||
"github.com/globalsign/mgo"
|
"github.com/globalsign/mgo"
|
||||||
"github.com/globalsign/mgo/bson"
|
"github.com/globalsign/mgo/bson"
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
"mongo.games.com/game/dbproxy/mongo"
|
"mongo.games.com/game/dbproxy/mongo"
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
rankproto "mongo.games.com/game/protocol/rank"
|
"mongo.games.com/goserver/core/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -40,12 +37,13 @@ func PlayerDataCollection(plt string) *mongo.Collection {
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"snid"}, Unique: true, Background: true, Sparse: true})
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"snid"}, Unique: true, Background: true, Sparse: true})
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"channel"}, Background: true, Sparse: true})
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"channel"}, Background: true, Sparse: true})
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"tel"}, Background: true, Sparse: true})
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"tel"}, Background: true, Sparse: true})
|
||||||
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"bankaccount"}, Background: true, Sparse: true})
|
||||||
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"alipayaccount"}, Background: true, Sparse: true})
|
||||||
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"alipayaccname"}, Background: true, Sparse: true})
|
||||||
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"bankaccname"}, Background: true, Sparse: true})
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitecode"}, Background: true, Sparse: true})
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitecode"}, Background: true, Sparse: true})
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"invitesnid"}, Background: true, Sparse: true})
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
|
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"createtime"}, Background: true, Sparse: true})
|
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"-createtime"}, Background: true, Sparse: true})
|
|
||||||
c_playerdata.EnsureIndex(mgo.Index{Key: []string{"othercode"}, Background: true, Sparse: true})
|
|
||||||
}
|
}
|
||||||
return c_playerdata
|
return c_playerdata
|
||||||
}
|
}
|
||||||
|
@ -1511,7 +1509,7 @@ func (svc *PlayerDataSvc) GetPlayerInviteSnid(req *model.PlayerIsExistBySnIdArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *PlayerDataSvc) GetInviteNum(req *model.PlayerIsExistBySnIdArgs, resp *int32) error {
|
func (svc *PlayerDataSvc) GetInviteNum(req *model.PlayerIsExistBySnIdArgs, resp *int32) error {
|
||||||
n, err := GetInviteNum(req.Plt, req.SnId, int32(rankproto.RankInvite_InviteType_Total))
|
n, err := GetInviteNum(req.Plt, req.SnId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1519,43 +1517,15 @@ func (svc *PlayerDataSvc) GetInviteNum(req *model.PlayerIsExistBySnIdArgs, resp
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetInviteNum(platform string, snId int32, rankType int32) (int32, error) {
|
func GetInviteNum(platform string, snId int32) (int32, error) {
|
||||||
var err error
|
c := PlayerDataCollection(platform)
|
||||||
var n int
|
if c == nil {
|
||||||
switch rankType {
|
return 0, PlayerColError
|
||||||
case int32(rankproto.RankInvite_InviteType_Week), int32(rankproto.RankInvite_InviteType_Month):
|
}
|
||||||
matchParam := bson.M{
|
|
||||||
"invitesnid": snId,
|
|
||||||
"tp": common.InviteScoreTypeBind,
|
|
||||||
}
|
|
||||||
now := time.Now().Local()
|
|
||||||
year, month, day := now.Date()
|
|
||||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
|
||||||
if rankType == int32(rankproto.RankInvite_InviteType_Week) {
|
|
||||||
// 本周起始日期(周日)
|
|
||||||
matchParam["weekindex"] = today.AddDate(0, 0, -int(today.Weekday())).Unix()
|
|
||||||
} else if rankType == int32(rankproto.RankInvite_InviteType_Month) {
|
|
||||||
// 本月起始日期
|
|
||||||
matchParam["monthindex"] = time.Date(year, month, 1, 0, 0, 0, 0, time.Local).Unix()
|
|
||||||
}
|
|
||||||
c := InviteScoreCollection(platform)
|
|
||||||
if c == nil {
|
|
||||||
return 0, InviteScoreColError
|
|
||||||
}
|
|
||||||
n, err = c.Find(matchParam).Count()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
n, err := c.Find(bson.M{"invitesnid": snId}).Count()
|
||||||
c := PlayerDataCollection(platform)
|
if err != nil {
|
||||||
if c == nil {
|
return 0, err
|
||||||
return 0, PlayerColError
|
|
||||||
}
|
|
||||||
n, err = c.Find(bson.M{"invitesnid": snId}).Count()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return int32(n), nil
|
return int32(n), nil
|
||||||
|
|
|
@ -17,7 +17,6 @@ const (
|
||||||
ETCDKEY_GAME_NOTICE = "/game/common_notice"
|
ETCDKEY_GAME_NOTICE = "/game/common_notice"
|
||||||
ETCDKEY_SHOP_ITEM = "/game/item_shop"
|
ETCDKEY_SHOP_ITEM = "/game/item_shop"
|
||||||
ETCDKEY_GAME_MATCH = "/game/game_match"
|
ETCDKEY_GAME_MATCH = "/game/game_match"
|
||||||
ETCDKEY_GAME_MATCH_TYPE = "/game/match_type"
|
|
||||||
ETCDKEY_ACT_TURNPLATE = "/game/act_turnplate"
|
ETCDKEY_ACT_TURNPLATE = "/game/act_turnplate"
|
||||||
ETCDKEY_ACT_7SIGN = "/game/act_7sign"
|
ETCDKEY_ACT_7SIGN = "/game/act_7sign"
|
||||||
ETCDKEY_ACT_BLINDBOX = "/game/act_blindbox"
|
ETCDKEY_ACT_BLINDBOX = "/game/act_blindbox"
|
||||||
|
|
|
@ -38,7 +38,6 @@ type MatchLog struct {
|
||||||
StartTime time.Time //开始时间
|
StartTime time.Time //开始时间
|
||||||
EndTime time.Time //结束时间
|
EndTime time.Time //结束时间
|
||||||
Players []*MatchPlayer //参赛人员数据
|
Players []*MatchPlayer //参赛人员数据
|
||||||
SortId int64 // 本场id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -154,32 +154,6 @@ func FindPlayerRankInviteList(args *FindPlayerRankInviteListArgs) (*FindPlayerRa
|
||||||
return ret, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type FindPlayerRankInviteScoreArgs struct {
|
|
||||||
Platform string
|
|
||||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
|
|
||||||
SnId int32
|
|
||||||
}
|
|
||||||
|
|
||||||
type FindPlayerRankInviteScoreReply struct {
|
|
||||||
RankType int32 // 邀请榜时间类型: 总榜 周榜 月榜
|
|
||||||
Data PlayerRankInvite
|
|
||||||
}
|
|
||||||
|
|
||||||
func FindPlayerRankInviteScoreType(args *FindPlayerRankInviteScoreArgs) (*FindPlayerRankInviteScoreReply, error) {
|
|
||||||
if rpcCli == nil {
|
|
||||||
logger.Logger.Error("model.FindPlayerRankInviteScoreType rpcCli == nil")
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
ret := new(FindPlayerRankInviteScoreReply)
|
|
||||||
err := rpcCli.CallWithTimeout("BindScoreSvc.GetInviteScoreByType", args, ret, time.Second*30)
|
|
||||||
if err != nil {
|
|
||||||
logger.Logger.Error("FindPlayerRankInviteScoreType error:", err)
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
return ret, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type WinCoinInfo struct {
|
type WinCoinInfo struct {
|
||||||
SnId int32
|
SnId int32
|
||||||
Name string
|
Name string
|
||||||
|
|
|
@ -586,8 +586,7 @@ type SCTMInfos struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
TMInfo []*TMInfo `protobuf:"bytes,1,rep,name=TMInfo,proto3" json:"TMInfo,omitempty"` //比赛场场次信息
|
TMInfo []*TMInfo `protobuf:"bytes,1,rep,name=TMInfo,proto3" json:"TMInfo,omitempty"` //比赛场场次信息
|
||||||
TypeList []int32 `protobuf:"varint,2,rep,packed,name=TypeList,proto3" json:"TypeList,omitempty"` // 所有玩法类型 1.锦标赛 2.实物赛 3.vip比赛 4.话费赛
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SCTMInfos) Reset() {
|
func (x *SCTMInfos) Reset() {
|
||||||
|
@ -629,13 +628,6 @@ func (x *SCTMInfos) GetTMInfo() []*TMInfo {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SCTMInfos) GetTypeList() []int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.TypeList
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
//单场次排行榜
|
//单场次排行榜
|
||||||
//PACKET_TM_CSTMRankList
|
//PACKET_TM_CSTMRankList
|
||||||
type CSTMRankList struct {
|
type CSTMRankList struct {
|
||||||
|
@ -1664,146 +1656,144 @@ var file_tournament_proto_rawDesc = []byte{
|
||||||
0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05,
|
0x12, 0x16, 0x0a, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x52, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x4f, 0x6e, 0x43, 0x68,
|
0x52, 0x06, 0x53, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x4f, 0x6e, 0x43, 0x68,
|
||||||
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52,
|
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||||
0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x53,
|
0x0d, 0x4f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x37,
|
||||||
0x0a, 0x09, 0x53, 0x43, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x2a, 0x0a, 0x06, 0x54,
|
0x0a, 0x09, 0x53, 0x43, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x2a, 0x0a, 0x06, 0x54,
|
||||||
0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f,
|
0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f,
|
||||||
0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||||
0x06, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4c,
|
0x06, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x22, 0x0a, 0x0c, 0x43, 0x53, 0x54, 0x4d, 0x52,
|
||||||
0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4c,
|
0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x18,
|
||||||
0x69, 0x73, 0x74, 0x22, 0x22, 0x0a, 0x0c, 0x43, 0x53, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x4c,
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x06, 0x54,
|
||||||
0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18,
|
||||||
0x05, 0x52, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x06, 0x54, 0x4d, 0x52, 0x61, 0x6e,
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a,
|
||||||
0x6b, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x08, 0x52, 0x61, 0x6e, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x61, 0x6e,
|
0x08, 0x52, 0x61, 0x6e, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x69, 0x6e,
|
||||||
0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, 0x61, 0x6e,
|
0x6e, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x57, 0x69,
|
||||||
0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x4e,
|
0x6e, 0x6e, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x22, 0x6c, 0x0a, 0x0c, 0x53, 0x43, 0x54, 0x4d, 0x52,
|
||||||
0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72,
|
0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x18,
|
||||||
0x4e, 0x75, 0x6d, 0x22, 0x6c, 0x0a, 0x0c, 0x53, 0x43, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x4c,
|
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54,
|
||||||
0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
0x05, 0x52, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x52,
|
0x54, 0x69, 0x6d, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x54, 0x4d, 0x52,
|
||||||
0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x54, 0x69, 0x6d, 0x65,
|
0x61, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x75, 0x72,
|
||||||
0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x18,
|
0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x06, 0x54,
|
||||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65,
|
0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x38, 0x0a, 0x0a, 0x43, 0x53, 0x53, 0x69, 0x67, 0x6e, 0x52,
|
||||||
0x6e, 0x74, 0x2e, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x06, 0x54, 0x4d, 0x52, 0x61, 0x6e,
|
0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
|
||||||
0x6b, 0x22, 0x38, 0x0a, 0x0a, 0x43, 0x53, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x12,
|
0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x54,
|
||||||
0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x4d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x22,
|
||||||
0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x18,
|
0x64, 0x0a, 0x0a, 0x53, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x4d, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x0a, 0x53,
|
0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f,
|
||||||
0x43, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43,
|
0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65,
|
||||||
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
|
0x24, 0x0a, 0x0d, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65,
|
||||||
0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x57,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x61, 0x72,
|
||||||
0x61, 0x69, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
|
0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x49, 0x0a, 0x0d, 0x53, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x53,
|
||||||
0x28, 0x03, 0x52, 0x0d, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d,
|
0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75,
|
||||||
0x65, 0x22, 0x49, 0x0a, 0x0d, 0x53, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x4e,
|
0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d,
|
||||||
0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20,
|
0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x02,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x07, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d, 0x12, 0x1e, 0x0a, 0x0a,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d,
|
||||||
0x4d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
0x22, 0x25, 0x0a, 0x09, 0x53, 0x43, 0x54, 0x4d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x18, 0x0a,
|
||||||
0x52, 0x0a, 0x4d, 0x61, 0x78, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75, 0x6d, 0x22, 0x25, 0x0a, 0x09,
|
0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
|
||||||
0x53, 0x43, 0x54, 0x4d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x61, 0x74,
|
0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41,
|
||||||
0x63, 0x68, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4d, 0x61, 0x74, 0x63,
|
0x77, 0x61, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f,
|
||||||
0x68, 0x49, 0x64, 0x22, 0x6b, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64,
|
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d,
|
||||||
0x12, 0x30, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03,
|
0x65, 0x6e, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x49, 0x74,
|
||||||
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
|
0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02,
|
||||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e,
|
0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x44, 0x69,
|
||||||
0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
|
0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x44, 0x69, 0x61,
|
||||||
0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e,
|
0x6d, 0x6f, 0x6e, 0x64, 0x22, 0x88, 0x03, 0x0a, 0x0f, 0x53, 0x43, 0x50, 0x72, 0x6f, 0x6d, 0x6f,
|
||||||
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64,
|
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43,
|
||||||
0x22, 0x88, 0x03, 0x0a, 0x0f, 0x53, 0x43, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e,
|
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f,
|
||||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18,
|
0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x14,
|
0x05, 0x52, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x6e,
|
||||||
0x0a, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x52,
|
0x64, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x52, 0x6f, 0x75,
|
||||||
0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x69,
|
0x6e, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64,
|
||||||
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f,
|
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x3f,
|
||||||
0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01,
|
0x0a, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27,
|
||||||
0x28, 0x05, 0x52, 0x06, 0x52, 0x61, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x52, 0x65,
|
0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x43, 0x50, 0x72,
|
||||||
0x63, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x74, 0x6f, 0x75,
|
0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x6f,
|
||||||
0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x43, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74,
|
0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12,
|
||||||
0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x45, 0x6e,
|
0x18, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x74, 0x72, 0x79, 0x52, 0x06, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4d,
|
0x52, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x4d, 0x61, 0x74,
|
||||||
0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4d, 0x61,
|
0x63, 0x68, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28,
|
||||||
0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72,
|
0x05, 0x52, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f,
|
||||||
0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, 0x4d,
|
0x6e, 0x12, 0x33, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x08,
|
||||||
0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e,
|
||||||
0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
|
0x74, 0x2e, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x09, 0x52, 0x61, 0x6e,
|
||||||
0x32, 0x15, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x52, 0x61,
|
0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4e,
|
||||||
0x6e, 0x6b, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x41, 0x77, 0x61,
|
0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68,
|
||||||
0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x18,
|
0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x45, 0x6e,
|
||||||
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65,
|
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
|
||||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
0x10, 0x0a, 0x0e, 0x43, 0x53, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
||||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x10, 0x0a, 0x0e, 0x43,
|
0x6f, 0x22, 0x8c, 0x01, 0x0a, 0x0e, 0x53, 0x43, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e,
|
||||||
0x53, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x8c, 0x01,
|
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||||
0x0a, 0x0e, 0x53, 0x43, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
|
0x52, 0x02, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x54, 0x69,
|
||||||
0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64,
|
0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0f, 0x53,
|
||||||
0x12, 0x28, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74,
|
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e,
|
||||||
0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0f, 0x53, 0x65, 0x61, 0x73, 0x6f,
|
0x0a, 0x02, 0x4c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x16,
|
||||||
0x6e, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76,
|
0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x4c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x61,
|
0x4c, 0x61, 0x73, 0x74, 0x4c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x73, 0x41, 0x77, 0x61, 0x72,
|
||||||
0x73, 0x74, 0x4c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4c, 0x61, 0x73, 0x74,
|
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x49, 0x73, 0x41, 0x77, 0x61, 0x72, 0x64,
|
||||||
0x4c, 0x76, 0x12, 0x18, 0x0a, 0x07, 0x49, 0x73, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x05, 0x20,
|
0x22, 0x58, 0x0a, 0x0a, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x12,
|
||||||
0x01, 0x28, 0x08, 0x52, 0x07, 0x49, 0x73, 0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x58, 0x0a, 0x0a,
|
0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e,
|
||||||
0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e,
|
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x12,
|
0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61,
|
0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x04,
|
||||||
0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x53,
|
||||||
0x4c, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
|
0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x4a, 0x0a, 0x0e,
|
||||||
0x52, 0x04, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x53, 0x54, 0x4d, 0x53, 0x65,
|
0x53, 0x43, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x38,
|
||||||
0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x22, 0x4a, 0x0a, 0x0e, 0x53, 0x43, 0x54, 0x4d,
|
0x0a, 0x0b, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x06, 0x20,
|
||||||
0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x38, 0x0a, 0x0b, 0x52, 0x65,
|
0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74,
|
||||||
0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x2e, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0b, 0x52, 0x65, 0x61,
|
||||||
0x16, 0x2e, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x61,
|
0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x43, 0x53, 0x54, 0x4d,
|
||||||
0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x0b, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52,
|
0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c,
|
||||||
0x61, 0x6e, 0x6b, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x43, 0x53, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73,
|
0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x22, 0x35, 0x0a, 0x0f, 0x53,
|
||||||
0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x01, 0x20,
|
0x43, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e,
|
||||||
0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x22, 0x35, 0x0a, 0x0f, 0x53, 0x43, 0x54, 0x4d, 0x53,
|
0x0a, 0x02, 0x4c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x12,
|
||||||
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76,
|
0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f,
|
0x64, 0x65, 0x2a, 0xd9, 0x03, 0x0a, 0x0c, 0x54, 0x4f, 0x55, 0x52, 0x4e, 0x41, 0x4d, 0x45, 0x4e,
|
||||||
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x2a, 0xd9,
|
0x54, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d,
|
||||||
0x03, 0x0a, 0x0c, 0x54, 0x4f, 0x55, 0x52, 0x4e, 0x41, 0x4d, 0x45, 0x4e, 0x54, 0x49, 0x44, 0x12,
|
0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||||
0x12, 0x0a, 0x0e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x5a, 0x45, 0x52,
|
0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xb4, 0x15,
|
||||||
0x4f, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d,
|
0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43,
|
||||||
0x5f, 0x43, 0x53, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xb4, 0x15, 0x12, 0x18, 0x0a, 0x13,
|
0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x10, 0xb5, 0x15, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41,
|
||||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d, 0x49, 0x6e,
|
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b,
|
||||||
0x66, 0x6f, 0x73, 0x10, 0xb5, 0x15, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
0x4c, 0x69, 0x73, 0x74, 0x10, 0xb6, 0x15, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||||
0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74,
|
0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73,
|
||||||
0x10, 0xb6, 0x15, 0x12, 0x1b, 0x0a, 0x16, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d,
|
0x74, 0x10, 0xb7, 0x15, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54,
|
||||||
0x5f, 0x53, 0x43, 0x54, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xb7, 0x15,
|
0x4d, 0x5f, 0x43, 0x53, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x10, 0xb8, 0x15, 0x12,
|
||||||
0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53,
|
0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x53,
|
||||||
0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x10, 0xb8, 0x15, 0x12, 0x19, 0x0a, 0x14, 0x50,
|
0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x10, 0xb9, 0x15, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41,
|
||||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x53, 0x69, 0x67, 0x6e, 0x52,
|
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x69,
|
||||||
0x61, 0x63, 0x65, 0x10, 0xb9, 0x15, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
0x67, 0x6e, 0x4e, 0x75, 0x6d, 0x10, 0xba, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b,
|
||||||
0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x4e, 0x75,
|
0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f,
|
||||||
0x6d, 0x10, 0xba, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54,
|
0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xbb, 0x15, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b,
|
||||||
0x4d, 0x5f, 0x53, 0x43, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
|
0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x10,
|
||||||
0x6f, 0x10, 0xbb, 0x15, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54,
|
0xbc, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f,
|
||||||
0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x10, 0xbc, 0x15, 0x12, 0x1d,
|
0x43, 0x53, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xbf,
|
||||||
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53, 0x54, 0x4d,
|
0x15, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53,
|
||||||
0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xbf, 0x15, 0x12, 0x1d, 0x0a,
|
0x43, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xc0, 0x15,
|
||||||
0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d, 0x53,
|
0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53,
|
||||||
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xc0, 0x15, 0x12, 0x1d, 0x0a, 0x18,
|
0x54, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x10, 0xc1, 0x15, 0x12,
|
||||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53, 0x54, 0x4d, 0x53, 0x65,
|
0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54,
|
||||||
0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x10, 0xc1, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x50,
|
0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x10, 0xc2, 0x15, 0x12, 0x1e,
|
||||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d, 0x53, 0x65, 0x61,
|
0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53, 0x54, 0x4d,
|
||||||
0x73, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x10, 0xc2, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41,
|
0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xc3, 0x15, 0x12, 0x1e,
|
||||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x43, 0x53, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73,
|
0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d,
|
||||||
0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xc3, 0x15, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41,
|
0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xc4, 0x15, 0x2a, 0x90,
|
||||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x4d, 0x5f, 0x53, 0x43, 0x54, 0x4d, 0x53, 0x65, 0x61, 0x73,
|
0x01, 0x0a, 0x0c, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||||
0x6f, 0x6e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xc4, 0x15, 0x2a, 0x90, 0x01, 0x0a, 0x0c, 0x53,
|
0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00,
|
||||||
0x69, 0x67, 0x6e, 0x52, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x4f,
|
0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x10,
|
||||||
0x50, 0x52, 0x43, 0x5f, 0x53, 0x75, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b,
|
0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10,
|
||||||
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x10, 0x01, 0x12, 0x0e, 0x0a,
|
0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x49, 0x74, 0x65, 0x6d,
|
||||||
0x0a, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x10, 0x02, 0x12, 0x0f, 0x0a,
|
0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x54, 0x69, 0x6d, 0x65, 0x10,
|
||||||
0x0b, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x4e, 0x6f, 0x49, 0x74, 0x65, 0x6d, 0x10, 0x03, 0x12, 0x0d,
|
0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x05,
|
||||||
0x0a, 0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x54, 0x69, 0x6d, 0x65, 0x10, 0x04, 0x12, 0x0d, 0x0a,
|
0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64,
|
||||||
0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x43, 0x6f, 0x69, 0x6e, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c,
|
0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x46, 0x72, 0x65, 0x65, 0x10,
|
||||||
0x4f, 0x50, 0x52, 0x43, 0x5f, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x10, 0x06, 0x12, 0x0d,
|
0x07, 0x42, 0x2a, 0x5a, 0x28, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73,
|
||||||
0x0a, 0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x46, 0x72, 0x65, 0x65, 0x10, 0x07, 0x42, 0x2a, 0x5a,
|
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||||
0x28, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
|
0x6f, 0x6c, 0x2f, 0x74, 0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70,
|
||||||
0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x74,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x6f, 0x75, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -64,11 +64,10 @@ message TMInfo{
|
||||||
int32 SortId = 20;
|
int32 SortId = 20;
|
||||||
repeated string OnChannelName = 21;//在哪个渠道开启
|
repeated string OnChannelName = 21;//在哪个渠道开启
|
||||||
}
|
}
|
||||||
//比赛场场次
|
//比赛场场次 激战人数刷新也走这个
|
||||||
//PACKET_TM_SCTMInfos
|
//PACKET_TM_SCTMInfos
|
||||||
message SCTMInfos{
|
message SCTMInfos{
|
||||||
repeated TMInfo TMInfo = 1;//比赛场场次信息
|
repeated TMInfo TMInfo = 1;//比赛场场次信息
|
||||||
repeated int32 TypeList = 2; // 所有玩法类型 1.锦标赛 2.实物赛 3.vip比赛 4.话费赛
|
|
||||||
}
|
}
|
||||||
//单场次排行榜
|
//单场次排行榜
|
||||||
//PACKET_TM_CSTMRankList
|
//PACKET_TM_CSTMRankList
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -454,11 +454,6 @@ message GameMatchDateList{
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /game/match_type
|
|
||||||
message GameMatchType{
|
|
||||||
string Platform = 1;
|
|
||||||
repeated int32 List = 2; // 所有玩法类型 1.锦标赛 2.实物赛 3.vip比赛 4.话费赛
|
|
||||||
}
|
|
||||||
|
|
||||||
message WelfareDate {
|
message WelfareDate {
|
||||||
int32 Grade = 1; // 数量
|
int32 Grade = 1; // 数量
|
||||||
|
|
2
public
2
public
|
@ -1 +1 @@
|
||||||
Subproject commit 38b1c8928c52249a60d1340372a2d9bd6d2eee01
|
Subproject commit 549a622ad237392dddedae5d13456a06a8328fdd
|
|
@ -236,47 +236,17 @@ func CSInvite(s *netlib.Session, d *rankproto.GateTransmit, packetId int, data i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
f := func() {
|
pack := &rankproto.SCInvite{
|
||||||
pack := &rankproto.SCInvite{
|
Id: msg.GetId(),
|
||||||
Id: msg.GetId(),
|
Ranks: ranks,
|
||||||
Ranks: ranks,
|
Me: me,
|
||||||
Me: me,
|
Skip: msg.GetSkip(),
|
||||||
Skip: msg.GetSkip(),
|
IsEndNum: IsEndNum,
|
||||||
IsEndNum: IsEndNum,
|
RankMaxNum: model.GameParamData.RankInviteMaxNum,
|
||||||
RankMaxNum: model.GameParamData.RankInviteMaxNum,
|
|
||||||
}
|
|
||||||
|
|
||||||
common.SendToGate(sid, int(rankproto.Rank_PACKET_RANK_SCInvite), pack, s)
|
|
||||||
logger.Logger.Tracef("SCInvite: %v", pack)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询自己
|
common.SendToGate(sid, int(rankproto.Rank_PACKET_RANK_SCInvite), pack, s)
|
||||||
if me == nil {
|
logger.Logger.Tracef("SCInvite: %v", pack)
|
||||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
|
||||||
r, err := model.FindPlayerRankInviteScoreType(&model.FindPlayerRankInviteScoreArgs{
|
|
||||||
Platform: d.Platform,
|
|
||||||
RankType: msg.GetId(),
|
|
||||||
SnId: d.Snid,
|
|
||||||
})
|
|
||||||
if err != nil || r == nil {
|
|
||||||
logger.Logger.Errorf("FindPlayerRankInviteScoreType error: %v", err)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
me = &rankproto.InviteRank{
|
|
||||||
Snid: r.Data.SnId,
|
|
||||||
Name: r.Data.Name,
|
|
||||||
Rank: model.GameParamData.RankInviteMaxNum,
|
|
||||||
Score: r.Data.Score,
|
|
||||||
InviteNum: r.Data.InviteNum,
|
|
||||||
ModId: r.Data.ModId,
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
|
||||||
f()
|
|
||||||
}), "rank_invite_me").Start()
|
|
||||||
} else {
|
|
||||||
f()
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,6 @@ func CSSignRace(s *netlib.Session, packetid int, data interface{}, sid int64) er
|
||||||
pack.RetCode = code //0成功 1重复报名 2比赛没有开启 3道具不足 4不在报名时间段 5金币不足 6钻石不足
|
pack.RetCode = code //0成功 1重复报名 2比赛没有开启 3道具不足 4不在报名时间段 5金币不足 6钻石不足
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Logger.Infof("player(%v) match(%v) SignUp is ok.", p.SnId, tmId)
|
|
||||||
|
|
||||||
if code == int32(tournament.SignRaceCode_OPRC_Close) ||
|
if code == int32(tournament.SignRaceCode_OPRC_Close) ||
|
||||||
code == int32(tournament.SignRaceCode_OPRC_Time) {
|
code == int32(tournament.SignRaceCode_OPRC_Time) {
|
||||||
TournamentMgr.CancelSignUpAll(platform, tmId)
|
TournamentMgr.CancelSignUpAll(platform, tmId)
|
||||||
|
@ -75,7 +73,7 @@ func CSSignRace(s *netlib.Session, packetid int, data interface{}, sid int64) er
|
||||||
logger.Logger.Trace("SCSignRace ", pack)
|
logger.Logger.Trace("SCSignRace ", pack)
|
||||||
|
|
||||||
// 检查是否可以开始比赛(关闭机器人时,比赛开赛)
|
// 检查是否可以开始比赛(关闭机器人时,比赛开赛)
|
||||||
if code == 0 && signSucc && !TournamentMgr.IsUseRobot(platform, tmId, 0) {
|
if code == 0 && signSucc && !TournamentMgr.IsUseRobot(platform, tmId) {
|
||||||
if TournamentMgr.CanStart(platform, tmId) {
|
if TournamentMgr.CanStart(platform, tmId) {
|
||||||
TournamentMgr.Start(platform, tmId)
|
TournamentMgr.Start(platform, tmId)
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,6 @@ func init() {
|
||||||
etcd.Register(etcd.ETCDKEY_GAME_NOTICE, webapi.CommonNoticeList{}, platformConfigEvent)
|
etcd.Register(etcd.ETCDKEY_GAME_NOTICE, webapi.CommonNoticeList{}, platformConfigEvent)
|
||||||
// 比赛配置
|
// 比赛配置
|
||||||
etcd.Register(etcd.ETCDKEY_GAME_MATCH, webapi.GameMatchDateList{}, platformConfigEvent)
|
etcd.Register(etcd.ETCDKEY_GAME_MATCH, webapi.GameMatchDateList{}, platformConfigEvent)
|
||||||
// 比赛场类型
|
|
||||||
etcd.Register(etcd.ETCDKEY_GAME_MATCH_TYPE, webapi.GameMatchType{}, platformConfigEvent)
|
|
||||||
// 个人水池配置
|
// 个人水池配置
|
||||||
etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, platformConfigEvent)
|
etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, platformConfigEvent)
|
||||||
// 商品兑换
|
// 商品兑换
|
||||||
|
@ -156,12 +154,6 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
||||||
} else {
|
} else {
|
||||||
TournamentMgr.UpdateData(false, config)
|
TournamentMgr.UpdateData(false, config)
|
||||||
}
|
}
|
||||||
case *webapi.GameMatchType:
|
|
||||||
if isInit {
|
|
||||||
TournamentMgr.UpdateTypeList(true, config)
|
|
||||||
} else {
|
|
||||||
TournamentMgr.UpdateTypeList(false, config)
|
|
||||||
}
|
|
||||||
case *webapi.ChannelSwitchConfig:
|
case *webapi.ChannelSwitchConfig:
|
||||||
PlatformMgrSingleton.GetConfig(config.Platform).ChannelSwitch[config.GetTp()] = config
|
PlatformMgrSingleton.GetConfig(config.Platform).ChannelSwitch[config.GetTp()] = config
|
||||||
if !isInit {
|
if !isInit {
|
||||||
|
|
|
@ -30,12 +30,9 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// 如果这里比赛类型没有,默认是锦标赛
|
MatchTypeNormal = 1 // 锦标赛
|
||||||
MatchTypeNormal = iota + 1 // 锦标赛
|
MatchTypeChampion = 2 // 冠军赛
|
||||||
MatchTypeChampion // 冠军赛/实物赛
|
MatchTypeVIP = 3 // vip比赛
|
||||||
MatchTypeVIP // vip比赛
|
|
||||||
MatchTypePhone // 话费赛
|
|
||||||
MatchTypeMax // 最大比赛类型
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -84,7 +81,6 @@ type PlayerRoundInfo struct {
|
||||||
|
|
||||||
type Tournament struct {
|
type Tournament struct {
|
||||||
BaseClockSinker
|
BaseClockSinker
|
||||||
TypeList map[string][]int32 // 比赛类型列表 平台id:比赛类型
|
|
||||||
GameMatchDateList map[string]map[int32]*webapiproto.GameMatchDate // 比赛配置,platform:比赛场配置id:比赛配置
|
GameMatchDateList map[string]map[int32]*webapiproto.GameMatchDate // 比赛配置,platform:比赛场配置id:比赛配置
|
||||||
singleSignupPlayers map[int32]*SignupInfo // 开启机器人时,报名的玩家,玩家Id:报名信息
|
singleSignupPlayers map[int32]*SignupInfo // 开启机器人时,报名的玩家,玩家Id:报名信息
|
||||||
signupPlayers map[string]map[int32]*SignInfo // 报名的玩家 platform:比赛配置id:报名人
|
signupPlayers map[string]map[int32]*SignInfo // 报名的玩家 platform:比赛配置id:报名人
|
||||||
|
@ -97,7 +93,6 @@ type Tournament struct {
|
||||||
|
|
||||||
func NewTournament() *Tournament {
|
func NewTournament() *Tournament {
|
||||||
ret := &Tournament{
|
ret := &Tournament{
|
||||||
TypeList: make(map[string][]int32),
|
|
||||||
GameMatchDateList: make(map[string]map[int32]*webapiproto.GameMatchDate),
|
GameMatchDateList: make(map[string]map[int32]*webapiproto.GameMatchDate),
|
||||||
singleSignupPlayers: make(map[int32]*SignupInfo),
|
singleSignupPlayers: make(map[int32]*SignupInfo),
|
||||||
signupPlayers: make(map[string]map[int32]*SignInfo),
|
signupPlayers: make(map[string]map[int32]*SignInfo),
|
||||||
|
@ -250,53 +245,8 @@ func (this *Tournament) UpdateData(init bool, data *webapiproto.GameMatchDateLis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Tournament) UpdateTypeList(init bool, data *webapiproto.GameMatchType) {
|
|
||||||
if data.Platform == "0" {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
isModify := false
|
|
||||||
d, ok := this.TypeList[data.Platform]
|
|
||||||
if !ok || len(d) != len(data.GetList()) {
|
|
||||||
this.TypeList[data.Platform] = data.GetList()
|
|
||||||
isModify = true
|
|
||||||
} else {
|
|
||||||
for k, v := range data.GetList() {
|
|
||||||
if d[k] != v {
|
|
||||||
this.TypeList[data.Platform] = data.GetList()
|
|
||||||
isModify = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if !isModify {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if !init {
|
|
||||||
//todo 优化
|
|
||||||
for _, v := range PlayerMgrSington.playerOfPlatform[data.Platform] {
|
|
||||||
pack := TournamentMgr.GetSCTMInfosPack(data.Platform, v.AppChannel)
|
|
||||||
v.SendToClient(int(tournament.TOURNAMENTID_PACKET_TM_SCTMInfos), pack)
|
|
||||||
logger.Logger.Trace("SCTMInfos UpdateTypeList", pack)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetMatchInfo 比赛配置
|
// GetMatchInfo 比赛配置
|
||||||
// !!!没有sortId会获取最新配置
|
func (this *Tournament) GetMatchInfo(platform string, tmId int32) *webapiproto.GameMatchDate {
|
||||||
func (this *Tournament) GetMatchInfo(platform string, tmId int32, sortId int64) *webapiproto.GameMatchDate {
|
|
||||||
if sortId > 0 {
|
|
||||||
v := this.matches[tmId]
|
|
||||||
if v != nil {
|
|
||||||
vv := v[sortId]
|
|
||||||
if vv != nil {
|
|
||||||
return vv.gmd
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
if list, ok := this.GameMatchDateList[platform]; ok {
|
if list, ok := this.GameMatchDateList[platform]; ok {
|
||||||
if gmd, ok1 := list[tmId]; ok1 {
|
if gmd, ok1 := list[tmId]; ok1 {
|
||||||
return gmd
|
return gmd
|
||||||
|
@ -307,7 +257,7 @@ func (this *Tournament) GetMatchInfo(platform string, tmId int32, sortId int64)
|
||||||
|
|
||||||
// MatchSwitch 比赛开关
|
// MatchSwitch 比赛开关
|
||||||
func (this *Tournament) MatchSwitch(platform string, tmId int32) bool {
|
func (this *Tournament) MatchSwitch(platform string, tmId int32) bool {
|
||||||
return this.IsMatchOn(this.GetMatchInfo(platform, tmId, 0))
|
return this.IsMatchOn(this.GetMatchInfo(platform, tmId))
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsMatchOn 比赛开关
|
// IsMatchOn 比赛开关
|
||||||
|
@ -316,8 +266,8 @@ func (this *Tournament) IsMatchOn(match *webapiproto.GameMatchDate) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsUseRobot 是否用机器人
|
// IsUseRobot 是否用机器人
|
||||||
func (this *Tournament) IsUseRobot(platform string, tmId int32, sortId int64) bool {
|
func (this *Tournament) IsUseRobot(platform string, tmId int32) bool {
|
||||||
return this.IsRobotOn(this.GetMatchInfo(platform, tmId, sortId))
|
return this.IsRobotOn(this.GetMatchInfo(platform, tmId))
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsRobotOn 是否用机器人
|
// IsRobotOn 是否用机器人
|
||||||
|
@ -437,7 +387,7 @@ func (this *Tournament) IsMatchWaiting(platform string, snId int32) (bool, int32
|
||||||
// 报名费用 0成功 3道具不足 5金币不足 6钻石不足 7免费次数不足
|
// 报名费用 0成功 3道具不足 5金币不足 6钻石不足 7免费次数不足
|
||||||
func (this *Tournament) signUpCost(p *Player, tmId int32, cost bool) (bool, int32) {
|
func (this *Tournament) signUpCost(p *Player, tmId int32, cost bool) (bool, int32) {
|
||||||
logger.Logger.Tracef("signUpCost 比赛id:%v 玩家:%v 报名:%v", tmId, p.SnId, cost)
|
logger.Logger.Tracef("signUpCost 比赛id:%v 玩家:%v 报名:%v", tmId, p.SnId, cost)
|
||||||
gmd := this.GetMatchInfo(p.Platform, tmId, 0)
|
gmd := this.GetMatchInfo(p.Platform, tmId)
|
||||||
if gmd == nil || p.IsRob {
|
if gmd == nil || p.IsRob {
|
||||||
return true, 0
|
return true, 0
|
||||||
}
|
}
|
||||||
|
@ -532,7 +482,7 @@ func (this *Tournament) signUpCost(p *Player, tmId int32, cost bool) (bool, int3
|
||||||
func (this *Tournament) SignUp(tmId int32, p *Player) (bool, int32) {
|
func (this *Tournament) SignUp(tmId int32, p *Player) (bool, int32) {
|
||||||
logger.Logger.Tracef("报名 比赛id:%v 玩家:%v", tmId, p.SnId)
|
logger.Logger.Tracef("报名 比赛id:%v 玩家:%v", tmId, p.SnId)
|
||||||
// 开启
|
// 开启
|
||||||
info := this.GetMatchInfo(p.Platform, tmId, 0)
|
info := this.GetMatchInfo(p.Platform, tmId)
|
||||||
if !this.IsMatchOn(info) {
|
if !this.IsMatchOn(info) {
|
||||||
return false, int32(tournament.SignRaceCode_OPRC_Close)
|
return false, int32(tournament.SignRaceCode_OPRC_Close)
|
||||||
}
|
}
|
||||||
|
@ -686,7 +636,7 @@ func (this *Tournament) ForceQuit(platform string, snId int32) {
|
||||||
func (this *Tournament) CanStart(platform string, tmId int32) bool {
|
func (this *Tournament) CanStart(platform string, tmId int32) bool {
|
||||||
if this.signupPlayers != nil && this.signupPlayers[platform] != nil {
|
if this.signupPlayers != nil && this.signupPlayers[platform] != nil {
|
||||||
if signInfo, ok := this.signupPlayers[platform][tmId]; ok {
|
if signInfo, ok := this.signupPlayers[platform][tmId]; ok {
|
||||||
matchInfo := this.GetMatchInfo(signInfo.Platform, tmId, 0)
|
matchInfo := this.GetMatchInfo(signInfo.Platform, tmId)
|
||||||
if matchInfo != nil {
|
if matchInfo != nil {
|
||||||
n := 0
|
n := 0
|
||||||
for _, v := range signInfo.signup {
|
for _, v := range signInfo.signup {
|
||||||
|
@ -719,7 +669,7 @@ func (this *Tournament) Start(platform string, tmId int32) {
|
||||||
this.matches[tmId] = make(map[int64]*TmMatch)
|
this.matches[tmId] = make(map[int64]*TmMatch)
|
||||||
}
|
}
|
||||||
|
|
||||||
matchInfo := this.GetMatchInfo(platform, tmId, 0)
|
matchInfo := this.GetMatchInfo(platform, tmId)
|
||||||
signInfo := this.signupPlayers[platform][tmId]
|
signInfo := this.signupPlayers[platform][tmId]
|
||||||
|
|
||||||
if matchInfo == nil || signInfo == nil || len(signInfo.signup) == 0 {
|
if matchInfo == nil || signInfo == nil || len(signInfo.signup) == 0 {
|
||||||
|
@ -1454,17 +1404,12 @@ func (this *Tournament) GetSCTMInfosPack(platform, channelName string) *tourname
|
||||||
pack.TMInfo = append(pack.TMInfo, tMInfo)
|
pack.TMInfo = append(pack.TMInfo, tMInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pack.TypeList = this.TypeList[platform]
|
|
||||||
}
|
}
|
||||||
return pack
|
return pack
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Tournament) MakeMatchLog(platform string, tmId int32, sortId int64) *model.MatchLog {
|
func (this *Tournament) MakeMatchLog(platform string, tmId int32, sortId int64) *model.MatchLog {
|
||||||
gameMatchDate := this.GetMatchInfo(platform, tmId, sortId)
|
gameMatchDate := this.GetMatchInfo(platform, tmId)
|
||||||
if gameMatchDate == nil {
|
|
||||||
logger.Logger.Errorf("MakeMatchLog gameMatchDate == nil tmId:%d sortId:%d", tmId, sortId)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
matchLog := model.NewMatchLog()
|
matchLog := model.NewMatchLog()
|
||||||
_, ok := this.roundPlayers[sortId]
|
_, ok := this.roundPlayers[sortId]
|
||||||
if !ok {
|
if !ok {
|
||||||
|
@ -1518,7 +1463,6 @@ func (this *Tournament) MakeMatchLog(platform string, tmId int32, sortId int64)
|
||||||
matchLog.GameFreeId = gameMatchDate.GameFreeId
|
matchLog.GameFreeId = gameMatchDate.GameFreeId
|
||||||
matchLog.StartTime = time.Unix(this.matches[tmId][sortId].StartTime, 0)
|
matchLog.StartTime = time.Unix(this.matches[tmId][sortId].StartTime, 0)
|
||||||
matchLog.EndTime = time.Now()
|
matchLog.EndTime = time.Now()
|
||||||
matchLog.SortId = sortId
|
|
||||||
return matchLog
|
return matchLog
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1551,7 +1495,7 @@ func (this *Tournament) Update() {
|
||||||
if info == nil || info.Ts <= 0 {
|
if info == nil || info.Ts <= 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
matchInfo := this.GetMatchInfo(info.Platform, info.TmId, 0)
|
matchInfo := this.GetMatchInfo(info.Platform, info.TmId)
|
||||||
if this.IsMatchOn(matchInfo) && !this.IsOutTime(matchInfo) && this.IsRobotOn(matchInfo) {
|
if this.IsMatchOn(matchInfo) && !this.IsOutTime(matchInfo) && this.IsRobotOn(matchInfo) {
|
||||||
needTime := this.playerWaitStart[snId]
|
needTime := this.playerWaitStart[snId]
|
||||||
if time.Now().Unix()-info.Ts > needTime {
|
if time.Now().Unix()-info.Ts > needTime {
|
||||||
|
|
Loading…
Reference in New Issue