Merge branch 'develop' of https://git.pogorockgames.com/mango-games/server/game into develop
This commit is contained in:
commit
9f4d1089cb
|
|
@ -77,3 +77,29 @@
|
|||
:<08><><18>阿<EFBFBD><E998BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>俛樗(<28>発<EFBFBD>%0d8<64>@<40><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>H璞<48><E7929E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>P
|
||||
;<08><><18>雉Ⅴ<E99B89><E285A4><EFBFBD><EFBFBD> <20><>片<EFBFBD>(<28>蓁〆0d8<64>@<40><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>H璞<48><E7929E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>P
|
||||
;<08><><18>跡球<E8B7A1><E79083><EFBFBD><EFBFBD> <20>凄<EFBFBD><E58784>:(<28><><EFBFBD><EFBFBD><EFBFBD>0d8<64>@<40><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>H璞<48><E7929E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>P
|
||||
ÑÛ·€›îÀ–± €ÚÄ XÈ` ÝŒ
|
||||
ÒÛ·€ŽÎ€áë €„¯_XÈ`À¤ÿ
|
||||
ÓÛ·€Æ†<C386>€åšw €”ëÜXÈ`À¶üš
|
||||
ÔÛ·€Œ<E282AC>ž€Êµî €¨Ö¹XÈ`€íøµ
|
||||
᩸€›îÀ–± €ÚÄ XÈ` ÝŒ
|
||||
⩸€ŽÎ€áë €„¯_XÈ`À¤ÿ
|
||||
㩸€Æ†<C386>€åšw €”ëÜXÈ`À¶üš
|
||||
䩸€Œ<E282AC>ž€Êµî €¨Ö¹XÈ`€íøµ
|
||||
ñ÷¸€›îÀ–± €ÚÄ XÈ` ÝŒ
|
||||
ò÷¸€ŽÎ€áë €„¯_XÈ`À¤ÿ
|
||||
ó÷¸€Æ†<C386>€åšw €”ëÜXÈ`À¶üš
|
||||
ô÷¸€Œ<E282AC>ž€Êµî €¨Ö¹XÈ`€íøµ
|
||||
<08>ƹ€›îÀ–± €„¯_XÈ` ÝŒ
|
||||
‚ƹ€Æ†<C386>€åšw €”ëÜXÈ`À¶üš
|
||||
ƒÆ¹€Œ<E282AC>ž€Êµî €¨Ö¹XÈ`€íøµ
|
||||
‘”º€›îÀ–± €„¯_XÈ` ÝŒ
|
||||
’”º€Æ†<C386>€åšw €”ëÜXÈ`À¶üš
|
||||
“”º€Œ<E282AC>ž€Êµî €¨Ö¹XÈ`€íøµ
|
||||
¡âº€›îÀ–± €ÚÄ XÈ` ÝŒ
|
||||
¢âº€ŽÎ€áë €„¯_XÈ`À¤ÿ
|
||||
£âº€Æ†<C386>€åšw €”ëÜXÈ`À¶üš
|
||||
¤âº€Œ<E282AC>ž€Êµî €¨Ö¹XÈ`€íøµ
|
||||
±°»€›îÀ–± €ÚÄ XÈ` ÝŒ
|
||||
²°»€ŽÎ€áë €„¯_XÈ`À¤ÿ
|
||||
³°»€Æ†<C386>€åšw €”ëÜXÈ`À¶üš
|
||||
´°»€Œ<E282AC>ž€Êµî €¨Ö¹XÈ`€íøµ
|
||||
|
|
@ -857,6 +857,214 @@
|
|||
"LowerOdds": -100,
|
||||
"LowerOddsMax": -800,
|
||||
"ProfitRate": 20
|
||||
},
|
||||
{
|
||||
"Id": 3010001,
|
||||
"InitValue": 6000000,
|
||||
"LowerLimit": 5000000,
|
||||
"UpperLimit": 20000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 6500000
|
||||
},
|
||||
{
|
||||
"Id": 3010002,
|
||||
"InitValue": 60000000,
|
||||
"LowerLimit": 50000000,
|
||||
"UpperLimit": 200000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 65000000
|
||||
},
|
||||
{
|
||||
"Id": 3010003,
|
||||
"InitValue": 300000000,
|
||||
"LowerLimit": 250000000,
|
||||
"UpperLimit": 1000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 325000000
|
||||
},
|
||||
{
|
||||
"Id": 3010004,
|
||||
"InitValue": 600000000,
|
||||
"LowerLimit": 500000000,
|
||||
"UpperLimit": 2000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 650000000
|
||||
},
|
||||
{
|
||||
"Id": 3020001,
|
||||
"InitValue": 6000000,
|
||||
"LowerLimit": 5000000,
|
||||
"UpperLimit": 20000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 6500000
|
||||
},
|
||||
{
|
||||
"Id": 3020002,
|
||||
"InitValue": 60000000,
|
||||
"LowerLimit": 50000000,
|
||||
"UpperLimit": 200000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 65000000
|
||||
},
|
||||
{
|
||||
"Id": 3020003,
|
||||
"InitValue": 300000000,
|
||||
"LowerLimit": 250000000,
|
||||
"UpperLimit": 1000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 325000000
|
||||
},
|
||||
{
|
||||
"Id": 3020004,
|
||||
"InitValue": 600000000,
|
||||
"LowerLimit": 500000000,
|
||||
"UpperLimit": 2000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 650000000
|
||||
},
|
||||
{
|
||||
"Id": 3030001,
|
||||
"InitValue": 6000000,
|
||||
"LowerLimit": 5000000,
|
||||
"UpperLimit": 20000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 6500000
|
||||
},
|
||||
{
|
||||
"Id": 3030002,
|
||||
"InitValue": 60000000,
|
||||
"LowerLimit": 50000000,
|
||||
"UpperLimit": 200000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 65000000
|
||||
},
|
||||
{
|
||||
"Id": 3030003,
|
||||
"InitValue": 300000000,
|
||||
"LowerLimit": 250000000,
|
||||
"UpperLimit": 1000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 325000000
|
||||
},
|
||||
{
|
||||
"Id": 3030004,
|
||||
"InitValue": 600000000,
|
||||
"LowerLimit": 500000000,
|
||||
"UpperLimit": 2000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 650000000
|
||||
},
|
||||
{
|
||||
"Id": 3040001,
|
||||
"InitValue": 6000000,
|
||||
"LowerLimit": 5000000,
|
||||
"UpperLimit": 200000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 6500000
|
||||
},
|
||||
{
|
||||
"Id": 3040002,
|
||||
"InitValue": 300000000,
|
||||
"LowerLimit": 250000000,
|
||||
"UpperLimit": 1000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 325000000
|
||||
},
|
||||
{
|
||||
"Id": 3040003,
|
||||
"InitValue": 600000000,
|
||||
"LowerLimit": 500000000,
|
||||
"UpperLimit": 2000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 650000000
|
||||
},
|
||||
{
|
||||
"Id": 3050001,
|
||||
"InitValue": 6000000,
|
||||
"LowerLimit": 5000000,
|
||||
"UpperLimit": 200000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 6500000
|
||||
},
|
||||
{
|
||||
"Id": 3050002,
|
||||
"InitValue": 300000000,
|
||||
"LowerLimit": 250000000,
|
||||
"UpperLimit": 1000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 325000000
|
||||
},
|
||||
{
|
||||
"Id": 3050003,
|
||||
"InitValue": 600000000,
|
||||
"LowerLimit": 500000000,
|
||||
"UpperLimit": 2000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 650000000
|
||||
},
|
||||
{
|
||||
"Id": 3060001,
|
||||
"InitValue": 6000000,
|
||||
"LowerLimit": 5000000,
|
||||
"UpperLimit": 20000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 6500000
|
||||
},
|
||||
{
|
||||
"Id": 3060002,
|
||||
"InitValue": 60000000,
|
||||
"LowerLimit": 50000000,
|
||||
"UpperLimit": 200000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 65000000
|
||||
},
|
||||
{
|
||||
"Id": 3060003,
|
||||
"InitValue": 300000000,
|
||||
"LowerLimit": 250000000,
|
||||
"UpperLimit": 1000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 325000000
|
||||
},
|
||||
{
|
||||
"Id": 3060004,
|
||||
"InitValue": 600000000,
|
||||
"LowerLimit": 500000000,
|
||||
"UpperLimit": 2000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 650000000
|
||||
},
|
||||
{
|
||||
"Id": 3070001,
|
||||
"InitValue": 6000000,
|
||||
"LowerLimit": 5000000,
|
||||
"UpperLimit": 20000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 6500000
|
||||
},
|
||||
{
|
||||
"Id": 3070002,
|
||||
"InitValue": 60000000,
|
||||
"LowerLimit": 50000000,
|
||||
"UpperLimit": 200000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 65000000
|
||||
},
|
||||
{
|
||||
"Id": 3070003,
|
||||
"InitValue": 300000000,
|
||||
"LowerLimit": 250000000,
|
||||
"UpperLimit": 1000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 325000000
|
||||
},
|
||||
{
|
||||
"Id": 3070004,
|
||||
"InitValue": 600000000,
|
||||
"LowerLimit": 500000000,
|
||||
"UpperLimit": 2000000000,
|
||||
"CtrlRate": 200,
|
||||
"InitNovicValue": 650000000
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
6у├ж├в├с├т├"║█ю└=
|
||||
6с├т├у├ж├в├"║█ю└=
|
||||
.نچۆ؆"¡<>À„=
|
||||
Wь├ы├т├у├в├ш├с├ж├з├" ║█─╜Б
|
||||
]в├ь├ы├з├э├с├т├у├ж├ш├"╒█Т
|
||||
Wс├ы├ш├ь├з├т├у├ж├в├" ║█─╜Б
|
||||
]з├с├т├у├ь├ы├ж├в├ш├э├"╒█Т
|
||||
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
|
@ -143,8 +143,10 @@ func newMgoSession(user, password, host string, port int32, options string) (s *
|
|||
// [mongodb://][user:pass@]host1[:port1][,host2[:port2],...][/database][?options]
|
||||
url := fmt.Sprintf("mongodb://%s%s:%d/admin%s", login, host, port, options)
|
||||
//fmt.Println(url)
|
||||
logger.Logger.Tracef("newMgoSession url:%s", url)
|
||||
session, err := mgo.Dial(url)
|
||||
if err != nil {
|
||||
logger.Logger.Errorf("newMgoSession err:%v", err)
|
||||
return nil, err
|
||||
}
|
||||
session.SetSafe(&mgo.Safe{})
|
||||
|
|
@ -240,7 +242,7 @@ func (msm *MgoSessionMgr) GetPltMgoSession(plt, key string) *Session {
|
|||
if c, ok := msm.GetCfg(plt, key); ok {
|
||||
s, err := newMgoSession(c.Username, c.Password, c.HostName, c.HostPort, c.Options)
|
||||
if s == nil || err != nil {
|
||||
logger.Logger.Error("GetPltMgoSession(%s,%s) err:%v", plt, key, err)
|
||||
logger.Logger.Errorf("GetPltMgoSession(%s,%s) err:%v config:%+v", plt, key, err, *c)
|
||||
return nil
|
||||
}
|
||||
ss := &Session{Session: s, cfg: c}
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
//水池设置
|
||||
coinPoolSetting := base.CoinPoolMgr.GetCoinPoolSetting(sceneEx.Platform, sceneEx.GetGameFreeId(), sceneEx.GroupId)
|
||||
//baseRate := coinPoolSetting.GetBaseRate() //基础赔率
|
||||
ctroRate := 500 //调节赔率 暗税系数
|
||||
ctroRate := coinPoolSetting.GetCtrlRate() //调节赔率 暗税系数
|
||||
//if baseRate >= 10000 || baseRate <= 0 || ctroRate < 0 || ctroRate >= 1000 || baseRate+ctroRate > 9900 {
|
||||
// logger.Logger.Warnf("AvengersErrorBaseRate [%v][%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, playerEx.spinID, baseRate, ctroRate)
|
||||
// baseRate = 9700
|
||||
|
|
@ -437,14 +437,14 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
jackpotRate := ctroRate //奖池系数
|
||||
logger.Logger.Tracef("AvengersRates [%v][%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, playerEx.spinID, taxRate, ctroRate)
|
||||
|
||||
//playerEx.IsFNovice(sceneEx.KeyGameId)
|
||||
isFoolPlayer := false
|
||||
playerEx.IsFNovice(sceneEx.KeyGameId)
|
||||
isFoolPlayer := playerEx.IsFoolPlayer[sceneEx.KeyGameId]
|
||||
var gamePoolCoin int64
|
||||
//if isFoolPlayer {
|
||||
// gamePoolCoin = base.CoinPoolMgr.GetNoviceCoinPool(sceneEx.GetGameFreeId(), sceneEx.Platform, sceneEx.GroupId) // 当前水池金额
|
||||
//} else {
|
||||
gamePoolCoin = base.CoinPoolMgr.GetCoin(sceneEx.GetGameFreeId(), sceneEx.Platform, sceneEx.GroupId) // 当前水池金额
|
||||
//}
|
||||
if isFoolPlayer {
|
||||
gamePoolCoin = base.CoinPoolMgr.GetNoviceCoin(sceneEx.GetGameFreeId(), sceneEx.Platform, sceneEx.GroupId) // 当前水池金额
|
||||
} else {
|
||||
gamePoolCoin = base.CoinPoolMgr.GetCoin(sceneEx.GetGameFreeId(), sceneEx.Platform, sceneEx.GroupId) // 当前水池金额
|
||||
}
|
||||
prizeFund := gamePoolCoin - sceneEx.jackpot.VirtualJK // 除去奖池的水池剩余金额
|
||||
|
||||
// 奖池参数
|
||||
|
|
@ -462,7 +462,7 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
//p.Statics(sceneEx.KeyGameId, sceneEx.KeyGamefreeId, -totalBetValue, true)
|
||||
if !p.IsRob && !sceneEx.Testing {
|
||||
// 推送金币
|
||||
sceneEx.PushCoinPool(prizeFundAdd, false)
|
||||
sceneEx.PushCoinPool(prizeFundAdd, isFoolPlayer)
|
||||
//base.CoinPoolMgr.PushCoin(sceneEx.GetGameFreeId(), sceneEx.GroupId, sceneEx.Platform, int64(float64(totalBetValue)*(float64(10000-ctroRate)/10000.0)))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ const (
|
|||
var CoinPoolMgr = &CoinPoolManager{
|
||||
CoinPool: new(sync.Map),
|
||||
ProfitPool: new(sync.Map),
|
||||
NoviceCoinPool: new(sync.Map),
|
||||
CoinPoolSetting: make(map[string]*webapi.CoinPoolSetting),
|
||||
curRunTime: make(map[string]int64),
|
||||
publicPond: new(sync.Map),
|
||||
|
|
@ -55,6 +56,9 @@ type CoinPoolManager struct {
|
|||
//收益池
|
||||
ProfitPoolDBKey string
|
||||
ProfitPool *sync.Map
|
||||
//新手池
|
||||
NoviceCoinPoolDBKey string
|
||||
NoviceCoinPool *sync.Map
|
||||
|
||||
dirty bool
|
||||
|
||||
|
|
@ -178,6 +182,20 @@ func (this *CoinPoolManager) getCoinPoolCoin(key string) int64 {
|
|||
return poolCoin
|
||||
}
|
||||
|
||||
// 获取调控池水位
|
||||
func (this *CoinPoolManager) getNoviceCoinPoolCoin(key string) int64 {
|
||||
poolValue, ok := this.NoviceCoinPool.Load(key)
|
||||
if !ok {
|
||||
return 0
|
||||
}
|
||||
poolCoin, ok := poolValue.(int64)
|
||||
if !ok {
|
||||
logger.Logger.Errorf("Error type convert in coinpoolmanager GetNoviceCoin:%v-%v", key, poolValue)
|
||||
return 0
|
||||
}
|
||||
return poolCoin
|
||||
}
|
||||
|
||||
// 减少调控池水位
|
||||
// 返回当前水位
|
||||
func (this *CoinPoolManager) popCoin(key string, coin int64) (bool, int64) {
|
||||
|
|
@ -210,6 +228,38 @@ func (this *CoinPoolManager) popCoin(key string, coin int64) (bool, int64) {
|
|||
return true, curValue
|
||||
}
|
||||
|
||||
// 减少调控池水位
|
||||
// 返回当前水位
|
||||
func (this *CoinPoolManager) popNoviceCoin(key string, coin int64) (bool, int64) {
|
||||
if this.getCoinPoolSetting(key).GetSwitch() == 1 {
|
||||
return false, 0
|
||||
}
|
||||
|
||||
poolValue, ok := this.NoviceCoinPool.Load(key)
|
||||
if !ok {
|
||||
return false, 0
|
||||
}
|
||||
poolCoin, ok := poolValue.(int64)
|
||||
if !ok {
|
||||
logger.Logger.Errorf("Error type convert in coinpoolmanager popNoviceCoin:%v-%v", key, poolValue)
|
||||
return false, 0
|
||||
}
|
||||
|
||||
//if poolCoin < coin {
|
||||
// return false
|
||||
//}
|
||||
|
||||
curValue := poolCoin - coin
|
||||
if curValue < -99999999 {
|
||||
curValue = -99999999
|
||||
}
|
||||
|
||||
this.NoviceCoinPool.Store(key, curValue)
|
||||
this.dirty = true
|
||||
logger.Logger.Infof("$$$$$$$$新手金币池 %v 取出 %v 金币,现有金币 %v.$$$$$$$$", key, coin, curValue)
|
||||
return true, curValue
|
||||
}
|
||||
|
||||
// 增加调控池水位
|
||||
// 返回当前水位
|
||||
func (this *CoinPoolManager) pushCoin(key string, coin int64) int64 {
|
||||
|
|
@ -236,6 +286,32 @@ func (this *CoinPoolManager) pushCoin(key string, coin int64) int64 {
|
|||
return poolCoin
|
||||
}
|
||||
|
||||
// 增加调控池水位
|
||||
// 返回当前水位
|
||||
func (this *CoinPoolManager) pushNoviceCoin(key string, coin int64) int64 {
|
||||
if this.getCoinPoolSetting(key).GetSwitch() == 1 {
|
||||
return 0
|
||||
}
|
||||
|
||||
poolValue, ok := this.NoviceCoinPool.Load(key)
|
||||
if !ok {
|
||||
this.NoviceCoinPool.Store(key, coin)
|
||||
this.dirty = true
|
||||
logger.Logger.Infof("$$$$$$$$新手金币池 %v 放入 %v 金币,现有金币 %v.$$$$$$$$", key, coin, coin)
|
||||
return coin
|
||||
}
|
||||
poolCoin, ok := poolValue.(int64)
|
||||
if !ok {
|
||||
logger.Logger.Errorf("NoviceCoin pool push error type value:%v-%v", key, poolValue)
|
||||
return 0
|
||||
}
|
||||
poolCoin += coin
|
||||
this.NoviceCoinPool.Store(key, poolCoin)
|
||||
this.dirty = true
|
||||
logger.Logger.Infof("$$$$$$$$新手金币池 %v 放入 %v 金币,现有金币 %v.$$$$$$$$", key, coin, poolCoin)
|
||||
return poolCoin
|
||||
}
|
||||
|
||||
// PopCoin 减少调控池水位
|
||||
func (this *CoinPoolManager) PopCoin(gameFreeId, groupId int32, platform string, coin int64) bool {
|
||||
if coin == 0 {
|
||||
|
|
@ -339,7 +415,15 @@ func (this *CoinPoolManager) UpdateCoinPoolSetting(setting *webapi.CoinPoolSetti
|
|||
if initValue != 0 { //初始化水池
|
||||
_, ok := this.CoinPool.Load(key)
|
||||
if !ok {
|
||||
this.pushCoin(key, int64(initValue))
|
||||
this.pushCoin(key, initValue)
|
||||
}
|
||||
}
|
||||
// 新手调控池初始化
|
||||
initValue = setting.GetInitNoviceValue()
|
||||
if initValue != 0 { //初始化水池
|
||||
_, ok := this.NoviceCoinPool.Load(key)
|
||||
if !ok {
|
||||
this.pushNoviceCoin(key, initValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -479,6 +563,18 @@ func (this *CoinPoolManager) Init() {
|
|||
} else {
|
||||
logger.Logger.Error("Unmarshal coin pool error:", err)
|
||||
}
|
||||
// 新手调控池
|
||||
this.NoviceCoinPoolDBKey = fmt.Sprintf("NoviceCoinPoolManager_Srv%v", common.GetSelfSrvId())
|
||||
data = model.GetStrKVGameData(this.NoviceCoinPoolDBKey)
|
||||
noviceCoinPool := make(map[string]int64)
|
||||
err = json.Unmarshal([]byte(data), &noviceCoinPool)
|
||||
if err == nil {
|
||||
for key, value := range noviceCoinPool {
|
||||
this.NoviceCoinPool.Store(key, value)
|
||||
}
|
||||
} else {
|
||||
logger.Logger.Error("Unmarshal novice coin pool error:", err)
|
||||
}
|
||||
// 收益池
|
||||
this.ProfitPoolDBKey = fmt.Sprintf("ProfitPoolManager_Srv%v", common.GetSelfSrvId())
|
||||
data = model.GetStrKVGameData(this.ProfitPoolDBKey)
|
||||
|
|
@ -525,6 +621,24 @@ func (this *CoinPoolManager) Save(asyn bool) {
|
|||
} else {
|
||||
logger.Logger.Error("Marshal coin pool error:", err)
|
||||
}
|
||||
// 新手调控池
|
||||
coinPool = make(map[string]int64)
|
||||
this.NoviceCoinPool.Range(func(key, value interface{}) bool {
|
||||
coinPool[key.(string)] = value.(int64)
|
||||
return true
|
||||
})
|
||||
buff, err = json.Marshal(coinPool)
|
||||
if err == nil {
|
||||
if asyn {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.UptStrKVGameData(this.NoviceCoinPoolDBKey, string(buff))
|
||||
}), nil, "UptStrKVGameData").Start()
|
||||
} else {
|
||||
model.UptStrKVGameData(this.NoviceCoinPoolDBKey, string(buff))
|
||||
}
|
||||
} else {
|
||||
logger.Logger.Error("Marshal novice coin pool error:", err)
|
||||
}
|
||||
// 收益池
|
||||
profitPool := make(map[string]int64)
|
||||
this.ProfitPool.Range(func(key, value interface{}) bool {
|
||||
|
|
@ -620,29 +734,80 @@ func (this *CoinPoolManager) GetCoinPoolStatesByPlatform(platform string, games
|
|||
return
|
||||
}
|
||||
|
||||
func (this *CoinPoolManager) pushCoinNovice(key string, coin int64) {
|
||||
}
|
||||
|
||||
func (this *CoinPoolManager) popCoinNovice(key string, coin int64) {
|
||||
|
||||
}
|
||||
|
||||
// PushCoinNovice 增加新手池水位
|
||||
func (this *CoinPoolManager) PushCoinNovice(gameFreeId, groupId int32, platform string, coin int64) {
|
||||
if coin == 0 {
|
||||
return
|
||||
}
|
||||
key := this.GenKey(gameFreeId, platform, groupId)
|
||||
this.pushCoinNovice(key, coin)
|
||||
poolVal := coin
|
||||
if coin > 0 { //处理收益池
|
||||
setting := this.getCoinPoolSetting(key)
|
||||
if setting != nil && setting.GetSwitch() == 0 {
|
||||
rate := this.GetProfitRate(setting)
|
||||
if rate != 0 { //负值也生效???
|
||||
profit := coin * int64(rate) / 1000
|
||||
this.AddProfitPool(key, profit)
|
||||
poolVal = coin - profit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.pushNoviceCoin(key, poolVal)
|
||||
return
|
||||
}
|
||||
|
||||
// PopCoinNovice 减少新手池水位
|
||||
func (this *CoinPoolManager) PopCoinNovice(gameFreeId, groupId int32, platform string, coin int64) {
|
||||
func (this *CoinPoolManager) PopCoinNovice(gameFreeId, groupId int32, platform string, coin int64) bool {
|
||||
if coin == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
key := this.GenKey(gameFreeId, platform, groupId)
|
||||
poolVal := coin
|
||||
if coin < 0 { //负值为收益
|
||||
setting := this.getCoinPoolSetting(key)
|
||||
if setting != nil && setting.GetSwitch() == 0 {
|
||||
rate := this.GetProfitRate(setting)
|
||||
if rate != 0 { //负值也生效???
|
||||
profit := coin * int64(rate) / 1000
|
||||
this.AddProfitPool(key, -profit)
|
||||
poolVal = coin - profit
|
||||
}
|
||||
}
|
||||
}
|
||||
ok, _ := this.popNoviceCoin(key, poolVal)
|
||||
if ok {
|
||||
dbGameFree := srvdata.PBDB_GameFreeMgr.GetData(gameFreeId)
|
||||
if dbGameFree != nil && dbGameFree.GetSceneType() != -1 { //非试玩场
|
||||
//保存数据
|
||||
//this.ReportCoinPoolRecEvent(gameFreeId, groupId, platform, -coin, curPoolVal, false)
|
||||
setting := this.GetCoinPoolSetting(platform, gameFreeId, groupId)
|
||||
if setting != nil {
|
||||
poolValue, ok := this.NoviceCoinPool.Load(key)
|
||||
if ok {
|
||||
poolCoin, ok := poolValue.(int64)
|
||||
if ok {
|
||||
if int64(setting.GetLowerLimit()) > poolCoin {
|
||||
WarningCoinPool(Warning_CoinPoolLow, gameFreeId)
|
||||
}
|
||||
|
||||
if poolCoin < 0 {
|
||||
WarningCoinPool(Warning_CoinPoolZero, gameFreeId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// GetNoviceCoin 获取新手池水位
|
||||
func (this *CoinPoolManager) GetNoviceCoin(gameFreeId int32, platform string, groupId int32) int64 {
|
||||
return 0
|
||||
key := this.GenKey(gameFreeId, platform, groupId)
|
||||
return this.getNoviceCoinPoolCoin(key)
|
||||
}
|
||||
|
||||
// IsMaxOutHaveEnough 判定是否满足出分,out 为负值是出分,正值为收分
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ func platformConfigEtcd(ctx context.Context, completeKey string, isInit bool, ev
|
|||
}
|
||||
switch d := data.(type) {
|
||||
case *webapi.PlayerPool:
|
||||
ConfigMgrInst.GetAllConfig(d.Platform).PlayerPool = d
|
||||
ConfigMgrInst.GetConfig(d.Platform).PlayerPool = d
|
||||
case *webapi.GameConfig:
|
||||
ConfigMgrInst.GetAllConfig(d.Platform).GameConfig = d
|
||||
ConfigMgrInst.GetConfig(d.Platform).GameConfig = d
|
||||
case *webapi.WelfareCollectConfig:
|
||||
ConfigMgrInst.GetAllConfig(d.Platform).WelfareCollectConfig = d
|
||||
ConfigMgrInst.GetConfig(d.Platform).WelfareCollectConfig = d
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,45 +0,0 @@
|
|||
package base
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
)
|
||||
|
||||
var PlatformConfigSingleton = &PlatformConfigMgr{
|
||||
Platforms: make(map[string]*PlatformConfig),
|
||||
}
|
||||
|
||||
type PlatformConfig struct {
|
||||
PlayerPool *webapi.PlayerPool
|
||||
GameConfig *webapi.GameConfig
|
||||
}
|
||||
|
||||
type PlatformConfigMgr struct {
|
||||
Platforms map[string]*PlatformConfig //key 是平台标记
|
||||
}
|
||||
|
||||
func (this *PlatformConfigMgr) Get(plt string) *PlatformConfig {
|
||||
ret, ok := this.Platforms[plt]
|
||||
if !ok {
|
||||
ret = new(PlatformConfig)
|
||||
this.Platforms[plt] = ret
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (this *PlatformConfigMgr) Update(config any) {
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
|
||||
switch v := config.(type) {
|
||||
case *webapi.PlayerPool:
|
||||
this.Get(v.GetPlatform()).PlayerPool = v
|
||||
|
||||
case *webapi.GameConfig:
|
||||
this.Get(v.GetPlatform()).GameConfig = v
|
||||
|
||||
default:
|
||||
logger.Logger.Error("Update config type error")
|
||||
}
|
||||
}
|
||||
|
|
@ -2376,7 +2376,7 @@ func (this *Scene) TryBillExGameDrop(p *Player) {
|
|||
|
||||
// DropCollectBox 掉落集卡礼盒
|
||||
func (this *Scene) DropCollectBox(p *Player) {
|
||||
if p == nil || p.IsRob || ConfigMgrInst.GetAllConfig(p.Platform).WelfareCollectConfig.Switch != model.WelfareOpen {
|
||||
if p == nil || p.IsRob || ConfigMgrInst.GetConfig(p.Platform).WelfareCollectConfig.Switch != model.WelfareOpen {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -2436,7 +2436,7 @@ func (this *Scene) GetBaseScore() int32 {
|
|||
}
|
||||
|
||||
func (this *Scene) PlayerPoolOdds(p *Player) int32 {
|
||||
config := PlatformConfigSingleton.Get(p.Platform).PlayerPool
|
||||
config := ConfigMgrInst.GetConfig(p.Platform).PlayerPool
|
||||
if config == nil {
|
||||
return 0
|
||||
}
|
||||
|
|
@ -2490,7 +2490,7 @@ func (this *Scene) GetPlayerOdds(p *Player, gameId int, hasRobot bool) int32 {
|
|||
// 场次水池概率
|
||||
f = CoinPoolMgr.GetCoinPoolOdds(this.Platform, this.GetGameFreeId(), this.GroupId)
|
||||
|
||||
cfg := PlatformConfigSingleton.Get(p.Platform).PlayerPool
|
||||
cfg := ConfigMgrInst.GetConfig(p.Platform).PlayerPool
|
||||
if cfg != nil && cfg.PlayerPoolSwitch {
|
||||
if g > 0 {
|
||||
t = f + (1000-f)*g/1000
|
||||
|
|
@ -2707,7 +2707,7 @@ func (this *Scene) Statistics(param *StaticParam) {
|
|||
|
||||
// 个人输赢统计条件(个人水池)
|
||||
// 黑白名单和新手调控,溢出金币统计到个人水池
|
||||
cfg := PlatformConfigSingleton.Get(p.Platform).PlayerPool
|
||||
cfg := ConfigMgrInst.GetConfig(p.Platform).PlayerPool
|
||||
isPlayerPool := cfg != nil && cfg.PlayerPoolSwitch && isControl && ((wbLevel == 0 && !isNovice) || addGain > 0)
|
||||
if isPlayerPool {
|
||||
keyGameType := common.GetKeyGameType(int(this.GetDBGameFree().GetGameType()))
|
||||
|
|
|
|||
|
|
@ -1184,7 +1184,7 @@ func (this *TienLenSceneData) SendHandCardOdds() {
|
|||
}
|
||||
}
|
||||
|
||||
gameConfig := base.PlatformConfigSingleton.Get(this.Platform).GameConfig
|
||||
gameConfig := base.ConfigMgrInst.GetConfig(this.Platform).GameConfig
|
||||
|
||||
// testPokers 用于测试
|
||||
isTestPoker := false
|
||||
|
|
@ -1228,7 +1228,7 @@ func (this *TienLenSceneData) SendHandCardOdds() {
|
|||
logger.Logger.Tracef("TienLen SendHandCardOdds Good:%v G:%v Bad:%v B:%v", isGood, G, isBad, B)
|
||||
|
||||
if isBad && !isTestPoker && len(robotPlayers) > 0 && !noviceCtrl && !noviceTianHu {
|
||||
gf := base.PlatformConfigSingleton.Get(this.Platform).GameConfig
|
||||
gf := base.ConfigMgrInst.GetConfig(this.Platform).GameConfig
|
||||
items := []int32{gf.GetTianHu(), gf.GetPaiKu(), gf.GetFenCha()}
|
||||
score := this.RandInt(int(gf.GetTianHu() + gf.GetPaiKu() + gf.GetFenCha()))
|
||||
sum := int32(0)
|
||||
|
|
|
|||
|
|
@ -504,6 +504,15 @@ func TienLenCreateRoomInfoPacket(s *base.Scene, p *base.Player, sceneEx *TienLen
|
|||
pack.LastDelCards = append(pack.LastDelCards, lastDelCard)
|
||||
insertNum++
|
||||
}
|
||||
|
||||
for _, cards := range sceneEx.card_play_action_seq_int32 {
|
||||
for _, card := range cards {
|
||||
if card >= 0 {
|
||||
pack.OutCardRecord = append(pack.OutCardRecord, card)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
proto.SetDefaults(pack)
|
||||
return pack
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,20 +20,22 @@ var (
|
|||
var CoinPoolSettingDatas = make(map[string]*CoinPoolSetting)
|
||||
|
||||
type CoinPoolSetting struct {
|
||||
Id bson.ObjectId `bson:"_id"`
|
||||
Platform string // 平台id
|
||||
GameFreeId int32 // 游戏id
|
||||
GroupId int32 // 组id
|
||||
ServerId int32 // 服务器id
|
||||
InitValue int64 // 初始库存值
|
||||
LowerLimit int64 // 库存下限
|
||||
UpperLimit int64 // 库存上限
|
||||
QuDu int64 // 曲度值
|
||||
UpperOdds int32 // 上线初始概率
|
||||
UpperOddsMax int32 // 上线最大概率
|
||||
LowerOdds int32 // 下线初始概率
|
||||
LowerOddsMax int32 // 下线最大概率
|
||||
ProfitRate int32 // 收益抽取比例
|
||||
Id bson.ObjectId `bson:"_id"`
|
||||
Platform string // 平台id
|
||||
GameFreeId int32 // 游戏id
|
||||
GroupId int32 // 组id
|
||||
ServerId int32 // 服务器id
|
||||
InitValue int64 // 初始库存值
|
||||
LowerLimit int64 // 库存下限
|
||||
UpperLimit int64 // 库存上限
|
||||
QuDu int64 // 曲度值
|
||||
UpperOdds int32 // 上线初始概率
|
||||
UpperOddsMax int32 // 上线最大概率
|
||||
LowerOdds int32 // 下线初始概率
|
||||
LowerOddsMax int32 // 下线最大概率
|
||||
ProfitRate int32 // 收益抽取比例
|
||||
CtrlRate int32 // 调节赔率
|
||||
InitNoviceValue int64 // 新手初始库存值
|
||||
// 扩展参数
|
||||
ResetTime int64 // 重置时间
|
||||
UptTime time.Time // 更新时间
|
||||
|
|
@ -57,6 +59,8 @@ func NewCoinPoolSetting(platform string, groupId, gamefreeid, srverId int32, db
|
|||
cl.ProfitRate = db.ProfitRate
|
||||
cl.ResetTime = time.Now().Unix()
|
||||
cl.UptTime = time.Now()
|
||||
cl.CtrlRate = db.CtrlRate
|
||||
cl.InitNoviceValue = db.InitNovicValue
|
||||
return cl
|
||||
}
|
||||
|
||||
|
|
|
|||
164
model/config.go
164
model/config.go
|
|
@ -1,6 +1,9 @@
|
|||
package model
|
||||
|
||||
import webapiproto "mongo.games.com/game/protocol/webapi"
|
||||
import (
|
||||
"mongo.games.com/game/protocol/shop"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
)
|
||||
|
||||
/*
|
||||
通用模型定义在这里,如果需要自定义可以内嵌在新结构体中
|
||||
|
|
@ -22,57 +25,170 @@ const (
|
|||
WelfareClose = 2 // 关闭
|
||||
)
|
||||
|
||||
func NewConfigMgr() *ConfigMgr {
|
||||
return &ConfigMgr{
|
||||
Platform: make(map[string]*AllConfig),
|
||||
Global: new(GlobalConfig),
|
||||
}
|
||||
type ShopInfo struct {
|
||||
Id int32 // 商品ID
|
||||
Page int32 // 页面 1,金币页面 2,钻石页面 3,道具页面
|
||||
Order int32 // 排序 页面内商品的位置排序
|
||||
Location []int32 // 显示位置 第1位,竖版大厅 第2位,Tienlen1级选场 第3位,捕鱼1级选场
|
||||
Picture string // 图片id
|
||||
Name string // 名称
|
||||
Label []int32 // 标签
|
||||
Ad int32 // 是否观看广告 0不看
|
||||
AdTime int32 // 观看几次广告
|
||||
RepeatTimes int32 // 领取次数
|
||||
CoolingTime []int32 // 观看冷却时间
|
||||
Type int32 // 获得类型 1,金币 2,钻石 3,道具类型
|
||||
Amount int64 // 获得数量
|
||||
AddArea []int32 // 加送百分比(比如加送10%,就配置110)
|
||||
ItemId int32 // 获得道具ID
|
||||
AddItemInfo []*shop.ItemInfo // 获得道具
|
||||
ConstType int32 // 购买消耗类型 1,金币 2,钻石 3,美金 4,柬埔寨币
|
||||
CostArea []int32 // 消耗数量区间
|
||||
VipLevel int32 //Vip等级限制
|
||||
Ratio int32 //权重
|
||||
EndTime int32 //新手礼包结束时间间隔
|
||||
//缓存数据
|
||||
AdLookedNum int32 //已经观看的次数
|
||||
AdReceiveNum int32 //已经领取的次数
|
||||
RemainingTime int32
|
||||
LastLookTime int32
|
||||
RoleAdded int32
|
||||
PetAdded int32
|
||||
RoleAddedId int32 //加成人物ID
|
||||
PetAddedId int32 //加成宠物ID
|
||||
FirstSwitch bool // 首冲翻倍
|
||||
AmountFinal int64 // 实际获得数量
|
||||
}
|
||||
|
||||
type AllConfig struct {
|
||||
// 平台配置
|
||||
Platform *webapi.Platform
|
||||
// 客户端游戏入口开关
|
||||
EntrySwitch *webapi.EntrySwitch
|
||||
// 公告
|
||||
CommonNotices *webapi.CommonNoticeList
|
||||
// 七日签到
|
||||
*webapiproto.Welfare7SignDateList
|
||||
*webapi.Welfare7SignDateList
|
||||
// 转盘
|
||||
*webapiproto.WelfareTurnplateDateList
|
||||
*webapi.WelfareTurnplateDateList
|
||||
// 盲盒
|
||||
*webapiproto.WelfareBlindBoxDataList
|
||||
*webapi.WelfareBlindBoxDataList
|
||||
BlindBoxCycle int32
|
||||
// 首充
|
||||
*webapiproto.WelfareFirstPayDataList
|
||||
*webapi.WelfareFirstPayDataList
|
||||
FirstPayCycle int32
|
||||
// 连续充值
|
||||
*webapiproto.WelfareContinuousPayDataList
|
||||
*webapi.WelfareContinuousPayDataList
|
||||
ContinuousPayCycle int32
|
||||
// 积分换手机
|
||||
*webapiproto.WelfarePhoneLotteryStatus
|
||||
*webapi.WelfarePhoneLotteryStatus
|
||||
// 集卡活动
|
||||
*webapiproto.WelfareCollectConfig
|
||||
*webapi.WelfareCollectConfig
|
||||
// 个人水池
|
||||
*webapiproto.PlayerPool
|
||||
*webapi.PlayerPool
|
||||
// 游戏调控全局配置
|
||||
*webapiproto.GameConfig
|
||||
*webapi.GameConfig
|
||||
// 兑换商品
|
||||
*webapi.ExchangeShopList
|
||||
// 商店
|
||||
ShopInfos map[int32]*ShopInfo // 商品id:商品信息
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
// 包对应的平台,包标识
|
||||
PackageList map[string]*webapi.AppInfo
|
||||
// 超管平台游戏开关,游戏id
|
||||
GameStatus map[int32]bool
|
||||
}
|
||||
|
||||
type ConfigMgr struct {
|
||||
Platform map[string]*AllConfig
|
||||
Global *GlobalConfig
|
||||
platform map[string]*AllConfig
|
||||
global *GlobalConfig
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) GetAllConfig(platform string) *AllConfig {
|
||||
c, ok := cm.Platform[platform]
|
||||
func NewConfigMgr() *ConfigMgr {
|
||||
return &ConfigMgr{
|
||||
platform: make(map[string]*AllConfig),
|
||||
}
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) GetConfig(platform string) *AllConfig {
|
||||
c, ok := cm.platform[platform]
|
||||
if !ok {
|
||||
c = &AllConfig{}
|
||||
cm.Platform[platform] = c
|
||||
c = &AllConfig{
|
||||
// todo 初始化默认值
|
||||
ShopInfos: make(map[int32]*ShopInfo),
|
||||
}
|
||||
cm.platform[platform] = c
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) GetGlobalConfig() *GlobalConfig {
|
||||
if cm.Global == nil {
|
||||
cm.Global = new(GlobalConfig)
|
||||
if cm.global == nil {
|
||||
cm.global = &GlobalConfig{
|
||||
// todo 初始化默认值
|
||||
PackageList: make(map[string]*webapi.AppInfo),
|
||||
GameStatus: make(map[int32]bool),
|
||||
}
|
||||
}
|
||||
return cm.Global
|
||||
return cm.global
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) GetConfigs() map[string]*AllConfig {
|
||||
return cm.platform
|
||||
}
|
||||
|
||||
// UpdateItemShop 更新商品信息
|
||||
func (cm *ConfigMgr) UpdateItemShop(list *webapi.ItemShopList) {
|
||||
if list == nil {
|
||||
return
|
||||
}
|
||||
|
||||
shopInfos := make(map[int32]*ShopInfo)
|
||||
for _, itemShop := range list.List {
|
||||
var itemInfo []*shop.ItemInfo
|
||||
for key, value := range itemShop.Award {
|
||||
itemInfo = append(itemInfo, &shop.ItemInfo{
|
||||
ItemId: int32(key),
|
||||
ItemNum: value,
|
||||
})
|
||||
}
|
||||
|
||||
shopInfos[itemShop.Id] = &ShopInfo{
|
||||
Id: itemShop.Id,
|
||||
ItemId: itemShop.ItemId,
|
||||
Page: itemShop.Page,
|
||||
Order: itemShop.Order,
|
||||
Type: itemShop.Type,
|
||||
Location: itemShop.Location,
|
||||
Picture: itemShop.Picture,
|
||||
Name: itemShop.Name,
|
||||
Ad: itemShop.Ad,
|
||||
AdTime: itemShop.AdTime,
|
||||
RepeatTimes: itemShop.RepeatTimes,
|
||||
CoolingTime: itemShop.CoolingTime,
|
||||
Label: itemShop.Label,
|
||||
AddArea: itemShop.AddArea,
|
||||
Amount: int64(itemShop.Amount),
|
||||
ConstType: itemShop.ConstType,
|
||||
CostArea: itemShop.CostArea,
|
||||
AddItemInfo: itemInfo,
|
||||
VipLevel: itemShop.VipLevel,
|
||||
Ratio: itemShop.Ratio,
|
||||
EndTime: itemShop.EndTime,
|
||||
FirstSwitch: itemShop.FirstSwitch,
|
||||
}
|
||||
}
|
||||
cm.GetConfig(list.Platform).ShopInfos = shopInfos
|
||||
}
|
||||
|
||||
// GetShopInfo 获取商品信息
|
||||
func (cm *ConfigMgr) GetShopInfo(plt string, shopId int32) *ShopInfo {
|
||||
if shops := cm.GetConfig(plt).ShopInfos; shops != nil {
|
||||
if info, ok1 := shops[shopId]; ok1 {
|
||||
return info
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -681,6 +681,10 @@ message DB_GameCoinPool {
|
|||
|
||||
int32 ProfitRate = 10;
|
||||
|
||||
int32 CtrlRate = 11;
|
||||
|
||||
int64 InitNovicValue = 12;
|
||||
|
||||
}
|
||||
|
||||
message DB_GameCoinPoolArray {
|
||||
|
|
|
|||
|
|
@ -488,9 +488,10 @@ type SCTienLenRoomInfo struct {
|
|||
NextNeed int32 `protobuf:"varint,25,opt,name=NextNeed,proto3" json:"NextNeed,omitempty"` //前多少名可以晋级下一轮
|
||||
MatchFinals int32 `protobuf:"varint,26,opt,name=MatchFinals,proto3" json:"MatchFinals,omitempty"` //0晋级赛 1半决赛 2是总决赛
|
||||
// 比赛场相关
|
||||
RankType int32 `protobuf:"varint,27,opt,name=RankType,proto3" json:"RankType,omitempty"` // 排位类型
|
||||
SceneAdd int32 `protobuf:"varint,28,opt,name=SceneAdd,proto3" json:"SceneAdd,omitempty"` // 场次加成(百分比)
|
||||
RecordId string `protobuf:"bytes,29,opt,name=RecordId,proto3" json:"RecordId,omitempty"` // 牌局ID
|
||||
RankType int32 `protobuf:"varint,27,opt,name=RankType,proto3" json:"RankType,omitempty"` // 排位类型
|
||||
SceneAdd int32 `protobuf:"varint,28,opt,name=SceneAdd,proto3" json:"SceneAdd,omitempty"` // 场次加成(百分比)
|
||||
RecordId string `protobuf:"bytes,29,opt,name=RecordId,proto3" json:"RecordId,omitempty"` // 牌局ID
|
||||
OutCardRecord []int32 `protobuf:"varint,30,rep,packed,name=OutCardRecord,proto3" json:"OutCardRecord,omitempty"` //已打出去的牌
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) Reset() {
|
||||
|
|
@ -707,6 +708,13 @@ func (x *SCTienLenRoomInfo) GetRecordId() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) GetOutCardRecord() []int32 {
|
||||
if x != nil {
|
||||
return x.OutCardRecord
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//房间状态更新
|
||||
type SCTienLenRoomState struct {
|
||||
state protoimpl.MessageState
|
||||
|
|
@ -2028,7 +2036,7 @@ var file_tienlen_proto_rawDesc = []byte{
|
|||
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a,
|
||||
0x0b, 0x4c, 0x61, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x43, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x43, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x43, 0x61, 0x72,
|
||||
0x64, 0x73, 0x22, 0xb5, 0x06, 0x0a, 0x11, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e,
|
||||
0x64, 0x73, 0x22, 0xdb, 0x06, 0x0a, 0x11, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e,
|
||||
0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x6d,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
|
|
@ -2079,221 +2087,223 @@ var file_tienlen_proto_rawDesc = []byte{
|
|||
0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x41, 0x64, 0x64, 0x18, 0x1c,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x41, 0x64, 0x64, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0x42, 0x0a, 0x12, 0x53, 0x43,
|
||||
0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x45,
|
||||
0x0a, 0x11, 0x43, 0x53, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65,
|
||||
0x72, 0x4f, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4f,
|
||||
0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x4f, 0x70,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x11, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e,
|
||||
0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x4f,
|
||||
0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49,
|
||||
0x64, 0x12, 0x33, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 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, 0x22, 0x46, 0x0a, 0x14, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e,
|
||||
0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x2e,
|
||||
0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74,
|
||||
0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c,
|
||||
0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x22, 0x28,
|
||||
0x0a, 0x14, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65,
|
||||
0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x22, 0x6f, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x49, 0x74, 0x65, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x41, 0x64, 0x64, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x17, 0x54, 0x69,
|
||||
0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x42,
|
||||
0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x61, 0x72,
|
||||
0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x61, 0x6d,
|
||||
0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x47, 0x61, 0x6d,
|
||||
0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x57, 0x69, 0x6e, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x49, 0x73, 0x57, 0x69, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x57,
|
||||
0x69, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x0c, 0x57, 0x69, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x41, 0x64, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x08, 0x41, 0x64, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x41, 0x64, 0x64,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x69,
|
||||
0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x08, 0x41,
|
||||
0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x69, 0x61, 0x6e, 0x48,
|
||||
0x75, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x69, 0x61, 0x6e, 0x48, 0x75, 0x22,
|
||||
0x4d, 0x0a, 0x13, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x47, 0x61, 0x6d, 0x65,
|
||||
0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x05, 0x44, 0x61, 0x74, 0x61, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e,
|
||||
0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x47, 0x61, 0x6d,
|
||||
0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x05, 0x44, 0x61, 0x74, 0x61, 0x73, 0x22, 0xc4,
|
||||
0x01, 0x0a, 0x18, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x53, 0x6d, 0x61, 0x6c,
|
||||
0x6c, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x57,
|
||||
0x69, 0x6e, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x57, 0x69, 0x6e,
|
||||
0x50, 0x6f, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x57, 0x69, 0x6e, 0x50, 0x6f, 0x73, 0x43, 0x6f, 0x69,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x57, 0x69, 0x6e, 0x50, 0x6f, 0x73, 0x43,
|
||||
0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x12, 0x20, 0x0a,
|
||||
0x0b, 0x4c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x0b, 0x4c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x4c, 0x6f, 0x73,
|
||||
0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x4c, 0x6f, 0x73,
|
||||
0x65, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0x25, 0x0a, 0x0d, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c,
|
||||
0x65, 0x6e, 0x43, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x22, 0x88, 0x02, 0x0a,
|
||||
0x11, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x61, 0x72, 0x64, 0x54, 0x65,
|
||||
0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x47, 0x72, 0x61, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x53, 0x43, 0x54,
|
||||
0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x61, 0x72, 0x64, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x47,
|
||||
0x72, 0x61, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x47, 0x72, 0x61, 0x64,
|
||||
0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x69,
|
||||
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x69, 0x6e,
|
||||
0x12, 0x1a, 0x0a, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x6f, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x4c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08,
|
||||
0x4c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x39, 0x0a, 0x0b,
|
||||
0x47, 0x72, 0x61, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a, 0x11, 0x53, 0x43, 0x54, 0x69, 0x65,
|
||||
0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x75, 0x72, 0x4f, 0x70, 0x50, 0x6f, 0x73, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x49, 0x73, 0x4e, 0x65, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49,
|
||||
0x73, 0x4e, 0x65, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20,
|
||||
0x03, 0x28, 0x05, 0x52, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x45, 0x78,
|
||||
0x44, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x45, 0x78, 0x44,
|
||||
0x65, 0x6c, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x3b, 0x0a, 0x19, 0x53, 0x43, 0x54, 0x69,
|
||||
0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x74, 0x65,
|
||||
0x72, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||
0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x61, 0x73, 0x74, 0x65,
|
||||
0x72, 0x53, 0x6e, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x1a, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c,
|
||||
0x65, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65,
|
||||
0x4e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4e,
|
||||
0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e,
|
||||
0x63, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0xcb, 0x07, 0x0a, 0x0f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e,
|
||||
0x4c, 0x65, 0x6e, 0x41, 0x49, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x42, 0x6f, 0x6d,
|
||||
0x62, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x42, 0x6f, 0x6d,
|
||||
0x62, 0x4e, 0x75, 0x6d, 0x12, 0x2f, 0x0a, 0x14, 0x43, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x6c, 0x61,
|
||||
0x79, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x11, 0x43, 0x61, 0x72, 0x64, 0x50, 0x6c, 0x61, 0x79, 0x41, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x53, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x5f, 0x30, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x61, 0x73, 0x74,
|
||||
0x4d, 0x6f, 0x76, 0x65, 0x30, 0x12, 0x1e, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x5f, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x61, 0x73, 0x74,
|
||||
0x4d, 0x6f, 0x76, 0x65, 0x31, 0x12, 0x1e, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x5f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x61, 0x73, 0x74,
|
||||
0x4d, 0x6f, 0x76, 0x65, 0x32, 0x12, 0x1e, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x5f, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4c, 0x61, 0x73, 0x74,
|
||||
0x4d, 0x6f, 0x76, 0x65, 0x33, 0x12, 0x27, 0x0a, 0x10, 0x4e, 0x75, 0x6d, 0x5f, 0x63, 0x61, 0x72,
|
||||
0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x30, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0d, 0x4e, 0x75, 0x6d, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x30, 0x12, 0x27,
|
||||
0x0a, 0x10, 0x4e, 0x75, 0x6d, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74,
|
||||
0x5f, 0x31, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x4e, 0x75, 0x6d, 0x43, 0x61, 0x72,
|
||||
0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x31, 0x12, 0x27, 0x0a, 0x10, 0x4e, 0x75, 0x6d, 0x5f, 0x63,
|
||||
0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0d, 0x4e, 0x75, 0x6d, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x32,
|
||||
0x12, 0x27, 0x0a, 0x10, 0x4e, 0x75, 0x6d, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65,
|
||||
0x66, 0x74, 0x5f, 0x33, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x4e, 0x75, 0x6d, 0x43,
|
||||
0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x33, 0x12, 0x28, 0x0a, 0x10, 0x4f, 0x74, 0x68,
|
||||
0x65, 0x72, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x43, 0x61,
|
||||
0x72, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x61,
|
||||
0x72, 0x64, 0x73, 0x5f, 0x30, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x30, 0x12, 0x24, 0x0a, 0x0e, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x31, 0x12,
|
||||
0x24, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f,
|
||||
0x32, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43,
|
||||
0x61, 0x72, 0x64, 0x73, 0x32, 0x12, 0x24, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f,
|
||||
0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x33, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x50,
|
||||
0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x33, 0x12, 0x2a, 0x0a, 0x11, 0x50,
|
||||
0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73,
|
||||
0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x48, 0x61,
|
||||
0x6e, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x79, 0x65,
|
||||
0x72, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x49, 0x73, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x59, 0x75, 0x6c,
|
||||
0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x49, 0x73, 0x54, 0x69, 0x65, 0x6e, 0x4c,
|
||||
0x65, 0x6e, 0x59, 0x75, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x73, 0x46, 0x69, 0x72, 0x73,
|
||||
0x74, 0x48, 0x61, 0x6e, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x49, 0x73, 0x46,
|
||||
0x69, 0x72, 0x73, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x43, 0x61, 0x72, 0x64,
|
||||
0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x30, 0x18, 0x14, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a,
|
||||
0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x30, 0x12, 0x20, 0x0a, 0x0c, 0x43, 0x61,
|
||||
0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x31, 0x18, 0x15, 0x20, 0x03, 0x28, 0x05,
|
||||
0x52, 0x0a, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x31, 0x12, 0x20, 0x0a, 0x0c,
|
||||
0x43, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x32, 0x18, 0x16, 0x20, 0x03,
|
||||
0x28, 0x05, 0x52, 0x0a, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x32, 0x12, 0x20,
|
||||
0x0a, 0x0c, 0x43, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x33, 0x18, 0x17,
|
||||
0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x33,
|
||||
0x12, 0x19, 0x0a, 0x08, 0x4c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x73, 0x18, 0x18, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x4c, 0x61, 0x73, 0x74, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x49,
|
||||
0x73, 0x45, 0x6e, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x45, 0x6e,
|
||||
0x64, 0x12, 0x1a, 0x0a, 0x08, 0x57, 0x69, 0x6e, 0x53, 0x6e, 0x69, 0x64, 0x73, 0x18, 0x1a, 0x20,
|
||||
0x03, 0x28, 0x05, 0x52, 0x08, 0x57, 0x69, 0x6e, 0x53, 0x6e, 0x69, 0x64, 0x73, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x49, 0x73, 0x57, 0x69, 0x6e, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73,
|
||||
0x57, 0x69, 0x6e, 0x22, 0x27, 0x0a, 0x13, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e,
|
||||
0x46, 0x69, 0x72, 0x73, 0x74, 0x4f, 0x70, 0x50, 0x6f, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f,
|
||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x22, 0x41, 0x0a, 0x1b,
|
||||
0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x54,
|
||||
0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x6e, 0x67, 0x43, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x54,
|
||||
0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x6e, 0x67, 0x43, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0c, 0x54, 0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x6e, 0x67, 0x43, 0x6e, 0x74, 0x2a,
|
||||
0x3e, 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, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x48, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x2a,
|
||||
0xb6, 0x04, 0x0a, 0x0f, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x54, 0x69,
|
||||
0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x18, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x52,
|
||||
0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xfa, 0x29, 0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x52, 0x6f,
|
||||
0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0xfb, 0x29, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c,
|
||||
0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xfc, 0x29, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xfd, 0x29, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79,
|
||||
0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xfe, 0x29, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c,
|
||||
0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10, 0xff, 0x29, 0x12, 0x19, 0x0a, 0x14,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e,
|
||||
0x43, 0x61, 0x72, 0x64, 0x10, 0x80, 0x2a, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x42,
|
||||
0x69, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x81, 0x2a, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x75, 0x72, 0x4f,
|
||||
0x70, 0x50, 0x6f, 0x73, 0x10, 0x82, 0x2a, 0x12, 0x24, 0x0a, 0x1f, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x53, 0x6d, 0x61, 0x6c, 0x6c,
|
||||
0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x83, 0x2a, 0x12, 0x25, 0x0a,
|
||||
0x20, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65,
|
||||
0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6e, 0x69,
|
||||
0x64, 0x10, 0x84, 0x2a, 0x12, 0x26, 0x0a, 0x21, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53,
|
||||
0x52, 0x08, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x4f, 0x75,
|
||||
0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x1e, 0x20, 0x03, 0x28,
|
||||
0x05, 0x52, 0x0d, 0x4f, 0x75, 0x74, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x22, 0x42, 0x0a, 0x12, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x52, 0x6f, 0x6f,
|
||||
0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x73, 0x22, 0x45, 0x0a, 0x11, 0x43, 0x53, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65,
|
||||
0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43,
|
||||
0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03,
|
||||
0x28, 0x03, 0x52, 0x07, 0x4f, 0x70, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x11,
|
||||
0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f,
|
||||
0x70, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x4f, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x4f, 0x70, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x4f, 0x70, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74,
|
||||
0x43, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x74, 0x69, 0x65,
|
||||
0x6e, 0x6c, 0x65, 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, 0x22, 0x46, 0x0a, 0x14,
|
||||
0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45,
|
||||
0x6e, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x54, 0x69, 0x65,
|
||||
0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04,
|
||||
0x44, 0x61, 0x74, 0x61, 0x22, 0x28, 0x0a, 0x14, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65,
|
||||
0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x22, 0x6f,
|
||||
0x0a, 0x07, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x08, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f,
|
||||
0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22,
|
||||
0xb3, 0x02, 0x0a, 0x17, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65,
|
||||
0x72, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53,
|
||||
0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05,
|
||||
0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x08, 0x47, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x49,
|
||||
0x73, 0x57, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x49, 0x73, 0x57, 0x69,
|
||||
0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x57, 0x69, 0x6e, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x63, 0x6f, 0x72,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x57, 0x69, 0x6e, 0x52, 0x61, 0x6e, 0x6b,
|
||||
0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x63, 0x6f,
|
||||
0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x53, 0x63,
|
||||
0x6f, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18,
|
||||
0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x41, 0x64, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12,
|
||||
0x2c, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x10, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x52, 0x08, 0x41, 0x64, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x54, 0x69, 0x61, 0x6e, 0x48, 0x75, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54,
|
||||
0x69, 0x61, 0x6e, 0x48, 0x75, 0x22, 0x4d, 0x0a, 0x13, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c,
|
||||
0x65, 0x6e, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x05,
|
||||
0x44, 0x61, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x74, 0x69,
|
||||
0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x72, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x52, 0x05, 0x44,
|
||||
0x61, 0x74, 0x61, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x18, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c,
|
||||
0x65, 0x6e, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65,
|
||||
0x64, 0x12, 0x16, 0x0a, 0x06, 0x57, 0x69, 0x6e, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x57, 0x69, 0x6e, 0x50, 0x6f, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x57, 0x69, 0x6e,
|
||||
0x50, 0x6f, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x57,
|
||||
0x69, 0x6e, 0x50, 0x6f, 0x73, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x4c, 0x6f, 0x73,
|
||||
0x65, 0x50, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x6f, 0x73, 0x65,
|
||||
0x50, 0x6f, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x73, 0x43, 0x6f,
|
||||
0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x4c, 0x6f, 0x73, 0x65, 0x50, 0x6f,
|
||||
0x73, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x57, 0x69, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x4c, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x08, 0x4c, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x69, 0x6e, 0x22, 0x25, 0x0a, 0x0d, 0x53,
|
||||
0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x61, 0x72, 0x64, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x43, 0x61, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x43, 0x61, 0x72,
|
||||
0x64, 0x73, 0x22, 0x88, 0x02, 0x0a, 0x11, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e,
|
||||
0x43, 0x61, 0x72, 0x64, 0x54, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x47, 0x72, 0x61, 0x64,
|
||||
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c,
|
||||
0x65, 0x6e, 0x2e, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x61, 0x72, 0x64,
|
||||
0x54, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x72, 0x61, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x06, 0x47, 0x72, 0x61, 0x64, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x54,
|
||||
0x6f, 0x74, 0x61, 0x6c, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x6f,
|
||||
0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x6f,
|
||||
0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x4c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x4c, 0x6f, 0x73, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61,
|
||||
0x74, 0x61, 0x1a, 0x39, 0x0a, 0x0b, 0x47, 0x72, 0x61, 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
|
||||
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7f, 0x0a,
|
||||
0x11, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x75, 0x72, 0x4f, 0x70, 0x50,
|
||||
0x6f, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x03, 0x50, 0x6f, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x4e, 0x65, 0x77, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x4e, 0x65, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x43, 0x61,
|
||||
0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x45, 0x78, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x45, 0x78, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c,
|
||||
0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x22, 0x3b,
|
||||
0x0a, 0x19, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d,
|
||||
0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0a, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x53, 0x6e, 0x69, 0x64, 0x22, 0x3e, 0x0a, 0x1a, 0x53,
|
||||
0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75,
|
||||
0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x10, 0x85, 0x2a, 0x12, 0x17, 0x0a, 0x12,
|
||||
0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x75, 0x64,
|
||||
0x69, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
|
||||
0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0xcb, 0x07, 0x0a, 0x0f,
|
||||
0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x41, 0x49, 0x44, 0x61, 0x74, 0x61, 0x12,
|
||||
0x19, 0x0a, 0x08, 0x42, 0x6f, 0x6d, 0x62, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x07, 0x42, 0x6f, 0x6d, 0x62, 0x4e, 0x75, 0x6d, 0x12, 0x2f, 0x0a, 0x14, 0x43, 0x61,
|
||||
0x72, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73,
|
||||
0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x43, 0x61, 0x72, 0x64, 0x50, 0x6c,
|
||||
0x61, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0b, 0x4c,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x30, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x30, 0x12, 0x1e, 0x0a, 0x0b, 0x4c,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x31, 0x12, 0x1e, 0x0a, 0x0b, 0x4c,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x32, 0x12, 0x1e, 0x0a, 0x0b, 0x4c,
|
||||
0x61, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x33, 0x12, 0x27, 0x0a, 0x10, 0x4e,
|
||||
0x75, 0x6d, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x30, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x4e, 0x75, 0x6d, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c,
|
||||
0x65, 0x66, 0x74, 0x30, 0x12, 0x27, 0x0a, 0x10, 0x4e, 0x75, 0x6d, 0x5f, 0x63, 0x61, 0x72, 0x64,
|
||||
0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x31, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d,
|
||||
0x4e, 0x75, 0x6d, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x31, 0x12, 0x27, 0x0a,
|
||||
0x10, 0x4e, 0x75, 0x6d, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f,
|
||||
0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x4e, 0x75, 0x6d, 0x43, 0x61, 0x72, 0x64,
|
||||
0x73, 0x4c, 0x65, 0x66, 0x74, 0x32, 0x12, 0x27, 0x0a, 0x10, 0x4e, 0x75, 0x6d, 0x5f, 0x63, 0x61,
|
||||
0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x33, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0d, 0x4e, 0x75, 0x6d, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x33, 0x12,
|
||||
0x28, 0x0a, 0x10, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x61,
|
||||
0x72, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x4f, 0x74, 0x68, 0x65, 0x72,
|
||||
0x48, 0x61, 0x6e, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x50, 0x6c, 0x61,
|
||||
0x79, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x30, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x30, 0x12,
|
||||
0x24, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f,
|
||||
0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43,
|
||||
0x61, 0x72, 0x64, 0x73, 0x31, 0x12, 0x24, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f,
|
||||
0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x32, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x50,
|
||||
0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x32, 0x12, 0x24, 0x0a, 0x0e, 0x50,
|
||||
0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x33, 0x18, 0x0f, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73,
|
||||
0x33, 0x12, 0x2a, 0x0a, 0x11, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x68, 0x61, 0x6e, 0x64,
|
||||
0x5f, 0x63, 0x61, 0x72, 0x64, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x50, 0x6c,
|
||||
0x61, 0x79, 0x65, 0x72, 0x48, 0x61, 0x6e, 0x64, 0x43, 0x61, 0x72, 0x64, 0x73, 0x12, 0x27, 0x0a,
|
||||
0x0f, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x50, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x49, 0x73, 0x54, 0x69, 0x65, 0x6e,
|
||||
0x4c, 0x65, 0x6e, 0x59, 0x75, 0x6c, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x49,
|
||||
0x73, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x59, 0x75, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b,
|
||||
0x49, 0x73, 0x46, 0x69, 0x72, 0x73, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x0b, 0x49, 0x73, 0x46, 0x69, 0x72, 0x73, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x12, 0x20,
|
||||
0x0a, 0x0c, 0x43, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x30, 0x18, 0x14,
|
||||
0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x30,
|
||||
0x12, 0x20, 0x0a, 0x0c, 0x43, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x31,
|
||||
0x18, 0x15, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c, 0x65, 0x66,
|
||||
0x74, 0x31, 0x12, 0x20, 0x0a, 0x0c, 0x43, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74,
|
||||
0x5f, 0x32, 0x18, 0x16, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x61, 0x72, 0x64, 0x73, 0x4c,
|
||||
0x65, 0x66, 0x74, 0x32, 0x12, 0x20, 0x0a, 0x0c, 0x43, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x6c, 0x65,
|
||||
0x66, 0x74, 0x5f, 0x33, 0x18, 0x17, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x43, 0x61, 0x72, 0x64,
|
||||
0x73, 0x4c, 0x65, 0x66, 0x74, 0x33, 0x12, 0x19, 0x0a, 0x08, 0x4c, 0x61, 0x73, 0x74, 0x5f, 0x70,
|
||||
0x6f, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x4c, 0x61, 0x73, 0x74, 0x50, 0x6f,
|
||||
0x73, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x45, 0x6e, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x05, 0x49, 0x73, 0x45, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x57, 0x69, 0x6e, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x57, 0x69, 0x6e, 0x53, 0x6e,
|
||||
0x69, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x73, 0x57, 0x69, 0x6e, 0x18, 0x1b, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x05, 0x49, 0x73, 0x57, 0x69, 0x6e, 0x22, 0x27, 0x0a, 0x13, 0x53, 0x43, 0x54,
|
||||
0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4f, 0x70, 0x50, 0x6f, 0x73,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50,
|
||||
0x6f, 0x73, 0x22, 0x41, 0x0a, 0x1b, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50,
|
||||
0x6c, 0x61, 0x79, 0x65, 0x72, 0x54, 0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x6e, 0x67, 0x43, 0x6e,
|
||||
0x74, 0x12, 0x22, 0x0a, 0x0c, 0x54, 0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x6e, 0x67, 0x43, 0x6e,
|
||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x54, 0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f,
|
||||
0x6e, 0x67, 0x43, 0x6e, 0x74, 0x2a, 0x3e, 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, 0x0d, 0x0a, 0x09, 0x4f, 0x50, 0x52, 0x43, 0x5f, 0x48,
|
||||
0x69, 0x6e, 0x74, 0x10, 0x02, 0x2a, 0xb6, 0x04, 0x0a, 0x0f, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65,
|
||||
0x6e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x5a, 0x45, 0x52, 0x4f, 0x10,
|
||||
0x00, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69,
|
||||
0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xfa, 0x29,
|
||||
0x12, 0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65,
|
||||
0x6e, 0x4c, 0x65, 0x6e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0xfb, 0x29,
|
||||
0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x53, 0x54, 0x69, 0x65,
|
||||
0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xfc, 0x29, 0x12,
|
||||
0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e,
|
||||
0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4f, 0x70, 0x10, 0xfd, 0x29, 0x12, 0x20,
|
||||
0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c,
|
||||
0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x10, 0xfe, 0x29,
|
||||
0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65,
|
||||
0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x10,
|
||||
0xff, 0x29, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54,
|
||||
0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x61, 0x72, 0x64, 0x10, 0x80, 0x2a, 0x12, 0x1f, 0x0a,
|
||||
0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65,
|
||||
0x6e, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x81, 0x2a, 0x12, 0x1d,
|
||||
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c,
|
||||
0x65, 0x6e, 0x43, 0x75, 0x72, 0x4f, 0x70, 0x50, 0x6f, 0x73, 0x10, 0x82, 0x2a, 0x12, 0x24, 0x0a,
|
||||
0x1f, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65,
|
||||
0x6e, 0x53, 0x6d, 0x61, 0x6c, 0x6c, 0x47, 0x61, 0x6d, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64,
|
||||
0x10, 0x83, 0x2a, 0x12, 0x25, 0x0a, 0x20, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43,
|
||||
0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73,
|
||||
0x74, 0x65, 0x72, 0x53, 0x6e, 0x69, 0x64, 0x10, 0x84, 0x2a, 0x12, 0x26, 0x0a, 0x21, 0x50, 0x41,
|
||||
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x10,
|
||||
0x85, 0x2a, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54,
|
||||
0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x41, 0x49, 0x10, 0x86, 0x2a, 0x12, 0x1f, 0x0a, 0x1a, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x46,
|
||||
0x69, 0x72, 0x73, 0x74, 0x4f, 0x70, 0x50, 0x6f, 0x73, 0x10, 0x87, 0x2a, 0x12, 0x1d, 0x0a, 0x18,
|
||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e,
|
||||
0x41, 0x49, 0x10, 0x86, 0x2a, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4f, 0x70,
|
||||
0x50, 0x6f, 0x73, 0x10, 0x87, 0x2a, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
|
||||
0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x61, 0x72, 0x64, 0x54, 0x65,
|
||||
0x73, 0x74, 0x10, 0x88, 0x2a, 0x12, 0x21, 0x0a, 0x1c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||
0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x54, 0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f,
|
||||
0x6e, 0x67, 0x43, 0x6e, 0x74, 0x10, 0x89, 0x2a, 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, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65,
|
||||
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x43, 0x61, 0x72, 0x64, 0x54, 0x65, 0x73, 0x74, 0x10, 0x88, 0x2a, 0x12, 0x21, 0x0a, 0x1c, 0x50,
|
||||
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x54,
|
||||
0x68, 0x69, 0x6e, 0x6b, 0x4c, 0x6f, 0x6e, 0x67, 0x43, 0x6e, 0x74, 0x10, 0x89, 0x2a, 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,
|
||||
0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -97,6 +97,9 @@ message SCTienLenRoomInfo {
|
|||
int32 RankType = 27; // 排位类型
|
||||
int32 SceneAdd = 28; // 场次加成(百分比)
|
||||
string RecordId = 29; // 牌局ID
|
||||
|
||||
repeated int32 OutCardRecord = 30 ;//已打出去的牌
|
||||
|
||||
}
|
||||
|
||||
//房间状态更新
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -268,12 +268,12 @@ message CoinPoolSetting{
|
|||
int32 LowerOdds = 11; // 下线初始概率
|
||||
int32 LowerOddsMax = 12; // 下线最大概率
|
||||
int32 ProfitRate = 13;//营收比例,千分比
|
||||
// 新增配置
|
||||
int64 ResetTime = 14; // 重置时间
|
||||
int32 Switch =15; // 开关 0开启 1关闭
|
||||
// 水池状态
|
||||
int64 CoinValue = 16; // 当前水位
|
||||
int64 ProfitPool = 17; // 收益池水位
|
||||
int32 CtrlRate = 18; //调节赔率,万分比
|
||||
int64 InitNoviceValue = 19; // 新手池初始库存值
|
||||
}
|
||||
//邮件
|
||||
message MessageInfo {
|
||||
|
|
|
|||
|
|
@ -5168,6 +5168,34 @@ func AgcConvertDB_GameCoinPool(fi,fo string) {
|
|||
|
||||
|
||||
|
||||
if len(row.Cells)<12+1{
|
||||
break
|
||||
}
|
||||
|
||||
temp, _ = strconv.ParseInt(row.Cells[12].String(), 10, 32)
|
||||
data.CtrlRate = int32(temp)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if len(row.Cells)<13+1{
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
temp, _ = strconv.ParseInt(row.Cells[13].String(), 10, 64)
|
||||
data.InitNovicValue = int64(temp)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
break
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,33 @@
|
|||
xcopy .\data D:\gocode\ReadyUpdate\data /s /e /y
|
||||
xcopy .\data D:\trunk\src\mongo.games.com\deploy\data /s /e /y
|
||||
|
||||
xcopy .\dbproxy\dbproxy D:\gocode\ReadyUpdate /y
|
||||
xcopy .\dbproxy\dbproxy D:\trunk\src\mongo.games.com\deploy /y
|
||||
del .\dbproxy\dbproxy
|
||||
|
||||
xcopy .\mgrsrv\mgrsrv D:\gocode\ReadyUpdate /y
|
||||
xcopy .\mgrsrv\mgrsrv D:\trunk\src\mongo.games.com\deploy /y
|
||||
del .\mgrsrv\mgrsrv
|
||||
|
||||
xcopy .\gatesrv\gatesrv D:\gocode\ReadyUpdate /y
|
||||
xcopy .\gatesrv\gatesrv D:\trunk\src\mongo.games.com\deploy /y
|
||||
del .\gatesrv\gatesrv
|
||||
|
||||
xcopy .\worldsrv\worldsrv D:\gocode\ReadyUpdate /y
|
||||
xcopy .\worldsrv\worldsrv D:\trunk\src\mongo.games.com\deploy /y
|
||||
del .\worldsrv\worldsrv
|
||||
|
||||
xcopy .\gamesrv\gamesrv D:\gocode\ReadyUpdate /y
|
||||
xcopy .\gamesrv\gamesrv D:\trunk\src\mongo.games.com\deploy /y
|
||||
del .\gamesrv\gamesrv
|
||||
|
||||
xcopy .\robot\robot D:\gocode\ReadyUpdate /y
|
||||
xcopy .\robot\robot D:\trunk\src\mongo.games.com\deploy /y
|
||||
del .\robot\robot
|
||||
|
||||
xcopy .\ranksrv\ranksrv D:\gocode\ReadyUpdate /y
|
||||
xcopy .\ranksrv\ranksrv D:\trunk\src\mongo.games.com\deploy /y
|
||||
del .\ranksrv\ranksrv
|
||||
|
||||
if exist "D:\gocode\ReadyUpdate\data\gameparam.json" (del D:\gocode\ReadyUpdate\data\gameparam.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\clientparam.json" (del D:\gocode\ReadyUpdate\data\clientparam.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\thrconfig.json" (del D:\gocode\ReadyUpdate\data\thrconfig.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\gamedata.json" (del D:\gocode\ReadyUpdate\data\gamedata.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\fishingparam.json" (del D:\gocode\ReadyUpdate\data\fishingparam.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\normalparam.json" (del D:\gocode\ReadyUpdate\data\normalparam.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\gmac.json" (del D:\gocode\ReadyUpdate\data\gmac.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\zone_rob.json" (del D:\gocode\ReadyUpdate\data\zone_rob.json)
|
||||
if exist "D:\gocode\ReadyUpdate\data\icon_rob.json" (del D:\gocode\ReadyUpdate\data\icon_rob.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\gameparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\gameparam.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\clientparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\clientparam.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\thrconfig.json" (del D:\trunk\src\mongo.games.com\deploy\data\thrconfig.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\gamedata.json" (del D:\trunk\src\mongo.games.com\deploy\data\gamedata.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\fishingparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\fishingparam.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\normalparam.json" (del D:\trunk\src\mongo.games.com\deploy\data\normalparam.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\gmac.json" (del D:\trunk\src\mongo.games.com\deploy\data\gmac.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\zone_rob.json" (del D:\trunk\src\mongo.games.com\deploy\data\zone_rob.json)
|
||||
if exist "D:\trunk\src\mongo.games.com\deploy\data\icon_rob.json" (del D:\trunk\src\mongo.games.com\deploy\data\icon_rob.json)
|
||||
pause
|
||||
|
|
@ -272,7 +272,6 @@ func init() {
|
|||
} else {
|
||||
logger.Logger.Trace("游戏结束------", scene.gameId, scene.sceneId, scene.replayCode, scene.currRound)
|
||||
}
|
||||
PlatformMgrSingleton.OnChangeSceneState(scene, scene.starting)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
@ -290,7 +289,6 @@ func init() {
|
|||
if scene != nil {
|
||||
scene.state = msg.GetCurrState()
|
||||
scene.fishing = msg.GetFishing()
|
||||
PlatformMgrSingleton.OnChangeSceneState(scene, scene.starting)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -578,7 +578,10 @@ func (this *CSUpdateVipShopHandler) Process(s *netlib.Session, packetid int, dat
|
|||
RefreshCount: p.VipShopRefreshCount, //玩家当前刷新次数
|
||||
}
|
||||
for i, info := range p.VipShopData {
|
||||
si := ShopMgrSington.ShopInfos[p.Platform][info.Id]
|
||||
si := ShopMgrSington.GetConfig(p.Platform).ShopInfos[info.Id]
|
||||
if si == nil {
|
||||
continue
|
||||
}
|
||||
data := &shop.ShopInfo{
|
||||
Id: info.Id,
|
||||
AdLookedNum: si.AdLookedNum,
|
||||
|
|
|
|||
141
worldsrv/etcd.go
141
worldsrv/etcd.go
|
|
@ -2,66 +2,131 @@ package main
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"go.etcd.io/etcd/client/v3"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/etcd"
|
||||
hallproto "mongo.games.com/game/protocol/gamehall"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// 平台配置
|
||||
etcd.Register(etcd.ETCDKEY_PLATFORM_PREFIX, webapi.Platform{}, platformConfigEvent)
|
||||
// 游戏场次配置
|
||||
etcd.Register(etcd.ETCDKEY_GAMECONFIG_PREFIX, webapi.GameFree{}, platformConfigEvent)
|
||||
// 超管平台游戏开关
|
||||
etcd.Register(etcd.ETCDKEY_GAME_CONFIG_GLOBAL, webapi.GameConfigGlobal{}, platformConfigEvent)
|
||||
// 平台包数据
|
||||
etcd.Register(etcd.ETCDKEY_PACKAGE_PREFIX, webapi.AppInfo{}, platformConfigEvent)
|
||||
// 客户端游戏入口开关
|
||||
etcd.Register(etcd.ETCDKEY_PACKAGE_ENTRYSWITCH, webapi.EntrySwitch{}, platformConfigEvent)
|
||||
// 公告
|
||||
etcd.Register(etcd.ETCDKEY_GAME_NOTICE, webapi.CommonNoticeList{}, platformConfigEvent)
|
||||
// 比赛配置
|
||||
etcd.Register(etcd.ETCDKEY_GAME_MATCH, webapi.GameMatchDateList{}, platformConfigEvent)
|
||||
// 个人水池配置
|
||||
etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, PlatformConfigEtcd)
|
||||
etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, platformConfigEvent)
|
||||
// 商品兑换
|
||||
etcd.Register(etcd.ETCDKEY_SHOP_EXCHANGE, webapi.ExchangeShopList{}, ExchangeShopList)
|
||||
etcd.Register(etcd.ETCDKEY_SHOP_EXCHANGE, webapi.ExchangeShopList{}, platformConfigEvent)
|
||||
// 商城商品
|
||||
etcd.Register(etcd.ETCDKEY_SHOP_ITEM, webapi.ItemShopList{}, ItemShopList)
|
||||
etcd.Register(etcd.ETCDKEY_SHOP_ITEM, webapi.ItemShopList{}, platformConfigEvent)
|
||||
// 集卡活动
|
||||
etcd.Register(etcd.ETCDKEY_ACT_Collect, webapi.WelfareCollectConfig{}, WelfareCollectConfig)
|
||||
etcd.Register(etcd.ETCDKEY_ACT_Collect, webapi.WelfareCollectConfig{}, platformConfigEvent)
|
||||
}
|
||||
|
||||
//func ExchangeShopList(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {}
|
||||
|
||||
func WelfareCollectConfig(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{}) {
|
||||
if event.Type == clientv3.EventTypeDelete {
|
||||
return
|
||||
}
|
||||
config, ok := data.(*webapi.WelfareCollectConfig)
|
||||
if !ok {
|
||||
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
||||
return
|
||||
}
|
||||
WelfareMgrSington.UpdateCollectConfig(config)
|
||||
}
|
||||
|
||||
func ItemShopList(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
if event.Type == clientv3.EventTypeDelete {
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
config, ok := data.(*webapi.ItemShopList)
|
||||
if !ok {
|
||||
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
||||
return
|
||||
}
|
||||
ShopMgrSington.UpdateItemShop(config)
|
||||
}
|
||||
|
||||
func PlatformConfigEtcd(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
if event.Type == clientv3.EventTypeDelete {
|
||||
return
|
||||
}
|
||||
PlatformMgrSingleton.UpdateConfig(data)
|
||||
}
|
||||
switch config := data.(type) {
|
||||
case *webapi.WelfareCollectConfig:
|
||||
WelfareMgrSington.UpdateCollectConfig(config)
|
||||
case *webapi.ItemShopList:
|
||||
ShopMgrSington.UpdateItemShop(config)
|
||||
case *webapi.ExchangeShopList:
|
||||
ShopMgrSington.UpExShop(config)
|
||||
case *webapi.PlayerPool:
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).PlayerPool = config
|
||||
case *webapi.EntrySwitch:
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).EntrySwitch = config
|
||||
PlatformMgrSingleton.ChangeEntrySwitch(config.Platform, config)
|
||||
case *webapi.CommonNoticeList:
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).CommonNotices = config
|
||||
if !isInit {
|
||||
// 通知公共变更
|
||||
for _, v := range PlayerMgrSington.playerOfPlatform[config.Platform] {
|
||||
if v != nil && v.IsOnLine() {
|
||||
v.SendToClient(int(hallproto.GameHallPacketID_PACKET_SC_NoticeChange), &hallproto.SCNoticeChange{})
|
||||
}
|
||||
}
|
||||
}
|
||||
case *webapi.GameConfigGlobal:
|
||||
if isInit {
|
||||
for _, v := range config.GetGameStatus() {
|
||||
gameId := v.GetGameId()
|
||||
status := v.GetStatus()
|
||||
PlatformMgrSingleton.GetGlobalConfig().GameStatus[gameId] = status
|
||||
}
|
||||
} else {
|
||||
cfgs := make([]*hallproto.GameConfig1, 0)
|
||||
for _, v := range config.GetGameStatus() {
|
||||
gameId := v.GetGameId() // gamefreeid
|
||||
status := v.GetStatus()
|
||||
if PlatformMgrSingleton.GetGlobalConfig().GameStatus[gameId] != status {
|
||||
cfgs = append(cfgs, &hallproto.GameConfig1{
|
||||
LogicId: gameId,
|
||||
Status: status,
|
||||
})
|
||||
}
|
||||
PlatformMgrSingleton.GetGlobalConfig().GameStatus[gameId] = status
|
||||
}
|
||||
PlatformMgrSingleton.ChangeGameStatus(cfgs)
|
||||
}
|
||||
case *webapi.Platform:
|
||||
if isInit {
|
||||
PlatformMgrSingleton.CreateDefaultPlatform()
|
||||
}
|
||||
PlatformMgrSingleton.UpsertPlatform(config.PlatformName, config.Isolated, config.Disabled, config.Id,
|
||||
config.CustomService, config.BindOption, config.ServiceFlag, config.UpgradeAccountGiveCoin,
|
||||
config.NewAccountGiveCoin, config.PerBankNoLimitAccount, config.ExchangeMin, config.ExchangeLimit,
|
||||
config.ExchangeTax, config.ExchangeFlow, config.ExchangeFlag, config.SpreadConfig, config.VipRange, "",
|
||||
nil, config.VerifyCodeType, nil /*config.ThirdGameMerchant,*/, config.CustomType,
|
||||
false, config.NeedSameName, config.ExchangeForceTax, config.ExchangeGiveFlow, config.ExchangeVer,
|
||||
config.ExchangeBankMax, config.ExchangeAlipayMax, 0, config.PerBankNoLimitName, config.IsCanUserBindPromoter,
|
||||
config.UserBindPromoterPrize, false, config.ExchangeMultiple, false, config.MerchantKey,
|
||||
config.BindTelReward)
|
||||
case *webapi.GameFree:
|
||||
var err error
|
||||
s := strings.TrimPrefix(completeKey, etcd.ETCDKEY_GAMECONFIG_PREFIX)
|
||||
arr := strings.Split(s, "/")
|
||||
if len(arr) > 1 {
|
||||
pltId := arr[0]
|
||||
if err == nil {
|
||||
PlatformMgrSingleton.UpsertGameFree(pltId, config)
|
||||
}
|
||||
}
|
||||
case *webapi.AppInfo:
|
||||
if config.PlatformId == 0 {
|
||||
config.PlatformId = int32(DefaultPlatformInt)
|
||||
}
|
||||
PlatformMgrSingleton.GetGlobalConfig().PackageList[config.PackageName] = config
|
||||
PlatformMgrSingleton.GetGlobalConfig().PackageList[config.BundleId] = config
|
||||
case *webapi.GameMatchDateList:
|
||||
if isInit {
|
||||
TournamentMgr.UpdateData(true, config)
|
||||
} else {
|
||||
TournamentMgr.UpdateData(false, config)
|
||||
}
|
||||
|
||||
func ExchangeShopList(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
if event.Type == clientv3.EventTypeDelete {
|
||||
return
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
config, ok := data.(*webapi.ExchangeShopList)
|
||||
if !ok {
|
||||
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
||||
return
|
||||
}
|
||||
ShopMgrSington.UpExShop(config)
|
||||
}
|
||||
|
|
|
|||
1662
worldsrv/etcdmgr.go
1662
worldsrv/etcdmgr.go
File diff suppressed because it is too large
Load Diff
|
|
@ -264,21 +264,23 @@ func (this *GameSession) DetectCoinPoolSetting(platform string, gamefreeid, grou
|
|||
this.cps[key] = data
|
||||
//send msg
|
||||
msg := &webapi.CoinPoolSetting{
|
||||
Platform: platform,
|
||||
GameFreeId: gamefreeid,
|
||||
ServerId: srvid,
|
||||
GroupId: groupId,
|
||||
InitValue: data.InitValue,
|
||||
LowerLimit: data.LowerLimit,
|
||||
UpperLimit: data.UpperLimit,
|
||||
QuDu: data.QuDu,
|
||||
UpperOdds: data.UpperOdds,
|
||||
UpperOddsMax: data.UpperOddsMax,
|
||||
LowerOdds: data.LowerOdds,
|
||||
LowerOddsMax: data.LowerOddsMax,
|
||||
ProfitRate: data.ProfitRate,
|
||||
ResetTime: data.ResetTime,
|
||||
Switch: data.Switch,
|
||||
Platform: platform,
|
||||
GameFreeId: gamefreeid,
|
||||
ServerId: srvid,
|
||||
GroupId: groupId,
|
||||
InitValue: data.InitValue,
|
||||
LowerLimit: data.LowerLimit,
|
||||
UpperLimit: data.UpperLimit,
|
||||
QuDu: data.QuDu,
|
||||
UpperOdds: data.UpperOdds,
|
||||
UpperOddsMax: data.UpperOddsMax,
|
||||
LowerOdds: data.LowerOdds,
|
||||
LowerOddsMax: data.LowerOddsMax,
|
||||
ProfitRate: data.ProfitRate,
|
||||
CtrlRate: data.CtrlRate,
|
||||
InitNoviceValue: data.InitNoviceValue,
|
||||
ResetTime: data.ResetTime,
|
||||
Switch: data.Switch,
|
||||
}
|
||||
proto.SetDefaults(msg)
|
||||
this.Send(int(server_proto.SSPacketID_PACKET_WG_COINPOOLSETTING), msg)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"mongo.games.com/goserver/core/module"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
hall_proto "mongo.games.com/game/protocol/gamehall"
|
||||
"mongo.games.com/game/protocol/pets"
|
||||
"mongo.games.com/game/srvdata"
|
||||
|
|
@ -233,7 +234,7 @@ func (this *PetMgr) GetPetInfo(p *Player, modId int32) *pets.PetInfo {
|
|||
}
|
||||
|
||||
// 商品人物总加成 人物功能变动需要修改
|
||||
func (this *PetMgr) GetShopAward(shopInfo *ShopInfo, p *Player) (award, roleId int32) {
|
||||
func (this *PetMgr) GetShopAward(shopInfo *model.ShopInfo, p *Player) (award, roleId int32) {
|
||||
if shopInfo.Ad > 0 && shopInfo.Type == ShopTypeCoin {
|
||||
id, add := srvdata.RolePetMgrSington.GetRoleAdd(p.PlayerData, common.RoleAddADV)
|
||||
award += add
|
||||
|
|
|
|||
|
|
@ -89,28 +89,28 @@ type Platform struct {
|
|||
IsCanUserBindPromoter bool //是否允许用户手动绑定推广员
|
||||
UserBindPromoterPrize int32 //手动绑定奖励
|
||||
SpreadWinLose bool //是否打开客损开关
|
||||
PltGameCfg *PlatformGameConfig //平台游戏配置
|
||||
GameConfig *GameList //平台游戏配置
|
||||
MerchantKey string //商户秘钥
|
||||
BindTelReward map[int32]int64 // 绑定手机号奖励
|
||||
}
|
||||
|
||||
type PlatformGameConfig struct {
|
||||
games map[int32]*webapiproto.GameFree //以gamefreeid为key
|
||||
cache map[int32][]*webapiproto.GameFree //以gameid为key
|
||||
type GameList struct {
|
||||
gameFreeId map[int32]*webapiproto.GameFree // 以gamefreeid为key
|
||||
gameId map[int32][]*webapiproto.GameFree // 以gameid为key
|
||||
}
|
||||
|
||||
func (cfg *PlatformGameConfig) RecreateCache() {
|
||||
if cfg.cache == nil {
|
||||
cfg.cache = make(map[int32][]*webapiproto.GameFree)
|
||||
func (cfg *GameList) Init() {
|
||||
if cfg.gameId == nil {
|
||||
cfg.gameId = make(map[int32][]*webapiproto.GameFree)
|
||||
}
|
||||
for _, val := range cfg.games {
|
||||
cfg.cache[val.DbGameFree.GetGameId()] = append(cfg.cache[val.DbGameFree.GetGameId()], val)
|
||||
for _, val := range cfg.gameFreeId {
|
||||
cfg.gameId[val.DbGameFree.GetGameId()] = append(cfg.gameId[val.DbGameFree.GetGameId()], val)
|
||||
}
|
||||
}
|
||||
|
||||
func (cfg *PlatformGameConfig) GetGameCfg(gamefreeId int32) *webapiproto.GameFree {
|
||||
if cfg.games != nil {
|
||||
if c, exist := cfg.games[gamefreeId]; exist {
|
||||
func (cfg *GameList) GetGameConfig(gameFreeId int32) *webapiproto.GameFree {
|
||||
if cfg.gameFreeId != nil {
|
||||
if c, exist := cfg.gameFreeId[gameFreeId]; exist {
|
||||
if c.GroupId == 0 {
|
||||
return c
|
||||
} else {
|
||||
|
|
@ -123,7 +123,7 @@ func (cfg *PlatformGameConfig) GetGameCfg(gamefreeId int32) *webapiproto.GameFre
|
|||
return temp
|
||||
}
|
||||
} else {
|
||||
//logger.Logger.Errorf("PlatformGameConfig GetGameCfg Can't Find GameCfg[%v]", gamefreeId)
|
||||
//logger.Logger.Errorf("GameList GetGameConfig Can't Find GameCfg[%v]", gameFreeId)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
@ -185,10 +185,12 @@ func NewPlatform(id int32, isolated bool) *Platform {
|
|||
Halls: make(map[int32]*PlatformGameHall),
|
||||
GamePlayerNum: make(map[int32]*PlatformGamePlayerNum),
|
||||
ClubConfig: &ClubConfig{},
|
||||
PltGameCfg: &PlatformGameConfig{
|
||||
games: make(map[int32]*webapiproto.GameFree),
|
||||
cache: make(map[int32][]*webapiproto.GameFree),
|
||||
GameConfig: &GameList{
|
||||
gameFreeId: make(map[int32]*webapiproto.GameFree),
|
||||
gameId: make(map[int32][]*webapiproto.GameFree),
|
||||
},
|
||||
ThirdGameMerchant: make(map[int32]int32),
|
||||
BindTelReward: make(map[int32]int64),
|
||||
}
|
||||
|
||||
return p
|
||||
|
|
@ -230,14 +232,6 @@ func (p *Platform) ChangeDisabled(disable bool) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (p *Platform) PlayerLogin(player *Player) {
|
||||
|
||||
}
|
||||
|
||||
func (p *Platform) PlayerLogout(player *Player) {
|
||||
|
||||
}
|
||||
|
||||
func (p *Platform) IsMarkFlag(flag int32) bool {
|
||||
if (p.BindOption & flag) != 0 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -24,14 +24,6 @@ const (
|
|||
DefaultPlatformInt = 0
|
||||
)
|
||||
|
||||
// PlatformConfig 所有跟平台相关的配置,不要再定义map数据结构了
|
||||
type PlatformConfig struct {
|
||||
Platform *Platform // 平台配置
|
||||
EntrySwitch *webapiproto.EntrySwitch // 客户端游戏入口开关
|
||||
CommonNotices *webapiproto.CommonNoticeList // 公告
|
||||
PlayerPool *webapiproto.PlayerPool // 个人水池配置
|
||||
}
|
||||
|
||||
type PlatformObserver interface {
|
||||
OnPlatformCreate(p *Platform)
|
||||
OnPlatformDestroy(p *Platform)
|
||||
|
|
@ -41,81 +33,75 @@ type PlatformObserver interface {
|
|||
}
|
||||
|
||||
var PlatformMgrSingleton = &PlatformMgr{
|
||||
configs: make(map[string]*PlatformConfig),
|
||||
PackageList: make(map[string]*webapiproto.AppInfo),
|
||||
GameStatus: make(map[int32]bool), //全局游戏开关
|
||||
platforms: make(map[string]*Platform),
|
||||
ConfigMgr: model.NewConfigMgr(),
|
||||
}
|
||||
|
||||
type PlatformMgr struct {
|
||||
BaseClockSinker
|
||||
|
||||
//todo 所有跟平台相关的配置,不要再定义map数据结构了
|
||||
configs map[string]*PlatformConfig
|
||||
|
||||
PackageList map[string]*webapiproto.AppInfo // 包对应的平台,包标识
|
||||
GameStatus map[int32]bool // 超管平台游戏开关,游戏id
|
||||
|
||||
Observers []PlatformObserver
|
||||
*model.ConfigMgr
|
||||
platforms map[string]*Platform
|
||||
observers []PlatformObserver
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) RegisterObserver(observer PlatformObserver) {
|
||||
for _, ob := range pm.Observers {
|
||||
for _, ob := range pm.observers {
|
||||
if ob == observer {
|
||||
return
|
||||
}
|
||||
}
|
||||
pm.Observers = append(pm.Observers, observer)
|
||||
pm.observers = append(pm.observers, observer)
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) UnregisterObserver(observer PlatformObserver) {
|
||||
for i, ob := range pm.Observers {
|
||||
for i, ob := range pm.observers {
|
||||
if ob == observer {
|
||||
pm.Observers = append(pm.Observers[:i], pm.Observers[i+1:]...)
|
||||
pm.observers = append(pm.observers[:i], pm.observers[i+1:]...)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// GetPlatforms 获取所有平台
|
||||
func (pm *PlatformMgr) GetPlatforms() []*Platform {
|
||||
var ret []*Platform
|
||||
for _, v := range pm.configs {
|
||||
if v != nil && v.Platform != nil {
|
||||
ret = append(ret, v.Platform)
|
||||
for _, v := range pm.platforms {
|
||||
if v != nil {
|
||||
ret = append(ret, v)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) CreatePlatform(id int32, isolated bool) *Platform {
|
||||
pltId := strconv.Itoa(int(id))
|
||||
p := NewPlatform(id, isolated)
|
||||
pm.Get(pltId).Platform = p
|
||||
if p != nil {
|
||||
pm.OnPlatformCreate(p)
|
||||
}
|
||||
return p
|
||||
}
|
||||
|
||||
// CreateDefaultPlatform 创建默认平台
|
||||
func (pm *PlatformMgr) CreateDefaultPlatform() {
|
||||
//默认平台数据
|
||||
defaultPlatform := pm.CreatePlatform(DefaultPlatformInt, false)
|
||||
defaultPlatform.Disable = false
|
||||
//默认平台配置
|
||||
pgc := defaultPlatform.PltGameCfg
|
||||
if pgc != nil {
|
||||
list := defaultPlatform.GameConfig
|
||||
if list != nil {
|
||||
for _, value := range srvdata.PBDB_GameFreeMgr.Datas.Arr {
|
||||
if value.GetGameId() > 0 {
|
||||
pgc.games[value.GetId()] = &webapiproto.GameFree{
|
||||
list.gameFreeId[value.GetId()] = &webapiproto.GameFree{
|
||||
Status: true,
|
||||
DbGameFree: value,
|
||||
}
|
||||
}
|
||||
}
|
||||
pgc.RecreateCache()
|
||||
list.Init()
|
||||
}
|
||||
}
|
||||
|
||||
// CreatePlatform 创建平台
|
||||
func (pm *PlatformMgr) CreatePlatform(id int32, isolated bool) *Platform {
|
||||
pltId := strconv.Itoa(int(id))
|
||||
p := NewPlatform(id, isolated)
|
||||
pm.platforms[pltId] = p
|
||||
pm.OnPlatformCreate(p)
|
||||
return p
|
||||
}
|
||||
|
||||
// UpsertPlatform 更新或新增平台
|
||||
func (pm *PlatformMgr) UpsertPlatform(name string, isolated, disable bool, id int32, url string,
|
||||
bindOption int32, serviceFlag bool, upgradeAccountGiveCoin, newAccountGiveCoin, perBankNoLimitAccount, exchangeMin,
|
||||
|
|
@ -126,7 +112,7 @@ func (pm *PlatformMgr) UpsertPlatform(name string, isolated, disable bool, id in
|
|||
userBindPromoterPrize int32, spreadWinLose bool, exchangeMultiple int32, registerVerifyCodeSwitch bool, merchantKey string,
|
||||
bindTelReward map[int32]int64) *Platform {
|
||||
pltId := strconv.Itoa(int(id))
|
||||
p := pm.Get(pltId).Platform
|
||||
p := pm.platforms[pltId]
|
||||
if p == nil {
|
||||
p = pm.CreatePlatform(id, isolated)
|
||||
}
|
||||
|
|
@ -188,50 +174,17 @@ func (pm *PlatformMgr) UpsertPlatform(name string, isolated, disable bool, id in
|
|||
return p
|
||||
}
|
||||
|
||||
// Get 获取平台相关配置,不会返回nil
|
||||
func (pm *PlatformMgr) Get(plt string) *PlatformConfig {
|
||||
cfg, ok := pm.configs[plt]
|
||||
if !ok {
|
||||
cfg = new(PlatformConfig)
|
||||
pm.configs[plt] = cfg
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) UpdateConfig(config any) {
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
switch v := config.(type) {
|
||||
case *webapiproto.PlayerPool:
|
||||
this.Get(v.GetPlatform()).PlayerPool = v
|
||||
default:
|
||||
logger.Logger.Errorf("unknown config type:%v", config)
|
||||
}
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) UpdateEntrySwitch(config *webapiproto.EntrySwitch) {
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
pm.Get(config.Platform).EntrySwitch = config
|
||||
}
|
||||
|
||||
// GetEntrySwitch 获取入口开关
|
||||
func (pm *PlatformMgr) GetEntrySwitch(plt string) *webapiproto.EntrySwitch {
|
||||
return pm.Get(plt).EntrySwitch
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) UpdateCommonNotices(config *webapiproto.CommonNoticeList) {
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
pm.Get(config.Platform).CommonNotices = config
|
||||
return pm.GetConfig(plt).EntrySwitch
|
||||
}
|
||||
|
||||
// GetCommonNotices 获取公告
|
||||
func (pm *PlatformMgr) GetCommonNotices(plt string) *webapiproto.CommonNoticeList {
|
||||
return pm.Get(plt).CommonNotices
|
||||
return pm.GetConfig(plt).CommonNotices
|
||||
}
|
||||
|
||||
// SyncGameFree 通知游戏配置更新
|
||||
func (pm *PlatformMgr) SyncGameFree(platform string, data *webapiproto.GameFree) {
|
||||
packSgf := &loginproto.SCSyncGameFree{}
|
||||
gc := &loginproto.GameConfig{
|
||||
|
|
@ -260,7 +213,7 @@ func (pm *PlatformMgr) SyncGameFree(platform string, data *webapiproto.GameFree)
|
|||
func (pm *PlatformMgr) UpsertGameFree(platform string, data *webapiproto.GameFree) {
|
||||
p := pm.GetPlatform(platform)
|
||||
if p != nil {
|
||||
pgc := p.PltGameCfg
|
||||
pgc := p.GameConfig
|
||||
if pgc != nil {
|
||||
dbGameFree := srvdata.PBDB_GameFreeMgr.GetData(data.DbGameFree.Id)
|
||||
if dbGameFree == nil {
|
||||
|
|
@ -272,11 +225,11 @@ func (pm *PlatformMgr) UpsertGameFree(platform string, data *webapiproto.GameFre
|
|||
CopyDBGameFreeField(dbGameFree, data.DbGameFree)
|
||||
}
|
||||
|
||||
old, ok := pgc.games[data.DbGameFree.Id]
|
||||
pgc.games[data.DbGameFree.Id] = data
|
||||
old, ok := pgc.gameFreeId[data.DbGameFree.Id]
|
||||
pgc.gameFreeId[data.DbGameFree.Id] = data
|
||||
found := false
|
||||
if ok && old != nil {
|
||||
if c, ok := pgc.cache[data.DbGameFree.Id]; ok {
|
||||
if c, ok := pgc.gameId[data.DbGameFree.Id]; ok {
|
||||
for i := 0; i < len(c); i++ {
|
||||
if c[i].DbGameFree.Id == data.DbGameFree.Id {
|
||||
c[i] = data
|
||||
|
|
@ -287,8 +240,9 @@ func (pm *PlatformMgr) UpsertGameFree(platform string, data *webapiproto.GameFre
|
|||
}
|
||||
}
|
||||
if !found {
|
||||
pgc.cache[data.DbGameFree.Id] = append(pgc.cache[data.DbGameFree.Id], data)
|
||||
pgc.gameId[data.DbGameFree.Id] = append(pgc.gameId[data.DbGameFree.Id], data)
|
||||
}
|
||||
// 新增的场次不会通知
|
||||
if ok && old != nil && !CompareGameFreeConfigChged(old, data) {
|
||||
pm.OnPlatformGameFreeUpdate(p, old, data)
|
||||
pm.SyncGameFree(p.IdStr, data)
|
||||
|
|
@ -298,29 +252,30 @@ func (pm *PlatformMgr) UpsertGameFree(platform string, data *webapiproto.GameFre
|
|||
}
|
||||
|
||||
func (pm *PlatformMgr) OnPlatformCreate(p *Platform) {
|
||||
for _, observer := range pm.Observers {
|
||||
for _, observer := range pm.observers {
|
||||
observer.OnPlatformCreate(p)
|
||||
}
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) OnPlatformGameFreeUpdate(p *Platform, oldCfg, newCfg *webapiproto.GameFree) {
|
||||
for _, observer := range pm.Observers {
|
||||
for _, observer := range pm.observers {
|
||||
observer.OnPlatformGameFreeUpdate(p, oldCfg, newCfg)
|
||||
}
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) OnPlatformDestroyByGameFreeId(p *Platform, gameFreeId int32) {
|
||||
for _, observer := range pm.Observers {
|
||||
for _, observer := range pm.observers {
|
||||
observer.OnPlatformDestroyByGameFreeId(p, gameFreeId)
|
||||
}
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) OnPlatformChangeDisabled(p *Platform, disable bool) {
|
||||
for _, observer := range pm.Observers {
|
||||
for _, observer := range pm.observers {
|
||||
observer.OnPlatformChangeDisabled(p, disable)
|
||||
}
|
||||
}
|
||||
|
||||
// ChangeDisabled 平台开关状态切换
|
||||
func (pm *PlatformMgr) ChangeDisabled(name string, disable bool) {
|
||||
if p := pm.GetPlatform(name); p != nil {
|
||||
if p.ChangeDisabled(disable) {
|
||||
|
|
@ -330,22 +285,10 @@ func (pm *PlatformMgr) ChangeDisabled(name string, disable bool) {
|
|||
}
|
||||
|
||||
func (pm *PlatformMgr) GetPlatform(platform string) *Platform {
|
||||
return pm.Get(platform).Platform
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) OnChangeSceneState(scene *Scene, startclose bool) {
|
||||
|
||||
}
|
||||
func (pm *PlatformMgr) PlayerLogin(p *Player) {
|
||||
if p.IsRob {
|
||||
return
|
||||
}
|
||||
platform := pm.GetPlatform(p.Platform)
|
||||
if platform != nil {
|
||||
platform.PlayerLogin(p)
|
||||
}
|
||||
return pm.platforms[platform]
|
||||
}
|
||||
|
||||
// Broadcast 给玩家发消息
|
||||
func (pm *PlatformMgr) Broadcast(packetid int, packet interface{}, players map[int32]*Player, exclude int32) {
|
||||
mgs := make(map[*netlib.Session][]*srvlibproto.MCSessionUnion)
|
||||
for _, p := range players {
|
||||
|
|
@ -367,18 +310,9 @@ func (pm *PlatformMgr) Broadcast(packetid int, packet interface{}, players map[i
|
|||
}
|
||||
}
|
||||
|
||||
func (pm *PlatformMgr) PlayerLogout(p *Player) {
|
||||
platform := pm.GetPlatform(p.Platform)
|
||||
if platform != nil && platform.Isolated {
|
||||
platform.PlayerLogout(p)
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) GetPackageTag(tag string) *webapiproto.AppInfo {
|
||||
logger.Logger.Tracef("Get %v platform.", tag)
|
||||
if pt, ok := this.PackageList[tag]; ok {
|
||||
if pt, ok := this.GetGlobalConfig().PackageList[tag]; ok {
|
||||
return pt
|
||||
}
|
||||
return nil
|
||||
|
|
@ -386,7 +320,7 @@ func (this *PlatformMgr) GetPackageTag(tag string) *webapiproto.AppInfo {
|
|||
|
||||
func (this *PlatformMgr) GetPlatformByPackageTag(tag string) (int32, int32, int32, int32, int32) {
|
||||
logger.Logger.Tracef("Get %v platform.", tag)
|
||||
if pt, ok := this.PackageList[tag]; ok {
|
||||
if pt, ok := this.GetGlobalConfig().PackageList[tag]; ok {
|
||||
return pt.PlatformId, 0, 0, 0, 0
|
||||
} else {
|
||||
return int32(DefaultPlatformInt), 0, 0, 0, 0
|
||||
|
|
@ -395,25 +329,13 @@ func (this *PlatformMgr) GetPlatformByPackageTag(tag string) (int32, int32, int3
|
|||
|
||||
func (this *PlatformMgr) GetCurrencyByPackageTag(tag string) (string, int32) {
|
||||
logger.Logger.Tracef("Get %v CurrencyRatio.", tag)
|
||||
if pt, ok := this.PackageList[tag]; ok && pt.CurrencyType != "" && pt.CurrencyRatio != 0 {
|
||||
if pt, ok := this.GetGlobalConfig().PackageList[tag]; ok && pt.CurrencyType != "" && pt.CurrencyRatio != 0 {
|
||||
return pt.CurrencyType, pt.CurrencyRatio
|
||||
}
|
||||
return "USD", 1
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) GetPlatformUpgradeAccountGiveCoinByPackageTag(tag string) int32 {
|
||||
platform, _, _, _, _ := this.GetPlatformByPackageTag(tag)
|
||||
return this.GetPlatformUpgradeAccountGiveCoinByPlatform(strconv.Itoa(int(platform)))
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) GetPlatformUpgradeAccountGiveCoinByPlatform(platform string) int32 {
|
||||
platformData := this.GetPlatform(platform)
|
||||
if platformData == nil {
|
||||
return 0
|
||||
}
|
||||
return platformData.UpgradeAccountGiveCoin
|
||||
}
|
||||
|
||||
// GetGameFrees 获取平台游戏配置
|
||||
func (this *PlatformMgr) GetGameFrees(platform string) map[int32]*webapiproto.GameFree {
|
||||
p := this.GetPlatform(platform)
|
||||
if p == nil {
|
||||
|
|
@ -421,8 +343,8 @@ func (this *PlatformMgr) GetGameFrees(platform string) map[int32]*webapiproto.Ga
|
|||
}
|
||||
|
||||
data := make(map[int32]*webapiproto.GameFree)
|
||||
for id, val := range p.PltGameCfg.games {
|
||||
if !val.Status || !this.GameStatus[id] {
|
||||
for id, val := range p.GameConfig.gameFreeId {
|
||||
if !val.Status || !this.GetGlobalConfig().GameStatus[id] {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -443,18 +365,19 @@ func (this *PlatformMgr) GetGameFrees(platform string) map[int32]*webapiproto.Ga
|
|||
return data
|
||||
}
|
||||
|
||||
// GetGameFree 获取平台游戏配置
|
||||
func (this *PlatformMgr) GetGameFree(platform string, gameFreeId int32) *webapiproto.GameFree {
|
||||
p := this.GetPlatform(platform)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
gf := p.PltGameCfg.GetGameCfg(gameFreeId)
|
||||
gf := p.GameConfig.GetGameConfig(gameFreeId)
|
||||
if gf == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !this.GameStatus[gameFreeId] || !gf.GetStatus() {
|
||||
if !this.GetGlobalConfig().GameStatus[gameFreeId] || !gf.GetStatus() {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -504,7 +427,7 @@ func (this *PlatformMgr) ChangeGameStatus(cfgs []*hallproto.GameConfig1) {
|
|||
for _, p := range this.GetPlatforms() {
|
||||
for _, cfg := range cfgs {
|
||||
gameFreeId := cfg.LogicId
|
||||
data, ok := p.PltGameCfg.games[gameFreeId]
|
||||
data, ok := p.GameConfig.gameFreeId[gameFreeId]
|
||||
if data != nil && ok && data.Status { //自身有这个游戏,且处于开启状态
|
||||
if !cfg.Status { //全局关,销毁游戏
|
||||
pack.GameCfg = append(pack.GameCfg, cfg)
|
||||
|
|
@ -562,187 +485,6 @@ func (this *PlatformMgr) Init() {
|
|||
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) LoadPlatform() {
|
||||
//构建默认的平台数据
|
||||
this.CreateDefaultPlatform()
|
||||
//获取平台数据 platform_list
|
||||
|
||||
//不使用etcd的情况下走api获取
|
||||
if !model.GameParamData.UseEtcd {
|
||||
//buf, err := webapi.API_GetPlatformData(common.GetAppId())
|
||||
//if err == nil {
|
||||
// ar := webapi_proto.ASPlatformInfo{}
|
||||
// err = proto.Unmarshal(buf, &ar)
|
||||
// if err == nil && ar.Tag == webapi_proto.TagCode_SUCCESS {
|
||||
// for _, value := range ar.Platforms {
|
||||
// platform := this.CreatePlatform(value.Id, value.Isolated)
|
||||
// platform.Name = value.PlatformName
|
||||
// //platform.ConfigId = value.ConfigId
|
||||
// platform.Disable = value.Disabled
|
||||
// platform.ServiceUrl = value.CustomService
|
||||
// platform.CustomType = value.CustomType
|
||||
// platform.BindOption = value.BindOption
|
||||
// //platform.ServiceFlag = value.ServiceFlag
|
||||
// platform.UpgradeAccountGiveCoin = value.UpgradeAccountGiveCoin
|
||||
// platform.NewAccountGiveCoin = value.NewAccountGiveCoin //新账号奖励金币
|
||||
// platform.PerBankNoLimitAccount = value.PerBankNoLimitAccount //同一银行卡号绑定用户数量限制
|
||||
// platform.ExchangeMin = value.ExchangeMin
|
||||
// platform.ExchangeLimit = value.ExchangeLimit
|
||||
// platform.ExchangeTax = value.ExchangeTax
|
||||
// platform.ExchangeFlow = value.ExchangeFlow
|
||||
// platform.ExchangeVer = value.ExchangeVer
|
||||
// platform.ExchangeFlag = value.ExchangeFlag
|
||||
// platform.ExchangeForceTax = value.ExchangeForceTax
|
||||
// platform.ExchangeGiveFlow = value.ExchangeGiveFlow
|
||||
// platform.VipRange = value.VipRange
|
||||
// //platform.OtherParams = value.OtherParams
|
||||
// platform.SpreadConfig = value.SpreadConfig
|
||||
// //platform.RankSwitch = value.Leaderboard
|
||||
// //platform.ClubConfig = value.ClubConfig
|
||||
// platform.VerifyCodeType = value.VerifyCodeType
|
||||
// //platform.RegisterVerifyCodeSwitch = value.RegisterVerifyCodeSwitch
|
||||
// for _, v := range value.ThirdGameMerchant {
|
||||
// platform.ThirdGameMerchant[v.Id] = v.Merchant
|
||||
// }
|
||||
// //platform.NeedDeviceInfo = value.NeedDeviceInfo
|
||||
// platform.NeedSameName = value.NeedSameName
|
||||
// platform.PerBankNoLimitName = value.PerBankNoLimitName
|
||||
// platform.ExchangeAlipayMax = value.ExchangeAlipayMax
|
||||
// platform.ExchangeBankMax = value.ExchangeBankMax
|
||||
// //platform.DgHboConfig = value.DgHboConfig
|
||||
// platform.IsCanUserBindPromoter = value.IsCanUserBindPromoter
|
||||
// platform.UserBindPromoterPrize = value.UserBindPromoterPrize
|
||||
// //platform.SpreadWinLose = value.SpreadWinLose
|
||||
// platform.ExchangeMultiple = value.ExchangeMultiple
|
||||
// if platform.ExchangeFlag&ExchangeFlag_Flow == 0 { //修正下
|
||||
// platform.ExchangeFlow = 0
|
||||
// }
|
||||
// platform.MerchantKey = value.MerchantKey
|
||||
// }
|
||||
// logger.Logger.Trace("Create platform")
|
||||
// } else {
|
||||
// logger.Logger.Error("Unmarshal platform data error:", err)
|
||||
// }
|
||||
//} else {
|
||||
// logger.Logger.Error("Get platfrom data error:", err)
|
||||
//}
|
||||
} else {
|
||||
EtcdMgrSington.InitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) LoadPlatformGameFree() {
|
||||
//不使用etcd的情况下走api获取
|
||||
|
||||
//获取平台详细信息 game_config_list
|
||||
if !model.GameParamData.UseEtcd {
|
||||
//logger.Logger.Trace("API_GetPlatformConfigData")
|
||||
//buf, err := webapi.API_GetPlatformConfigData(common.GetAppId())
|
||||
//if err == nil {
|
||||
// pcdr := &webapi_proto.ASGameConfig{}
|
||||
// err = proto.Unmarshal(buf, pcdr)
|
||||
// if err == nil && pcdr.Tag == webapi_proto.TagCode_SUCCESS {
|
||||
// platGameCfgs := pcdr.GetConfigs()
|
||||
//
|
||||
// //遍历所有平台配置
|
||||
// for _, pgc := range platGameCfgs {
|
||||
// platormId := pgc.GetPlatformId()
|
||||
// platform := this.GetPlatform(strconv.Itoa(int(platormId)))
|
||||
// if platform == nil {
|
||||
// continue
|
||||
// }
|
||||
//
|
||||
// for _, config := range pgc.GetDbGameFrees() {
|
||||
// dbGameFree := srvdata.PBDB_GameFreeMgr.GetData(config.DbGameFree.Id)
|
||||
// if dbGameFree == nil {
|
||||
// logger.Logger.Error("Platform config data error logic id:", config)
|
||||
// continue
|
||||
// }
|
||||
// platform.PltGameCfg.games[config.DbGameFree.Id] = config
|
||||
// if config.GetDbGameFree() == nil { //数据容错
|
||||
// config.DbGameFree = dbGameFree
|
||||
// } else {
|
||||
// CopyDBGameFreeField(dbGameFree, config.DbGameFree)
|
||||
// }
|
||||
// logger.Logger.Info("PlatformGameConfig data:", config.DbGameFree.Id)
|
||||
// }
|
||||
// platform.PltGameCfg.RecreateCache()
|
||||
// }
|
||||
// } else {
|
||||
// logger.Logger.Error("Unmarshal platform config data error:", err, string(buf))
|
||||
// }
|
||||
//} else {
|
||||
// logger.Logger.Error("Get platfrom config data error:", err)
|
||||
//}
|
||||
} else {
|
||||
EtcdMgrSington.InitPlatformGameConfig()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) LoadPlatformPackage() {
|
||||
if !model.GameParamData.UseEtcd {
|
||||
|
||||
} else {
|
||||
EtcdMgrSington.InitPlatformPackage()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) LoadCommonNotice() {
|
||||
if !model.GameParamData.UseEtcd {
|
||||
|
||||
} else {
|
||||
EtcdMgrSington.InitCommonNotice()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) LoadGameMatch() {
|
||||
if !model.GameParamData.UseEtcd {
|
||||
|
||||
} else {
|
||||
EtcdMgrSington.InitGameMatchDate()
|
||||
}
|
||||
}
|
||||
|
||||
// LoadGlobalGameStatus 加载超管平台游戏开关
|
||||
func (this *PlatformMgr) LoadGlobalGameStatus() {
|
||||
//不使用etcd的情况下走api获取
|
||||
if !model.GameParamData.UseEtcd {
|
||||
////获取全局游戏开关
|
||||
//logger.Logger.Trace("API_GetGlobalGameStatus")
|
||||
//buf, err := webapi.API_GetGlobalGameStatus(common.GetAppId())
|
||||
//if err == nil {
|
||||
// as := webapi_proto.ASGameConfigGlobal{}
|
||||
// err = proto.Unmarshal(buf, &as)
|
||||
// if err == nil && as.Tag == webapi_proto.TagCode_SUCCESS {
|
||||
// if as.GetGameStatus() != nil {
|
||||
// status := as.GetGameStatus().GetGameStatus()
|
||||
// for _, v := range status {
|
||||
// gameId := v.GetGameId()
|
||||
// status := v.GetStatus()
|
||||
// PlatformMgrSingleton.GameStatus[gameId] = status
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// logger.Logger.Error("Unmarshal GlobalGameStatus data error:", err)
|
||||
// }
|
||||
//} else {
|
||||
// logger.Logger.Error("Get GlobalGameStatus data error:", err)
|
||||
//}
|
||||
} else {
|
||||
EtcdMgrSington.InitGameGlobalStatus()
|
||||
}
|
||||
}
|
||||
|
||||
// LoadEntrySwitch 拉取界面入口开关
|
||||
func (this *PlatformMgr) LoadEntrySwitch() {
|
||||
//不使用etcd的情况下走api获取
|
||||
if model.GameParamData.UseEtcd {
|
||||
EtcdMgrSington.InitEntrySwitch()
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func (this *PlatformMgr) Update() {
|
||||
|
||||
}
|
||||
|
|
@ -852,40 +594,5 @@ func CopyDBGameFreeField(src, dst *serverproto.DB_GameFree) {
|
|||
|
||||
func init() {
|
||||
ClockMgrSington.RegisteSinker(PlatformMgrSingleton)
|
||||
module.RegisteModule(PlatformMgrSingleton, time.Second*2, 0)
|
||||
|
||||
RegisterParallelLoadFunc("拉取平台数据", func() error {
|
||||
PlatformMgrSingleton.LoadPlatform()
|
||||
return nil
|
||||
})
|
||||
|
||||
RegisterParallelLoadFunc("拉取平台游戏开关", func() error {
|
||||
PlatformMgrSingleton.LoadGlobalGameStatus()
|
||||
return nil
|
||||
})
|
||||
|
||||
RegisterParallelLoadFunc("拉取游戏入口开关", func() error {
|
||||
PlatformMgrSingleton.LoadEntrySwitch()
|
||||
return nil
|
||||
})
|
||||
|
||||
RegisterParallelLoadFunc("拉取平台游戏详细配置", func() error {
|
||||
PlatformMgrSingleton.LoadPlatformGameFree()
|
||||
return nil
|
||||
})
|
||||
|
||||
RegisterParallelLoadFunc("平台包数据", func() error {
|
||||
PlatformMgrSingleton.LoadPlatformPackage()
|
||||
return nil
|
||||
})
|
||||
|
||||
RegisterParallelLoadFunc("平台公告", func() error {
|
||||
PlatformMgrSingleton.LoadCommonNotice()
|
||||
return nil
|
||||
})
|
||||
|
||||
RegisterParallelLoadFunc("平台比赛", func() error {
|
||||
PlatformMgrSingleton.LoadGameMatch()
|
||||
return nil
|
||||
})
|
||||
module.RegisteModule(PlatformMgrSingleton, time.Hour, 0)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -321,8 +321,6 @@ func (this *Player) OnLogined() {
|
|||
|
||||
this.BindGroupTag([]string{this.Platform})
|
||||
|
||||
PlatformMgrSingleton.PlayerLogin(this)
|
||||
|
||||
gameStateMgr.PlayerClear(this)
|
||||
|
||||
//玩家登录事件
|
||||
|
|
@ -416,8 +414,6 @@ func (this *Player) OnRehold() {
|
|||
//登录事件
|
||||
this.ReportLoginEvent()
|
||||
|
||||
PlatformMgrSingleton.PlayerLogin(this)
|
||||
|
||||
gameStateMgr.PlayerClear(this)
|
||||
|
||||
//玩家重连事件
|
||||
|
|
@ -527,7 +523,7 @@ func (this *Player) SendGameConfig(gameId int32, plf, chl string) {
|
|||
|
||||
gps := PlatformMgrSingleton.GetGameFrees(this.Platform)
|
||||
for _, v := range gps {
|
||||
if v.Status && PlatformMgrSingleton.GameStatus[v.DbGameFree.Id] {
|
||||
if v.Status && PlatformMgrSingleton.GetGlobalConfig().GameStatus[v.DbGameFree.Id] {
|
||||
if v.DbGameFree.GetGameRule() != 0 && v.DbGameFree.GetGameId() == gameId {
|
||||
// 场次配置
|
||||
lgc := &hall_proto.GameConfig1{
|
||||
|
|
@ -1524,7 +1520,6 @@ func (this *Player) DropLine() {
|
|||
this.SendToGame(int(server_proto.SSPacketID_PACKET_WG_PLAYERDROPLINE), pack)
|
||||
}
|
||||
PlayerMgrSington.DroplinePlayer(this)
|
||||
PlatformMgrSingleton.PlayerLogout(this)
|
||||
this.sid = 0
|
||||
this.gateSess = nil
|
||||
//统计在线时长日志
|
||||
|
|
@ -1554,7 +1549,6 @@ func (this *Player) Logout() {
|
|||
FriendMgrSington.UpdateLogoutTime(this.Platform, this.SnId)
|
||||
//clubManager.DropLinePlayer(this.SnId)
|
||||
PlayerMgrSington.DroplinePlayer(this)
|
||||
PlatformMgrSingleton.PlayerLogout(this)
|
||||
if !this.IsRobot() {
|
||||
PlayerOnlineSington.Check = true
|
||||
}
|
||||
|
|
@ -1620,7 +1614,6 @@ func (this *Player) OnLogouted() {
|
|||
MatchSeasonMgrSington.SaveMatchSeasonData(this.SnId, true)
|
||||
}
|
||||
//平台数据
|
||||
PlatformMgrSingleton.PlayerLogout(this)
|
||||
//PlayerSingleAdjustMgr.DelPlayerData(this.Platform, this.SnId)
|
||||
|
||||
//离线玩家清空俱乐部信息
|
||||
|
|
@ -4373,12 +4366,7 @@ func (this *Player) BindTelReward() {
|
|||
}
|
||||
|
||||
func (this *Player) UpdateShopID(shopId int32) {
|
||||
var shopInfo *ShopInfo
|
||||
if shops, ok := ShopMgrSington.ShopInfos[this.Platform]; ok {
|
||||
if shopInf, ok := shops[shopId]; ok {
|
||||
shopInfo = shopInf
|
||||
}
|
||||
}
|
||||
var shopInfo = ShopMgrSington.ConfigMgr.GetShopInfo(this.Platform, shopId)
|
||||
if shopInfo != nil && shopInfo.FirstSwitch {
|
||||
if !slices.Contains(this.ShopID, int(shopInfo.Id)) {
|
||||
this.ShopID = append(this.ShopID, int(shopInfo.Id))
|
||||
|
|
|
|||
|
|
@ -906,7 +906,6 @@ func (this *Scene) OnClose() {
|
|||
this.Broadcast(int(hallproto.GameHallPacketID_PACKET_SC_DESTROYROOM), scDestroyRoom, 0)
|
||||
|
||||
this.closed = true
|
||||
PlatformMgrSingleton.OnChangeSceneState(this, this.closed)
|
||||
this.sp.OnStop(this)
|
||||
//NpcServerAgentSington.OnSceneClose(this)
|
||||
for _, p := range this.players {
|
||||
|
|
@ -954,7 +953,6 @@ func (this *Scene) ForceDelete(isManual bool) {
|
|||
this.manualDelete = isManual
|
||||
this.deleting = true
|
||||
this.force = true
|
||||
PlatformMgrSingleton.OnChangeSceneState(this, this.force)
|
||||
pack := &serverproto.WGDestroyScene{
|
||||
SceneId: proto.Int(this.sceneId),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,48 +86,11 @@ const (
|
|||
)
|
||||
|
||||
var ShopMgrSington = &ShopMgr{
|
||||
ShopInfos: make(map[string]map[int32]*ShopInfo),
|
||||
ExShops: make(map[string]*webapi_proto.ExchangeShopList),
|
||||
ConfigMgr: model.NewConfigMgr(),
|
||||
}
|
||||
|
||||
type ShopMgr struct {
|
||||
ShopInfos map[string]map[int32]*ShopInfo // Platform:商品id:商品信息
|
||||
ExShops map[string]*webapi_proto.ExchangeShopList //兑换商品 消耗v卡
|
||||
}
|
||||
|
||||
type ShopInfo struct {
|
||||
Id int32 // 商品ID
|
||||
Page int32 // 页面 1,金币页面 2,钻石页面 3,道具页面
|
||||
Order int32 // 排序 页面内商品的位置排序
|
||||
Location []int32 // 显示位置 第1位,竖版大厅 第2位,Tienlen1级选场 第3位,捕鱼1级选场
|
||||
Picture string // 图片id
|
||||
Name string // 名称
|
||||
Label []int32 // 标签
|
||||
Ad int32 // 是否观看广告 0不看
|
||||
AdTime int32 // 观看几次广告
|
||||
RepeatTimes int32 // 领取次数
|
||||
CoolingTime []int32 // 观看冷却时间
|
||||
Type int32 // 获得类型 1,金币 2,钻石 3,道具类型
|
||||
Amount int64 // 获得数量
|
||||
AddArea []int32 // 加送百分比(比如加送10%,就配置110)
|
||||
ItemId int32 // 获得道具ID
|
||||
AddItemInfo []*shop.ItemInfo // 获得道具
|
||||
ConstType int32 // 购买消耗类型 1,金币 2,钻石 3,美金 4,柬埔寨币
|
||||
CostArea []int32 // 消耗数量区间
|
||||
VipLevel int32 //Vip等级限制
|
||||
Ratio int32 //权重
|
||||
EndTime int32 //新手礼包结束时间间隔
|
||||
//缓存数据
|
||||
AdLookedNum int32 //已经观看的次数
|
||||
AdReceiveNum int32 //已经领取的次数
|
||||
RemainingTime int32
|
||||
LastLookTime int32
|
||||
RoleAdded int32
|
||||
PetAdded int32
|
||||
RoleAddedId int32 //加成人物ID
|
||||
PetAddedId int32 //加成宠物ID
|
||||
FirstSwitch bool // 首冲翻倍
|
||||
AmountFinal int64 // 实际获得数量
|
||||
*model.ConfigMgr
|
||||
}
|
||||
|
||||
type ExchangeShopInfo struct {
|
||||
|
|
@ -150,55 +113,12 @@ func (this *ShopMgr) ModuleName() string {
|
|||
func (this *ShopMgr) Init() {
|
||||
}
|
||||
|
||||
// UpdateItemShop 更新商品信息
|
||||
func (this *ShopMgr) UpdateItemShop(cfgs *webapi_proto.ItemShopList) {
|
||||
if cfgs == nil {
|
||||
return
|
||||
}
|
||||
shopInfos := make(map[int32]*ShopInfo)
|
||||
for _, itemShop := range cfgs.List {
|
||||
var itemInfo []*shop.ItemInfo
|
||||
for key, value := range itemShop.Award {
|
||||
itemInfo = append(itemInfo, &shop.ItemInfo{
|
||||
ItemId: int32(key),
|
||||
ItemNum: value,
|
||||
})
|
||||
}
|
||||
|
||||
shopInfos[itemShop.Id] = &ShopInfo{
|
||||
Id: itemShop.Id,
|
||||
ItemId: itemShop.ItemId,
|
||||
Page: itemShop.Page,
|
||||
Order: itemShop.Order,
|
||||
Type: itemShop.Type,
|
||||
Location: itemShop.Location,
|
||||
Picture: itemShop.Picture,
|
||||
Name: itemShop.Name,
|
||||
Ad: itemShop.Ad,
|
||||
AdTime: itemShop.AdTime,
|
||||
RepeatTimes: itemShop.RepeatTimes,
|
||||
CoolingTime: itemShop.CoolingTime,
|
||||
Label: itemShop.Label,
|
||||
AddArea: itemShop.AddArea,
|
||||
Amount: int64(itemShop.Amount),
|
||||
ConstType: itemShop.ConstType,
|
||||
CostArea: itemShop.CostArea,
|
||||
AddItemInfo: itemInfo,
|
||||
VipLevel: itemShop.VipLevel,
|
||||
Ratio: itemShop.Ratio,
|
||||
EndTime: itemShop.EndTime,
|
||||
FirstSwitch: itemShop.FirstSwitch,
|
||||
}
|
||||
}
|
||||
this.ShopInfos[cfgs.Platform] = shopInfos
|
||||
}
|
||||
|
||||
// UpExShop 更新兑换商品信息
|
||||
func (this *ShopMgr) UpExShop(cfgs *webapi_proto.ExchangeShopList) {
|
||||
this.ExShops[cfgs.GetPlatform()] = cfgs
|
||||
this.GetConfig(cfgs.Platform).ExchangeShopList = cfgs
|
||||
}
|
||||
|
||||
func (this *ShopMgr) GetShopInfoProto(si *ShopInfo, p *Player, vipShopId int32) (shopInfo *shop.ShopInfo) {
|
||||
func (this *ShopMgr) GetShopInfoProto(si *model.ShopInfo, p *Player, vipShopId int32) (shopInfo *shop.ShopInfo) {
|
||||
if si == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -258,16 +178,11 @@ func (this *ShopMgr) GetShopInfoProto(si *ShopInfo, p *Player, vipShopId int32)
|
|||
}
|
||||
|
||||
// GetShopInfo 获取玩家某个商品信息(例如玩家看广告领取)
|
||||
func (this *ShopMgr) GetShopInfo(shopId int32, p *Player) *ShopInfo {
|
||||
func (this *ShopMgr) GetShopInfo(shopId int32, p *Player) *model.ShopInfo {
|
||||
if shopId == 0 {
|
||||
return nil
|
||||
}
|
||||
var shopInfo *ShopInfo
|
||||
if shops, ok := this.ShopInfos[p.Platform]; ok {
|
||||
if shopInf, ok1 := shops[shopId]; ok1 {
|
||||
shopInfo = shopInf
|
||||
}
|
||||
}
|
||||
var shopInfo = this.ConfigMgr.GetShopInfo(p.Platform, shopId)
|
||||
if shopInfo != nil {
|
||||
// AdLookedNum 已看次数
|
||||
// AdReceiveNum 已领次数
|
||||
|
|
@ -299,7 +214,7 @@ func (this *ShopMgr) GetShopInfo(shopId int32, p *Player) *ShopInfo {
|
|||
firstBuy = !slices.Contains(p.ShopID, int(shopInfo.Id))
|
||||
}
|
||||
|
||||
return &ShopInfo{
|
||||
return &model.ShopInfo{
|
||||
Id: shopInfo.Id,
|
||||
Ad: shopInfo.Ad,
|
||||
AdTime: shopInfo.AdTime,
|
||||
|
|
@ -347,7 +262,9 @@ func (this *ShopMgr) GetShopInfos(p *Player, nowLocation int) []*shop.ShopInfo {
|
|||
this.UpdateVipShopData(p)
|
||||
}
|
||||
|
||||
for _, shopInfo := range this.ShopInfos[p.Platform] {
|
||||
shopInfos := this.GetConfig(p.Platform).ShopInfos
|
||||
|
||||
for _, shopInfo := range shopInfos {
|
||||
if nowLocation == -1 || (nowLocation < len(shopInfo.Location) && shopInfo.Location[nowLocation] == 1) {
|
||||
if shopInfo.Page == ShopPageVip {
|
||||
continue
|
||||
|
|
@ -418,8 +335,14 @@ func (this *ShopMgr) GetShopInfos(p *Player, nowLocation int) []*shop.ShopInfo {
|
|||
}
|
||||
}
|
||||
//VIP商城数据
|
||||
if shopInfos == nil {
|
||||
return newShops
|
||||
}
|
||||
for i, data := range p.VipShopData {
|
||||
shopInfo := this.ShopInfos[p.Platform][data.Id]
|
||||
shopInfo := shopInfos[data.Id]
|
||||
if shopInfo == nil {
|
||||
continue
|
||||
}
|
||||
var AdLookedNum, AdReceiveNum, remainingTime int32
|
||||
var lastLookTime int64
|
||||
if shopInfo.Ad > 0 {
|
||||
|
|
@ -522,9 +445,9 @@ func (this *ShopMgr) UpdateVipShopData(p *Player) {
|
|||
return
|
||||
}
|
||||
//获取对应VIP等级物品列表
|
||||
vipShopInfoMap := make(map[int32]*ShopInfo)
|
||||
vipShopInfoMap := make(map[int32]*model.ShopInfo)
|
||||
var sumRatio = 0 //权重
|
||||
for _, shopInfo := range this.ShopInfos[p.Platform] {
|
||||
for _, shopInfo := range this.GetConfig(p.Platform).ShopInfos {
|
||||
if shopInfo.Page == ShopPageVip && shopInfo.VipLevel == p.VIP {
|
||||
vipShopInfoMap[shopInfo.Id] = shopInfo
|
||||
sumRatio += int(shopInfo.Ratio)
|
||||
|
|
@ -560,12 +483,7 @@ func (this *ShopMgr) UpdateVipShopData(p *Player) {
|
|||
|
||||
// LookAdReceive 看广告领取商品,校验领取次数
|
||||
func (this *ShopMgr) LookAdReceive(shopId int32, p *Player, position int32) shop.OpResultCode {
|
||||
var shopInfo *ShopInfo
|
||||
if shops, ok := this.ShopInfos[p.Platform]; ok {
|
||||
if shopInf, ok1 := shops[shopId]; ok1 {
|
||||
shopInfo = shopInf
|
||||
}
|
||||
}
|
||||
var shopInfo = this.ConfigMgr.GetShopInfo(p.Platform, shopId)
|
||||
if shopInfo == nil {
|
||||
logger.Logger.Errorf("this shop == nil shopId[%v] ", shopId)
|
||||
return shop.OpResultCode_OPRC_Error
|
||||
|
|
@ -585,7 +503,7 @@ func (this *ShopMgr) LookAdReceive(shopId int32, p *Player, position int32) shop
|
|||
}
|
||||
|
||||
// ReceiveVCPayShop 领取VC看广告商品
|
||||
func (this *ShopMgr) ReceiveVCPayShop(shopInfo *ShopInfo, p *Player, vipShopId, position int32) shop.OpResultCode {
|
||||
func (this *ShopMgr) ReceiveVCPayShop(shopInfo *model.ShopInfo, p *Player, vipShopId, position int32) shop.OpResultCode {
|
||||
if shopInfo == nil {
|
||||
logger.Logger.Errorf("this shop == nil")
|
||||
return shop.OpResultCode_OPRC_Error
|
||||
|
|
@ -596,7 +514,7 @@ func (this *ShopMgr) ReceiveVCPayShop(shopInfo *ShopInfo, p *Player, vipShopId,
|
|||
}
|
||||
|
||||
// PayAway 商城 领取商品
|
||||
func (this *ShopMgr) PayAway(shopInfo *ShopInfo, p *Player, vipShopId, position int32) {
|
||||
func (this *ShopMgr) PayAway(shopInfo *model.ShopInfo, p *Player, vipShopId, position int32) {
|
||||
shopName := shopInfo.Name + "|" + strconv.Itoa(int(shopInfo.Id))
|
||||
costNum := rand.Int31n(shopInfo.CostArea[1]-shopInfo.CostArea[0]+1) + shopInfo.CostArea[0]
|
||||
if shopInfo.Page == ShopPageVip {
|
||||
|
|
@ -713,12 +631,7 @@ func (this *ShopMgr) GetAmountFinal(p *Player, shopId, vipShopId int32) int64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
var shopInfo *ShopInfo
|
||||
if shops, ok := this.ShopInfos[p.Platform]; ok {
|
||||
if shopInf, ok := shops[shopId]; ok {
|
||||
shopInfo = shopInf
|
||||
}
|
||||
}
|
||||
var shopInfo = this.ConfigMgr.GetShopInfo(p.Platform, shopId)
|
||||
if shopInfo == nil {
|
||||
return 0
|
||||
}
|
||||
|
|
@ -769,7 +682,7 @@ func (this *ShopMgr) GetAmountFinal(p *Player, shopId, vipShopId int32) int64 {
|
|||
}
|
||||
|
||||
// 商城购买 额外增加道具
|
||||
func (this *ShopMgr) ShopAddItem(shopInfo *ShopInfo, p *Player) {
|
||||
func (this *ShopMgr) ShopAddItem(shopInfo *model.ShopInfo, p *Player) {
|
||||
if shopInfo.AddItemInfo != nil {
|
||||
for _, info := range shopInfo.AddItemInfo {
|
||||
item := &Item{ItemId: info.ItemId, ItemNum: info.ItemNum, ObtainTime: time.Now().Unix()}
|
||||
|
|
@ -784,7 +697,7 @@ func (this *ShopMgr) ShopAddItem(shopInfo *ShopInfo, p *Player) {
|
|||
}
|
||||
|
||||
// CreateVCOrder 产生VC订单,记录看广告获取商品的订单
|
||||
func (this *ShopMgr) CreateVCOrder(shopInfo *ShopInfo, snid, costNum int32, platform string, amount [3]int32) {
|
||||
func (this *ShopMgr) CreateVCOrder(shopInfo *model.ShopInfo, snid, costNum int32, platform string, amount [3]int32) {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
//获得类型
|
||||
if shopInfo.Type < ShopTypeCoin && shopInfo.Type > ShopTypeItem {
|
||||
|
|
@ -811,7 +724,7 @@ func (this *ShopMgr) CreateVCOrder(shopInfo *ShopInfo, snid, costNum int32, plat
|
|||
}
|
||||
|
||||
func (this *ShopMgr) GetExchangeData(platform string, id int32) *ExchangeShopInfo {
|
||||
if exShops := this.ExShops[platform]; exShops != nil {
|
||||
if exShops := this.GetConfig(platform).ExchangeShopList; exShops != nil {
|
||||
for _, data := range exShops.List {
|
||||
if data.Id == id {
|
||||
var exType []*shop.ExchangeType
|
||||
|
|
@ -1126,7 +1039,10 @@ func (this *ShopMgr) ShopCheckShowRed(p *Player) {
|
|||
}
|
||||
for i := 0; i < 3; i++ {
|
||||
var isShow bool
|
||||
for _, shopInfo := range this.ShopInfos[p.Platform] {
|
||||
for _, shopInfo := range this.GetConfig(p.Platform).ShopInfos {
|
||||
if shopInfo == nil {
|
||||
continue
|
||||
}
|
||||
var AdLookedNum, remainingTime int32
|
||||
var lastLookTime int64
|
||||
if shopInfo.Ad > 0 && (i == -1 || (i < len(shopInfo.Location) && shopInfo.Location[i] == 1)) {
|
||||
|
|
@ -1171,7 +1087,7 @@ func (this *ShopMgr) SendAPICreateOrder(p *Player, ConfigPayId int32, data any,
|
|||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
var amount [ShopTypeItem]int32
|
||||
var dbShop *model.DbShop
|
||||
if shopInfo, ok := data.(*ShopInfo); ok {
|
||||
if shopInfo, ok := data.(*model.ShopInfo); ok {
|
||||
// 目前现金只能买钻石
|
||||
var addTotal = int64(shopInfo.Amount)
|
||||
added := rand.Int31n(shopInfo.AddArea[1]-shopInfo.AddArea[0]+1) + shopInfo.AddArea[0]
|
||||
|
|
|
|||
|
|
@ -1538,7 +1538,7 @@ func init() {
|
|||
for _, s := range gameStatus {
|
||||
gameId := s.GetGameId()
|
||||
status := s.GetStatus()
|
||||
PlatformMgrSingleton.GameStatus[gameId] = status
|
||||
PlatformMgrSingleton.GetGlobalConfig().GameStatus[gameId] = status
|
||||
}
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
pack.Msg = ""
|
||||
|
|
@ -1573,9 +1573,9 @@ func init() {
|
|||
for _, v := range dbGameFrees {
|
||||
dbGameFree := v.GetDbGameFree()
|
||||
logicId := dbGameFree.GetId()
|
||||
platform.PltGameCfg.games[logicId] = v
|
||||
platform.GameConfig.gameFreeId[logicId] = v
|
||||
}
|
||||
platform.PltGameCfg.RecreateCache()
|
||||
platform.GameConfig.Init()
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
pack.Msg = ""
|
||||
return common.ResponseTag_Ok, pack
|
||||
|
|
@ -1726,7 +1726,7 @@ func init() {
|
|||
|
||||
// 首次购买现金商品,获得翻倍;标记商品已经购买过
|
||||
if addcoin+diamond > 0 {
|
||||
if m, ok := ShopMgrSington.ShopInfos[platform]; ok && m != nil {
|
||||
if m := ShopMgrSington.GetConfig(platform).ShopInfos; m != nil {
|
||||
if shopInfo, ok := m[msg.GetShopId()]; ok && shopInfo != nil {
|
||||
if shopInfo.FirstSwitch {
|
||||
if !slices.Contains(findPlayer.ShopID, int(msg.GetShopId())) {
|
||||
|
|
@ -4537,7 +4537,7 @@ func getPlayerDataParam(p *model.PlayerData, season *model.PlayerRankSeason) *mo
|
|||
return nil
|
||||
}
|
||||
|
||||
data := PlatformMgrSingleton.Get(p.Platform).PlayerPool
|
||||
data := PlatformMgrSingleton.GetConfig(p.Platform).PlayerPool
|
||||
|
||||
rankScore := make(map[int64]int64)
|
||||
if season == nil {
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ func (this *WelfareMgr) UpdateSign7(cfg *webapi_proto.Welfare7SignDateList) {
|
|||
if model.GameParamData.TestActSwitch {
|
||||
cfg.Switch = model.WelfareOpen
|
||||
}
|
||||
this.GetAllConfig(cfg.Platform).Welfare7SignDateList = cfg
|
||||
this.GetConfig(cfg.Platform).Welfare7SignDateList = cfg
|
||||
}
|
||||
|
||||
func (this *WelfareMgr) UpdateTurnplate(cfg *webapi_proto.WelfareTurnplateDateList) {
|
||||
|
|
@ -130,7 +130,7 @@ func (this *WelfareMgr) UpdateTurnplate(cfg *webapi_proto.WelfareTurnplateDateLi
|
|||
cfg.Switch = model.WelfareOpen
|
||||
}
|
||||
s := int32(0)
|
||||
info := this.GetAllConfig(cfg.Platform)
|
||||
info := this.GetConfig(cfg.Platform)
|
||||
if info.WelfareTurnplateDateList != nil {
|
||||
s = info.WelfareTurnplateDateList.Switch
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ func (this *WelfareMgr) UpdateBlindBox(cfg *webapi_proto.WelfareBlindBoxDataList
|
|||
cfg.Switch = model.WelfareOpen
|
||||
}
|
||||
s := int32(0)
|
||||
info := this.GetAllConfig(cfg.Platform)
|
||||
info := this.GetConfig(cfg.Platform)
|
||||
if info.WelfareBlindBoxDataList != nil {
|
||||
s = info.WelfareBlindBoxDataList.Switch
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ func (this *WelfareMgr) UpdateFirstPay(cfg *webapi_proto.WelfareFirstPayDataList
|
|||
cfg.Switch = model.WelfareOpen
|
||||
}
|
||||
s := int32(0)
|
||||
info := this.GetAllConfig(cfg.Platform)
|
||||
info := this.GetConfig(cfg.Platform)
|
||||
if info.WelfareFirstPayDataList != nil {
|
||||
s = info.WelfareFirstPayDataList.Switch
|
||||
}
|
||||
|
|
@ -185,7 +185,7 @@ func (this *WelfareMgr) UpdateContinuousPay(cfg *webapi_proto.WelfareContinuousP
|
|||
cfg.Switch = model.WelfareOpen
|
||||
}
|
||||
s := int32(0)
|
||||
info := this.GetAllConfig(cfg.Platform)
|
||||
info := this.GetConfig(cfg.Platform)
|
||||
if info.WelfareContinuousPayDataList != nil {
|
||||
s = info.WelfareContinuousPayDataList.Switch
|
||||
}
|
||||
|
|
@ -204,7 +204,7 @@ func (this *WelfareMgr) UpdatePhoneLotteryStatus(cfg *webapi_proto.WelfarePhoneL
|
|||
cfg.Switch = model.WelfareOpen
|
||||
}
|
||||
s := int32(0)
|
||||
info := this.GetAllConfig(cfg.Platform)
|
||||
info := this.GetConfig(cfg.Platform)
|
||||
if info.WelfarePhoneLotteryStatus != nil {
|
||||
s = info.WelfarePhoneLotteryStatus.Switch
|
||||
}
|
||||
|
|
@ -216,7 +216,7 @@ func (this *WelfareMgr) UpdatePhoneLotteryStatus(cfg *webapi_proto.WelfarePhoneL
|
|||
}
|
||||
|
||||
func (this *WelfareMgr) GetPhoneLotteryStatus(platform string) int32 {
|
||||
info := this.GetAllConfig(platform)
|
||||
info := this.GetConfig(platform)
|
||||
if info.WelfarePhoneLotteryStatus != nil {
|
||||
return info.WelfarePhoneLotteryStatus.Switch
|
||||
}
|
||||
|
|
@ -228,7 +228,7 @@ func (this *WelfareMgr) UpdateCollectConfig(cfg *webapi_proto.WelfareCollectConf
|
|||
cfg.Switch = model.WelfareOpen
|
||||
}
|
||||
s := int32(0)
|
||||
info := this.GetAllConfig(cfg.Platform)
|
||||
info := this.GetConfig(cfg.Platform)
|
||||
if info.WelfareCollectConfig != nil {
|
||||
s = info.WelfareCollectConfig.Switch
|
||||
}
|
||||
|
|
@ -240,7 +240,7 @@ func (this *WelfareMgr) UpdateCollectConfig(cfg *webapi_proto.WelfareCollectConf
|
|||
}
|
||||
|
||||
func (this *WelfareMgr) GetCollectSwitch(platform string) int32 {
|
||||
info := this.GetAllConfig(platform)
|
||||
info := this.GetConfig(platform)
|
||||
if info.WelfareCollectConfig != nil {
|
||||
return info.WelfareCollectConfig.Switch
|
||||
}
|
||||
|
|
@ -253,7 +253,7 @@ func (this *WelfareMgr) OnDayChanged(player *Player) error {
|
|||
}
|
||||
|
||||
player.WelfData.ReliefFundTimes = 0
|
||||
blindBox := this.GetAllConfig(player.Platform).WelfareBlindBoxDataList
|
||||
blindBox := this.GetConfig(player.Platform).WelfareBlindBoxDataList
|
||||
if blindBox != nil { // 关闭循环重置为-1
|
||||
if blindBox.Cycle == model.WelfareClose && player.WelfData.BlindBoxId != 0 {
|
||||
player.WelfData.BlindBoxId = -1
|
||||
|
|
@ -293,7 +293,7 @@ func (this *WelfareMgr) GetTurnplate(p *Player) {
|
|||
pack := &welfare.SCGetTurnplate{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
}
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
turnplate := info.WelfareTurnplateDateList
|
||||
sign7 := info.Welfare7SignDateList
|
||||
if turnplate != nil && sign7 != nil {
|
||||
|
|
@ -399,7 +399,7 @@ func (this *WelfareMgr) GetTurnplteVideo(p *Player) {
|
|||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETTURNPLATE), pack)
|
||||
}
|
||||
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
turn := info.WelfareTurnplateDateList // 转盘
|
||||
sign7 := info.Welfare7SignDateList // 签到
|
||||
if turn == nil || sign7 == nil {
|
||||
|
|
@ -578,7 +578,7 @@ func (this *WelfareMgr) GetAddupSign(p *Player, addupday int32) {
|
|||
pack := &welfare.SCGetAddupSign{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
}
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
turnplate := info.WelfareTurnplateDateList
|
||||
sign7 := info.Welfare7SignDateList
|
||||
if turnplate != nil && sign7 != nil {
|
||||
|
|
@ -644,7 +644,7 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
|||
pack := &welfare.SCWelfaredInfo{}
|
||||
diff := 0
|
||||
ts := time.Now().Unix()
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
turnplate := info.WelfareTurnplateDateList
|
||||
sign7 := info.Welfare7SignDateList
|
||||
if turnplate != nil && sign7 != nil {
|
||||
|
|
@ -720,7 +720,7 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
|||
func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) {
|
||||
pack := &player_proto.SCEasyWelfaredInfo{}
|
||||
// 0转盘1盲盒2首冲3连续充值
|
||||
info := this.GetAllConfig(platform)
|
||||
info := this.GetConfig(platform)
|
||||
|
||||
// 转盘
|
||||
turnplate := info.WelfareTurnplateDateList
|
||||
|
|
@ -819,7 +819,7 @@ func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) {
|
|||
// Welfareturnplate 转盘红点
|
||||
func (this *WelfareMgr) Welfareturnplate(p *Player, op int32) bool { // 0 红点提示 1全部领取
|
||||
var isShow bool
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
turnplate := info.WelfareTurnplateDateList
|
||||
sign7 := info.Welfare7SignDateList
|
||||
if turnplate != nil && sign7 != nil {
|
||||
|
|
@ -884,7 +884,7 @@ func (this *WelfareMgr) BlindBoxInfo(p *Player, bid int32) {
|
|||
pack := &welfare.SCBlindBoxInfo{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
}
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
blindBox := info.WelfareBlindBoxDataList
|
||||
if blindBox != nil {
|
||||
if blindBox.Switch != model.WelfareOpen {
|
||||
|
|
@ -960,7 +960,7 @@ func (this *WelfareMgr) BuyBlindBox(p *Player, buyid, ConfigPayId int32) {
|
|||
pack := &shop.SCPayInfo{
|
||||
RetCode: shop.OpResultCode_OPRC_Error,
|
||||
}
|
||||
blindBox := this.GetAllConfig(p.Platform).WelfareBlindBoxDataList
|
||||
blindBox := this.GetConfig(p.Platform).WelfareBlindBoxDataList
|
||||
if blindBox == nil {
|
||||
logger.Logger.Tracef("BuyBlindBox blindBox==nil snid: %v pack: %v", p.SnId, pack)
|
||||
p.SendToClient(int(shop.SPacketID_PACKET_SCPAYINFO), pack)
|
||||
|
|
@ -1062,7 +1062,7 @@ func (this *WelfareMgr) FirstPayInfo(p *Player) {
|
|||
pack := &welfare.SCWelfareFirstPayData{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
}
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
firstPay := info.WelfareFirstPayDataList
|
||||
if firstPay != nil {
|
||||
pack.Switch = firstPay.Switch
|
||||
|
|
@ -1146,7 +1146,7 @@ func (this *WelfareMgr) BuyFirstPay(p *Player, ConfigPayId int32) {
|
|||
pack := &shop.SCPayInfo{
|
||||
RetCode: shop.OpResultCode_OPRC_Error,
|
||||
}
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
firstPay := info.WelfareFirstPayDataList
|
||||
if firstPay == nil {
|
||||
logger.Logger.Errorf("BuyFirstPay firstPay == nil snid: %v pack: %v", p.SnId, pack)
|
||||
|
|
@ -1271,7 +1271,7 @@ func (this *WelfareMgr) ContinuousPayInfo(p *Player) {
|
|||
pack := &welfare.SCWelfareContinuousPayData{
|
||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||
}
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
continuousPay := info.WelfareContinuousPayDataList
|
||||
if continuousPay != nil {
|
||||
pack.Switch = continuousPay.Switch
|
||||
|
|
@ -1355,7 +1355,7 @@ func (this *WelfareMgr) BuyContinuousPay(p *Player, ConfigPayId int32) {
|
|||
pack := &shop.SCPayInfo{
|
||||
RetCode: shop.OpResultCode_OPRC_Error,
|
||||
}
|
||||
info := this.GetAllConfig(p.Platform)
|
||||
info := this.GetConfig(p.Platform)
|
||||
continuousPay := info.WelfareContinuousPayDataList
|
||||
if continuousPay == nil {
|
||||
logger.Logger.Tracef("BuyContinuousPay continuousPay == nil snid: %v pack: %v", p.SnId, pack)
|
||||
|
|
@ -1483,7 +1483,7 @@ func (this *WelfareMgr) Shutdown() {
|
|||
}
|
||||
|
||||
func (this *WelfareMgr) OnDayTimer() {
|
||||
for _, v := range this.ConfigMgr.Platform {
|
||||
for _, v := range this.GetConfigs() {
|
||||
v.BlindBoxCycle = 0
|
||||
v.FirstPayCycle = 0
|
||||
v.ContinuousPayCycle = 0
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue