Compare commits
17 Commits
94a4737609
...
a77cfa41dd
| Author | SHA1 | Date |
|---|---|---|
|
|
a77cfa41dd | |
|
|
33eab3f5bc | |
|
|
94ca1562e5 | |
|
|
3bff2c17f3 | |
|
|
49c2d8baac | |
|
|
9ea57766a4 | |
|
|
bfdf500eec | |
|
|
cae5536ed3 | |
|
|
17c0817dab | |
|
|
1db69f8df3 | |
|
|
904982158a | |
|
|
4e6b92cd33 | |
|
|
7222426469 | |
|
|
1db62f9d90 | |
|
|
f4434bd945 | |
|
|
a040d30354 | |
|
|
4c0c6f7c2b |
|
|
@ -171,8 +171,8 @@ func IsDaZhong(gameId int) bool {
|
|||
|
||||
// 房间编号区间
|
||||
const (
|
||||
PrivateSceneStartId = 10000000
|
||||
PrivateSceneMaxId = 99999999
|
||||
PrivateSceneStartId = 100000
|
||||
PrivateSceneMaxId = 999999
|
||||
MatchSceneStartId = 100000000
|
||||
MatchSceneMaxId = 199999999
|
||||
HundredSceneStartId = 200000000
|
||||
|
|
@ -309,6 +309,8 @@ const (
|
|||
GainWayItemFenGain = 103 // 道具分解获得
|
||||
GainWayGuide = 104 //新手引导奖励
|
||||
GainWayVipGift9 = 105 //vip等级礼包
|
||||
GainWayRoomCost = 106 //房费消耗
|
||||
GainWayRoomGain = 107 //房卡场获得
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
|
@ -867,3 +869,36 @@ const (
|
|||
DataConfigSprite = 1 // 精灵配置
|
||||
DataConfigMatchAudience = 2 // 赛事观战开关
|
||||
)
|
||||
|
||||
// 房间状态
|
||||
const (
|
||||
SceneStateWaite = 0 // 等待
|
||||
SceneStateStart = 1 // 开始
|
||||
SceneStateEnd = 2 // 结束
|
||||
)
|
||||
|
||||
const (
|
||||
// PlayerHistoryModel .
|
||||
PlayerHistoryModel = iota + 1
|
||||
|
||||
// BIGWIN_HISTORY_MODEL .
|
||||
BIGWIN_HISTORY_MODEL
|
||||
|
||||
// GameHistoryModel .
|
||||
GameHistoryModel
|
||||
)
|
||||
|
||||
type ListOpType int // 列表操作类型
|
||||
|
||||
const (
|
||||
ListModify ListOpType = 1 // 修改
|
||||
ListAdd ListOpType = 2 // 增加
|
||||
ListDel ListOpType = 3 // 减少
|
||||
ListFind ListOpType = 4 // 查询
|
||||
)
|
||||
|
||||
type NotifyType int // 通知类型
|
||||
|
||||
const (
|
||||
NotifyPrivateRoomList NotifyType = 1 // 私人房间列表
|
||||
)
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -435,6 +435,72 @@
|
|||
"Location": "0",
|
||||
"Describe": "作用:用于报名冠军赛事;\n产出途径:参加任意锦标赛,获得冠军\n"
|
||||
},
|
||||
{
|
||||
"Id": 40002,
|
||||
"Name": "房卡",
|
||||
"ShowLocation": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"Classify": [
|
||||
1,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"Type": 24,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"SaleGold": 10000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "作用:用于参与竞技馆内玩法;\n产出途径:商城购买\n"
|
||||
},
|
||||
{
|
||||
"Id": 40003,
|
||||
"Name": "娃娃卡",
|
||||
"ShowLocation": [
|
||||
1,
|
||||
1
|
||||
],
|
||||
"Classify": [
|
||||
1,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"Type": 23,
|
||||
"Effect0": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"Effect": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"SaleGold": 10000,
|
||||
"Composition": 1,
|
||||
"CompositionMax": 9999,
|
||||
"Location": "0",
|
||||
"Describe": "作用:用于抓娃娃机抓娃娃;\n产出途径:商城购买\n"
|
||||
},
|
||||
{
|
||||
"Id": 50001,
|
||||
"Name": "碎片礼盒",
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -71,7 +71,7 @@
|
|||
"Name": "十三张(四人场)",
|
||||
"GameId": 211,
|
||||
"Params": [
|
||||
0,
|
||||
4,
|
||||
0,
|
||||
30,
|
||||
50,
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
"Name": "十三张(八人场)",
|
||||
"GameId": 212,
|
||||
"Params": [
|
||||
1,
|
||||
8,
|
||||
0,
|
||||
30,
|
||||
50,
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
"Name": "十三张(自由场经典场)",
|
||||
"GameId": 213,
|
||||
"Params": [
|
||||
1,
|
||||
8,
|
||||
0,
|
||||
30,
|
||||
50,
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
"Name": "十三张(自由场癞子场)",
|
||||
"GameId": 214,
|
||||
"Params": [
|
||||
1,
|
||||
8,
|
||||
0,
|
||||
30,
|
||||
50,
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
|
@ -12,6 +12,7 @@
|
|||
"DependentPlayerCnt":true,
|
||||
"EnterAfterStart":true,
|
||||
"PerGameTakeCard":100,
|
||||
"BaseScore": 10,
|
||||
"Params":[
|
||||
]
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
"DependentPlayerCnt":true,
|
||||
"EnterAfterStart":true,
|
||||
"PerGameTakeCard":100,
|
||||
"BaseScore": 10,
|
||||
"Params":[
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package mq
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"mongo.games.com/goserver/core/broker"
|
||||
"mongo.games.com/goserver/core/broker/rabbitmq"
|
||||
|
||||
"mongo.games.com/game/dbproxy/svc"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/mq"
|
||||
)
|
||||
|
||||
func init() {
|
||||
mq.RegisterSubscriber(mq.DBCustomLog, func(e broker.Event) (err error) {
|
||||
msg := e.Message()
|
||||
if msg != nil {
|
||||
defer func() {
|
||||
e.Ack()
|
||||
}()
|
||||
|
||||
var log model.CustomLog
|
||||
err = json.Unmarshal(msg.Body, &log)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
c := svc.DbCustomLogCollection(log.Platform)
|
||||
if c != nil {
|
||||
err = c.Insert(log)
|
||||
}
|
||||
return
|
||||
}
|
||||
return nil
|
||||
}, broker.Queue(mq.DBCustomLog), broker.DisableAutoAck(), rabbitmq.DurableQueue())
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package svc
|
||||
|
||||
import (
|
||||
"github.com/globalsign/mgo"
|
||||
"mongo.games.com/game/dbproxy/mongo"
|
||||
"mongo.games.com/game/model"
|
||||
)
|
||||
|
||||
func DbCustomLogCollection(plt string) *mongo.Collection {
|
||||
s := mongo.MgoSessionMgrSington.GetPltMgoSession(plt, model.DbCustomLogDBName)
|
||||
if s != nil {
|
||||
d, first := s.DB().C(model.DbCustomLogCollName)
|
||||
if first {
|
||||
d.EnsureIndex(mgo.Index{Key: []string{"cycleid"}, Background: true, Sparse: true})
|
||||
d.EnsureIndex(mgo.Index{Key: []string{"-startts", "cycleid"}, Background: true, Sparse: true})
|
||||
d.EnsureIndex(mgo.Index{Key: []string{"roomconfigid"}, Background: true, Sparse: true})
|
||||
d.EnsureIndex(mgo.Index{Key: []string{"roomid"}, Background: true, Sparse: true})
|
||||
d.EnsureIndex(mgo.Index{Key: []string{"startts"}, Background: true, Sparse: true})
|
||||
d.EnsureIndex(mgo.Index{Key: []string{"endts"}, Background: true, Sparse: true})
|
||||
d.EnsureIndex(mgo.Index{Key: []string{"-endts"}, Background: true, Sparse: true})
|
||||
}
|
||||
return d
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -28,6 +28,8 @@ func GameDetailedLogsCollection(plt string) *mongo.Collection {
|
|||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"matchid"}, Background: true, Sparse: true})
|
||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-ts", "gameid"}, Background: true, Sparse: true})
|
||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-ts", "gamefreeid"}, Background: true, Sparse: true})
|
||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-ts", "cycleid"}, Background: true, Sparse: true})
|
||||
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"cycleid"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c_gamedetailed
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ func GamePlayerListLogsCollection(plt string) *mongo.Collection {
|
|||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "gamefreeid"}, Background: true, Sparse: true})
|
||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "snid", "gameid"}, Background: true, Sparse: true})
|
||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "snid", "gamefreeid"}, Background: true, Sparse: true})
|
||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "cycleid"}, Background: true, Sparse: true})
|
||||
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"cycleid"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c_gameplayerlistlog
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ func ItemLogsCollection(plt string) *mongo.Collection {
|
|||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"gameid"}, Background: true, Sparse: true})
|
||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
|
||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"snid", "logtype", "itemid", "typeid"}, Background: true, Sparse: true})
|
||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"roomconfigid"}, Background: true, Sparse: true})
|
||||
c_itemlog.EnsureIndex(mgo.Index{Key: []string{"typeid", "roomconfigid"}, Background: true, Sparse: true})
|
||||
}
|
||||
return c_itemlog
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,4 +41,6 @@ const (
|
|||
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
|
||||
ETCDKEY_MatchAudience = "/game/match_audience" //比赛观众
|
||||
ETCDKEY_Spirit = "/game/spirit" // 小精灵配置
|
||||
ETCDKEY_RoomType = "/game/room_type" // 房间类型配置
|
||||
ETCDKEY_RoomConfig = "/game/room_config" // 房间配置
|
||||
)
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ func (this *CSDestroyRoomHandler) Process(s *netlib.Session, packetid int, data
|
|||
logger.Logger.Warn("CSDestroyRoomHandler s.creator != p.AccountId")
|
||||
return nil
|
||||
}
|
||||
// 房卡场开始后不能解散
|
||||
if scene.IsCustom() && scene.NumOfGames > 0 {
|
||||
return nil
|
||||
}
|
||||
scene.Destroy(true)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -79,7 +83,7 @@ func (this *CSLeaveRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
logger.Logger.Warnf("CSLeaveRoomHandler[%v][%v] scene.gaming==true", scene.SceneId, p.SnId)
|
||||
pack := &gamehall.SCLeaveRoom{
|
||||
OpRetCode: gamehall.OpResultCode_Game_OPRC_YourAreGamingCannotLeave_Game,
|
||||
RoomId: proto.Int(scene.SceneId),
|
||||
RoomId: scene.SceneId,
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_LEAVEROOM), pack)
|
||||
|
|
@ -96,7 +100,7 @@ func (this *CSLeaveRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
Reason: proto.Int(0),
|
||||
OpRetCode: gamehall.OpResultCode_Game_OPRC_Sucess_Game,
|
||||
Mode: msg.Mode,
|
||||
RoomId: proto.Int(scene.SceneId),
|
||||
RoomId: scene.SceneId,
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_LEAVEROOM), pack)
|
||||
|
|
@ -289,10 +293,48 @@ func CSRoomEvent(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
return nil
|
||||
}
|
||||
|
||||
func CSDestroyRoom(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSDestroyRoomHandler Process recv ", data)
|
||||
p := base.PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
logger.Logger.Warn("CSDestroyRoomHandler p == nil")
|
||||
return nil
|
||||
}
|
||||
scene := p.GetScene()
|
||||
if scene == nil {
|
||||
logger.Logger.Warn("CSDestroyRoomHandler p.GetScene() == nil")
|
||||
return nil
|
||||
}
|
||||
if !scene.HasPlayer(p) {
|
||||
return nil
|
||||
}
|
||||
|
||||
pack := &gamehall.SCDestroyRoom{
|
||||
RoomId: scene.SceneId,
|
||||
OpRetCode: gamehall.OpResultCode_Game_OPRC_Error_Game,
|
||||
}
|
||||
send := func() {
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_DESTROYROOM), pack)
|
||||
logger.Logger.Tracef("SCDestroyRoom: %v", pack)
|
||||
}
|
||||
|
||||
if scene.Creator != p.SnId {
|
||||
logger.Logger.Warn("CSDestroyRoomHandler s.creator != p.AccountId")
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
// 房卡场开始后不能解散
|
||||
if scene.IsCustom() && scene.NumOfGames > 0 {
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
scene.Destroy(true)
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 房间创建者解散房间
|
||||
common.RegisterHandler(int(gamehall.GameHallPacketID_PACKET_CS_DESTROYROOM), &CSDestroyRoomHandler{})
|
||||
netlib.RegisterFactory(int(gamehall.GameHallPacketID_PACKET_CS_DESTROYROOM), &CSDestroyRoomPacketFactory{})
|
||||
common.Register(int(gamehall.GameHallPacketID_PACKET_CS_DESTROYROOM), &gamehall.CSDestroyRoom{}, CSDestroyRoom)
|
||||
|
||||
// 离开或暂离房间
|
||||
common.RegisterHandler(int(gamehall.GameHallPacketID_PACKET_CS_LEAVEROOM), &CSLeaveRoomHandler{})
|
||||
|
|
|
|||
|
|
@ -52,61 +52,43 @@ func HandleWGPlayerLeave(session *netlib.Session, packetId int, data interface{}
|
|||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
//创建场景
|
||||
netlib.RegisterFactory(int(server.SSPacketID_PACKET_WG_CREATESCENE), netlib.PacketFactoryWrapper(func() interface{} {
|
||||
return &server.WGCreateScene{}
|
||||
}))
|
||||
netlib.RegisterHandler(int(server.SSPacketID_PACKET_WG_CREATESCENE), netlib.HandlerWrapper(func(s *netlib.Session, packetid int, pack interface{}) error {
|
||||
logger.Logger.Trace("receive WGCreateScene:", pack)
|
||||
if msg, ok := pack.(*server.WGCreateScene); ok {
|
||||
sceneId := int(msg.GetSceneId())
|
||||
gameMode := int(msg.GetGameMode())
|
||||
sceneMode := int(msg.GetSceneMode())
|
||||
gameId := int(msg.GetGameId())
|
||||
paramsEx := msg.GetParamsEx()
|
||||
hallId := msg.GetHallId()
|
||||
groupId := msg.GetGroupId()
|
||||
dbGameFree := msg.GetDBGameFree()
|
||||
bEnterAfterStart := msg.GetEnterAfterStart()
|
||||
totalOfGames := msg.GetTotalOfGames()
|
||||
baseScore := msg.GetBaseScore()
|
||||
playerNum := int(msg.GetPlayerNum())
|
||||
matchInfoId := msg.GetMatchInfoId()
|
||||
scene := base.SceneMgrSington.CreateScene(s, sceneId, gameMode, sceneMode, gameId, msg.GetPlatform(), msg.GetParams(),
|
||||
msg.GetAgentor(), msg.GetCreator(), msg.GetReplayCode(), hallId, groupId, totalOfGames, dbGameFree,
|
||||
bEnterAfterStart, baseScore, playerNum, msg.GetChessRank(), paramsEx...)
|
||||
if scene != nil {
|
||||
if scene.IsMatchScene() {
|
||||
scene.MatchInfoId = matchInfoId
|
||||
if len(scene.Params) > 0 {
|
||||
scene.MatchId = scene.Params[0]
|
||||
}
|
||||
if len(scene.Params) > 1 {
|
||||
scene.MatchFinals = scene.Params[1] == 1
|
||||
}
|
||||
if len(scene.Params) > 2 {
|
||||
scene.MatchRound = scene.Params[2]
|
||||
}
|
||||
if len(scene.Params) > 3 {
|
||||
scene.MatchCurPlayerNum = scene.Params[3]
|
||||
}
|
||||
if len(scene.Params) > 4 {
|
||||
scene.MatchNextNeed = scene.Params[4]
|
||||
}
|
||||
if len(scene.Params) > 5 {
|
||||
scene.MatchType = scene.Params[5]
|
||||
}
|
||||
}
|
||||
scene.ClubId = msg.GetClub()
|
||||
scene.RoomId = msg.GetClubRoomId()
|
||||
scene.RoomPos = msg.GetClubRoomPos()
|
||||
scene.PumpCoin = msg.GetClubRate()
|
||||
scene.RealCtrl = msg.RealCtrl
|
||||
}
|
||||
}
|
||||
//func HandlePlayerChangeItems(session *netlib.Session, packetId int, data interface{}) error {
|
||||
// logger.Logger.Tracef("receive PlayerChangeItems %v", data)
|
||||
// msg, ok := data.(*server.PlayerChangeItems)
|
||||
// if !ok {
|
||||
// return nil
|
||||
// }
|
||||
// p := base.PlayerMgrSington.GetPlayerBySnId(msg.GetSnId())
|
||||
// if p == nil {
|
||||
// return nil
|
||||
// }
|
||||
// var items []*model.Item
|
||||
// for _, v := range msg.GetItems() {
|
||||
// items = append(items, &model.Item{
|
||||
// ItemId: v.GetId(),
|
||||
// ItemNum: v.GetNum(),
|
||||
// })
|
||||
// }
|
||||
// p.ReceiveAddItems(items)
|
||||
// return nil
|
||||
//}
|
||||
|
||||
func CreateSceneHandler(session *netlib.Session, packetId int, data interface{}) error {
|
||||
logger.Logger.Tracef("receive CreateScene %v", data)
|
||||
msg, ok := data.(*server.WGCreateScene)
|
||||
if !ok {
|
||||
return nil
|
||||
}))
|
||||
}
|
||||
base.SceneMgrSington.CreateScene(&base.CreateSceneParam{
|
||||
Session: session,
|
||||
WGCreateScene: msg,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 创建房间
|
||||
netlib.Register(int(server.SSPacketID_PACKET_WG_CREATESCENE), &server.WGCreateScene{}, CreateSceneHandler)
|
||||
|
||||
//删除场景
|
||||
// 立刻删除,不管游戏是否结束
|
||||
|
|
@ -256,7 +238,7 @@ func init() {
|
|||
}
|
||||
|
||||
if scene.Testing {
|
||||
p.Coin = int64(scene.DbGameFree.GetTestTakeCoin())
|
||||
p.Coin = int64(scene.GetDBGameFree().GetTestTakeCoin())
|
||||
}
|
||||
base.PlayerMgrSington.ManagePlayer(p)
|
||||
scene.PlayerEnter(p, isload)
|
||||
|
|
@ -373,7 +355,7 @@ func init() {
|
|||
//p.coin = msg.GetTakeCoin()
|
||||
//p.takeCoin = msg.GetTakeCoin()
|
||||
if scene.Testing {
|
||||
p.Coin = int64(scene.DbGameFree.GetTestTakeCoin())
|
||||
p.Coin = int64(scene.GetDBGameFree().GetTestTakeCoin())
|
||||
}
|
||||
p.LastSyncCoin = p.Coin
|
||||
scene.AudienceSit(p)
|
||||
|
|
@ -585,4 +567,6 @@ func init() {
|
|||
netlib.Register(int(server.SSPacketID_PACKET_WG_BUYRECTIMEITEM), server.WGBuyRecTimeItem{}, HandleWGBuyRecTimeItem)
|
||||
// 修改皮肤
|
||||
netlib.Register(int(server.SSPacketID_PACKET_WG_UpdateSkin), server.WGUpdateSkin{}, HandleWGUpdateSkin)
|
||||
// 同步道具数量
|
||||
//netlib.Register(int(server.SSPacketID_PACKET_PlayerChangeItems), server.PlayerChangeItems{}, HandlePlayerChangeItems)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,14 +57,14 @@ func (this *AvengersSceneData) SceneDestroy(force bool) {
|
|||
}
|
||||
|
||||
func (this *AvengersSceneData) init() bool {
|
||||
if this.DbGameFree == nil {
|
||||
if this.GetDBGameFree() == nil {
|
||||
return false
|
||||
}
|
||||
params := this.DbGameFree.GetJackpot()
|
||||
params := this.GetDBGameFree().GetJackpot()
|
||||
this.jackpot = &base.SlotJackpotPool{}
|
||||
if this.jackpot.Small <= 0 {
|
||||
this.jackpot.Small = 0
|
||||
this.jackpot.VirtualJK = int64(params[rule.AVENGERS_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore())
|
||||
this.jackpot.VirtualJK = int64(params[rule.AVENGERS_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore())
|
||||
}
|
||||
str := base.SlotsPoolMgr.GetPool(this.GetGameFreeId(), this.Platform)
|
||||
if str != "" {
|
||||
|
|
@ -100,7 +100,7 @@ type AvengersSpinResult struct {
|
|||
}
|
||||
|
||||
func (this *AvengersSceneData) CalcLinePrize(cards []int, betLines []int64, betValue int64) (spinRes AvengersSpinResult) {
|
||||
taxRate := this.DbGameFree.GetTaxRate()
|
||||
taxRate := this.GetDBGameFree().GetTaxRate()
|
||||
calcTaxScore := func(score int64, taxScore *int64) int64 {
|
||||
newScore := int64(float64(score) * float64(10000-taxRate) / 10000.0)
|
||||
if taxScore != nil {
|
||||
|
|
@ -188,7 +188,7 @@ func (this *AvengersSceneData) BroadcastJackpot(sync bool) {
|
|||
this.lastJackpotValue = this.jackpot.VirtualJK
|
||||
pack := &gamehall.SCHundredSceneGetGameJackpot{}
|
||||
jpfi := &gamehall.GameJackpotFundInfo{
|
||||
GameFreeId: proto.Int32(this.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(this.GetDBGameFree().Id),
|
||||
JackPotFund: proto.Int64(this.jackpot.VirtualJK),
|
||||
}
|
||||
pack.GameJackpotFund = append(pack.GameJackpotFund, jpfi)
|
||||
|
|
@ -215,7 +215,7 @@ func (this *AvengersSceneData) PopCoinPool(winCoin int64, IsNovice bool) {
|
|||
}
|
||||
}
|
||||
func (this *AvengersSceneData) RecordBurstLog(name string, wincoin, totalbet int64) {
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.DbGameFree.GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.InsertBurstJackpotLogs(log)
|
||||
}), nil, "InsertBurstJackpotLogs").Start()
|
||||
|
|
@ -223,7 +223,7 @@ func (this *AvengersSceneData) RecordBurstLog(name string, wincoin, totalbet int
|
|||
|
||||
func (this *AvengersSceneData) BurstHistory(player *AvengersPlayerData) {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.GetBurstJackpotLog(this.Platform, this.DbGameFree.GameId)
|
||||
return model.GetBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
var logsp []*avengers.AvengersBurstHistoryInfo
|
||||
if data != nil {
|
||||
|
|
@ -251,7 +251,7 @@ func (this *AvengersSceneData) GetLastBurstJackPot() time.Time {
|
|||
}
|
||||
func (this *AvengersSceneData) SetLastBurstJackPot() {
|
||||
var randT = rand.Intn(25200-7200+1) + 7200
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(25200-7200+1) + 7200
|
||||
case 2:
|
||||
|
|
@ -267,7 +267,7 @@ func (this *AvengersSceneData) SetLastBurstJackPot() {
|
|||
func (this *AvengersSceneData) AIAddJackPot() {
|
||||
if time.Now().Sub(this.lastJackPot) > 0 {
|
||||
var randT = rand.Intn(3) + 1
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(3) + 1
|
||||
case 2:
|
||||
|
|
@ -280,20 +280,20 @@ func (this *AvengersSceneData) AIAddJackPot() {
|
|||
randT = rand.Intn(3) + 1
|
||||
}
|
||||
this.lastJackPot = time.Now().Add(time.Second * time.Duration(randT))
|
||||
val := int64(math.Floor(float64(this.DbGameFree.GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
val := int64(math.Floor(float64(this.GetDBGameFree().GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
this.jackpot.VirtualJK += val
|
||||
}
|
||||
}
|
||||
func (this *AvengersSceneData) AIBurstJackPot() {
|
||||
if time.Now().Sub(this.GetLastBurstJackPot()) > 0 {
|
||||
this.SetLastBurstJackPot()
|
||||
jackpotParams := this.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.AVENGERS_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
jackpotParams := this.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.AVENGERS_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
//AI机器人爆奖
|
||||
val := this.jackpot.VirtualJK
|
||||
this.jackpot.VirtualJK = jackpotInit
|
||||
bet := int64(this.DbGameFree.GetBaseScore()) * int64(rule.LINENUM)
|
||||
bet := int64(this.GetDBGameFree().GetBaseScore()) * int64(rule.LINENUM)
|
||||
this.RecordBurstLog(this.RandNickName(), val, bet)
|
||||
}
|
||||
}
|
||||
|
|
@ -314,11 +314,11 @@ func (this *AvengersSceneData) KickPlayerByTime() {
|
|||
}
|
||||
//for _, p := range this.players {
|
||||
// //游戏次数达到目标值
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.DbGameFree.GetId()))
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.GetDBGameFree().GetId()))
|
||||
// if !p.IsRob &&
|
||||
// todayGamefreeIDSceneData != nil &&
|
||||
// this.DbGameFree.GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.DbGameFree.GetPlayNumLimit()) {
|
||||
// this.GetDBGameFree().GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.GetDBGameFree().GetPlayNumLimit()) {
|
||||
// this.PlayerLeave(p.Player, common.PlayerLeaveReason_GameTimes, true)
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ func (this *ScenePolicyAvengers) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
|||
logger.Logger.Trace("(this *ScenePolicyAvengers) OnPlayerEnter, SceneId=", s.SceneId, " player=", p.SnId)
|
||||
if sceneEx, ok := s.ExtraData.(*AvengersSceneData); ok {
|
||||
playerEx := &AvengersPlayerData{Player: p}
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.DbGameFree.GetBaseScore() // 底注
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.GetDBGameFree().GetBaseScore() // 底注
|
||||
sceneEx.players[p.SnId] = playerEx
|
||||
p.ExtraData = playerEx
|
||||
AvengersSendRoomInfo(s, p, sceneEx, playerEx, nil)
|
||||
|
|
@ -229,14 +229,14 @@ func (this *ScenePolicyAvengers) GetJackPotVal(s *base.Scene) int64 {
|
|||
func AvengersSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *AvengersSceneData, playerEx *AvengersPlayerData, data *avengers.GameBilledData) {
|
||||
logger.Logger.Trace("-------------------发送房间消息 ", s.RoomId, p.SnId)
|
||||
pack := &avengers.SCAvengersRoomInfo{
|
||||
RoomId: proto.Int(s.SceneId),
|
||||
RoomId: s.SceneId,
|
||||
Creator: proto.Int32(s.Creator),
|
||||
GameId: proto.Int(s.GameId),
|
||||
RoomMode: proto.Int(s.GameMode),
|
||||
GameId: s.GameId,
|
||||
RoomMode: s.GameMode,
|
||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
||||
State: proto.Int(s.SceneState.GetState()),
|
||||
Jackpot: proto.Int64(sceneEx.jackpot.VirtualJK),
|
||||
GameFreeId: proto.Int32(s.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
||||
BilledData: data,
|
||||
}
|
||||
if playerEx != nil {
|
||||
|
|
@ -252,7 +252,7 @@ func AvengersSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *AvengersSceneD
|
|||
pack.Players = append(pack.Players, pd)
|
||||
pack.BetLines = playerEx.betLines
|
||||
pack.FreeTimes = proto.Int32(playerEx.freeTimes)
|
||||
pack.Chip = proto.Int32(s.DbGameFree.BaseScore)
|
||||
pack.Chip = proto.Int32(s.GetDBGameFree().BaseScore)
|
||||
pack.SpinID = proto.Int64(playerEx.spinID)
|
||||
if playerEx.totalPriceBonus > 0 {
|
||||
switch playerEx.bonusStage {
|
||||
|
|
@ -367,8 +367,8 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
return false
|
||||
}
|
||||
//先做底注校验
|
||||
if sceneEx.DbGameFree.GetBaseScore() != int32(params[0]) {
|
||||
logger.Logger.Warnf("avengers snid[%v] opcode[%v] params[%v] BaseScore[%v]", p.SnId, opcode, params, sceneEx.DbGameFree.GetBaseScore())
|
||||
if sceneEx.GetDBGameFree().GetBaseScore() != int32(params[0]) {
|
||||
logger.Logger.Warnf("avengers snid[%v] opcode[%v] params[%v] BaseScore[%v]", p.SnId, opcode, params, sceneEx.GetDBGameFree().GetBaseScore())
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, avengers.OpResultCode_OPRC_Error, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -405,7 +405,7 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
if playerEx.freeTimes <= 0 && totalBetValue > playerEx.Coin {
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, avengers.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.DbGameFree.GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.GetDBGameFree().GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, avengers.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -419,7 +419,7 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
//获取当前水池的上下文环境
|
||||
sceneEx.CpCtx = base.CoinPoolMgr.GetCoinPoolCtx(sceneEx.Platform, sceneEx.GetGameFreeId(), sceneEx.GroupId)
|
||||
//税收比例
|
||||
taxRate := sceneEx.DbGameFree.GetTaxRate()
|
||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate()
|
||||
if taxRate < 0 || taxRate > 10000 {
|
||||
logger.Logger.Warnf("AvengersErrorTaxRate [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, playerEx.spinID, taxRate)
|
||||
taxRate = 500
|
||||
|
|
@ -448,8 +448,8 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
prizeFund := gamePoolCoin - sceneEx.jackpot.VirtualJK // 除去奖池的水池剩余金额
|
||||
|
||||
// 奖池参数
|
||||
jackpotParams := sceneEx.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.AVENGERS_JACKPOT_InitJackpot]) * int64(sceneEx.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
jackpotParams := sceneEx.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.AVENGERS_JACKPOT_InitJackpot]) * int64(sceneEx.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
var jackpotFundAdd, prizeFundAdd int64 //奖池/水池增量
|
||||
if playerEx.freeTimes <= 0 { //正常模式才能记录用户的押注变化,免费模式不能改变押注
|
||||
|
|
@ -469,7 +469,7 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
////统计参与游戏次数
|
||||
//if !sceneEx.Testing && !playerEx.IsRob {
|
||||
// pack := &server.GWSceneEnd{
|
||||
// GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
// GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
// Players: []*server.PlayerCtx{&server.PlayerCtx{SnId: proto.Int32(playerEx.SnId), Coin: proto.Int64(playerEx.Coin)}},
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
|
|
@ -668,7 +668,7 @@ func (this *SceneStateAvengersStart) OnPlayerOp(s *base.Scene, p *base.Player, o
|
|||
case AvengersPlayerHistory:
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
spinid := strconv.Itoa(int(playerEx.SnId))
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.DbGameFree.GetGameClass(), s.GameId) //复仇者联盟存储个人操作记录不分场次,因为选场界面也需要拉去个人操作记录
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.GetDBGameFree().GetGameClass(), int(s.GameId)) //复仇者联盟存储个人操作记录不分场次,因为选场界面也需要拉去个人操作记录
|
||||
pack := &avengers.SCAvengersPlayerHistory{}
|
||||
for _, v := range gpl.Data {
|
||||
if v.GameDetailedLogId == "" {
|
||||
|
|
@ -806,7 +806,7 @@ func (this *SceneStateAvengersStart) BenchTest(s *base.Scene, p *base.Player) {
|
|||
file.WriteString("玩家id,当前水位,之前余额,之后余额,投入,产出,税收,小游戏,爆奖,中线倍数,中线数,剩余免费次数\r\n")
|
||||
|
||||
oldCoin := p.Coin
|
||||
p.Coin = 5000 * int64(s.DbGameFree.GetBaseScore())
|
||||
p.Coin = 5000 * int64(s.GetDBGameFree().GetBaseScore())
|
||||
if playerEx, ok := p.ExtraData.(*AvengersPlayerData); ok {
|
||||
for i := 0; i < BENCH_CNT; i++ {
|
||||
startCoin := p.Coin
|
||||
|
|
@ -817,7 +817,7 @@ func (this *SceneStateAvengersStart) BenchTest(s *base.Scene, p *base.Player) {
|
|||
inCoin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||
outCoin := playerEx.RollGameType.BaseResult.ChangeCoin + inCoin
|
||||
taxCoin := playerEx.RollGameType.BaseResult.Tax
|
||||
lineScore := float64(playerEx.RollGameType.BaseResult.WinRate*s.DbGameFree.GetBaseScore()) * float64(10000.0-s.DbGameFree.GetTaxRate()) / 10000.0
|
||||
lineScore := float64(playerEx.RollGameType.BaseResult.WinRate*s.GetDBGameFree().GetBaseScore()) * float64(10000.0-s.GetDBGameFree().GetTaxRate()) / 10000.0
|
||||
jackpotScore := outCoin - playerEx.RollGameType.BaseResult.ChangeCoin - int64(lineScore+0.00001)
|
||||
|
||||
str := fmt.Sprintf("%v,%v,%v,%v,%v,%v,%v,%v,%v,%v,%v,%v\r\n", p.SnId, poolCoin, startCoin, p.Coin, inCoin, outCoin, taxCoin,
|
||||
|
|
@ -860,7 +860,7 @@ func (this *SceneStateAvengersStart) WinTargetBenchTest(s *base.Scene, p *base.P
|
|||
}
|
||||
file.WriteString("玩家id,当前水位,之前余额,之后余额,投入,产出,税收,小游戏,爆奖,中线倍数,中线数,剩余免费次数\r\n")
|
||||
oldCoin := p.Coin
|
||||
switch s.DbGameFree.GetSceneType() {
|
||||
switch s.GetDBGameFree().GetSceneType() {
|
||||
case 1:
|
||||
p.Coin = 100000
|
||||
case 2:
|
||||
|
|
@ -883,7 +883,7 @@ func (this *SceneStateAvengersStart) WinTargetBenchTest(s *base.Scene, p *base.P
|
|||
inCoin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||
outCoin := playerEx.RollGameType.BaseResult.ChangeCoin + inCoin
|
||||
taxCoin := playerEx.RollGameType.BaseResult.Tax
|
||||
lineScore := float64(playerEx.RollGameType.BaseResult.WinRate*s.DbGameFree.GetBaseScore()) * float64(10000.0-s.DbGameFree.GetTaxRate()) / 10000.0
|
||||
lineScore := float64(playerEx.RollGameType.BaseResult.WinRate*s.GetDBGameFree().GetBaseScore()) * float64(10000.0-s.GetDBGameFree().GetTaxRate()) / 10000.0
|
||||
jackpotScore := outCoin - playerEx.RollGameType.BaseResult.WinSmallGame - int64(lineScore+0.00001)
|
||||
|
||||
str := fmt.Sprintf("%v,%v,%v,%v,%v,%v,%v,%v,%v,%v,%v,%v\r\n", p.SnId, poolCoin, startCoin, p.Coin, inCoin, outCoin, taxCoin,
|
||||
|
|
@ -915,7 +915,7 @@ func AvengersCheckAndSaveLog(sceneEx *AvengersSceneData, playerEx *AvengersPlaye
|
|||
|
||||
//log2
|
||||
playerEx.RollGameType.BaseResult.ChangeCoin = changeCoin
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.DbGameFree.GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.GetDBGameFree().GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.RoomId = int32(sceneEx.SceneId)
|
||||
playerEx.RollGameType.BaseResult.AfterCoin = playerEx.Coin
|
||||
playerEx.RollGameType.BaseResult.BeforeCoin = startCoin
|
||||
|
|
@ -974,8 +974,8 @@ func AvengersCheckAndSaveLog(sceneEx *AvengersSceneData, playerEx *AvengersPlaye
|
|||
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
|
||||
}
|
||||
gwPlayerBet := &server.GWPlayerData{
|
||||
SceneId: proto.Int(sceneEx.SceneId),
|
||||
GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
SceneId: sceneEx.SceneId,
|
||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
}
|
||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
||||
sceneEx.SyncPlayerDatas(&base.PlayerDataParam{
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ package base
|
|||
|
||||
// 提供税收和流水,根据代理需求后台进行分账
|
||||
func ProfitDistribution(p *Player, tax, taxex, validFlow int64) {
|
||||
//LogChannelSingleton.WriteMQData(model.GenerateTaxDivide(p.SnId, p.Platform, p.Channel, p.BeUnderAgentCode, p.PackageID, tax, taxex, validFlow, p.scene.GameId, p.scene.GameMode, p.scene.DbGameFree.GetId(), p.PromoterTree))
|
||||
//LogChannelSingleton.WriteMQData(model.GenerateTaxDivide(p.SnId, p.Platform, p.Channel, p.BeUnderAgentCode, p.PackageID, tax, taxex, validFlow, p.scene.GameId, p.scene.GameMode, p.scene.GetDBGameFree().GetId(), p.PromoterTree))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,4 +54,5 @@ func init() {
|
|||
LogChannelSingleton.RegisterLogCName(model.GamePlayerListLogCollName, &model.GamePlayerListLog{})
|
||||
LogChannelSingleton.RegisterLogCName(model.FriendRecordLogCollName, &model.FriendRecord{})
|
||||
LogChannelSingleton.RegisterLogCName(model.ItemLogCollName, &model.ItemLog{})
|
||||
LogChannelSingleton.RegisterLogCName(mq.DBCustomLog, &model.CustomLog{})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ type Player struct {
|
|||
Iparams map[int]int64 //整形参数
|
||||
sparams map[int]string //字符参数
|
||||
IsLocal bool //是否本地player
|
||||
Items map[int32]int64 //背包数据
|
||||
Items map[int32]int64 //背包数据, 不可直接修改,使用 AddItems 方法
|
||||
MatchParams []int32 //比赛参数 排名、段位、假snid、假角色、假皮肤
|
||||
MatchRobotGrades []MatchRobotGrade
|
||||
TestLog []string // 调试日志
|
||||
|
|
@ -246,7 +246,7 @@ func (this *Player) SyncFlagToWorld() {
|
|||
}
|
||||
pack := &server.GWPlayerFlag{
|
||||
SnId: proto.Int32(this.SnId),
|
||||
RoomId: proto.Int(this.scene.SceneId),
|
||||
RoomId: this.scene.SceneId,
|
||||
Flag: proto.Int(this.flag),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
|
|
@ -439,7 +439,6 @@ func (this *Player) AddCoin(num int64, gainWay int32, syncFlag int, oper, remark
|
|||
return
|
||||
}
|
||||
this.Coin += num
|
||||
this.Items[common.ItemIDCoin] = this.Coin
|
||||
if this.scene != nil {
|
||||
if !this.IsRob && !this.scene.Testing { //机器人log排除掉
|
||||
log := model.NewCoinLogEx(&model.CoinLogParam{
|
||||
|
|
@ -467,9 +466,6 @@ func (this *Player) AddCoin(num int64, gainWay int32, syncFlag int, oper, remark
|
|||
if this.Coin < 0 {
|
||||
this.Coin = 0
|
||||
}
|
||||
if this.scene.IsHundredScene() {
|
||||
this.scene.NewBigCoinNotice(this, int64(num), 5)
|
||||
}
|
||||
}
|
||||
//增加玩家经验
|
||||
if num > 0 {
|
||||
|
|
@ -524,7 +520,6 @@ func (this *Player) AddCoinAsync(num int64, gainWay int32, notifyC, broadcast bo
|
|||
return
|
||||
}
|
||||
this.Coin += num
|
||||
this.Items[common.ItemIDCoin] = this.Coin
|
||||
if this.scene != nil {
|
||||
if !this.IsRob && !this.scene.Testing && writeLog { //机器人log排除掉
|
||||
log := model.NewCoinLogEx(&model.CoinLogParam{
|
||||
|
|
@ -607,62 +602,6 @@ func (this *Player) AddRankScore(rankType int32, num int64) {
|
|||
}
|
||||
}
|
||||
|
||||
// 保存金币变动日志
|
||||
// 数据用途: 个人房间内牌局账变记录,后台部分报表使用,确保数据计算无误,否则可能影响月底对账
|
||||
// takeCoin: 牌局结算前玩家身上的金币
|
||||
// changecoin: 本局玩家输赢的钱,注意是税后
|
||||
// coin: 结算后玩家当前身上的金币余额
|
||||
// totalbet: 总下注额
|
||||
// taxcoin: 本局该玩家产生的税收,这里要包含俱乐部的税
|
||||
// wincoin: 本局赢取的金币,含税 wincoin==changecoin+taxcoin
|
||||
// jackpotWinCoin: 从奖池中赢取的金币(拉霸类游戏)
|
||||
// smallGameWinCoin: 小游戏赢取的金币(拉霸类游戏)
|
||||
func (this *Player) SaveSceneCoinLog(takeCoin, changecoin, coin, totalbet, taxcoin, wincoin int64, jackpotWinCoin int64, smallGameWinCoin int64) {
|
||||
if this.scene != nil {
|
||||
if !this.IsRob && !this.scene.Testing && !this.scene.IsMatchScene() { //机器人log排除掉
|
||||
var eventType int64 //输赢事件值 默认值为0
|
||||
if coin-takeCoin > 0 {
|
||||
eventType = 1
|
||||
} else if coin-takeCoin < 0 {
|
||||
eventType = -1
|
||||
}
|
||||
log := model.NewSceneCoinLogEx(this.SnId, changecoin, takeCoin, coin, eventType,
|
||||
int64(this.scene.DbGameFree.GetBaseScore()), totalbet, int32(this.scene.GameId), this.PlayerData.Ip,
|
||||
this.scene.paramsEx[0], this.Pos, this.Platform, this.Channel, this.BeUnderAgentCode, int32(this.scene.SceneId),
|
||||
this.scene.DbGameFree.GetGameMode(), this.scene.GetGameFreeId(), taxcoin, wincoin,
|
||||
jackpotWinCoin, smallGameWinCoin, this.PackageID)
|
||||
if log != nil {
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 需要关照
|
||||
func (this *Player) IsNeedCare() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// 需要削弱
|
||||
func (this *Player) IsNeedWeaken() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (this *Player) GetCoinOverPercent() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (this *Player) SyncCoin() {
|
||||
pack := &player.SCPlayerCoinChange{
|
||||
SnId: proto.Int32(this.SnId),
|
||||
AddCoin: proto.Int64(0),
|
||||
RestCoin: proto.Int64(this.Coin),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
this.SendToClient(int(player.PlayerPacketID_PACKET_SC_PLAYERCOINCHANGE), pack)
|
||||
logger.Logger.Trace("(this *Player) SyncCoin SCPlayerCoinChange:", pack)
|
||||
}
|
||||
|
||||
func (this *Player) ReportGameEvent(tax, taxex, changeCoin, validbet, validFlow, in, out int64) {
|
||||
// 记录玩家 首次参与该场次的游戏时间 游戏次数
|
||||
var gameFirstTime, gameFreeFirstTime time.Time
|
||||
|
|
@ -682,25 +621,12 @@ func (this *Player) ReportGameEvent(tax, taxex, changeCoin, validbet, validFlow,
|
|||
|
||||
gamingTime := int32(time.Now().Sub(this.scene.GameNowTime).Seconds())
|
||||
LogChannelSingleton.WriteMQData(model.GenerateGameEvent(model.CreatePlayerGameRecEvent(this.SnId, tax, taxex, changeCoin, validbet, validFlow, in, out,
|
||||
int32(this.scene.GameId), this.scene.DbGameFree.GetId(), int32(this.scene.GameMode),
|
||||
int32(this.scene.GameId), this.scene.GetGameFreeId(), int32(this.scene.GameMode),
|
||||
this.scene.GetRecordId(), this.Channel, this.BeUnderAgentCode, this.Platform, this.City, this.DeviceOS,
|
||||
this.CreateTime, gamingTime, gameFirstTime, gameFreeFirstTime, gameTimes, gameFreeTimes, this.LastLoginTime,
|
||||
this.TelephonePromoter, this.DeviceId)))
|
||||
}
|
||||
|
||||
// 破产事件
|
||||
func (this *Player) ReportBankRuptcy(gameId, gameMode, gameFreeId int32) {
|
||||
//if !this.IsRob {
|
||||
// d, e := model.MarshalBankruptcyEvent(2, this.SnId, this.TelephonePromoter, this.Channel, this.BeUnderAgentCode, this.Platform, this.City, this.CreateTime, gameId, gameMode, gameFreeId)
|
||||
// if e == nil {
|
||||
// rmd := model.NewInfluxDBData("hj.player_bankruptcy", d)
|
||||
// if rmd != nil {
|
||||
// InfluxDBDataChannelSington.Write(rmd)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
// 汇总玩家该次游戏总产生的税收
|
||||
// 数据用途: 平台和推广间分账用,确保数据计算无误,
|
||||
// 注意:该税收不包含俱乐部的抽水
|
||||
|
|
@ -714,30 +640,6 @@ func (this *Player) AddServiceFee(tax int64) {
|
|||
}
|
||||
}
|
||||
|
||||
//func (this *Player) SaveReportForm(showId, sceneMode int, keyGameId string, profitCoin, flow int64, validBet int64) {
|
||||
// //个人报表统计
|
||||
// if this.TotalGameData == nil {
|
||||
// this.TotalGameData = make(map[int][]*model.PlayerGameTotal)
|
||||
// }
|
||||
// if this.TotalGameData[showId] == nil {
|
||||
// this.TotalGameData[showId] = []*model.PlayerGameTotal{new(model.PlayerGameTotal)}
|
||||
// }
|
||||
// td := this.TotalGameData[showId][len(this.TotalGameData[showId])-1]
|
||||
// td.ProfitCoin += profitCoin
|
||||
// td.BetCoin += validBet
|
||||
// td.FlowCoin += flow
|
||||
// ///////////////最多盈利
|
||||
// if pgs, exist := this.GDatas[keyGameId]; exist {
|
||||
// if pgs.Statics.MaxSysOut < profitCoin {
|
||||
// pgs.Statics.MaxSysOut = profitCoin
|
||||
// }
|
||||
// } else {
|
||||
// gs := model.NewPlayerGameStatics()
|
||||
// gs.MaxSysOut = profitCoin
|
||||
// this.GDatas[keyGameId] = &model.PlayerGameInfo{FirstTime: time.Now(), Statics: *gs}
|
||||
// }
|
||||
//}
|
||||
|
||||
// Statics 弃用,使用 Scene.Statistics 方法
|
||||
// 个人投入产出汇总,以游戏id为key存储
|
||||
// 数据用途:计算玩家赔率用,数据确保计算无误,否则可能影响玩家手牌的调控
|
||||
|
|
@ -851,61 +753,18 @@ func (this *Player) Statics(keyGameId string, keyGameFreeId string, gain int64,
|
|||
////}
|
||||
}
|
||||
|
||||
func (this *Player) SendTrusteeshipTips() {
|
||||
pack := &player.SCTrusteeshipTips{
|
||||
Trusteeship: proto.Int32(this.Trusteeship),
|
||||
TotalNum: proto.Int32(model.GameParamData.PlayerWatchNum),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
logger.Logger.Trace("SCTrusteeshipTips: ", pack)
|
||||
this.SendToClient(int(player.PlayerPacketID_PACKET_SC_TRUSTEESHIPTIPS), pack)
|
||||
}
|
||||
|
||||
func (this *Player) MarshalIParam() []*server.PlayerIParam {
|
||||
var params []*server.PlayerIParam
|
||||
for i, v := range this.Iparams {
|
||||
params = append(params, &server.PlayerIParam{
|
||||
ParamId: proto.Int(i),
|
||||
IntVal: proto.Int64(v),
|
||||
})
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
func (this *Player) UnmarshalIParam(params []*server.PlayerIParam) {
|
||||
for _, p := range params {
|
||||
this.Iparams[int(p.GetParamId())] = p.GetIntVal()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Player) MarshalSParam() []*server.PlayerSParam {
|
||||
var params []*server.PlayerSParam
|
||||
for i, v := range this.sparams {
|
||||
params = append(params, &server.PlayerSParam{
|
||||
ParamId: proto.Int(i),
|
||||
StrVal: proto.String(v),
|
||||
})
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
func (this *Player) UnmarshalSParam(params []*server.PlayerSParam) {
|
||||
for _, p := range params {
|
||||
this.sparams[int(p.GetParamId())] = p.GetStrVal()
|
||||
}
|
||||
}
|
||||
|
||||
func (this *Player) MarshalCParam() []*server.PlayerCParam {
|
||||
var params []*server.PlayerCParam
|
||||
for k, v := range this.cparams {
|
||||
params = append(params, &server.PlayerCParam{
|
||||
StrKey: proto.String(k),
|
||||
StrVal: proto.String(v),
|
||||
})
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
func (this *Player) UnmarshalCParam(params []*server.PlayerCParam) {
|
||||
for _, p := range params {
|
||||
this.cparams[p.GetStrKey()] = p.GetStrVal()
|
||||
|
|
@ -1219,17 +1078,6 @@ func (this *Player) NoviceOdds(gameId int) (int32, bool) {
|
|||
return int32(odds), b1
|
||||
}
|
||||
|
||||
/*// 设置玩家捕鱼等级
|
||||
func (this *Player) SetFishLevel(level int64) {
|
||||
data := srvdata.PBDB_PlayerExpMgr.GetData(int32(level))
|
||||
if data == nil {
|
||||
logger.Logger.Errorf("设置玩家等级错误!snid = %v, lvel = %v", this.SnId, level)
|
||||
return
|
||||
}
|
||||
this.FishLevel = level
|
||||
this.FishExp = int64(data.Exp)
|
||||
}*/
|
||||
|
||||
// 增加玩家经验
|
||||
func (this *Player) AddPlayerExp(exp int64) bool {
|
||||
this.Exp += exp
|
||||
|
|
@ -1395,3 +1243,71 @@ func (this *Player) PetUseSkill() bool {
|
|||
func (this *Player) GetSkillAdd(id int32) int32 {
|
||||
return this.GetSkillAdd2(id, ConfigMgrInst)
|
||||
}
|
||||
|
||||
// AddItems 添加道具
|
||||
// 增加或减少道具
|
||||
// 同步到 worldsrv
|
||||
func (this *Player) AddItems(args *model.AddItemParam) {
|
||||
pack := &server.PlayerChangeItems{
|
||||
SnId: args.P.SnId,
|
||||
}
|
||||
|
||||
for _, v := range args.Change {
|
||||
item := srvdata.GameItemMgr.Get(this.Platform, v.ItemId)
|
||||
if item == nil {
|
||||
continue
|
||||
}
|
||||
if v.ItemNum < 0 && this.Items[v.ItemId] < -v.ItemNum {
|
||||
v.ItemNum = -this.Items[v.ItemId]
|
||||
}
|
||||
if v.ItemNum == 0 {
|
||||
continue
|
||||
}
|
||||
this.Items[v.ItemId] += v.ItemNum
|
||||
if !args.NoLog {
|
||||
logType := 0
|
||||
if v.ItemNum < 0 {
|
||||
logType = 1
|
||||
}
|
||||
LogChannelSingleton.WriteLog(model.NewItemLogEx(model.ItemParam{
|
||||
Platform: this.Platform,
|
||||
SnId: this.SnId,
|
||||
LogType: int32(logType),
|
||||
ItemId: v.ItemId,
|
||||
ItemName: item.Name,
|
||||
Count: v.ItemNum,
|
||||
Remark: args.Remark,
|
||||
TypeId: args.GainWay,
|
||||
GameId: args.GameId,
|
||||
GameFreeId: args.GameFreeId,
|
||||
Cost: args.Cost,
|
||||
}))
|
||||
}
|
||||
pack.Items = append(pack.Items, &server.Item{
|
||||
Id: v.ItemId,
|
||||
Num: v.ItemNum,
|
||||
})
|
||||
}
|
||||
|
||||
if len(pack.Items) > 0 {
|
||||
this.SendToWorld(int(server.SSPacketID_PACKET_PlayerChangeItems), pack)
|
||||
logger.Logger.Tracef("PlayerChangeItems: %v", pack)
|
||||
}
|
||||
}
|
||||
|
||||
//func (this *Player) ReceiveAddItems(items []*model.Item) {
|
||||
// for _, v := range items {
|
||||
// item := srvdata.GameItemMgr.Get(this.Platform, v.ItemId)
|
||||
// if item == nil {
|
||||
// continue
|
||||
// }
|
||||
// if v.ItemNum < 0 && this.Items[v.ItemId] < -v.ItemNum {
|
||||
// v.ItemNum = -this.Items[v.ItemId]
|
||||
// }
|
||||
// if v.ItemNum == 0 {
|
||||
// continue
|
||||
// }
|
||||
// this.Items[v.ItemId] += v.ItemNum
|
||||
// logger.Logger.Tracef("ReceiveAddItems snid:%v, item:%v, num:%v change:%v", this.SnId, v.ItemId, this.Items[v.ItemId], v.ItemNum)
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ func (this *PlayerMgr) AddPlayer(id int64, data []byte, ws, gs *netlib.Session)
|
|||
logger.Logger.Warnf("(this *PlayerMgr) AddPlayer found id=%v player exist snid=%v", id, oldPlayer.SnId)
|
||||
testFlag = true
|
||||
if oldPlayer.scene != nil {
|
||||
logger.Logger.Warnf("(this *PlayerMgr) AddPlayer found snid=%v in sceneid=%v", id, oldPlayer.SnId, oldPlayer.scene.SceneId)
|
||||
if SceneMgrSington.GetScene(oldPlayer.scene.SceneId) != nil {
|
||||
logger.Logger.Warnf("(this *PlayerMgr) AddPlayer found snid=%v in sceneid=%v SceneMgrSington.GetScene(oldPlayer.scene.sceneId) != nil", id, oldPlayer.SnId, oldPlayer.scene.SceneId)
|
||||
logger.Logger.Warnf("(this *PlayerMgr) AddPlayer found id=%v snid=%v in sceneid=%v", id, oldPlayer.SnId, oldPlayer.scene.SceneId)
|
||||
if SceneMgrSington.GetScene(int(oldPlayer.scene.SceneId)) != nil {
|
||||
logger.Logger.Warnf("(this *PlayerMgr) AddPlayer found id=%v snid=%v in sceneid=%v SceneMgrSington.GetScene(oldPlayer.scene.sceneId) != nil", id, oldPlayer.SnId, oldPlayer.scene.SceneId)
|
||||
}
|
||||
}
|
||||
this.DelPlayer(id)
|
||||
|
|
|
|||
|
|
@ -13,11 +13,6 @@ import (
|
|||
"mongo.games.com/goserver/core/netlib"
|
||||
)
|
||||
|
||||
const (
|
||||
ReplayServerType int = 8
|
||||
ReplayServerId = 801
|
||||
)
|
||||
|
||||
var _replayIgnorePacketIds = map[int]bool{}
|
||||
|
||||
type ReplayRecorder struct {
|
||||
|
|
@ -97,13 +92,13 @@ func (this *ReplayRecorder) Fini(s *Scene) {
|
|||
// todo dev
|
||||
//Rec: this.rs,
|
||||
LogId: proto.String(this.Logid),
|
||||
GameId: proto.Int32(s.DbGameFree.GetGameId()),
|
||||
RoomMode: proto.Int32(s.DbGameFree.GetGameMode()),
|
||||
GameId: int32(s.GetGameId()),
|
||||
RoomMode: int32(s.GetGameMode()),
|
||||
NumOfGames: proto.Int(s.NumOfGames),
|
||||
Platform: proto.String(s.Platform),
|
||||
DatasVer: proto.Int32(s.rrVer),
|
||||
GameFreeid: proto.Int32(s.GetGameFreeId()),
|
||||
RoomId: proto.Int(s.SceneId),
|
||||
RoomId: s.SceneId,
|
||||
}
|
||||
if s.ClubId != 0 {
|
||||
pack.ClubId = proto.Int32(s.ClubId)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -32,38 +32,47 @@ func (this *SceneMgr) makeKey(gameid, gamemode int) int {
|
|||
return int(gameid*10000 + gamemode)
|
||||
}
|
||||
|
||||
func (this *SceneMgr) CreateScene(s *netlib.Session, sceneId, gameMode, sceneMode, gameId int, platform string,
|
||||
params []int64, agentor, creator int32, replayCode string, hallId, groupId, totalOfGames int32,
|
||||
dbGameFree *server.DB_GameFree, bEnterAfterStart bool, baseScore int32, playerNum int, chessRank []int32, paramsEx ...int32) *Scene {
|
||||
scene := NewScene(s, sceneId, gameMode, sceneMode, gameId, platform, params, agentor, creator, replayCode,
|
||||
hallId, groupId, totalOfGames, dbGameFree, bEnterAfterStart, baseScore, playerNum, chessRank, paramsEx...)
|
||||
type CreateSceneParam struct {
|
||||
Session *netlib.Session
|
||||
*server.WGCreateScene
|
||||
}
|
||||
|
||||
func (this *SceneMgr) CreateScene(args *CreateSceneParam) *Scene {
|
||||
scene := NewScene(args)
|
||||
if scene == nil {
|
||||
logger.Logger.Error("(this *SceneMgr) CreateScene, scene == nil")
|
||||
return nil
|
||||
}
|
||||
this.scenes[scene.SceneId] = scene
|
||||
|
||||
platform := args.GetPlatform()
|
||||
gameId := args.GetGameId()
|
||||
gameMode := args.GetGameMode()
|
||||
gameFreeId := args.GetDBGameFree().GetId()
|
||||
// 平台标记
|
||||
this.scenes[int(scene.SceneId)] = scene
|
||||
if _, ok := this.PlatformScene[platform]; !ok {
|
||||
this.PlatformScene[platform] = true
|
||||
}
|
||||
//
|
||||
key := this.makeKey(gameId, gameMode)
|
||||
// 游戏id索引
|
||||
key := this.makeKey(int(gameId), int(gameMode))
|
||||
if ss, exist := this.scenesByGame[key]; exist {
|
||||
ss[scene.SceneId] = scene
|
||||
ss[int(scene.SceneId)] = scene
|
||||
} else {
|
||||
ss = make(map[int]*Scene)
|
||||
ss[scene.SceneId] = scene
|
||||
ss[int(scene.SceneId)] = scene
|
||||
this.scenesByGame[key] = ss
|
||||
}
|
||||
//
|
||||
if ss, exist := this.scenesByGameFree[dbGameFree.GetId()]; exist {
|
||||
ss[scene.SceneId] = scene
|
||||
// 场次id索引
|
||||
if ss, exist := this.scenesByGameFree[gameFreeId]; exist {
|
||||
ss[int(scene.SceneId)] = scene
|
||||
} else {
|
||||
ss = make(map[int]*Scene)
|
||||
ss[scene.SceneId] = scene
|
||||
this.scenesByGameFree[dbGameFree.GetId()] = ss
|
||||
ss[int(scene.SceneId)] = scene
|
||||
this.scenesByGameFree[gameFreeId] = ss
|
||||
}
|
||||
scene.OnStart()
|
||||
logger.Logger.Infof("(this *SceneMgr) CreateScene,New scene,id:[%d] replaycode:[%v]", scene.SceneId, replayCode)
|
||||
logger.Logger.Infof("(this *SceneMgr) CreateScene,New scene,id:[%d] replaycode:[%v]", scene.SceneId, args.GetReplayCode())
|
||||
|
||||
return scene
|
||||
}
|
||||
|
||||
|
|
@ -71,13 +80,13 @@ func (this *SceneMgr) DestroyScene(sceneId int) {
|
|||
if scene, exist := this.scenes[sceneId]; exist {
|
||||
scene.OnStop()
|
||||
//
|
||||
key := this.makeKey(scene.GameId, scene.GameMode)
|
||||
key := this.makeKey(int(scene.GameId), int(scene.GameMode))
|
||||
if ss, exist := this.scenesByGame[key]; exist {
|
||||
delete(ss, scene.SceneId)
|
||||
delete(ss, int(scene.SceneId))
|
||||
}
|
||||
//
|
||||
if ss, exist := this.scenesByGameFree[scene.GetGameFreeId()]; exist {
|
||||
delete(ss, scene.SceneId)
|
||||
delete(ss, int(scene.SceneId))
|
||||
}
|
||||
delete(this.scenes, sceneId)
|
||||
logger.Logger.Infof("(this *SceneMgr) DestroyScene, sceneid = %v", sceneId)
|
||||
|
|
@ -169,7 +178,7 @@ func (this *SceneMgr) JackPotSync(platform string, gameIds ...int32) {
|
|||
val := s.sp.GetJackPotVal(s)
|
||||
if val > 0 {
|
||||
jpfi := &gamehall.GameJackpotFundInfo{
|
||||
GameFreeId: proto.Int32(s.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(s.GetGameFreeId()),
|
||||
JackPotFund: proto.Int64(val),
|
||||
}
|
||||
pack.GameJackpotFund = append(pack.GameJackpotFund, jpfi)
|
||||
|
|
|
|||
|
|
@ -59,14 +59,14 @@ func (this *CaiShenSceneData) SceneDestroy(force bool) {
|
|||
}
|
||||
|
||||
func (this *CaiShenSceneData) init() bool {
|
||||
if this.DbGameFree == nil {
|
||||
if this.GetDBGameFree() == nil {
|
||||
return false
|
||||
}
|
||||
params := this.DbGameFree.GetJackpot()
|
||||
params := this.GetDBGameFree().GetJackpot()
|
||||
this.jackpot = &base.SlotJackpotPool{}
|
||||
if this.jackpot.Small <= 0 {
|
||||
this.jackpot.Small = 0
|
||||
this.jackpot.VirtualJK = int64(params[rule.CAISHEN_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore())
|
||||
this.jackpot.VirtualJK = int64(params[rule.CAISHEN_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore())
|
||||
}
|
||||
str := base.XSlotsPoolMgr.GetPool(this.GetGameFreeId(), this.Platform)
|
||||
if str != "" {
|
||||
|
|
@ -102,7 +102,7 @@ type CaiShenSpinResult struct {
|
|||
}
|
||||
|
||||
func (this *CaiShenSceneData) CalcLinePrize(cards []int, betLines []int64, betValue int64) (spinRes CaiShenSpinResult) {
|
||||
taxRate := this.DbGameFree.GetTaxRate()
|
||||
taxRate := this.GetDBGameFree().GetTaxRate()
|
||||
calcTaxScore := func(score int64, taxScore *int64) int64 {
|
||||
newScore := int64(float64(score) * float64(10000-taxRate) / 10000.0)
|
||||
if taxScore != nil {
|
||||
|
|
@ -188,7 +188,7 @@ func (this *CaiShenSceneData) BroadcastJackpot(sync bool) {
|
|||
this.lastJackpotValue = this.jackpot.VirtualJK
|
||||
pack := &gamehall.SCHundredSceneGetGameJackpot{}
|
||||
jpfi := &gamehall.GameJackpotFundInfo{
|
||||
GameFreeId: proto.Int32(this.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(this.GetDBGameFree().Id),
|
||||
JackPotFund: proto.Int64(this.jackpot.VirtualJK),
|
||||
}
|
||||
pack.GameJackpotFund = append(pack.GameJackpotFund, jpfi)
|
||||
|
|
@ -215,7 +215,7 @@ func (this *CaiShenSceneData) PopCoinPool(winCoin int64, IsNovice bool) {
|
|||
}
|
||||
}
|
||||
func (this *CaiShenSceneData) RecordBurstLog(name string, wincoin, totalbet int64) {
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.DbGameFree.GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.InsertBurstJackpotLogs(log)
|
||||
}), nil, "InsertBurstJackpotLogs").Start()
|
||||
|
|
@ -223,7 +223,7 @@ func (this *CaiShenSceneData) RecordBurstLog(name string, wincoin, totalbet int6
|
|||
|
||||
func (this *CaiShenSceneData) BurstHistory(player *CaiShenPlayerData) {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.GetBurstJackpotLog(this.Platform, this.DbGameFree.GameId)
|
||||
return model.GetBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
var logsp []*caishen.CaiShenBurstHistoryInfo
|
||||
if data != nil {
|
||||
|
|
@ -251,7 +251,7 @@ func (this *CaiShenSceneData) GetLastBurstJackPot() time.Time {
|
|||
}
|
||||
func (this *CaiShenSceneData) SetLastBurstJackPot() {
|
||||
var randT = rand.Intn(25200-7200+1) + 7200
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(25200-7200+1) + 7200
|
||||
case 2:
|
||||
|
|
@ -267,7 +267,7 @@ func (this *CaiShenSceneData) SetLastBurstJackPot() {
|
|||
func (this *CaiShenSceneData) AIAddJackPot() {
|
||||
if time.Now().Sub(this.lastJackPot) > 0 {
|
||||
var randT = rand.Intn(3) + 1
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(3) + 1
|
||||
case 2:
|
||||
|
|
@ -280,20 +280,20 @@ func (this *CaiShenSceneData) AIAddJackPot() {
|
|||
randT = rand.Intn(3) + 1
|
||||
}
|
||||
this.lastJackPot = time.Now().Add(time.Second * time.Duration(randT))
|
||||
val := int64(math.Floor(float64(this.DbGameFree.GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
val := int64(math.Floor(float64(this.GetDBGameFree().GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
this.jackpot.VirtualJK += val
|
||||
}
|
||||
}
|
||||
func (this *CaiShenSceneData) AIBurstJackPot() {
|
||||
if time.Now().Sub(this.GetLastBurstJackPot()) > 0 {
|
||||
this.SetLastBurstJackPot()
|
||||
jackpotParams := this.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.CAISHEN_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
jackpotParams := this.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.CAISHEN_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
//AI机器人爆奖
|
||||
val := this.jackpot.VirtualJK
|
||||
this.jackpot.VirtualJK = jackpotInit
|
||||
bet := int64(this.DbGameFree.GetBaseScore()) * int64(rule.LINENUM)
|
||||
bet := int64(this.GetDBGameFree().GetBaseScore()) * int64(rule.LINENUM)
|
||||
this.RecordBurstLog(this.RandNickName(), val, int64(bet))
|
||||
}
|
||||
}
|
||||
|
|
@ -314,11 +314,11 @@ func (this *CaiShenSceneData) KickPlayerByTime() {
|
|||
}
|
||||
//for _, p := range this.players {
|
||||
// //游戏次数达到目标值
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.DbGameFree.GetId()))
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.GetDBGameFree().GetId()))
|
||||
// if !p.IsRob &&
|
||||
// todayGamefreeIDSceneData != nil &&
|
||||
// this.DbGameFree.GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.DbGameFree.GetPlayNumLimit()) {
|
||||
// this.GetDBGameFree().GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.GetDBGameFree().GetPlayNumLimit()) {
|
||||
// this.PlayerLeave(p.Player, common.PlayerLeaveReason_GameTimes, true)
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ func (this *ScenePolicyCaiShen) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
|||
logger.Logger.Trace("(this *ScenePolicyCaiShen) OnPlayerEnter, SceneId=", s.SceneId, " player=", p.SnId)
|
||||
if sceneEx, ok := s.ExtraData.(*CaiShenSceneData); ok {
|
||||
playerEx := &CaiShenPlayerData{Player: p}
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.DbGameFree.GetBaseScore() // 底注
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.GetDBGameFree().GetBaseScore() // 底注
|
||||
sceneEx.players[p.SnId] = playerEx
|
||||
p.ExtraData = playerEx
|
||||
CaiShenSendRoomInfo(s, p, sceneEx, playerEx, nil)
|
||||
|
|
@ -230,14 +230,14 @@ func (this *ScenePolicyCaiShen) GetJackPotVal(s *base.Scene) int64 {
|
|||
func CaiShenSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *CaiShenSceneData, playerEx *CaiShenPlayerData, data *caishen.GameBilledData) {
|
||||
logger.Logger.Trace("-------------------发送房间消息 ", s.RoomId, p.SnId)
|
||||
pack := &caishen.SCCaiShenRoomInfo{
|
||||
RoomId: proto.Int(s.SceneId),
|
||||
RoomId: s.SceneId,
|
||||
Creator: proto.Int32(s.Creator),
|
||||
GameId: proto.Int(s.GameId),
|
||||
RoomMode: proto.Int(s.GameMode),
|
||||
GameId: s.GameId,
|
||||
RoomMode: s.GameMode,
|
||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
||||
State: proto.Int(s.SceneState.GetState()),
|
||||
Jackpot: proto.Int64(sceneEx.jackpot.VirtualJK),
|
||||
GameFreeId: proto.Int32(s.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
||||
BilledData: data,
|
||||
}
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ func CaiShenSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *CaiShenSceneDat
|
|||
//}
|
||||
pack.BetLines = playerEx.betLines
|
||||
pack.FreeTimes = proto.Int32(playerEx.freeTimes)
|
||||
pack.Chip = proto.Int32(s.DbGameFree.BaseScore)
|
||||
pack.Chip = proto.Int32(s.GetDBGameFree().BaseScore)
|
||||
pack.SpinID = proto.Int64(playerEx.spinID)
|
||||
if playerEx.totalPriceBonus > 0 {
|
||||
switch playerEx.bonusStage {
|
||||
|
|
@ -373,7 +373,7 @@ func (this *SceneStateCaiShenStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
return false
|
||||
}
|
||||
//先做底注校验
|
||||
if sceneEx.DbGameFree.GetBaseScore() != int32(params[0]) {
|
||||
if sceneEx.GetDBGameFree().GetBaseScore() != int32(params[0]) {
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, caishen.OpResultCode_OPRC_Error, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -407,7 +407,7 @@ func (this *SceneStateCaiShenStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
if playerEx.freeTimes <= 0 && totalBetValue > playerEx.Coin {
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, caishen.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.DbGameFree.GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.GetDBGameFree().GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, caishen.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -422,7 +422,7 @@ func (this *SceneStateCaiShenStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
sceneEx.CpCtx = base.CoinPoolMgr.GetCoinPoolCtx(sceneEx.Platform, sceneEx.GetGameFreeId(), sceneEx.GroupId)
|
||||
|
||||
//税收比例
|
||||
taxRate := sceneEx.DbGameFree.GetTaxRate()
|
||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate()
|
||||
if taxRate < 0 || taxRate > 10000 {
|
||||
logger.Logger.Tracef("CaiShenErrorTaxRate [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, playerEx.spinID, taxRate)
|
||||
taxRate = 500
|
||||
|
|
@ -445,8 +445,8 @@ func (this *SceneStateCaiShenStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
prizeFund := gamePoolCoin - sceneEx.jackpot.VirtualJK // 除去奖池的水池剩余金额
|
||||
|
||||
// 奖池参数
|
||||
var jackpotParam = sceneEx.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParam[rule.CAISHEN_JACKPOT_InitJackpot]) * int64(sceneEx.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
var jackpotParam = sceneEx.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParam[rule.CAISHEN_JACKPOT_InitJackpot]) * int64(sceneEx.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
var jackpotFundAdd, prizeFundAdd int64
|
||||
if playerEx.freeTimes <= 0 { //正常模式才能记录用户的押注变化,免费模式不能改变押注
|
||||
|
|
@ -466,7 +466,7 @@ func (this *SceneStateCaiShenStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
////统计参与游戏次数
|
||||
//if !sceneEx.Testing && !playerEx.IsRob {
|
||||
// pack := &server.GWSceneEnd{
|
||||
// GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
// GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
// Players: []*server.PlayerCtx{&server.PlayerCtx{SnId: proto.Int32(playerEx.SnId), Coin: proto.Int64(playerEx.Coin)}},
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
|
|
@ -656,7 +656,7 @@ func (this *SceneStateCaiShenStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
case CaiShenPlayerHistory:
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
spinid := strconv.FormatInt(int64(playerEx.SnId), 10)
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.DbGameFree.GetGameClass(), s.GameId)
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.GetDBGameFree().GetGameClass(), int(s.GameId))
|
||||
pack := &caishen.SCCaiShenPlayerHistory{}
|
||||
for _, v := range gpl.Data {
|
||||
//if v.GameDetailedLogId == "" {
|
||||
|
|
@ -847,7 +847,7 @@ func (this *SceneStateCaiShenStart) WinTargetBenchTest(s *base.Scene, p *base.Pl
|
|||
}
|
||||
file.WriteString("玩家id,当前水位,之前余额,之后余额,投入,产出,税收,小游戏,中线倍数,中线数,剩余免费次数\r\n")
|
||||
oldCoin := p.Coin
|
||||
switch s.DbGameFree.GetSceneType() {
|
||||
switch s.GetDBGameFree().GetSceneType() {
|
||||
case 1:
|
||||
p.Coin = 100000
|
||||
case 2:
|
||||
|
|
@ -905,7 +905,7 @@ func (this *SceneStateCaiShenStart) MultiplayerBenchTest(s *base.Scene) {
|
|||
})
|
||||
caiShenBenchTestTimes++
|
||||
|
||||
fileName := fmt.Sprintf("caishen-total-%v-%d.csv", s.DbGameFree.GetSceneType(), caiShenBenchTestTimes)
|
||||
fileName := fmt.Sprintf("caishen-total-%v-%d.csv", s.GetDBGameFree().GetSceneType(), caiShenBenchTestTimes)
|
||||
file, err := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, os.ModePerm)
|
||||
defer file.Close()
|
||||
if err != nil {
|
||||
|
|
@ -918,7 +918,7 @@ func (this *SceneStateCaiShenStart) MultiplayerBenchTest(s *base.Scene) {
|
|||
|
||||
playersFile := make(map[int32]*os.File)
|
||||
oldCoins := make(map[int32]int64)
|
||||
hasCoin := 1000 * int64(s.DbGameFree.GetBaseScore())
|
||||
hasCoin := 1000 * int64(s.GetDBGameFree().GetBaseScore())
|
||||
robots := make(map[int32]bool)
|
||||
testPlayers := make(map[int32]*base.Player)
|
||||
for _, p := range s.Players {
|
||||
|
|
@ -926,7 +926,7 @@ func (this *SceneStateCaiShenStart) MultiplayerBenchTest(s *base.Scene) {
|
|||
p.IsRob = false
|
||||
robots[p.SnId] = true
|
||||
}
|
||||
fileName := fmt.Sprintf("caishen-player%v-%v-%d.csv", p.SnId, s.DbGameFree.GetSceneType(), caiShenBenchTestTimes)
|
||||
fileName := fmt.Sprintf("caishen-player%v-%v-%d.csv", p.SnId, s.GetDBGameFree().GetSceneType(), caiShenBenchTestTimes)
|
||||
file, err := os.OpenFile(fileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, os.ModePerm)
|
||||
if err != nil {
|
||||
file, err = os.Create(fileName)
|
||||
|
|
@ -955,7 +955,7 @@ func (this *SceneStateCaiShenStart) MultiplayerBenchTest(s *base.Scene) {
|
|||
}
|
||||
}()
|
||||
|
||||
totalBet := int64(s.DbGameFree.GetBaseScore()) * int64(len(rule.AllBetLines))
|
||||
totalBet := int64(s.GetDBGameFree().GetBaseScore()) * int64(len(rule.AllBetLines))
|
||||
for i := 0; i < BENCH_CNT; i++ {
|
||||
for snid, p := range testPlayers {
|
||||
if playerEx, ok := p.ExtraData.(*CaiShenPlayerData); ok {
|
||||
|
|
@ -970,7 +970,7 @@ func (this *SceneStateCaiShenStart) MultiplayerBenchTest(s *base.Scene) {
|
|||
inCoin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||
outCoin := playerEx.RollGameType.BaseResult.ChangeCoin + inCoin
|
||||
taxCoin := playerEx.RollGameType.BaseResult.Tax
|
||||
lineScore := float64(playerEx.RollGameType.BaseResult.WinRate*s.DbGameFree.GetBaseScore()) * float64(10000.0-s.DbGameFree.GetTaxRate()) / 10000.0
|
||||
lineScore := float64(playerEx.RollGameType.BaseResult.WinRate*s.GetDBGameFree().GetBaseScore()) * float64(10000.0-s.GetDBGameFree().GetTaxRate()) / 10000.0
|
||||
jackpotScore := outCoin - playerEx.RollGameType.BaseResult.WinSmallGame - int64(lineScore+0.00001)
|
||||
|
||||
str := fmt.Sprintf("%v,%v,%v,%v,%v,%v,%v,%v,%v,%v,%v,%v\r\n", p.SnId, poolCoin, StartCoin, p.Coin, inCoin, outCoin, taxCoin,
|
||||
|
|
@ -1004,7 +1004,7 @@ func CaiShenCheckAndSaveLog(sceneEx *CaiShenSceneData, playerEx *CaiShenPlayerDa
|
|||
|
||||
//log2
|
||||
playerEx.RollGameType.BaseResult.ChangeCoin = changeCoin
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.DbGameFree.GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.GetDBGameFree().GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.RoomId = int32(sceneEx.SceneId)
|
||||
playerEx.RollGameType.BaseResult.AfterCoin = playerEx.Coin
|
||||
playerEx.RollGameType.BaseResult.BeforeCoin = startCoin
|
||||
|
|
@ -1063,8 +1063,8 @@ func CaiShenCheckAndSaveLog(sceneEx *CaiShenSceneData, playerEx *CaiShenPlayerDa
|
|||
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
|
||||
}
|
||||
gwPlayerBet := &server.GWPlayerData{
|
||||
SceneId: proto.Int(sceneEx.SceneId),
|
||||
GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
SceneId: sceneEx.SceneId,
|
||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
}
|
||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
||||
sceneEx.SyncPlayerDatas(&base.PlayerDataParam{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func getChessVariant(gameId int) int {
|
|||
}
|
||||
|
||||
func NewSceneEx(s *base.Scene) *SceneEx {
|
||||
variant := getChessVariant(s.GameId)
|
||||
variant := getChessVariant(int(s.GameId))
|
||||
chess := rule.NewChess(variant)
|
||||
chess.Init()
|
||||
sceneEx := &SceneEx{
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ func CreateRoomInfoPacket(s *base.Scene, p *base.Player, sceneEx *SceneEx, playe
|
|||
State: proto.Int32(int32(s.GetSceneState().GetState())),
|
||||
TimeOut: proto.Int(s.GetSceneState().GetTimeout(s)),
|
||||
NumOfGames: proto.Int(sceneEx.NumOfGames),
|
||||
TotalOfGames: proto.Int(sceneEx.TotalOfGames),
|
||||
TotalOfGames: sceneEx.TotalOfGames,
|
||||
CurOpIdx: proto.Int(-1),
|
||||
MasterSnid: proto.Int32(sceneEx.masterSnId),
|
||||
AudienceNum: proto.Int(s.GetAudiencesNum()),
|
||||
|
|
@ -528,7 +528,7 @@ func CreateRoomInfoPacket(s *base.Scene, p *base.Player, sceneEx *SceneEx, playe
|
|||
|
||||
}
|
||||
pack.MatchFinals = 0
|
||||
if s.MatchFinals {
|
||||
if s.GetMatch().GetIsFinals() {
|
||||
pack.MatchFinals = 1
|
||||
if s.NumOfGames >= 2 {
|
||||
pack.MatchFinals = 2
|
||||
|
|
@ -852,7 +852,7 @@ func (this *SceneStateWaitStart) OnTick(s *base.Scene) {
|
|||
if sceneEx, ok := s.GetExtraData().(*SceneEx); ok {
|
||||
if sceneEx.IsMatchScene() {
|
||||
delayT := time.Second * 2
|
||||
if sceneEx.MatchRound != 1 { //第一轮延迟2s,其他延迟3s 配合客户端播放动画
|
||||
if sceneEx.GetMatch().GetCurrRound() != 1 { //第一轮延迟2s,其他延迟3s 配合客户端播放动画
|
||||
delayT = time.Second * 4
|
||||
}
|
||||
if time.Now().Sub(sceneEx.StateStartTime) > delayT {
|
||||
|
|
@ -1215,14 +1215,14 @@ func (this *SceneStateBilled) OnEnter(s *base.Scene) {
|
|||
|
||||
pack := &chesstitians.SCChesstitiansGameBilled{}
|
||||
chessType := model.ChesstitiansType{
|
||||
GameId: sceneEx.GameId,
|
||||
GameId: int(sceneEx.GameId),
|
||||
RoomId: int32(sceneEx.GetSceneId()),
|
||||
RoomType: int32(sceneEx.Scene.SceneType),
|
||||
RoomType: sceneEx.Scene.GetDBGameFree().GetSceneType(),
|
||||
NumOfGames: int32(sceneEx.Scene.NumOfGames),
|
||||
BankId: sceneEx.masterSnId,
|
||||
PlayerCount: rule.MaxNumOfPlayer,
|
||||
BaseScore: s.BaseScore,
|
||||
TaxRate: s.DbGameFree.GetTaxRate(),
|
||||
TaxRate: s.GetDBGameFree().GetTaxRate(),
|
||||
RoomMode: s.GetSceneMode(),
|
||||
}
|
||||
|
||||
|
|
@ -1462,7 +1462,7 @@ func (this *SceneStateBilled) OnLeave(s *base.Scene) {
|
|||
return
|
||||
}
|
||||
|
||||
if s.CheckNeedDestroy() || (s.IsMatchScene() && (!s.MatchFinals || (s.MatchFinals && s.NumOfGames >= 2))) { // 非决赛打一场 决赛打两场
|
||||
if s.CheckNeedDestroy() || (s.IsMatchScene() && (!s.GetMatch().GetIsFinals() || (s.GetMatch().GetIsFinals() && s.NumOfGames >= 2))) { // 非决赛打一场 决赛打两场
|
||||
sceneEx.SceneDestroy(true)
|
||||
}
|
||||
s.TryRelease()
|
||||
|
|
|
|||
|
|
@ -53,14 +53,14 @@ func (this *EasterIslandSceneData) OnPlayerLeave(p *base.Player, reason int) {
|
|||
}
|
||||
|
||||
func (this *EasterIslandSceneData) init() bool {
|
||||
if this.DbGameFree == nil {
|
||||
if this.GetDBGameFree() == nil {
|
||||
return false
|
||||
}
|
||||
params := this.DbGameFree.GetJackpot()
|
||||
params := this.GetDBGameFree().GetJackpot()
|
||||
this.jackpot = &base.SlotJackpotPool{}
|
||||
if this.jackpot.Small <= 0 {
|
||||
this.jackpot.Small = 0
|
||||
this.jackpot.VirtualJK = int64(params[rule.EL_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore())
|
||||
this.jackpot.VirtualJK = int64(params[rule.EL_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore())
|
||||
}
|
||||
str := base.SlotsPoolMgr.GetPool(this.GetGameFreeId(), this.Platform)
|
||||
if str != "" {
|
||||
|
|
@ -101,7 +101,7 @@ type EasterIslandSpinResult struct {
|
|||
}
|
||||
|
||||
func (this *EasterIslandSceneData) CalcLinePrize(cards []int, betLines []int64, betValue int64) (spinRes EasterIslandSpinResult) {
|
||||
taxRate := this.DbGameFree.GetTaxRate()
|
||||
taxRate := this.GetDBGameFree().GetTaxRate()
|
||||
calcTaxScore := func(score int64, taxScore *int64) int64 {
|
||||
newScore := int64(float64(score) * float64(10000-taxRate) / 10000.0)
|
||||
if taxScore != nil {
|
||||
|
|
@ -192,7 +192,7 @@ func (this *EasterIslandSceneData) BroadcastJackpot(sync bool) {
|
|||
this.lastJackpotValue = this.jackpot.VirtualJK
|
||||
pack := &gamehall.SCHundredSceneGetGameJackpot{}
|
||||
jpfi := &gamehall.GameJackpotFundInfo{
|
||||
GameFreeId: proto.Int32(this.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(this.GetDBGameFree().Id),
|
||||
JackPotFund: proto.Int64(this.jackpot.VirtualJK),
|
||||
}
|
||||
pack.GameJackpotFund = append(pack.GameJackpotFund, jpfi)
|
||||
|
|
@ -218,7 +218,7 @@ func (this *EasterIslandSceneData) PopCoinPool(winCoin int64, IsNovice bool) {
|
|||
}
|
||||
}
|
||||
func (this *EasterIslandSceneData) RecordBurstLog(name string, wincoin, totalbet int64) {
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.DbGameFree.GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.InsertBurstJackpotLogs(log)
|
||||
}), nil, "InsertBurstJackpotLogs").Start()
|
||||
|
|
@ -226,7 +226,7 @@ func (this *EasterIslandSceneData) RecordBurstLog(name string, wincoin, totalbet
|
|||
|
||||
func (this *EasterIslandSceneData) BurstHistory(player *EasterIslandPlayerData) {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.GetBurstJackpotLog(this.Platform, this.DbGameFree.GameId)
|
||||
return model.GetBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
var logsp []*easterisland.EasterIslandBurstHistoryInfo
|
||||
if data != nil {
|
||||
|
|
@ -254,7 +254,7 @@ func (this *EasterIslandSceneData) GetLastBurstJackPot() time.Time {
|
|||
}
|
||||
func (this *EasterIslandSceneData) SetLastBurstJackPot() {
|
||||
var randT = rand.Intn(25200-7200+1) + 7200
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(25200-7200+1) + 7200
|
||||
case 2:
|
||||
|
|
@ -269,7 +269,7 @@ func (this *EasterIslandSceneData) SetLastBurstJackPot() {
|
|||
func (this *EasterIslandSceneData) AIAddJackPot() {
|
||||
if time.Now().Sub(this.lastJackPot) > 0 {
|
||||
var randT = rand.Intn(3) + 1
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(3) + 1
|
||||
case 2:
|
||||
|
|
@ -282,20 +282,20 @@ func (this *EasterIslandSceneData) AIAddJackPot() {
|
|||
randT = rand.Intn(3) + 1
|
||||
}
|
||||
this.lastJackPot = time.Now().Add(time.Second * time.Duration(randT))
|
||||
val := int64(math.Floor(float64(this.DbGameFree.GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
val := int64(math.Floor(float64(this.GetDBGameFree().GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
this.jackpot.VirtualJK += val
|
||||
}
|
||||
}
|
||||
func (this *EasterIslandSceneData) AIBurstJackPot() {
|
||||
if time.Now().Sub(this.GetLastBurstJackPot()) > 0 {
|
||||
this.SetLastBurstJackPot()
|
||||
jackpotParams := this.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.EL_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
jackpotParams := this.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.EL_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
//AI机器人爆奖
|
||||
val := this.jackpot.VirtualJK
|
||||
this.jackpot.VirtualJK = jackpotInit
|
||||
bet := int64(this.DbGameFree.GetBaseScore()) * int64(rule.LINENUM)
|
||||
bet := int64(this.GetDBGameFree().GetBaseScore()) * int64(rule.LINENUM)
|
||||
this.RecordBurstLog(this.RandNickName(), val, bet)
|
||||
}
|
||||
}
|
||||
|
|
@ -316,11 +316,11 @@ func (this *EasterIslandSceneData) KickPlayerByTime() {
|
|||
}
|
||||
//for _, p := range this.players {
|
||||
// //游戏次数达到目标值
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.DbGameFree.GetId()))
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.GetDBGameFree().GetId()))
|
||||
// if !p.IsRob &&
|
||||
// todayGamefreeIDSceneData != nil &&
|
||||
// this.DbGameFree.GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.DbGameFree.GetPlayNumLimit()) {
|
||||
// this.GetDBGameFree().GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.GetDBGameFree().GetPlayNumLimit()) {
|
||||
// this.PlayerLeave(p.Player, common.PlayerLeaveReason_GameTimes, true)
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ func (this *ScenePolicyEasterIsland) OnPlayerEnter(s *base.Scene, p *base.Player
|
|||
logger.Logger.Trace("(this *ScenePolicyEasterIsland) OnPlayerEnter, sceneId=", s.SceneId, " player=", p.SnId)
|
||||
if sceneEx, ok := s.ExtraData.(*EasterIslandSceneData); ok {
|
||||
playerEx := &EasterIslandPlayerData{Player: p}
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.DbGameFree.GetBaseScore() // 底注
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.GetDBGameFree().GetBaseScore() // 底注
|
||||
sceneEx.players[p.SnId] = playerEx
|
||||
p.ExtraData = playerEx
|
||||
EasterIslandSendRoomInfo(s, p, sceneEx, playerEx, nil)
|
||||
|
|
@ -230,14 +230,14 @@ func (this *ScenePolicyEasterIsland) GetJackPotVal(s *base.Scene) int64 {
|
|||
func EasterIslandSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *EasterIslandSceneData, playerEx *EasterIslandPlayerData, data *easterisland.GameBilledData) {
|
||||
logger.Logger.Trace("-------------------发送房间消息 ", s.RoomId, p.SnId)
|
||||
pack := &easterisland.SCEasterIslandRoomInfo{
|
||||
RoomId: proto.Int(s.SceneId),
|
||||
RoomId: s.SceneId,
|
||||
Creator: proto.Int32(s.Creator),
|
||||
GameId: proto.Int(s.GameId),
|
||||
RoomMode: proto.Int(s.GameMode),
|
||||
GameId: s.GameId,
|
||||
RoomMode: s.GameMode,
|
||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
||||
State: proto.Int(s.SceneState.GetState()),
|
||||
Jackpot: proto.Int64(sceneEx.jackpot.VirtualJK),
|
||||
GameFreeId: proto.Int32(s.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
||||
BilledData: data,
|
||||
}
|
||||
if playerEx != nil {
|
||||
|
|
@ -256,7 +256,7 @@ func EasterIslandSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *EasterIsla
|
|||
//}
|
||||
pack.BetLines = playerEx.betLines
|
||||
pack.FreeTimes = proto.Int32(playerEx.freeTimes)
|
||||
pack.Chip = proto.Int32(s.DbGameFree.BaseScore)
|
||||
pack.Chip = proto.Int32(s.GetDBGameFree().BaseScore)
|
||||
pack.SpinID = proto.Int64(playerEx.spinID)
|
||||
if playerEx.totalPriceBonus > 0 {
|
||||
switch playerEx.bonusStage {
|
||||
|
|
@ -367,7 +367,7 @@ func (this *SceneStateEasterIslandStart) OnPlayerOp(s *base.Scene, p *base.Playe
|
|||
return false
|
||||
}
|
||||
//先做底注校验
|
||||
if sceneEx.DbGameFree.GetBaseScore() != int32(params[0]) {
|
||||
if sceneEx.GetDBGameFree().GetBaseScore() != int32(params[0]) {
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, easterisland.OpResultCode_OPRC_Error, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -401,7 +401,7 @@ func (this *SceneStateEasterIslandStart) OnPlayerOp(s *base.Scene, p *base.Playe
|
|||
if playerEx.freeTimes <= 0 && totalBetValue > playerEx.Coin {
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, easterisland.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.DbGameFree.GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.GetDBGameFree().GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, easterisland.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -413,7 +413,7 @@ func (this *SceneStateEasterIslandStart) OnPlayerOp(s *base.Scene, p *base.Playe
|
|||
|
||||
//获取当前水池的上下文环境
|
||||
sceneEx.CpCtx = base.CoinPoolMgr.GetCoinPoolCtx(sceneEx.Platform, sceneEx.GetGameFreeId(), sceneEx.GroupId)
|
||||
taxRate := sceneEx.DbGameFree.GetTaxRate()
|
||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate()
|
||||
if taxRate < 0 || taxRate > 10000 {
|
||||
logger.Logger.Warnf("EasterIslandErrorTaxRate [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, playerEx.spinID, taxRate)
|
||||
taxRate = 500
|
||||
|
|
@ -430,9 +430,9 @@ func (this *SceneStateEasterIslandStart) OnPlayerOp(s *base.Scene, p *base.Playe
|
|||
} else {
|
||||
gamePoolCoin = base.CoinPoolMgr.GetCoin(sceneEx.GetGameFreeId(), sceneEx.Platform, sceneEx.GroupId) // 当前水池金额
|
||||
}
|
||||
prizeFund := gamePoolCoin - sceneEx.jackpot.VirtualJK // 除去奖池的水池剩余金额
|
||||
jackpotParams := sceneEx.DbGameFree.GetJackpot() // 奖池参数
|
||||
var jackpotInit = int64(jackpotParams[rule.EL_JACKPOT_InitJackpot]) * int64(sceneEx.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
prizeFund := gamePoolCoin - sceneEx.jackpot.VirtualJK // 除去奖池的水池剩余金额
|
||||
jackpotParams := sceneEx.GetDBGameFree().GetJackpot() // 奖池参数
|
||||
var jackpotInit = int64(jackpotParams[rule.EL_JACKPOT_InitJackpot]) * int64(sceneEx.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
var jackpotFundAdd, prizeFundAdd int64
|
||||
if playerEx.freeTimes <= 0 { //正常模式才能记录用户的押注变化,免费模式不能改变押注
|
||||
|
|
@ -449,7 +449,7 @@ func (this *SceneStateEasterIslandStart) OnPlayerOp(s *base.Scene, p *base.Playe
|
|||
////统计参与游戏次数
|
||||
//if !sceneEx.Testing && !playerEx.IsRob {
|
||||
// pack := &server.GWSceneEnd{
|
||||
// GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
// GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
// Players: []*server.PlayerCtx{&server.PlayerCtx{SnId: proto.Int32(playerEx.SnId), Coin: proto.Int64(playerEx.Coin)}},
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
|
|
@ -629,7 +629,7 @@ func (this *SceneStateEasterIslandStart) OnPlayerOp(s *base.Scene, p *base.Playe
|
|||
case EasterIslandPlayerHistory:
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
spinid := strconv.FormatInt(int64(playerEx.SnId), 10)
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.DbGameFree.GetGameClass(), s.GameId)
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.GetDBGameFree().GetGameClass(), int(s.GameId))
|
||||
pack := &easterisland.SCEasterIslandPlayerHistory{}
|
||||
for _, v := range gpl.Data {
|
||||
//if v.GameDetailedLogId == "" {
|
||||
|
|
@ -819,7 +819,7 @@ func (this *SceneStateEasterIslandStart) WinTargetBenchTest(s *base.Scene, p *ba
|
|||
}
|
||||
file.WriteString("玩家id,当前水位,之前余额,之后余额,投入,产出,税收,小游戏,中线倍数,中线数,剩余免费次数\r\n")
|
||||
oldCoin := p.Coin
|
||||
switch s.DbGameFree.GetSceneType() {
|
||||
switch s.GetDBGameFree().GetSceneType() {
|
||||
case 1:
|
||||
p.Coin = 100000
|
||||
case 2:
|
||||
|
|
@ -873,7 +873,7 @@ func EasterIslandCheckAndSaveLog(sceneEx *EasterIslandSceneData, playerEx *Easte
|
|||
|
||||
//log2
|
||||
playerEx.RollGameType.BaseResult.ChangeCoin = changeCoin
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.DbGameFree.GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.GetDBGameFree().GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.RoomId = int32(sceneEx.SceneId)
|
||||
playerEx.RollGameType.BaseResult.AfterCoin = playerEx.Coin
|
||||
playerEx.RollGameType.BaseResult.BeforeCoin = startCoin
|
||||
|
|
@ -932,8 +932,8 @@ func EasterIslandCheckAndSaveLog(sceneEx *EasterIslandSceneData, playerEx *Easte
|
|||
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
|
||||
}
|
||||
gwPlayerBet := &server.GWPlayerData{
|
||||
SceneId: proto.Int(sceneEx.SceneId),
|
||||
GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
SceneId: sceneEx.SceneId,
|
||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
}
|
||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
||||
sceneEx.SyncPlayerDatas(&base.PlayerDataParam{
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ func (this *CSFishSkillUseReqHandler) Process(s *netlib.Session, packetid int, d
|
|||
status := false
|
||||
for _, s := range strSlice {
|
||||
num, _ := strconv.Atoi(s)
|
||||
if num == player.GetScene().SceneType {
|
||||
if int32(num) == player.GetScene().GetSceneType() {
|
||||
status = true
|
||||
}
|
||||
}
|
||||
|
|
@ -414,7 +414,7 @@ func (this *CSFishSkillUseReqHandler) Process(s *netlib.Session, packetid int, d
|
|||
pack.Result = 1
|
||||
pack.Status = fishing_proto.SCFishSkillUseResp_ROOM_DISALLOW
|
||||
player.SendToClient(int(fishing_proto.FIPacketID_FISHING_SC_SKILLUSERESP), pack)
|
||||
fishlogger.Trace("当前房间不允许使用此技能 skillId = %v,sceneType = %v", skillId, player.GetScene().SceneType)
|
||||
fishlogger.Trace("当前房间不允许使用此技能 skillId = %v,sceneType = %v", skillId, player.GetScene().GetSceneType())
|
||||
return nil
|
||||
}
|
||||
//判断当前技能在不在CD中
|
||||
|
|
@ -516,7 +516,7 @@ func (this *CSSkillListReqHandler) Process(s *netlib.Session, packetid int, data
|
|||
pack := &fishing_proto.SCSkillListResp{}
|
||||
for _, skill := range srvdata.PBDB_FishSkillMgr.Datas.Arr {
|
||||
//获取房间类型
|
||||
sceneType := player.GetScene().SceneType
|
||||
sceneType := player.GetScene().GetSceneType()
|
||||
str := skill.Hidden
|
||||
num, err := strconv.Atoi(str)
|
||||
status := true
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ func (this *FishingPlayerData) SaveDetailedLog(s *base.Scene) {
|
|||
GameCoinTs: proto.Int64(this.GameCoinTs),
|
||||
}
|
||||
gwPlayerData := &server_proto.GWPlayerData{
|
||||
SceneId: proto.Int(sceneEx.SceneId),
|
||||
SceneId: sceneEx.SceneId,
|
||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
}
|
||||
gwPlayerData.Datas = append(gwPlayerData.Datas, playerBet)
|
||||
|
|
|
|||
|
|
@ -108,12 +108,11 @@ func (this *FishingSceneData) init() bool {
|
|||
this.SetPlayerNum(4)
|
||||
this.gameId = this.GetGameId()
|
||||
this.platform = this.GetPlatform()
|
||||
this.sceneType = int(this.DbGameFree.GetSceneType())
|
||||
this.sceneType = int(this.GetDBGameFree().GetSceneType())
|
||||
this.keyGameId = this.GetKeyGameId()
|
||||
this.testing = this.GetTesting()
|
||||
this.gamefreeId = this.GetGameFreeId()
|
||||
this.groupId = this.GetGroupId()
|
||||
this.agentor = this.GetAgentor()
|
||||
this.sceneMode = this.GetSceneMode()
|
||||
this.TimePoint = 0
|
||||
this.lastLittleBossTime = time.Now().Unix()
|
||||
|
|
@ -905,7 +904,7 @@ func (this *FishingSceneData) fishSettlements(fishs []*Fish, player *FishingPlay
|
|||
}
|
||||
//BOSS鱼死亡 更新BOSS池和个人池
|
||||
if value.IsBoss == fishing.Boss {
|
||||
bossPond := base.GetCoinPoolMgr().GetBossPond(this.DbGameFree.SceneType)
|
||||
bossPond := base.GetCoinPoolMgr().GetBossPond(this.GetDBGameFree().SceneType)
|
||||
this.isBossDie(player, int64(dropCoin), bossPond)
|
||||
}
|
||||
|
||||
|
|
@ -1508,7 +1507,7 @@ func (this *FishingSceneData) AddBossPond(player *FishingPlayerData, fishtype in
|
|||
// 减掉个人池数值
|
||||
if score > 0 {
|
||||
player.MoneyPond -= score
|
||||
base.GetCoinPoolMgr().AddBossPond(this.DbGameFree.SceneType, score)
|
||||
base.GetCoinPoolMgr().AddBossPond(this.GetDBGameFree().SceneType, score)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1522,7 +1521,7 @@ func (this *FishingSceneData) isBossDie(player *FishingPlayerData, score int64,
|
|||
minNum = bossPond
|
||||
}
|
||||
player.MoneyPond += minNum
|
||||
base.GetCoinPoolMgr().AddBossPond(this.DbGameFree.SceneType, -minNum)
|
||||
base.GetCoinPoolMgr().AddBossPond(this.GetDBGameFree().SceneType, -minNum)
|
||||
fishlogger.Infof("玩家:%v,Boss奖池剩余金币数量:%v\n", player.SnId, bossPond)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ func (p *FruitsPlayerData) Clear() {
|
|||
p.weightPos = 0
|
||||
}
|
||||
func (p *FruitsPlayerData) TestCode(eleLineAppearRate [][]int32, sceneEx *FruitsSceneData) bool {
|
||||
//if sceneEx.DbGameFree.GetId() == 3060004 {
|
||||
//if sceneEx.GetDBGameFree().GetId() == 3060004 {
|
||||
// p.result.CreateLine(eleLineAppearRate, p.gameState == fruits.FreeGame)
|
||||
// if p.testIdx == 1 {
|
||||
// //test mary
|
||||
|
|
@ -186,7 +186,7 @@ func (p *FruitsPlayerData) CreateResult(eleLineAppearRate [][]int32, sceneEx *Fr
|
|||
case 5:
|
||||
winjackpot = int64(math.Ceil(float64(JackPotVal) * 0.4 / float64(fruits.NowByte)))
|
||||
}
|
||||
if winjackpot < int64(sceneEx.DbGameFree.GetJackpotMin())*fruits.NowByte {
|
||||
if winjackpot < int64(sceneEx.GetDBGameFree().GetJackpotMin())*fruits.NowByte {
|
||||
isNeed = false
|
||||
break
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ func NewFruitsSceneData(s *base.Scene) *FruitsSceneData {
|
|||
func (s *FruitsSceneData) Init() {
|
||||
s.LoadJackPotData()
|
||||
//for _, data := range srvdata.PBDB_SlotRateWeightMgr.Datas.Arr {
|
||||
// if data.Id == s.DbGameFree.Id {
|
||||
// if data.Id == s.GetDBGameFree().Id {
|
||||
// //s.levelRate = append(s.levelRate, data.EleWeight1)
|
||||
// //s.slotRateWeightTotal = append(s.slotRateWeightTotal, data.EleWeight1, data.EleWeight2, data.EleWeight3, data.EleWeight4, data.EleWeight5)
|
||||
// }
|
||||
|
|
@ -59,12 +59,12 @@ func (s *FruitsSceneData) SceneDestroy(force bool) {
|
|||
}
|
||||
func (s *FruitsSceneData) AddPrizeCoin(playerEx *FruitsPlayerData) {
|
||||
val := playerEx.betCoin
|
||||
tax := int64(math.Ceil(float64(val) * float64(s.DbGameFree.GetTaxRate()) / 10000))
|
||||
tax := int64(math.Ceil(float64(val) * float64(s.GetDBGameFree().GetTaxRate()) / 10000))
|
||||
//playerEx.taxCoin = tax
|
||||
//playerEx.AddServiceFee(tax)
|
||||
val -= tax
|
||||
|
||||
addPrizeCoin := int64(math.Floor(float64(val*fruits.NowByte*int64(s.DbGameFree.GetJackpotRatio())) / 1000)) //扩大10000倍
|
||||
addPrizeCoin := int64(math.Floor(float64(val*fruits.NowByte*int64(s.GetDBGameFree().GetJackpotRatio())) / 1000)) //扩大10000倍
|
||||
s.jackpot.AddToSmall(playerEx.IsRob, addPrizeCoin)
|
||||
logger.Logger.Tracef("奖池增加...AddPrizeCoin... %f", float64(addPrizeCoin)/float64(fruits.NowByte))
|
||||
base.SlotsPoolMgr.SetPool(s.GetGameFreeId(), s.Platform, s.jackpot)
|
||||
|
|
@ -95,7 +95,7 @@ func (s *FruitsSceneData) OnPlayerLeave(p *base.Player, reason int) {
|
|||
if playerEx.winCoin != 0 {
|
||||
//SysProfitCoinMgr.Add(s.sysProfitCoinKey, 0, playerEx.winCoin)
|
||||
p.Statics(s.KeyGameId, s.KeyGamefreeId, playerEx.winCoin, false)
|
||||
//tax := int64(math.Ceil(float64(playerEx.winCoin) * float64(s.DbGameFree.GetTaxRate()) / 10000))
|
||||
//tax := int64(math.Ceil(float64(playerEx.winCoin) * float64(s.GetDBGameFree().GetTaxRate()) / 10000))
|
||||
//playerEx.taxCoin = tax
|
||||
//playerEx.winCoin -= tax
|
||||
//p.AddServiceFee(tax)
|
||||
|
|
@ -140,7 +140,7 @@ func (s *FruitsSceneData) Win(p *FruitsPlayerData) {
|
|||
p.noWinTimes = 0
|
||||
//SysProfitCoinMgr.Add(s.sysProfitCoinKey, 0, p.winCoin)
|
||||
p.Statics(s.KeyGameId, s.KeyGamefreeId, p.winCoin, false)
|
||||
//tax := int64(math.Ceil(float64(p.winCoin) * float64(s.DbGameFree.GetTaxRate()) / 10000))
|
||||
//tax := int64(math.Ceil(float64(p.winCoin) * float64(s.GetDBGameFree().GetTaxRate()) / 10000))
|
||||
//p.taxCoin = tax
|
||||
//p.winCoin -= tax
|
||||
//p.AddServiceFee(tax)
|
||||
|
|
@ -210,7 +210,7 @@ func (s *FruitsSceneData) LoadJackPotData() {
|
|||
base.SlotsPoolMgr.SetPool(s.GetGameFreeId(), s.Platform, s.jackpot)
|
||||
} else {
|
||||
s.jackpot = &base.SlotJackpotPool{}
|
||||
jp := s.DbGameFree.GetJackpot()
|
||||
jp := s.GetDBGameFree().GetJackpot()
|
||||
if len(jp) > 0 {
|
||||
s.jackpot.Small += int64(jp[0] * 10000)
|
||||
}
|
||||
|
|
@ -244,7 +244,7 @@ func (s *FruitsSceneData) SaveLog(p *FruitsPlayerData, isOffline int) {
|
|||
}
|
||||
}
|
||||
FruitsType := model.FruitsType{
|
||||
RoomId: s.SceneId,
|
||||
RoomId: int(s.SceneId),
|
||||
BasicScore: int32(p.oneBetCoin),
|
||||
PlayerSnId: p.SnId,
|
||||
BeforeCoin: p.startCoin,
|
||||
|
|
@ -372,7 +372,7 @@ func (s *FruitsSceneData) SendPlayerBet(p *FruitsPlayerData) {
|
|||
Tax: proto.Int64(p.taxCoin),
|
||||
}
|
||||
gwPlayerBet := &server.GWPlayerData{
|
||||
GameFreeId: proto.Int32(s.DbGameFree.GetId()),
|
||||
GameFreeId: proto.Int32(s.GetDBGameFree().GetId()),
|
||||
}
|
||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
||||
s.SyncPlayerDatas(&base.PlayerDataParam{
|
||||
|
|
@ -604,8 +604,8 @@ func (s *FruitsSceneData) GetEleWeight(needpos int32) (norms, frees, marys [][]i
|
|||
curCoin := base.CoinPoolMgr.GetCoin(s.GetGameFreeId(), s.Platform, s.GroupId)
|
||||
curCoin = int64(math.Floor(float64(curCoin) / float64(fruits.NowByte)))
|
||||
|
||||
for i := len(s.DbGameFree.BalanceLine) - 1; i >= 0; i-- {
|
||||
balance := s.DbGameFree.BalanceLine[i]
|
||||
for i := len(s.GetDBGameFree().BalanceLine) - 1; i >= 0; i-- {
|
||||
balance := s.GetDBGameFree().BalanceLine[i]
|
||||
if curCoin >= int64(balance) {
|
||||
key = int32(i)
|
||||
break
|
||||
|
|
|
|||
|
|
@ -148,16 +148,16 @@ func FruitsSendRoomInfo(s *base.Scene, sceneEx *FruitsSceneData, playerEx *Fruit
|
|||
func FruitsCreateRoomInfoPacket(s *base.Scene, sceneEx *FruitsSceneData, playerEx *FruitsPlayerData) interface{} {
|
||||
//房间信息
|
||||
pack := &protocol.SCFruitsRoomInfo{
|
||||
RoomId: proto.Int(s.SceneId),
|
||||
GameId: proto.Int(s.GameId),
|
||||
RoomMode: proto.Int(s.SceneMode),
|
||||
SceneType: proto.Int(s.SceneType),
|
||||
RoomId: s.SceneId,
|
||||
GameId: s.GameId,
|
||||
RoomMode: s.SceneMode,
|
||||
SceneType: s.GetSceneType(),
|
||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
||||
NumOfGames: proto.Int(sceneEx.NumOfGames),
|
||||
State: proto.Int(s.SceneState.GetState()),
|
||||
ParamsEx: s.DbGameFree.OtherIntParams,
|
||||
GameFreeId: proto.Int32(s.DbGameFree.Id),
|
||||
//BetLimit: s.DbGameFree.BetLimit,
|
||||
ParamsEx: s.GetDBGameFree().OtherIntParams,
|
||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
||||
//BetLimit: s.GetDBGameFree().BetLimit,
|
||||
}
|
||||
|
||||
//自己的信息
|
||||
|
|
@ -299,11 +299,11 @@ func (this *SceneBaseStateFruits) OnTick(s *base.Scene) {
|
|||
if sceneEx, ok := s.ExtraData.(*FruitsSceneData); ok {
|
||||
//for _, p := range sceneEx.players {
|
||||
// //游戏次数达到目标值
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(sceneEx.DbGameFree.GetId()))
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(sceneEx.GetDBGameFree().GetId()))
|
||||
// if !p.IsRob &&
|
||||
// todayGamefreeIDSceneData != nil &&
|
||||
// sceneEx.DbGameFree.GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(sceneEx.DbGameFree.GetPlayNumLimit()) {
|
||||
// sceneEx.GetDBGameFree().GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(sceneEx.GetDBGameFree().GetPlayNumLimit()) {
|
||||
// s.PlayerLeave(p.Player, common.PlayerLeaveReason_GameTimes, true)
|
||||
// }
|
||||
//}
|
||||
|
|
@ -397,7 +397,7 @@ func (this *SceneStateStartFruits) OnPlayerOp(s *base.Scene, p *base.Player, opc
|
|||
//只有开始算操作
|
||||
p.LastOPTimer = time.Now()
|
||||
idx := int(params[0])
|
||||
if len(sceneEx.DbGameFree.GetOtherIntParams()) <= idx {
|
||||
if len(sceneEx.GetDBGameFree().GetOtherIntParams()) <= idx {
|
||||
pack := &protocol.SCFruitsOp{
|
||||
OpCode: proto.Int(opcode),
|
||||
OpRetCode: proto.Int(3),
|
||||
|
|
@ -419,12 +419,12 @@ func (this *SceneStateStartFruits) OnPlayerOp(s *base.Scene, p *base.Player, opc
|
|||
if playerEx.gameState == fruits.Normal {
|
||||
playerEx.freeTotal = 0
|
||||
playerEx.betIdx = idx
|
||||
playerEx.betCoin = int64(sceneEx.DbGameFree.GetOtherIntParams()[idx])
|
||||
playerEx.betCoin = int64(sceneEx.GetDBGameFree().GetOtherIntParams()[idx])
|
||||
playerEx.oneBetCoin = playerEx.betCoin / 9
|
||||
//playerEx.isReportGameEvent = true
|
||||
playerEx.noWinTimes++
|
||||
|
||||
if playerEx.Coin < int64(s.DbGameFree.GetBetLimit()) {
|
||||
if playerEx.Coin < int64(s.GetDBGameFree().GetBetLimit()) {
|
||||
//押注限制(低于该值不能押注)
|
||||
pack := &protocol.SCFruitsOp{
|
||||
OpCode: proto.Int(opcode),
|
||||
|
|
@ -486,9 +486,9 @@ func (this *SceneStateStartFruits) OnPlayerOp(s *base.Scene, p *base.Player, opc
|
|||
case fruits.FruitsPlayerOpSwitch:
|
||||
if len(params) > 0 && playerEx.freeTimes == 0 && playerEx.maryFreeTimes == 0 {
|
||||
idx := int(params[0])
|
||||
if len(sceneEx.DbGameFree.GetOtherIntParams()) > idx {
|
||||
if len(sceneEx.GetDBGameFree().GetOtherIntParams()) > idx {
|
||||
playerEx.betIdx = idx
|
||||
playerEx.betCoin = int64(sceneEx.DbGameFree.GetOtherIntParams()[idx])
|
||||
playerEx.betCoin = int64(sceneEx.GetDBGameFree().GetOtherIntParams()[idx])
|
||||
playerEx.oneBetCoin = playerEx.betCoin / 9
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ func (this *IceAgeSceneData) init() bool {
|
|||
this.jackpot = &base.SlotJackpotPool{}
|
||||
if this.jackpot.Small <= 0 {
|
||||
this.jackpot.Small = 0
|
||||
this.jackpot.VirtualJK = int64(params[rule.ICEAGE_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore())
|
||||
this.jackpot.VirtualJK = int64(params[rule.ICEAGE_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore())
|
||||
}
|
||||
|
||||
str := base.SlotsPoolMgr.GetPool(this.GetGameFreeId(), this.GetPlatform())
|
||||
|
|
@ -238,7 +238,7 @@ func (this *IceAgeSceneData) BroadcastJackpot(sync bool) {
|
|||
this.lastJackpotValue = this.jackpot.VirtualJK
|
||||
pack := &gamehall.SCHundredSceneGetGameJackpot{}
|
||||
jpfi := &gamehall.GameJackpotFundInfo{
|
||||
GameFreeId: proto.Int32(this.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(this.GetDBGameFree().Id),
|
||||
JackPotFund: proto.Int64(this.jackpot.VirtualJK),
|
||||
}
|
||||
pack.GameJackpotFund = append(pack.GameJackpotFund, jpfi)
|
||||
|
|
@ -264,7 +264,7 @@ func (this *IceAgeSceneData) PopCoinPool(winCoin int64, IsNovice bool) {
|
|||
}
|
||||
}
|
||||
func (this *IceAgeSceneData) RecordBurstLog(name string, wincoin, totalbet int64) {
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.DbGameFree.GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.InsertBurstJackpotLogs(log)
|
||||
}), nil, "InsertBurstJackpotLogs").Start()
|
||||
|
|
@ -272,7 +272,7 @@ func (this *IceAgeSceneData) RecordBurstLog(name string, wincoin, totalbet int64
|
|||
|
||||
func (this *IceAgeSceneData) BurstHistory(player *IceAgePlayerData) {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.GetBurstJackpotLog(this.Platform, this.DbGameFree.GameId)
|
||||
return model.GetBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
var logsp []*iceage.IceAgeBurstHistoryInfo
|
||||
if data != nil {
|
||||
|
|
@ -300,7 +300,7 @@ func (this *IceAgeSceneData) GetLastBurstJackPot() time.Time {
|
|||
}
|
||||
func (this *IceAgeSceneData) SetLastBurstJackPot() {
|
||||
var randT = rand.Intn(25200-7200+1) + 7200
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(25200-7200+1) + 7200
|
||||
case 2:
|
||||
|
|
@ -313,7 +313,7 @@ func (this *IceAgeSceneData) SetLastBurstJackPot() {
|
|||
func (this *IceAgeSceneData) AIAddJackPot() {
|
||||
if time.Now().Sub(this.lastJackPot) > 0 {
|
||||
var randT = rand.Intn(3) + 1
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(3) + 1
|
||||
case 2:
|
||||
|
|
@ -324,20 +324,20 @@ func (this *IceAgeSceneData) AIAddJackPot() {
|
|||
randT = rand.Intn(3) + 1
|
||||
}
|
||||
this.lastJackPot = time.Now().Add(time.Second * time.Duration(randT))
|
||||
val := int64(math.Floor(float64(this.DbGameFree.GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
val := int64(math.Floor(float64(this.GetDBGameFree().GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
this.jackpot.VirtualJK += val
|
||||
}
|
||||
}
|
||||
func (this *IceAgeSceneData) AIBurstJackPot() {
|
||||
if time.Now().Sub(this.GetLastBurstJackPot()) > 0 {
|
||||
this.SetLastBurstJackPot()
|
||||
jackpotParams := this.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.ICEAGE_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
jackpotParams := this.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.ICEAGE_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
//AI机器人爆奖
|
||||
val := this.jackpot.VirtualJK
|
||||
this.jackpot.VirtualJK = jackpotInit
|
||||
bet := int64(this.DbGameFree.GetBaseScore()) * int64(rule.LINENUM)
|
||||
bet := int64(this.GetDBGameFree().GetBaseScore()) * int64(rule.LINENUM)
|
||||
this.RecordBurstLog(this.RandNickName(), val, bet)
|
||||
}
|
||||
}
|
||||
|
|
@ -358,11 +358,11 @@ func (this *IceAgeSceneData) KickPlayerByTime() {
|
|||
}
|
||||
//for _, p := range this.players {
|
||||
// //游戏次数达到目标值
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.DbGameFree.GetId()))
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.GetDBGameFree().GetId()))
|
||||
// if !p.IsRob &&
|
||||
// todayGamefreeIDSceneData != nil &&
|
||||
// this.DbGameFree.GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.DbGameFree.GetPlayNumLimit()) {
|
||||
// this.GetDBGameFree().GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.GetDBGameFree().GetPlayNumLimit()) {
|
||||
// this.PlayerLeave(p.Player, common.PlayerLeaveReason_GameTimes, true)
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ func IceAgeSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *IceAgeSceneData,
|
|||
pack.Players = append(pack.Players, pd)
|
||||
pack.BetLines = playerEx.betLines
|
||||
pack.FreeTimes = proto.Int32(playerEx.freeTimes)
|
||||
pack.Chip = proto.Int32(s.DbGameFree.BaseScore)
|
||||
pack.Chip = proto.Int32(s.GetDBGameFree().BaseScore)
|
||||
pack.TotalPriceBonus = proto.Int64(playerEx.totalPriceBonus)
|
||||
pack.SpinID = proto.Int64(playerEx.spinID)
|
||||
}
|
||||
|
|
@ -681,7 +681,7 @@ func (this *SceneStateIceAgeStart) OnPlayerOp(s *base.Scene, p *base.Player, opc
|
|||
case IceAgePlayerHistory:
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
spinid := strconv.FormatInt(int64(playerEx.SnId), 10)
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.DbGameFree.GetGameClass(), s.GetGameId())
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.GetDBGameFree().GetGameClass(), s.GetGameId())
|
||||
pack := &iceage.SCIceAgePlayerHistory{}
|
||||
for _, v := range gpl.Data {
|
||||
//if v.GameDetailedLogId == "" {
|
||||
|
|
@ -982,7 +982,7 @@ func IceAgeCheckAndSaveLog(sceneEx *IceAgeSceneData, playerEx *IceAgePlayerData)
|
|||
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
|
||||
}
|
||||
gwPlayerBet := &server.GWPlayerData{
|
||||
SceneId: proto.Int(sceneEx.SceneId),
|
||||
SceneId: sceneEx.SceneId,
|
||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
}
|
||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ func (s *RichBlessedSceneData) SceneDestroy(force bool) {
|
|||
}
|
||||
func (s *RichBlessedSceneData) AddPrizeCoin(playerEx *RichBlessedPlayerData) {
|
||||
val := playerEx.betCoin
|
||||
tax := int64(math.Ceil(float64(val) * float64(s.DbGameFree.GetTaxRate()) / 10000))
|
||||
tax := int64(math.Ceil(float64(val) * float64(s.GetDBGameFree().GetTaxRate()) / 10000))
|
||||
//playerEx.taxCoin = tax
|
||||
//playerEx.AddServiceFee(tax)
|
||||
val -= tax
|
||||
|
||||
addPrizeCoin := val * richblessed.NowByte * int64(s.DbGameFree.GetJackpotRatio()) //扩大10000倍
|
||||
jk1 := int64(math.Floor(float64(addPrizeCoin) / 1000 / 4)) //千分之奖池比例 分四份
|
||||
addPrizeCoin := val * richblessed.NowByte * int64(s.GetDBGameFree().GetJackpotRatio()) //扩大10000倍
|
||||
jk1 := int64(math.Floor(float64(addPrizeCoin) / 1000 / 4)) //千分之奖池比例 分四份
|
||||
s.jackpot.AddToGrand(playerEx.IsRob, jk1)
|
||||
s.jackpot.AddToBig(playerEx.IsRob, jk1)
|
||||
s.jackpot.AddToMiddle(playerEx.IsRob, jk1)
|
||||
|
|
@ -177,7 +177,7 @@ func (s *RichBlessedSceneData) Win(p *RichBlessedPlayerData) {
|
|||
p.noWinTimes = 0
|
||||
//SysProfitCoinMgr.Add(s.sysProfitCoinKey, 0, p.winCoin)
|
||||
p.Statics(s.KeyGameId, s.KeyGamefreeId, p.winCoin, false)
|
||||
//tax := int64(math.Ceil(float64(p.winCoin) * float64(s.DbGameFree.GetTaxRate()) / 10000))
|
||||
//tax := int64(math.Ceil(float64(p.winCoin) * float64(s.GetDBGameFree().GetTaxRate()) / 10000))
|
||||
//p.taxCoin = tax
|
||||
//p.winCoin -= tax
|
||||
//p.AddServiceFee(tax)
|
||||
|
|
@ -198,7 +198,7 @@ func (s *RichBlessedSceneData) JACKPOTWin(p *RichBlessedPlayerData) {
|
|||
p.noWinTimes = 0
|
||||
//SysProfitCoinMgr.Add(s.sysProfitCoinKey, 0, p.JackwinCoin)
|
||||
p.Statics(s.KeyGameId, s.KeyGamefreeId, p.JackwinCoin, false)
|
||||
//tax := int64(math.Ceil(float64(p.JackwinCoin) * float64(s.DbGameFree.GetTaxRate()) / 10000))
|
||||
//tax := int64(math.Ceil(float64(p.JackwinCoin) * float64(s.GetDBGameFree().GetTaxRate()) / 10000))
|
||||
//p.taxCoin = tax
|
||||
//p.JackwinCoin -= tax
|
||||
//p.AddServiceFee(tax)
|
||||
|
|
@ -271,7 +271,7 @@ func (s *RichBlessedSceneData) LoadJackPotData() {
|
|||
base.SlotsPoolMgr.SetPool(s.GetGameFreeId(), s.Platform, s.jackpot)
|
||||
} else {
|
||||
s.jackpot = &base.SlotJackpotPool{}
|
||||
jp := s.DbGameFree.GetJackpot()
|
||||
jp := s.GetDBGameFree().GetJackpot()
|
||||
if len(jp) > 0 {
|
||||
s.jackpot.Small += int64(jp[0] * 10000)
|
||||
}
|
||||
|
|
@ -300,7 +300,7 @@ func (s *RichBlessedSceneData) SaveLog(p *RichBlessedPlayerData, isOffline int)
|
|||
|
||||
}
|
||||
RichBlessed := model.RichBlessedType{
|
||||
RoomId: s.SceneId,
|
||||
RoomId: int(s.SceneId),
|
||||
BasicScore: int32(p.oneBetCoin),
|
||||
PlayerSnId: p.SnId,
|
||||
BeforeCoin: p.startCoin,
|
||||
|
|
@ -388,8 +388,8 @@ func (s *RichBlessedSceneData) GetEleWeight(needpos int32) (norms, frees [][]int
|
|||
curCoin := base.CoinPoolMgr.GetCoin(s.GetGameFreeId(), s.Platform, s.GroupId)
|
||||
curCoin = int64(math.Floor(float64(curCoin) / float64(richblessed.NowByte)))
|
||||
|
||||
for i := len(s.DbGameFree.BalanceLine) - 1; i >= 0; i-- {
|
||||
balance := s.DbGameFree.BalanceLine[i]
|
||||
for i := len(s.GetDBGameFree().BalanceLine) - 1; i >= 0; i-- {
|
||||
balance := s.GetDBGameFree().BalanceLine[i]
|
||||
if curCoin >= int64(balance) {
|
||||
key = int32(i)
|
||||
break
|
||||
|
|
@ -426,7 +426,7 @@ func (s *RichBlessedSceneData) GetEleWeight(needpos int32) (norms, frees [][]int
|
|||
}
|
||||
|
||||
func (s *RichBlessedSceneData) CreateResult(eleLineAppearRate [][]int32, playerEx *RichBlessedPlayerData) {
|
||||
//if s.DbGameFree.GetId() == 3070004 {
|
||||
//if s.GetDBGameFree().GetId() == 3070004 {
|
||||
// playerEx.TestCode(eleLineAppearRate)
|
||||
//} else {
|
||||
playerEx.result.CreateLine(eleLineAppearRate)
|
||||
|
|
@ -448,7 +448,7 @@ func (s *RichBlessedSceneData) SendPlayerBet(p *RichBlessedPlayerData) {
|
|||
GameCoinTs: p.GameCoinTs,
|
||||
}
|
||||
gwPlayerBet := &server.GWPlayerData{
|
||||
GameFreeId: proto.Int32(s.DbGameFree.GetId()),
|
||||
GameFreeId: proto.Int32(s.GetDBGameFree().GetId()),
|
||||
SceneId: int32(s.SceneId),
|
||||
}
|
||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ func (this *ScenePolicyRichBlessed) OnPlayerEnter(s *base.Scene, p *base.Player)
|
|||
if s == nil || p == nil {
|
||||
return
|
||||
}
|
||||
logger.Logger.Trace("(this *ScenePolicyRichBlessed) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.Name, "bet:", s.DbGameFree.GetOtherIntParams())
|
||||
logger.Logger.Trace("(this *ScenePolicyRichBlessed) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.Name, "bet:", s.GetDBGameFree().GetOtherIntParams())
|
||||
if sceneEx, ok := s.GetExtraData().(*RichBlessedSceneData); ok {
|
||||
playerEx := &RichBlessedPlayerData{Player: p}
|
||||
playerEx.init()
|
||||
|
|
@ -148,15 +148,15 @@ func RichBlessedSendRoomInfo(s *base.Scene, sceneEx *RichBlessedSceneData, playe
|
|||
func RichBlessedCreateRoomInfoPacket(s *base.Scene, sceneEx *RichBlessedSceneData, playerEx *RichBlessedPlayerData) interface{} {
|
||||
//房间信息
|
||||
pack := &protocol.SCRBRoomInfo{
|
||||
RoomId: proto.Int(s.SceneId),
|
||||
GameId: proto.Int(s.GameId),
|
||||
RoomMode: proto.Int(s.SceneMode),
|
||||
SceneType: proto.Int(s.SceneType),
|
||||
RoomId: s.SceneId,
|
||||
GameId: s.GameId,
|
||||
RoomMode: s.SceneMode,
|
||||
SceneType: s.GetSceneType(),
|
||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
||||
NumOfGames: proto.Int(sceneEx.NumOfGames),
|
||||
State: proto.Int(s.SceneState.GetState()),
|
||||
ParamsEx: common.Int64ToInt32(s.DbGameFree.OtherIntParams), //s.GetParamsEx(),
|
||||
//BetLimit: s.DbGameFree.BetLimit,
|
||||
ParamsEx: common.Int64ToInt32(s.GetDBGameFree().OtherIntParams), //s.GetParamsEx(),
|
||||
//BetLimit: s.GetDBGameFree().BetLimit,
|
||||
|
||||
NowGameState: proto.Int(playerEx.gameState),
|
||||
BetIdx: proto.Int(playerEx.betIdx),
|
||||
|
|
@ -172,11 +172,11 @@ func RichBlessedCreateRoomInfoPacket(s *base.Scene, sceneEx *RichBlessedSceneDat
|
|||
WinFreeTimes: proto.Int32(int32(playerEx.nowFreeTimes)),
|
||||
JackpotEle: proto.Int32(playerEx.result.JackpotEle),
|
||||
WinJackpot: proto.Int64(playerEx.JackwinCoin),
|
||||
GameFreeId: proto.Int32(s.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
|
||||
}
|
||||
|
||||
if playerEx.oneBetCoin == 0 && len(s.DbGameFree.GetOtherIntParams()) != 0 { // 初始化客户端jack显示
|
||||
oneBetCoin := int64(s.DbGameFree.GetOtherIntParams()[0] / richblessed.LineNum)
|
||||
if playerEx.oneBetCoin == 0 && len(s.GetDBGameFree().GetOtherIntParams()) != 0 { // 初始化客户端jack显示
|
||||
oneBetCoin := int64(s.GetDBGameFree().GetOtherIntParams()[0] / richblessed.LineNum)
|
||||
pack.SmallJackpot = oneBetCoin * richblessed.JkEleNumRate[richblessed.BlueGirl]
|
||||
pack.MiddleJackpot = oneBetCoin * richblessed.JkEleNumRate[richblessed.BlueBoy]
|
||||
pack.BigJackpot = oneBetCoin * richblessed.JkEleNumRate[richblessed.GoldGirl]
|
||||
|
|
@ -302,11 +302,11 @@ func (this *SceneBaseStateRichBlessed) OnTick(s *base.Scene) {
|
|||
if sceneEx, ok := s.ExtraData.(*RichBlessedSceneData); ok {
|
||||
//for _, p := range sceneEx.players {
|
||||
// //游戏次数达到目标值
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(sceneEx.DbGameFree.GetId()))
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(sceneEx.GetDBGameFree().GetId()))
|
||||
// if !p.IsRob &&
|
||||
// todayGamefreeIDSceneData != nil &&
|
||||
// sceneEx.DbGameFree.GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(sceneEx.DbGameFree.GetPlayNumLimit()) {
|
||||
// sceneEx.GetDBGameFree().GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(sceneEx.GetDBGameFree().GetPlayNumLimit()) {
|
||||
// s.PlayerLeave(p.Player, common.PlayerLeaveReason_GameTimes, true)
|
||||
// }
|
||||
//}
|
||||
|
|
@ -401,7 +401,7 @@ func (this *SceneStateStartRichBlessed) OnPlayerOp(s *base.Scene, p *base.Player
|
|||
//只有开始算操作
|
||||
p.LastOPTimer = time.Now()
|
||||
idx := int(params[0])
|
||||
if len(sceneEx.DbGameFree.GetOtherIntParams()) <= idx {
|
||||
if len(sceneEx.GetDBGameFree().GetOtherIntParams()) <= idx {
|
||||
pack := &protocol.SCRichBlessedOp{
|
||||
OpCode: proto.Int(opcode),
|
||||
OpRetCode: proto.Int(3),
|
||||
|
|
@ -423,13 +423,13 @@ func (this *SceneStateStartRichBlessed) OnPlayerOp(s *base.Scene, p *base.Player
|
|||
if playerEx.gameState == richblessed.Normal {
|
||||
logger.Logger.Tracef("(this *SceneStateStartRichBlessed) OnPlayerOp, 下注 %v %v %v", playerEx.betCoin, playerEx.maxbetCoin, playerEx.oneBetCoin)
|
||||
playerEx.betIdx = idx
|
||||
playerEx.betCoin = int64(sceneEx.DbGameFree.GetOtherIntParams()[idx])
|
||||
maxidx := len(sceneEx.DbGameFree.GetOtherIntParams()) - 1
|
||||
playerEx.maxbetCoin = int64(sceneEx.DbGameFree.GetOtherIntParams()[maxidx])
|
||||
playerEx.betCoin = int64(sceneEx.GetDBGameFree().GetOtherIntParams()[idx])
|
||||
maxidx := len(sceneEx.GetDBGameFree().GetOtherIntParams()) - 1
|
||||
playerEx.maxbetCoin = int64(sceneEx.GetDBGameFree().GetOtherIntParams()[maxidx])
|
||||
playerEx.oneBetCoin = playerEx.betCoin / richblessed.LineNum // 单注
|
||||
playerEx.noWinTimes++
|
||||
|
||||
if playerEx.Coin < int64(s.DbGameFree.GetBetLimit()) {
|
||||
if playerEx.Coin < int64(s.GetDBGameFree().GetBetLimit()) {
|
||||
//押注限制(低于该值不能押注)
|
||||
pack := &protocol.SCRichBlessedOp{
|
||||
OpCode: proto.Int(opcode),
|
||||
|
|
@ -495,9 +495,9 @@ func (this *SceneStateStartRichBlessed) OnPlayerOp(s *base.Scene, p *base.Player
|
|||
case richblessed.RichBlessedPlayerOpSwitch:
|
||||
if len(params) > 0 && playerEx.freeTimes == 0 {
|
||||
idx := int(params[0])
|
||||
if len(sceneEx.DbGameFree.GetOtherIntParams()) > idx {
|
||||
if len(sceneEx.GetDBGameFree().GetOtherIntParams()) > idx {
|
||||
playerEx.betIdx = idx
|
||||
playerEx.betCoin = int64(sceneEx.DbGameFree.GetOtherIntParams()[idx])
|
||||
playerEx.betCoin = int64(sceneEx.GetDBGameFree().GetOtherIntParams()[idx])
|
||||
playerEx.oneBetCoin = playerEx.betCoin / richblessed.LineNum
|
||||
pack := &protocol.SCRichBlessedOp{
|
||||
OpCode: proto.Int(opcode),
|
||||
|
|
|
|||
|
|
@ -271,15 +271,15 @@ func (this *SceneEx) init() bool {
|
|||
}
|
||||
|
||||
func (this *SceneEx) GetBaseScore() int32 { //游戏底分
|
||||
if this.DbGameFree != nil {
|
||||
return this.DbGameFree.GetBaseScore()
|
||||
if this.GetDBGameFree() != nil {
|
||||
return this.GetDBGameFree().GetBaseScore()
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
func (this *SceneEx) GetBetMaxCoin() int32 { //游戏底分
|
||||
if this.DbGameFree != nil {
|
||||
return this.DbGameFree.GetBaseScore() * 10000
|
||||
if this.GetDBGameFree() != nil {
|
||||
return this.GetDBGameFree().GetBaseScore() * 10000
|
||||
}
|
||||
return 1 * 10000
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,14 +52,14 @@ func (this *TamQuocSceneData) SceneDestroy(force bool) {
|
|||
}
|
||||
|
||||
func (this *TamQuocSceneData) init() bool {
|
||||
if this.DbGameFree == nil {
|
||||
if this.GetDBGameFree() == nil {
|
||||
return false
|
||||
}
|
||||
params := this.DbGameFree.GetJackpot()
|
||||
params := this.GetDBGameFree().GetJackpot()
|
||||
this.jackpot = &base.SlotJackpotPool{}
|
||||
if this.jackpot.Small <= 0 {
|
||||
this.jackpot.Small = 0
|
||||
this.jackpot.VirtualJK = int64(params[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore())
|
||||
this.jackpot.VirtualJK = int64(params[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore())
|
||||
}
|
||||
str := base.SlotsPoolMgr.GetPool(this.GetGameFreeId(), this.Platform)
|
||||
if str != "" {
|
||||
|
|
@ -95,7 +95,7 @@ type TamQuocSpinResult struct {
|
|||
}
|
||||
|
||||
func (this *TamQuocSceneData) CalcLinePrize(cards []int, betLines []int64, betValue int64) (spinRes TamQuocSpinResult) {
|
||||
taxRate := this.DbGameFree.GetTaxRate()
|
||||
taxRate := this.GetDBGameFree().GetTaxRate()
|
||||
calcTaxScore := func(score int64, taxScore *int64) int64 {
|
||||
newScore := int64(float64(score) * float64(10000-taxRate) / 10000.0)
|
||||
if taxScore != nil {
|
||||
|
|
@ -114,7 +114,7 @@ func (this *TamQuocSceneData) CalcLinePrize(cards []int, betLines []int64, betVa
|
|||
if spinRes.TotalPrizeJackpot == 0 { // 第一个爆奖 获取当前奖池所有
|
||||
prizeJackpot = this.jackpot.VirtualJK
|
||||
} else { // 之后的爆奖 奖励为奖池初值
|
||||
prizeJackpot = int64(this.DbGameFree.GetJackpot()[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore())
|
||||
prizeJackpot = int64(this.GetDBGameFree().GetJackpot()[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore())
|
||||
}
|
||||
prizeJackpot = calcTaxScore(prizeJackpot, &spinRes.TotalTaxScore)
|
||||
spinRes.TotalPrizeJackpot += prizeJackpot
|
||||
|
|
@ -177,7 +177,7 @@ func (this *TamQuocSceneData) BroadcastJackpot(sync bool) {
|
|||
this.lastJackpotValue = this.jackpot.VirtualJK
|
||||
pack := &gamehall.SCHundredSceneGetGameJackpot{}
|
||||
jpfi := &gamehall.GameJackpotFundInfo{
|
||||
GameFreeId: proto.Int32(this.DbGameFree.Id),
|
||||
GameFreeId: proto.Int32(this.GetDBGameFree().Id),
|
||||
JackPotFund: proto.Int64(this.jackpot.VirtualJK),
|
||||
}
|
||||
pack.GameJackpotFund = append(pack.GameJackpotFund, jpfi)
|
||||
|
|
@ -204,7 +204,7 @@ func (this *TamQuocSceneData) PopCoinPool(winCoin int64, IsNovice bool) {
|
|||
}
|
||||
}
|
||||
func (this *TamQuocSceneData) RecordBurstLog(name string, wincoin, totalbet int64) {
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.DbGameFree.GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
log := model.NewBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId, this.GetGameFreeId(), name, wincoin, totalbet)
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.InsertBurstJackpotLogs(log)
|
||||
}), nil, "InsertBurstJackpotLogs").Start()
|
||||
|
|
@ -212,7 +212,7 @@ func (this *TamQuocSceneData) RecordBurstLog(name string, wincoin, totalbet int6
|
|||
|
||||
func (this *TamQuocSceneData) BurstHistory(player *TamQuocPlayerData) {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.GetBurstJackpotLog(this.Platform, this.DbGameFree.GameId)
|
||||
return model.GetBurstJackpotLog(this.Platform, this.GetDBGameFree().GameId)
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
var logsp []*tamquoc.TamQuocBurstHistoryInfo
|
||||
if data != nil {
|
||||
|
|
@ -240,7 +240,7 @@ func (this *TamQuocSceneData) GetLastBurstJackPot() time.Time {
|
|||
}
|
||||
func (this *TamQuocSceneData) SetLastBurstJackPot() {
|
||||
var randT = rand.Intn(25200-7200+1) + 7200
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(25200-7200+1) + 7200
|
||||
case 2:
|
||||
|
|
@ -254,7 +254,7 @@ func (this *TamQuocSceneData) SetLastBurstJackPot() {
|
|||
func (this *TamQuocSceneData) AIAddJackPot() {
|
||||
if time.Now().Sub(this.lastJackPot) > 0 {
|
||||
var randT = rand.Intn(3) + 1
|
||||
switch this.DbGameFree.SceneType {
|
||||
switch this.GetDBGameFree().SceneType {
|
||||
case 1:
|
||||
randT = rand.Intn(3) + 1
|
||||
case 2:
|
||||
|
|
@ -265,20 +265,20 @@ func (this *TamQuocSceneData) AIAddJackPot() {
|
|||
randT = rand.Intn(3) + 1
|
||||
}
|
||||
this.lastJackPot = time.Now().Add(time.Second * time.Duration(randT))
|
||||
val := int64(math.Floor(float64(this.DbGameFree.GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
val := int64(math.Floor(float64(this.GetDBGameFree().GetBaseScore()) * float64(rule.LINENUM) * float64(500) / 10000))
|
||||
this.jackpot.VirtualJK += val
|
||||
}
|
||||
}
|
||||
func (this *TamQuocSceneData) AIBurstJackPot() {
|
||||
if time.Now().Sub(this.GetLastBurstJackPot()) > 0 {
|
||||
this.SetLastBurstJackPot()
|
||||
jackpotParams := this.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(this.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
jackpotParams := this.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParams[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(this.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
//AI机器人爆奖
|
||||
val := this.jackpot.VirtualJK
|
||||
this.jackpot.VirtualJK = jackpotInit
|
||||
bet := int64(this.DbGameFree.GetBaseScore()) * int64(rule.LINENUM)
|
||||
bet := int64(this.GetDBGameFree().GetBaseScore()) * int64(rule.LINENUM)
|
||||
this.RecordBurstLog(this.RandNickName(), val, int64(bet))
|
||||
}
|
||||
}
|
||||
|
|
@ -299,11 +299,11 @@ func (this *TamQuocSceneData) KickPlayerByTime() {
|
|||
}
|
||||
//for _, p := range this.players {
|
||||
// //游戏次数达到目标值
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.DbGameFree.GetId()))
|
||||
// todayGamefreeIDSceneData, _ := p.GetDaliyGameData(int(this.GetDBGameFree().GetId()))
|
||||
// if !p.IsRob &&
|
||||
// todayGamefreeIDSceneData != nil &&
|
||||
// this.DbGameFree.GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.DbGameFree.GetPlayNumLimit()) {
|
||||
// this.GetDBGameFree().GetPlayNumLimit() != 0 &&
|
||||
// todayGamefreeIDSceneData.GameTimes >= int64(this.GetDBGameFree().GetPlayNumLimit()) {
|
||||
// this.PlayerLeave(p.Player, common.PlayerLeaveReason_GameTimes, true)
|
||||
// }
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ func (this *ScenePolicyTamQuoc) OnPlayerEnter(s *base.Scene, p *base.Player) {
|
|||
logger.Logger.Trace("(this *ScenePolicyTamQuoc) OnPlayerEnter, sceneId=", s.SceneId, " player=", p.SnId)
|
||||
if sceneEx, ok := s.ExtraData.(*TamQuocSceneData); ok {
|
||||
playerEx := &TamQuocPlayerData{Player: p}
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.DbGameFree.GetBaseScore() // 底注
|
||||
playerEx.init(s) // 玩家当前信息初始化
|
||||
playerEx.score = sceneEx.GetDBGameFree().GetBaseScore() // 底注
|
||||
sceneEx.players[p.SnId] = playerEx
|
||||
p.ExtraData = playerEx
|
||||
TamQuocSendRoomInfo(s, p, sceneEx, playerEx, nil)
|
||||
|
|
@ -226,10 +226,10 @@ func (this *ScenePolicyTamQuoc) GetJackPotVal(s *base.Scene) int64 {
|
|||
func TamQuocSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *TamQuocSceneData, playerEx *TamQuocPlayerData, data *tamquoc.GameBilledData) {
|
||||
logger.Logger.Trace("-------------------发送房间消息 ", s.RoomId, p.SnId)
|
||||
pack := &tamquoc.SCTamQuocRoomInfo{
|
||||
RoomId: proto.Int(s.SceneId),
|
||||
RoomId: s.SceneId,
|
||||
Creator: proto.Int32(s.Creator),
|
||||
GameId: proto.Int(s.GameId),
|
||||
RoomMode: proto.Int(s.GameMode),
|
||||
GameId: s.GameId,
|
||||
RoomMode: s.GameMode,
|
||||
Params: common.CopySliceInt64ToInt32(s.Params),
|
||||
State: proto.Int(s.SceneState.GetState()),
|
||||
Jackpot: proto.Int64(sceneEx.jackpot.VirtualJK),
|
||||
|
|
@ -252,7 +252,7 @@ func TamQuocSendRoomInfo(s *base.Scene, p *base.Player, sceneEx *TamQuocSceneDat
|
|||
//}
|
||||
pack.BetLines = playerEx.betLines
|
||||
pack.FreeTimes = proto.Int32(playerEx.freeTimes)
|
||||
pack.Chip = proto.Int32(s.DbGameFree.BaseScore)
|
||||
pack.Chip = proto.Int32(s.GetDBGameFree().BaseScore)
|
||||
pack.SpinID = proto.Int64(playerEx.spinID)
|
||||
if playerEx.totalPriceBonus > 0 && playerEx.bonusGameStartTime.Add(TamQuocBonusGamePickTime).Before(time.Now()) {
|
||||
playerEx.totalPriceBonus = 0
|
||||
|
|
@ -339,7 +339,7 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
return false
|
||||
}
|
||||
//先做底注校验
|
||||
if sceneEx.DbGameFree.GetBaseScore() != int32(params[0]) {
|
||||
if sceneEx.GetDBGameFree().GetBaseScore() != int32(params[0]) {
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, tamquoc.OpResultCode_OPRC_Error, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -373,7 +373,7 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
if playerEx.freeTimes <= 0 && totalBetValue > playerEx.Coin {
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, tamquoc.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.DbGameFree.GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
} else if playerEx.freeTimes <= 0 && int64(sceneEx.GetDBGameFree().GetBetLimit()) > playerEx.Coin { //押注限制
|
||||
this.OnPlayerSToCOp(s, p, playerEx.Pos, opcode, tamquoc.OpResultCode_OPRC_CoinNotEnough, params)
|
||||
return false
|
||||
}
|
||||
|
|
@ -388,7 +388,7 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
sceneEx.CpCtx = base.CoinPoolMgr.GetCoinPoolCtx(sceneEx.Platform, sceneEx.GetGameFreeId(), sceneEx.GroupId)
|
||||
|
||||
//税收比例
|
||||
taxRate := sceneEx.DbGameFree.GetTaxRate()
|
||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate()
|
||||
if taxRate < 0 || taxRate > 10000 {
|
||||
logger.Logger.Tracef("TamQuocErrorTaxRate [%v][%v][%v][%v]", sceneEx.GetGameFreeId(), playerEx.SnId, playerEx.spinID, taxRate)
|
||||
taxRate = 500
|
||||
|
|
@ -410,8 +410,8 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
prizeFund := gamePoolCoin - sceneEx.jackpot.VirtualJK // 除去奖池的水池剩余金额
|
||||
|
||||
// 奖池参数
|
||||
var jackpotParam = sceneEx.DbGameFree.GetJackpot()
|
||||
var jackpotInit = int64(jackpotParam[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(sceneEx.DbGameFree.GetBaseScore()) //奖池初始值
|
||||
var jackpotParam = sceneEx.GetDBGameFree().GetJackpot()
|
||||
var jackpotInit = int64(jackpotParam[rule.TAMQUOC_JACKPOT_InitJackpot]) * int64(sceneEx.GetDBGameFree().GetBaseScore()) //奖池初始值
|
||||
|
||||
var jackpotFundAdd, prizeFundAdd int64
|
||||
if playerEx.freeTimes <= 0 { //正常模式才能记录用户的押注变化,免费模式不能改变押注
|
||||
|
|
@ -431,7 +431,7 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
//统计参与游戏次数
|
||||
//if !sceneEx.Testing && !playerEx.IsRob {
|
||||
// pack := &server.GWSceneEnd{
|
||||
// GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
// GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
// Players: []*server.PlayerCtx{&server.PlayerCtx{SnId: proto.Int32(playerEx.SnId), Coin: proto.Int64(playerEx.Coin)}},
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
|
|
@ -454,11 +454,11 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
var slotDataIsOk bool
|
||||
for i := 0; i < 3; i++ {
|
||||
slotData = rule.GenerateSlotsData_v2(symbolType)
|
||||
//if sceneEx.DbGameFree.GetSceneType() == 1 {
|
||||
//if sceneEx.GetDBGameFree().GetSceneType() == 1 {
|
||||
// slotData = []int{1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7}
|
||||
//}
|
||||
spinRes = sceneEx.CalcLinePrize(slotData, playerEx.betLines, params[0])
|
||||
//if sceneEx.DbGameFree.GetSceneType() == 1 {
|
||||
//if sceneEx.GetDBGameFree().GetSceneType() == 1 {
|
||||
// slotDataIsOk = true
|
||||
// break
|
||||
//}
|
||||
|
|
@ -641,7 +641,7 @@ func (this *SceneStateTamQuocStart) OnPlayerOp(s *base.Scene, p *base.Player, op
|
|||
case TamQuocPlayerHistory:
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
spinid := strconv.FormatInt(int64(playerEx.SnId), 10)
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.DbGameFree.GetGameClass(), s.GameId)
|
||||
gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 80, 0, 0, 0, s.GetDBGameFree().GetGameClass(), int(s.GameId))
|
||||
pack := &tamquoc.SCTamQuocPlayerHistory{}
|
||||
for _, v := range gpl.Data {
|
||||
//if v.GameDetailedLogId == "" {
|
||||
|
|
@ -759,7 +759,7 @@ func TamQuocCheckAndSaveLog(sceneEx *TamQuocSceneData, playerEx *TamQuocPlayerDa
|
|||
|
||||
//log2
|
||||
playerEx.RollGameType.BaseResult.ChangeCoin = changeCoin
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.DbGameFree.GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.BasicBet = sceneEx.GetDBGameFree().GetBaseScore()
|
||||
playerEx.RollGameType.BaseResult.RoomId = int32(sceneEx.SceneId)
|
||||
playerEx.RollGameType.BaseResult.AfterCoin = playerEx.Coin
|
||||
playerEx.RollGameType.BaseResult.BeforeCoin = startCoin
|
||||
|
|
@ -818,8 +818,8 @@ func TamQuocCheckAndSaveLog(sceneEx *TamQuocSceneData, playerEx *TamQuocPlayerDa
|
|||
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
|
||||
}
|
||||
gwPlayerBet := &server.GWPlayerData{
|
||||
SceneId: proto.Int(sceneEx.SceneId),
|
||||
GameFreeId: proto.Int32(sceneEx.DbGameFree.GetId()),
|
||||
SceneId: sceneEx.SceneId,
|
||||
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
|
||||
}
|
||||
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
|
||||
sceneEx.SyncPlayerDatas(&base.PlayerDataParam{
|
||||
|
|
|
|||
|
|
@ -173,7 +173,6 @@ func (this *SceneEx) ThirteenWaterCreateRoomInfoPacket(s *base.Scene, p *base.Pl
|
|||
Creator: proto.Int32(s.GetCreator()),
|
||||
GameId: proto.Int(s.GetGameId()),
|
||||
RoomMode: proto.Int(s.GetSceneMode()),
|
||||
AgentId: proto.Int32(s.GetAgentor()),
|
||||
SceneType: s.GetDBGameFree().SceneType,
|
||||
State: proto.Int(s.GetSceneState().GetState()),
|
||||
TimeOut: proto.Int(s.GetSceneState().GetTimeout(s)),
|
||||
|
|
@ -369,15 +368,15 @@ func (this *SceneEx) ThirteenWaterCreateRoomInfoPacket(s *base.Scene, p *base.Pl
|
|||
}
|
||||
|
||||
func (this *SceneEx) GetBaseScore() int64 { //游戏底分
|
||||
if this.DbGameFree.FreeMode == 1 {
|
||||
if this.GetDBGameFree().FreeMode == 1 {
|
||||
baseScore := this.GetParam(rule.ParamBaseScore)
|
||||
if baseScore > 0 {
|
||||
return baseScore
|
||||
}
|
||||
}
|
||||
|
||||
if this.DbGameFree != nil {
|
||||
return int64(this.DbGameFree.GetBaseScore())
|
||||
if this.GetDBGameFree() != nil {
|
||||
return int64(this.GetDBGameFree().GetBaseScore())
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
|
@ -1269,7 +1268,7 @@ func (this *SceneEx) CountBilled() {
|
|||
}
|
||||
if playerEx.gainCoin > 0 {
|
||||
gainCoin := playerEx.gainCoin
|
||||
playerEx.gainCoin = playerEx.gainCoin * int64(10000-this.DbGameFree.GetTaxRate()) / 10000
|
||||
playerEx.gainCoin = playerEx.gainCoin * int64(10000-this.GetDBGameFree().GetTaxRate()) / 10000
|
||||
playerEx.taxCoin = gainCoin - playerEx.gainCoin
|
||||
}
|
||||
logger.Logger.Tracef("玩家分数 %v, coin:%v tax:%v win:%v", playerEx.SnId, playerEx.gainCoin, playerEx.taxCoin, playerEx.winAllPlayers)
|
||||
|
|
@ -1335,7 +1334,7 @@ func (this *SceneEx) SendHandCardOdds() {
|
|||
if seat.IsRob {
|
||||
robotPlayers = append(robotPlayers, seat)
|
||||
} else {
|
||||
seat.odds = this.GetPlayerOdds(seat.Player, this.GameId, this.robotNum > 0)
|
||||
seat.odds = this.GetPlayerOdds(seat.Player, int(this.GameId), this.robotNum > 0)
|
||||
seat.playerPool = int(this.PlayerPoolOdds(seat.Player))
|
||||
if seat.odds > 0 {
|
||||
realPlayersGood = append(realPlayersGood, seat)
|
||||
|
|
|
|||
|
|
@ -1258,9 +1258,9 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
|||
if sceneEx.gamePlayerNum-sceneEx.robotNum > 0 {
|
||||
/////////////////////////////////////统计牌局详细记录
|
||||
thirteenWaterType := model.ThirteenWaterType{
|
||||
RoomId: int32(sceneEx.SceneId),
|
||||
RoomId: sceneEx.SceneId,
|
||||
RoomRounds: int32(sceneEx.NumOfGames),
|
||||
RoomType: int32(sceneEx.SceneType),
|
||||
RoomType: sceneEx.GetSceneType(),
|
||||
BaseScore: int32(sceneEx.GetBaseScore()),
|
||||
NowRound: int32(sceneEx.NumOfGames),
|
||||
ClubRate: sceneEx.Scene.PumpCoin,
|
||||
|
|
@ -1462,7 +1462,7 @@ func (this *StateBilled) OnLeave(s *base.Scene) {
|
|||
s.TryDismissRob()
|
||||
}
|
||||
|
||||
if s.CheckNeedDestroy() || (s.IsMatchScene() && (!s.MatchFinals || (s.MatchFinals && s.NumOfGames >= 2))) { // 非决赛打一场 决赛打两场
|
||||
if s.CheckNeedDestroy() || (s.IsMatchScene() && (!s.GetMatch().GetIsFinals() || (s.GetMatch().GetIsFinals() && s.NumOfGames >= 2))) { // 非决赛打一场 决赛打两场
|
||||
sceneEx.SceneDestroy(true)
|
||||
}
|
||||
s.TryRelease()
|
||||
|
|
|
|||
|
|
@ -21,6 +21,17 @@ import (
|
|||
"mongo.games.com/game/srvdata"
|
||||
)
|
||||
|
||||
type BilledInfo struct {
|
||||
Round int32 // 第几局
|
||||
ChangeScore int64 // 积分变化
|
||||
Score int64 // 结算后积分
|
||||
}
|
||||
|
||||
type Item struct {
|
||||
Id int32
|
||||
Num int64
|
||||
}
|
||||
|
||||
// 房间上的额外数据
|
||||
type TienLenSceneData struct {
|
||||
*base.Scene //场景
|
||||
|
|
@ -56,13 +67,20 @@ type TienLenSceneData struct {
|
|||
isCardsKu bool //是否是牌库
|
||||
cardsKuId int32 //牌库ID
|
||||
ctrlType int // 1控赢 2控输 0不控
|
||||
BilledList map[int32]*[]*BilledInfo // 多轮结算记录, 玩家id:每局结算记录
|
||||
RoundEndTime []int64 // 每局结束时间
|
||||
RoundLogId []string // 每局牌局记录id
|
||||
CustomLogSave bool // 是否已经保存日志
|
||||
PlayerAward map[int32]*[]*model.Item // 房卡场最终奖励
|
||||
}
|
||||
|
||||
func NewTienLenSceneData(s *base.Scene) *TienLenSceneData {
|
||||
sceneEx := &TienLenSceneData{
|
||||
Scene: s,
|
||||
poker: rule.NewPoker(),
|
||||
players: make(map[int32]*TienLenPlayerData),
|
||||
Scene: s,
|
||||
poker: rule.NewPoker(),
|
||||
players: make(map[int32]*TienLenPlayerData),
|
||||
BilledList: map[int32]*[]*BilledInfo{},
|
||||
PlayerAward: make(map[int32]*[]*model.Item),
|
||||
}
|
||||
sceneEx.Clear()
|
||||
return sceneEx
|
||||
|
|
@ -143,6 +161,11 @@ func (this *TienLenSceneData) CanStart() bool {
|
|||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if this.IsCustom() {
|
||||
return this.IsAllReady() && this.GetPlayerCnt() >= this.GetPlayerNum()
|
||||
}
|
||||
|
||||
// 房间人数>=2开始,并且有真人或者是预创建房间,并且有房主
|
||||
if nPlayerCount >= 2 && (this.GetRealPlayerNum() > 0 || this.IsPreCreateScene()) { //人数>=2开始
|
||||
return true
|
||||
|
|
@ -267,6 +290,7 @@ func (this *TienLenSceneData) OnPlayerLeave(p *base.Player, reason int) {
|
|||
}
|
||||
|
||||
func (this *TienLenSceneData) SceneDestroy(force bool) {
|
||||
this.SaveCustomLog()
|
||||
//销毁房间
|
||||
this.Scene.Destroy(force)
|
||||
}
|
||||
|
|
@ -371,7 +395,7 @@ func (this *TienLenSceneData) BroadcastOpPos() {
|
|||
for _, seat := range this.seats {
|
||||
if seat != nil && seat.IsGameing() {
|
||||
if !seat.IsRob {
|
||||
seat.odds = this.GetPlayerOdds(seat.Player, this.GameId, this.robotGamingNum > 0)
|
||||
seat.odds = this.GetPlayerOdds(seat.Player, int(this.GameId), this.robotGamingNum > 0)
|
||||
if seat.odds < 0 {
|
||||
B -= seat.odds
|
||||
}
|
||||
|
|
@ -523,7 +547,7 @@ func (this *TienLenSceneData) IsTienLenToEnd() bool {
|
|||
return common.IsTienLenToEnd(this.GetGameId())
|
||||
}
|
||||
func (this *TienLenSceneData) GetFreeGameSceneType() int32 {
|
||||
return int32(this.SceneType)
|
||||
return this.GetSceneType()
|
||||
}
|
||||
|
||||
// 比赛场发牌
|
||||
|
|
@ -1061,7 +1085,7 @@ func (this *TienLenSceneData) SendHandCardOdds() {
|
|||
if seat.IsRob {
|
||||
robotPlayers = append(robotPlayers, seat)
|
||||
} else {
|
||||
seat.odds = this.GetPlayerOdds(seat.Player, this.GameId, this.robotGamingNum > 0)
|
||||
seat.odds = this.GetPlayerOdds(seat.Player, int(this.GameId), this.robotGamingNum > 0)
|
||||
seat.playerPool = int(this.PlayerPoolOdds(seat.Player))
|
||||
if seat.odds > 0 {
|
||||
realPlayersGood = append(realPlayersGood, seat)
|
||||
|
|
@ -1072,7 +1096,7 @@ func (this *TienLenSceneData) SendHandCardOdds() {
|
|||
} else {
|
||||
realPlayers = append(realPlayers, seat)
|
||||
}
|
||||
_, isNovice := seat.NoviceOdds(this.GameId)
|
||||
_, isNovice := seat.NoviceOdds(int(this.GameId))
|
||||
if isNovice {
|
||||
novicePlayers = append(novicePlayers, seat)
|
||||
} else {
|
||||
|
|
@ -1952,7 +1976,7 @@ func (this *TienLenSceneData) TrySmallGameBilled() {
|
|||
logger.Logger.Trace("宠物技能抵挡炸弹生效,发送消息 SCTienLenPetSkillRes: ", pack)
|
||||
}
|
||||
if score != 0 {
|
||||
taxRate := this.DbGameFree.GetTaxRate() //万分比
|
||||
taxRate := this.GetDBGameFree().GetTaxRate() //万分比
|
||||
gainScore := int64(float64(score) * float64(10000-taxRate) / 10000.0) //税后
|
||||
bombTaxScore := score - gainScore
|
||||
// win
|
||||
|
|
@ -2078,3 +2102,60 @@ func (this *TienLenSceneData) SendFirstGiveTimeItem(p *base.Player) {
|
|||
p.SendToClient(int(tienlen.TienLenPacketID_PACKET_SCTienLenFirstGiveItemItem), pack)
|
||||
}
|
||||
}
|
||||
|
||||
// SaveCustomLog 保存竞技馆对局记录
|
||||
func (this *TienLenSceneData) SaveCustomLog() {
|
||||
if this.CustomLogSave || !this.IsCustom() {
|
||||
return
|
||||
}
|
||||
this.CustomLogSave = true
|
||||
state := int32(0)
|
||||
if len(this.RoundEndTime) < int(this.TotalOfGames) {
|
||||
state = 1
|
||||
}
|
||||
log := &model.CustomLog{
|
||||
CycleId: this.CycleID,
|
||||
RoomConfigId: this.GetCustom().GetRoomConfigId(),
|
||||
RoomId: this.SceneId,
|
||||
StartTs: this.GameStartTime.Unix(),
|
||||
EndTs: time.Now().Unix(),
|
||||
State: state,
|
||||
GameFreeId: this.GetGameFreeId(),
|
||||
TotalRound: this.TotalOfGames,
|
||||
Password: this.GetCustom().GetPassword(),
|
||||
CostType: this.GetCustom().GetCostType(),
|
||||
Voice: this.GetCustom().GetVoice(),
|
||||
}
|
||||
for snid := range this.BilledList {
|
||||
var items []*model.Item
|
||||
if this.PlayerAward[snid] != nil {
|
||||
items = *this.PlayerAward[snid]
|
||||
}
|
||||
log.SnId = append(log.SnId, model.PlayerInfo{
|
||||
SnId: snid,
|
||||
Awards: items,
|
||||
})
|
||||
}
|
||||
|
||||
sort.Slice(log.SnId, func(i, j int) bool {
|
||||
p1 := base.PlayerMgrSington.GetPlayerBySnId(log.SnId[i].SnId)
|
||||
p2 := base.PlayerMgrSington.GetPlayerBySnId(log.SnId[j].SnId)
|
||||
return p1.GetCoin() > p2.GetCoin()
|
||||
})
|
||||
|
||||
for k, v := range this.RoundEndTime {
|
||||
score := make([]int64, len(this.BilledList))
|
||||
for kk, vv := range log.SnId {
|
||||
if k < len(*this.BilledList[vv.SnId]) {
|
||||
score[kk] = (*this.BilledList[vv.SnId])[k].ChangeScore
|
||||
}
|
||||
}
|
||||
log.List = append(log.List, model.RoundInfo{
|
||||
Round: int32(k + 1),
|
||||
Ts: v,
|
||||
Score: score,
|
||||
LogId: this.RoundLogId[k],
|
||||
})
|
||||
}
|
||||
base.LogChannelSingleton.WriteLog(log)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,6 +148,9 @@ func (this *ScenePolicyTienLen) OnPlayerLeave(s *base.Scene, p *base.Player, rea
|
|||
}
|
||||
sceneEx.OnPlayerLeave(p, reason)
|
||||
s.FirePlayerEvent(p, base.PlayerEventLeave, []int64{int64(reason)})
|
||||
if s.IsCustom() && len(s.Players) == 0 {
|
||||
s.Destroy(true)
|
||||
}
|
||||
}
|
||||
|
||||
// 玩家掉线
|
||||
|
|
@ -423,7 +426,7 @@ func TienLenCreateRoomInfoPacket(s *base.Scene, p *base.Player, sceneEx *TienLen
|
|||
State: proto.Int32(int32(s.GetSceneState().GetState())),
|
||||
TimeOut: proto.Int(s.GetSceneState().GetTimeout(s)),
|
||||
NumOfGames: proto.Int(sceneEx.NumOfGames),
|
||||
TotalOfGames: proto.Int(sceneEx.TotalOfGames),
|
||||
TotalOfGames: sceneEx.TotalOfGames,
|
||||
CurOpIdx: proto.Int(-1),
|
||||
MasterSnid: proto.Int32(sceneEx.masterSnid),
|
||||
AudienceNum: proto.Int(s.GetAudiencesNum()),
|
||||
|
|
@ -432,19 +435,27 @@ func TienLenCreateRoomInfoPacket(s *base.Scene, p *base.Player, sceneEx *TienLen
|
|||
RankType: s.GetDBGameFree().GetRankType(),
|
||||
SceneAdd: s.GetDBGameFree().GetSceneAdd(),
|
||||
// 比赛场相关
|
||||
Round: int32(s.MatchRound),
|
||||
CurPlayerNum: int32(s.MatchCurPlayerNum),
|
||||
NextNeed: int32(s.MatchNextNeed),
|
||||
Round: s.GetMatch().GetCurrRound(),
|
||||
CurPlayerNum: s.GetMatch().GetCurrPlayerNum(),
|
||||
NextNeed: s.GetMatch().GetNextPlayerNum(),
|
||||
RecordId: sceneEx.recordId,
|
||||
TMInfoId: sceneEx.MatchInfoId,
|
||||
TMInfoId: s.GetMatch().GetMatchId(),
|
||||
RoomTypeId: s.GetCustom().GetRoomTypeId(),
|
||||
RoomConfigId: s.GetCustom().GetRoomConfigId(),
|
||||
CostType: s.GetCustom().GetCostType(),
|
||||
Voice: s.GetCustom().GetVoice(),
|
||||
Password: s.GetCustom().GetPassword(),
|
||||
}
|
||||
if s.GetCustom().GetPassword() != "" {
|
||||
pack.NeedPassword = 1
|
||||
}
|
||||
pack.IsMatch = int32(0)
|
||||
// 0.普通场 1.锦标赛 2.冠军赛 3.vip专属
|
||||
if s.IsMatchScene() {
|
||||
pack.IsMatch = int32(s.MatchType)
|
||||
pack.IsMatch = s.GetMatch().GetMatchType()
|
||||
}
|
||||
pack.MatchFinals = 0
|
||||
if s.MatchFinals {
|
||||
if s.GetMatch().GetIsFinals() {
|
||||
pack.MatchFinals = 1
|
||||
if s.NumOfGames >= 2 {
|
||||
pack.MatchFinals = 2
|
||||
|
|
@ -880,7 +891,7 @@ func (this *SceneWaitStartStateTienLen) OnTick(s *base.Scene) {
|
|||
if sceneEx, ok := s.GetExtraData().(*TienLenSceneData); ok {
|
||||
if sceneEx.IsMatchScene() {
|
||||
delayT := time.Second * 2
|
||||
if sceneEx.MatchRound != 1 { //第一轮延迟2s,其他延迟3s 配合客户端播放动画
|
||||
if sceneEx.GetMatch().GetCurrRound() != 1 { //第一轮延迟2s,其他延迟3s 配合客户端播放动画
|
||||
delayT = time.Second * 4
|
||||
}
|
||||
if time.Now().Sub(sceneEx.StateStartTime) > delayT {
|
||||
|
|
@ -954,13 +965,17 @@ func (this *SceneHandCardStateTienLen) OnEnter(s *base.Scene) {
|
|||
s.NotifySceneRoundStart(s.NumOfGames)
|
||||
this.BroadcastRoomState(s, this.GetState(), int64(s.NumOfGames))
|
||||
|
||||
if s.IsCustom() && s.NumOfGames == 1 {
|
||||
s.SyncSceneState(common.SceneStateStart)
|
||||
}
|
||||
|
||||
//同步防伙牌数据
|
||||
sceneEx.SyncScenePlayer()
|
||||
//发牌
|
||||
if rule.TestOpen {
|
||||
sceneEx.SendHandCardTest()
|
||||
} else {
|
||||
if sceneEx.IsMatchScene() {
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
sceneEx.SendHandCard_Match()
|
||||
} else {
|
||||
sceneEx.SendHandCardOdds()
|
||||
|
|
@ -982,7 +997,7 @@ func (this *SceneHandCardStateTienLen) OnEnter(s *base.Scene) {
|
|||
seat.tianHu = rule.TianHu12Straight
|
||||
}
|
||||
if seat.tianHu > 0 {
|
||||
keyNovice := common.GetKeyNoviceGameId(sceneEx.GameId)
|
||||
keyNovice := common.GetKeyNoviceGameId(int(sceneEx.GameId))
|
||||
data, ok := seat.GDatas[keyNovice]
|
||||
if !ok {
|
||||
data = &model.PlayerGameInfo{FirstTime: time.Now()}
|
||||
|
|
@ -1637,14 +1652,14 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
winRankScore := int64(0)
|
||||
pack := &tienlen.SCTienLenGameBilled{}
|
||||
tienlenType := model.TienLenType{
|
||||
GameId: sceneEx.GameId,
|
||||
GameId: int(sceneEx.GameId),
|
||||
RoomId: int32(sceneEx.GetSceneId()),
|
||||
RoomType: sceneEx.GetFreeGameSceneType(),
|
||||
NumOfGames: int32(sceneEx.Scene.NumOfGames),
|
||||
BankId: sceneEx.masterSnid,
|
||||
PlayerCount: sceneEx.curGamingPlayerNum,
|
||||
BaseScore: s.GetBaseScore(),
|
||||
TaxRate: s.DbGameFree.GetTaxRate(),
|
||||
TaxRate: s.GetDBGameFree().GetTaxRate(),
|
||||
RoomMode: s.GetSceneMode(),
|
||||
PlayerPool: make(map[int]int),
|
||||
}
|
||||
|
|
@ -1773,7 +1788,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
gainScore = losePlayerCoin
|
||||
}
|
||||
losePlayerScore = gainScore
|
||||
if sceneEx.IsMatchScene() { //比赛场是积分,不应该增加账变
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() { //比赛场是积分,不应该增加账变
|
||||
losePlayer.AddCoinNoLog(int64(-gainScore), 0)
|
||||
} else {
|
||||
losePlayer.AddCoin(int64(-gainScore), common.GainWay_CoinSceneLost, 0, "system", s.GetSceneName())
|
||||
|
|
@ -1915,7 +1930,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
astWinGainScore = lastWinPlayerCoin
|
||||
}
|
||||
lastWinPlayerScore = astWinGainScore
|
||||
if sceneEx.IsMatchScene() {
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
lastWinPlayer.AddCoinNoLog(int64(-astWinGainScore), 0)
|
||||
} else {
|
||||
lastWinPlayer.AddCoin(int64(-astWinGainScore), common.GainWay_CoinSceneLost, 0, "system", s.GetSceneName())
|
||||
|
|
@ -2020,7 +2035,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
var otherScore int64 // 额外总加分
|
||||
oldRankScore := playerEx.GetRankScore(sceneEx.GetDBGameFree().GetRankType())
|
||||
rankScore = loseRankScore
|
||||
taxRate := sceneEx.DbGameFree.GetTaxRate() //万分比
|
||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate() //万分比
|
||||
gainScore := int64(float64(losePlayerScore) * float64(10000-taxRate) / 10000.0) //税后
|
||||
gainTaxScore := losePlayerScore - gainScore // 税收
|
||||
if playerNum == 3 {
|
||||
|
|
@ -2028,7 +2043,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
gainTaxScore = losePlayerScore + lastWinPlayerScore - gainScore
|
||||
rankScore = loseRankScore + lastWinPlayerRankScore
|
||||
}
|
||||
if sceneEx.IsMatchScene() {
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
playerEx.AddCoinNoLog(int64(gainScore), 0)
|
||||
} else {
|
||||
playerEx.AddCoin(gainScore, common.GainWay_CoinSceneWin, 0, "system", s.GetSceneName())
|
||||
|
|
@ -2130,10 +2145,10 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
var otherScore int64 // 额外总加分
|
||||
oldRankScore := playerEx.GetRankScore(sceneEx.GetDBGameFree().GetRankType())
|
||||
rankScore = lastWinPlayerRankScore
|
||||
taxRate := sceneEx.DbGameFree.GetTaxRate() //万分比
|
||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate() //万分比
|
||||
gainScore := int64(float64(lastWinPlayerScore) * float64(10000-taxRate) / 10000.0) //税后
|
||||
gainTaxScore := lastWinPlayerScore - gainScore
|
||||
if sceneEx.IsMatchScene() {
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
playerEx.AddCoinNoLog(int64(gainScore), 0)
|
||||
} else {
|
||||
playerEx.AddCoin(gainScore, common.GainWay_CoinSceneWin, 0, "system", s.GetSceneName())
|
||||
|
|
@ -2275,7 +2290,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
gainScore = losePlayerCoin
|
||||
}
|
||||
winScore += gainScore
|
||||
if sceneEx.IsMatchScene() {
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
playerEx.AddCoinNoLog(int64(-gainScore), 0)
|
||||
} else {
|
||||
playerEx.AddCoin(int64(-gainScore), common.GainWay_CoinSceneLost, 0, "system", s.GetSceneName())
|
||||
|
|
@ -2411,10 +2426,10 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
var otherScore int64 // 额外总加分
|
||||
playerEx := sceneEx.players[winSnid]
|
||||
if playerEx != nil {
|
||||
taxRate := sceneEx.DbGameFree.GetTaxRate() //万分比
|
||||
taxRate := sceneEx.GetDBGameFree().GetTaxRate() //万分比
|
||||
gainScore := int64(float64(winScore) * float64(10000-taxRate) / 10000.0) //税后
|
||||
gainTaxScore := winScore - gainScore
|
||||
if sceneEx.IsMatchScene() {
|
||||
if sceneEx.IsMatchScene() || sceneEx.IsCustom() {
|
||||
playerEx.AddCoinNoLog(int64(gainScore), 0)
|
||||
} else {
|
||||
playerEx.AddCoin(gainScore, common.GainWay_CoinSceneWin, 0, "system", s.GetSceneName())
|
||||
|
|
@ -2531,6 +2546,91 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
s.Broadcast(int(tienlen.TienLenPacketID_PACKET_SCTienLenGameBilled), pack, 0)
|
||||
logger.Logger.Trace("TienLenPacketID_PACKET_SCTienLenGameBilled gameFreeId:", sceneEx.GetGameFreeId(), ";pack:", pack)
|
||||
|
||||
if sceneEx.IsCustom() && sceneEx.TotalOfGames > 0 {
|
||||
for _, v := range tienlenType.PlayerData {
|
||||
d := sceneEx.BilledList[v.UserId]
|
||||
if d == nil {
|
||||
arr := make([]*BilledInfo, 0)
|
||||
d = &arr
|
||||
sceneEx.BilledList[v.UserId] = d
|
||||
}
|
||||
*d = append(*d, &BilledInfo{
|
||||
Round: int32(sceneEx.NumOfGames),
|
||||
ChangeScore: v.BillCoin,
|
||||
Score: base.PlayerMgrSington.GetPlayerBySnId(v.UserId).GetCoin(),
|
||||
})
|
||||
}
|
||||
sceneEx.RoundEndTime = append(sceneEx.RoundEndTime, time.Now().Unix())
|
||||
sceneEx.RoundLogId = append(sceneEx.RoundLogId, sceneEx.recordId)
|
||||
if sceneEx.NumOfGames >= int(sceneEx.TotalOfGames) {
|
||||
sceneEx.BilledList = make(map[int32]*[]*BilledInfo)
|
||||
sceneEx.RoundEndTime = sceneEx.RoundEndTime[:0]
|
||||
sceneEx.RoundLogId = sceneEx.RoundLogId[:0]
|
||||
packBilled := &tienlen.SCTienLenCycleBilled{}
|
||||
for snid, billedList := range sceneEx.BilledList {
|
||||
info := &tienlen.TienLenCycleBilledInfo{
|
||||
SnId: snid,
|
||||
TotalScore: 1000,
|
||||
Score: 1000,
|
||||
}
|
||||
for _, bill := range *billedList {
|
||||
info.RoundScore = append(info.RoundScore, bill.ChangeScore)
|
||||
info.TotalScore += bill.ChangeScore
|
||||
}
|
||||
packBilled.List = append(packBilled.List, info)
|
||||
}
|
||||
sort.Slice(packBilled.List, func(i, j int) bool {
|
||||
var a, b int64
|
||||
for _, v := range packBilled.List[i].RoundScore {
|
||||
a += v
|
||||
}
|
||||
a += packBilled.List[i].Score
|
||||
for _, v := range packBilled.List[j].RoundScore {
|
||||
b += v
|
||||
}
|
||||
b += packBilled.List[j].Score
|
||||
return a > b
|
||||
})
|
||||
if len(packBilled.List) > 0 {
|
||||
for _, v := range sceneEx.Items {
|
||||
packBilled.List[0].Award = append(packBilled.List[0].Award, &tienlen.ItemInfo{
|
||||
Id: v.Id,
|
||||
Num: v.Num,
|
||||
})
|
||||
}
|
||||
// 发奖品
|
||||
if len(sceneEx.Items) > 0 {
|
||||
p := base.PlayerMgrSington.GetPlayerBySnId(packBilled.List[0].SnId)
|
||||
if p != nil {
|
||||
var items []*model.Item
|
||||
for _, v := range packBilled.List[0].Award {
|
||||
itemData := srvdata.GameItemMgr.Get(p.Platform, p.SnId)
|
||||
if itemData != nil {
|
||||
items = append(items, &model.Item{
|
||||
ItemId: v.GetId(),
|
||||
ItemNum: v.GetNum(),
|
||||
})
|
||||
}
|
||||
}
|
||||
p.AddItems(&model.AddItemParam{
|
||||
P: &p.PlayerData,
|
||||
Change: items,
|
||||
GainWay: common.GainWayRoomGain,
|
||||
Operator: "system",
|
||||
Remark: "房卡场奖励",
|
||||
GameId: int64(sceneEx.GameId),
|
||||
GameFreeId: int64(sceneEx.GetGameFreeId()),
|
||||
})
|
||||
sceneEx.PlayerAward[p.SnId] = &items
|
||||
}
|
||||
}
|
||||
}
|
||||
s.Broadcast(int(tienlen.TienLenPacketID_PACKET_SCTienLenCycleBilled), packBilled, 0)
|
||||
s.SyncSceneState(common.SceneStateEnd)
|
||||
sceneEx.SaveCustomLog()
|
||||
}
|
||||
}
|
||||
|
||||
// 牌局记录
|
||||
info, err := model.MarshalGameNoteByFIGHT(&tienlenType)
|
||||
if err == nil {
|
||||
|
|
@ -2579,10 +2679,11 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
})
|
||||
|
||||
// 保存玩家游戏记录
|
||||
sceneEx.SaveGamePlayerListLog(o_player.UserId,
|
||||
base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.Promoter,
|
||||
o_player.PackageTag, sceneEx.recordId, o_player.InviterId, totalin, totalout, o_player.BillTaxCoin,
|
||||
0, 0, o_player.GainCoin+o_player.BombCoin, validBet, validFlow, o_player.IsFirst, o_player.IsLeave))
|
||||
param := base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.Promoter,
|
||||
o_player.PackageTag, sceneEx.recordId, o_player.InviterId, totalin, totalout, o_player.BillTaxCoin,
|
||||
0, 0, o_player.GainCoin+o_player.BombCoin, validBet, validFlow, o_player.IsFirst, o_player.IsLeave)
|
||||
param.CycleId = sceneEx.CycleID
|
||||
sceneEx.SaveGamePlayerListLog(o_player.UserId, param)
|
||||
}
|
||||
}
|
||||
if isSave {
|
||||
|
|
@ -2591,6 +2692,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
Trend20Lately: "",
|
||||
CtrlType: sceneEx.ctrlType,
|
||||
PlayerPool: tienlenType.PlayerPool,
|
||||
CycleId: sceneEx.CycleID,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -2694,7 +2796,10 @@ func (this *SceneBilledStateTienLen) OnLeave(s *base.Scene) {
|
|||
s.TryDismissRob()
|
||||
}
|
||||
|
||||
if s.CheckNeedDestroy() || (s.IsMatchScene() && (!s.MatchFinals || (s.MatchFinals && s.NumOfGames >= 2))) { // 非决赛打一场 决赛打两场
|
||||
if s.CheckNeedDestroy() || (s.IsMatchScene() && (!s.GetMatch().GetIsFinals() || (s.GetMatch().GetIsFinals() && s.NumOfGames >= 2))) { // 非决赛打一场 决赛打两场
|
||||
sceneEx.SceneDestroy(true)
|
||||
}
|
||||
if s.TotalOfGames > 0 && s.NumOfGames >= int(s.TotalOfGames) {
|
||||
sceneEx.SceneDestroy(true)
|
||||
}
|
||||
s.RankMatchDestroy()
|
||||
|
|
@ -2781,6 +2886,11 @@ func init() {
|
|||
base.RegisteScenePolicy(common.GameId_TienLenRank_toend, 0, ScenePolicyTienLenSingleton)
|
||||
base.RegisteScenePolicy(common.GameId_TienLenRank_yl, 0, ScenePolicyTienLenSingleton)
|
||||
base.RegisteScenePolicy(common.GameId_TienLenRank_yl_toend, 0, ScenePolicyTienLenSingleton)
|
||||
// 房卡场
|
||||
base.RegisteScenePolicy(common.GameId_TienLenCustom, 0, ScenePolicyTienLenSingleton)
|
||||
base.RegisteScenePolicy(common.GameId_TienLenCustom_toend, 0, ScenePolicyTienLenSingleton)
|
||||
base.RegisteScenePolicy(common.GameId_TienLenCustom_yl, 0, ScenePolicyTienLenSingleton)
|
||||
base.RegisteScenePolicy(common.GameId_TienLenCustom_yl_toend, 0, ScenePolicyTienLenSingleton)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,153 +1,150 @@
|
|||
package transact
|
||||
|
||||
//
|
||||
//import (
|
||||
// "errors"
|
||||
// "fmt"
|
||||
// "mongo.games.com/game/common"
|
||||
// "mongo.games.com/game/gamesrv/base"
|
||||
// "mongo.games.com/game/model"
|
||||
// "mongo.games.com/game/proto"
|
||||
// webapi_proto "mongo.games.com/game/protocol/webapi"
|
||||
// "mongo.games.com/goserver/core/basic"
|
||||
// "mongo.games.com/goserver/core/logger"
|
||||
// "mongo.games.com/goserver/core/netlib"
|
||||
// "mongo.games.com/goserver/core/task"
|
||||
// "mongo.games.com/goserver/core/transact"
|
||||
// "sync"
|
||||
//)
|
||||
//
|
||||
//const __REQIP__ = "__REQIP__"
|
||||
//
|
||||
//var (
|
||||
// WebAPIErrParam = errors.New("param err")
|
||||
// WebAPIErrNoPlayer = errors.New("player no find")
|
||||
//)
|
||||
//
|
||||
//func init() {
|
||||
// transact.RegisteHandler(common.TransType_GameSrvWebApi, &WebAPITranscateHandler{})
|
||||
//}
|
||||
//
|
||||
//var WebAPIHandlerMgrSingleton = &WebAPIHandlerMgr{wshMap: make(map[string]WebAPIHandler)}
|
||||
//
|
||||
//type WebAPITranscateHandler struct {
|
||||
//}
|
||||
//
|
||||
//func (this *WebAPITranscateHandler) OnExcute(tNode *transact.TransNode, ud interface{}) transact.TransExeResult {
|
||||
// logger.Logger.Trace("WebAPITranscateHandler.OnExcute ")
|
||||
// req := &common.M2GWebApiRequest{}
|
||||
// err := netlib.UnmarshalPacketNoPackId(ud.([]byte), req)
|
||||
// if err == nil {
|
||||
// wsh := WebAPIHandlerMgrSingleton.GetWebAPIHandler(req.Path)
|
||||
// if wsh == nil {
|
||||
// logger.Logger.Error("WebAPITranscateHandler no registe WebAPIHandler ", req.Path)
|
||||
// return transact.TransExeResult_Failed
|
||||
// }
|
||||
// tag, msg := wsh.Handler(tNode, req.Body)
|
||||
// tNode.TransRep.RetFiels = msg
|
||||
// switch tag {
|
||||
// case common.ResponseTag_Ok:
|
||||
// return transact.TransExeResult_Success
|
||||
// case common.ResponseTag_TransactYield:
|
||||
// return transact.TransExeResult_Yield
|
||||
// }
|
||||
// }
|
||||
// logger.Logger.Error("WebAPITranscateHandler.OnExcute err:", err.Error())
|
||||
// return transact.TransExeResult_Failed
|
||||
//}
|
||||
//
|
||||
//func (this *WebAPITranscateHandler) OnCommit(tNode *transact.TransNode) transact.TransExeResult {
|
||||
// logger.Logger.Trace("WebAPITranscateHandler.OnCommit ")
|
||||
// return transact.TransExeResult_Success
|
||||
//}
|
||||
//
|
||||
//func (this *WebAPITranscateHandler) OnRollBack(tNode *transact.TransNode) transact.TransExeResult {
|
||||
// logger.Logger.Trace("WebAPITranscateHandler.OnRollBack ")
|
||||
// return transact.TransExeResult_Success
|
||||
//}
|
||||
//
|
||||
//func (this *WebAPITranscateHandler) OnChildTransRep(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int,
|
||||
// ud interface{}) transact.TransExeResult {
|
||||
// logger.Logger.Trace("WebAPITranscateHandler.OnChildTransRep ")
|
||||
// return transact.TransExeResult_Success
|
||||
//}
|
||||
//
|
||||
//type WebAPIHandler interface {
|
||||
// Handler(*transact.TransNode, []byte) (int, proto.Message)
|
||||
//}
|
||||
//
|
||||
//type WebAPIHandlerWrapper func(*transact.TransNode, []byte) (int, proto.Message)
|
||||
//
|
||||
//func (wshw WebAPIHandlerWrapper) Handler(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||
// return wshw(tNode, params)
|
||||
//}
|
||||
//
|
||||
//type WebAPIHandlerMgr struct {
|
||||
// wshMap map[string]WebAPIHandler
|
||||
// DataWaitList sync.Map
|
||||
//}
|
||||
//
|
||||
//func (this *WebAPIHandlerMgr) RegisteWebAPIHandler(name string, wsh WebAPIHandler) {
|
||||
// this.wshMap[name] = wsh
|
||||
//}
|
||||
//
|
||||
//func (this *WebAPIHandlerMgr) GetWebAPIHandler(name string) WebAPIHandler {
|
||||
// if wsh, exist := this.wshMap[name]; exist {
|
||||
// return wsh
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
//
|
||||
//func init() {
|
||||
// //单控
|
||||
// WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/SinglePlayerAdjust", WebAPIHandlerWrapper(
|
||||
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||
// pack := &webapi_proto.SASinglePlayerAdjust{}
|
||||
// msg := &webapi_proto.ASSinglePlayerAdjust{}
|
||||
// err := proto.Unmarshal(params, msg)
|
||||
// if err != nil {
|
||||
// fmt.Printf("err:%v", err)
|
||||
// pack.Tag = webapi_proto.TagCode_FAILED
|
||||
// pack.Msg = "数据序列化失败"
|
||||
// return common.ResponseTag_ParamError, pack
|
||||
// }
|
||||
// pack.Tag = webapi_proto.TagCode_SUCCESS
|
||||
// switch msg.GetOpration() {
|
||||
// case 1:
|
||||
// psa := base.PlayerSingleAdjustMgr.AddNewSingleAdjust(msg.GetPlayerSingleAdjust())
|
||||
// if psa != nil {
|
||||
// task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
// return model.AddNewSingleAdjust(psa)
|
||||
// }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
// if data != nil {
|
||||
// pack.Tag = webapi_proto.TagCode_FAILED
|
||||
// pack.Msg = "insert err" + data.(error).Error()
|
||||
// }
|
||||
// tNode.TransRep.RetFiels = pack
|
||||
// tNode.Resume()
|
||||
// }), "AddNewSingleAdjust").Start()
|
||||
// return common.ResponseTag_TransactYield, pack
|
||||
// }
|
||||
// case 2:
|
||||
// base.PlayerSingleAdjustMgr.EditSingleAdjust(msg.GetPlayerSingleAdjust())
|
||||
// case 3:
|
||||
// psa := msg.PlayerSingleAdjust
|
||||
// if psa != nil {
|
||||
// base.PlayerSingleAdjustMgr.DeleteSingleAdjust(psa.Platform, psa.SnId, psa.GameFreeId)
|
||||
// }
|
||||
// case 4:
|
||||
// ps := msg.PlayerSingleAdjust
|
||||
// webp := base.PlayerSingleAdjustMgr.GetSingleAdjust(ps.Platform, ps.SnId, ps.GameFreeId)
|
||||
// if webp == nil {
|
||||
// pack.Tag = webapi_proto.TagCode_FAILED
|
||||
// pack.Msg = fmt.Sprintf("webp == nil %v %v %v", ps.Platform, ps.SnId, ps.GameFreeId)
|
||||
// }
|
||||
// pack.PlayerSingleAdjust = webp
|
||||
// default:
|
||||
// pack.Tag = webapi_proto.TagCode_FAILED
|
||||
// pack.Msg = "Opration param is error!"
|
||||
// return common.ResponseTag_ParamError, pack
|
||||
// }
|
||||
// return common.ResponseTag_Ok, pack
|
||||
// }))
|
||||
//}
|
||||
import (
|
||||
"errors"
|
||||
"sync"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
"mongo.games.com/goserver/core/transact"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/gamesrv/base"
|
||||
"mongo.games.com/game/gamesrv/tienlen"
|
||||
"mongo.games.com/game/proto"
|
||||
webapiproto "mongo.games.com/game/protocol/webapi"
|
||||
)
|
||||
|
||||
const __REQIP__ = "__REQIP__"
|
||||
|
||||
var (
|
||||
WebAPIErrParam = errors.New("param err")
|
||||
WebAPIErrNoPlayer = errors.New("player no find")
|
||||
)
|
||||
|
||||
func init() {
|
||||
transact.RegisteHandler(common.TransType_GameSrvWebApi, &WebAPITranscateHandler{})
|
||||
}
|
||||
|
||||
var WebAPIHandlerMgrSingleton = &WebAPIHandlerMgr{wshMap: make(map[string]WebAPIHandler)}
|
||||
|
||||
type WebAPITranscateHandler struct {
|
||||
}
|
||||
|
||||
func (this *WebAPITranscateHandler) OnExcute(tNode *transact.TransNode, ud interface{}) transact.TransExeResult {
|
||||
logger.Logger.Trace("WebAPITranscateHandler.OnExcute ")
|
||||
req := &common.M2GWebApiRequest{}
|
||||
err := netlib.UnmarshalPacketNoPackId(ud.([]byte), req)
|
||||
if err == nil {
|
||||
wsh := WebAPIHandlerMgrSingleton.GetWebAPIHandler(req.Path)
|
||||
if wsh == nil {
|
||||
logger.Logger.Error("WebAPITranscateHandler no registe WebAPIHandler ", req.Path)
|
||||
return transact.TransExeResult_Failed
|
||||
}
|
||||
tag, msg := wsh.Handler(tNode, req.Body)
|
||||
tNode.TransRep.RetFiels = msg
|
||||
switch tag {
|
||||
case common.ResponseTag_Ok:
|
||||
return transact.TransExeResult_Success
|
||||
case common.ResponseTag_TransactYield:
|
||||
return transact.TransExeResult_Yield
|
||||
}
|
||||
}
|
||||
logger.Logger.Error("WebAPITranscateHandler.OnExcute err:", err.Error())
|
||||
return transact.TransExeResult_Failed
|
||||
}
|
||||
|
||||
func (this *WebAPITranscateHandler) OnCommit(tNode *transact.TransNode) transact.TransExeResult {
|
||||
logger.Logger.Trace("WebAPITranscateHandler.OnCommit ")
|
||||
return transact.TransExeResult_Success
|
||||
}
|
||||
|
||||
func (this *WebAPITranscateHandler) OnRollBack(tNode *transact.TransNode) transact.TransExeResult {
|
||||
logger.Logger.Trace("WebAPITranscateHandler.OnRollBack ")
|
||||
return transact.TransExeResult_Success
|
||||
}
|
||||
|
||||
func (this *WebAPITranscateHandler) OnChildTransRep(tNode *transact.TransNode, hChild transact.TransNodeID, retCode int,
|
||||
ud interface{}) transact.TransExeResult {
|
||||
logger.Logger.Trace("WebAPITranscateHandler.OnChildTransRep ")
|
||||
return transact.TransExeResult_Success
|
||||
}
|
||||
|
||||
type WebAPIHandler interface {
|
||||
Handler(*transact.TransNode, []byte) (int, proto.Message)
|
||||
}
|
||||
|
||||
type WebAPIHandlerWrapper func(*transact.TransNode, []byte) (int, proto.Message)
|
||||
|
||||
func (wshw WebAPIHandlerWrapper) Handler(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||
return wshw(tNode, params)
|
||||
}
|
||||
|
||||
type WebAPIHandlerMgr struct {
|
||||
wshMap map[string]WebAPIHandler
|
||||
DataWaitList sync.Map
|
||||
}
|
||||
|
||||
func (this *WebAPIHandlerMgr) RegisteWebAPIHandler(name string, wsh WebAPIHandler) {
|
||||
this.wshMap[name] = wsh
|
||||
}
|
||||
|
||||
func (this *WebAPIHandlerMgr) GetWebAPIHandler(name string) WebAPIHandler {
|
||||
if wsh, exist := this.wshMap[name]; exist {
|
||||
return wsh
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 对局详情
|
||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/room_info", WebAPIHandlerWrapper(
|
||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||
pack := &webapiproto.SARoomInfo{}
|
||||
msg := &webapiproto.ASRoomInfo{}
|
||||
err := proto.Unmarshal(params, msg)
|
||||
if err != nil {
|
||||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "数据序列化失败"
|
||||
return common.ResponseTag_ParamError, pack
|
||||
}
|
||||
pack.Tag = webapiproto.TagCode_SUCCESS
|
||||
|
||||
scene := base.SceneMgrSington.GetScene(int(msg.GetRoomId()))
|
||||
if scene == nil || scene.ExtraData == nil {
|
||||
pack.Tag = webapiproto.TagCode_NotFound
|
||||
pack.Msg = "房间没找到"
|
||||
return common.ResponseTag_NoFindRoom, pack
|
||||
}
|
||||
|
||||
switch d := scene.ExtraData.(type) {
|
||||
case tienlen.TienLenSceneData:
|
||||
for k := range d.BilledList {
|
||||
pack.SnId = append(pack.SnId, k)
|
||||
}
|
||||
for k, v := range d.RoundLogId {
|
||||
var score []int64
|
||||
for _, vv := range pack.SnId {
|
||||
list := d.BilledList[vv]
|
||||
if list == nil || len(*list) <= k {
|
||||
score = append(score, 0)
|
||||
continue
|
||||
}
|
||||
score = append(score, (*list)[k].ChangeScore)
|
||||
}
|
||||
item := &webapiproto.RoundInfo{
|
||||
Round: int32(k + 1),
|
||||
Ts: d.RoundEndTime[k],
|
||||
Score: score,
|
||||
LogId: v,
|
||||
}
|
||||
pack.List = append(pack.List, item)
|
||||
}
|
||||
|
||||
default:
|
||||
pack.Tag = webapiproto.TagCode_FAILED
|
||||
pack.Msg = "未实现"
|
||||
}
|
||||
return common.ResponseTag_Ok, pack
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/goserver/core"
|
||||
"mongo.games.com/goserver/core/admin"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
"mongo.games.com/goserver/core/transact"
|
||||
|
|
@ -176,14 +177,6 @@ func init() {
|
|||
return transact.TransExeResult(retCode)
|
||||
}),
|
||||
})
|
||||
// //参数设置
|
||||
// admin.MyAdminApp.Route("/api/Param/CommonTax", GameSrvWebAPI)
|
||||
// //捕鱼金币池查询
|
||||
// admin.MyAdminApp.Route("/api/CoinPool/FishingPool", GameSrvWebAPI)
|
||||
// //通用金币池查询
|
||||
// admin.MyAdminApp.Route("/api/CoinPool/GamePool", GameSrvWebAPI)
|
||||
// //捕鱼渔场保留金币
|
||||
// admin.MyAdminApp.Route("/api/CoinPool/GameFishsAllCoin", GameSrvWebAPI)
|
||||
// //单控数据
|
||||
//admin.MyAdminApp.Route("/api/game/SinglePlayerAdjust", GameSrvWebAPI)
|
||||
// 对局详情
|
||||
admin.MyAdminApp.Route("/api/game/room_info", GameSrvWebAPI)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,3 +84,16 @@ func SaveToDelBackupBagItem(args *BagInfo) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AddItemParam struct {
|
||||
P *PlayerData
|
||||
Change []*Item // 道具变化数量
|
||||
Cost []*Item // 获得道具时消耗的道具数量
|
||||
Add int64 // 加成数量
|
||||
GainWay int32 // 记录类型
|
||||
Operator, Remark string // 操作人,备注
|
||||
GameId, GameFreeId int64 // 游戏id,场次id
|
||||
NoLog bool // 是否不记录日志
|
||||
LogId string // 撤销的id,道具兑换失败
|
||||
RoomConfigId int32 // 房间配置id
|
||||
}
|
||||
|
|
|
|||
106
model/config.go
106
model/config.go
|
|
@ -1,10 +1,14 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/protocol/gamehall"
|
||||
"strconv"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/protocol/shop"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
/*
|
||||
|
|
@ -138,6 +142,11 @@ type AllConfig struct {
|
|||
MatchAudience map[int32]*webapi.MatchAudience // 比赛观众列表 key: 玩家id
|
||||
// 小精灵配置
|
||||
*webapi.SpiritConfig
|
||||
// 房卡场房间类型
|
||||
RoomType map[int32]*webapi.RoomType // key: 房间类型id
|
||||
// 房卡场房间配置
|
||||
RoomConfig map[int32]*webapi.RoomConfig // key: 房间配置id
|
||||
RoomTypeMap map[int32][]*webapi.RoomConfig // key: 房间类型id:房间配置
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
|
|
@ -167,6 +176,9 @@ func (cm *ConfigMgr) GetConfig(platform string) *AllConfig {
|
|||
ShopInfos: make(map[int32]*ShopInfo),
|
||||
ChannelSwitch: make(map[int32]*webapi.ChannelSwitchConfig),
|
||||
MatchAudience: make(map[int32]*webapi.MatchAudience),
|
||||
RoomType: make(map[int32]*webapi.RoomType),
|
||||
RoomConfig: make(map[int32]*webapi.RoomConfig),
|
||||
RoomTypeMap: make(map[int32][]*webapi.RoomConfig),
|
||||
}
|
||||
cm.platform[platform] = c
|
||||
}
|
||||
|
|
@ -366,8 +378,9 @@ func (cm *ConfigMgr) AddMatchAudience(d *webapi.MatchAudience) {
|
|||
cfg.MatchAudience[d.GetSnId()] = d
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) DelMatchAudience(d *webapi.MatchAudience) {
|
||||
delete(cm.GetConfig(d.Platform).MatchAudience, d.GetSnId())
|
||||
func (cm *ConfigMgr) DelMatchAudience(plt string, snid int32) {
|
||||
logger.Logger.Tracef("del match audience plt:%s, snid:%d", plt, snid)
|
||||
delete(cm.GetConfig(plt).MatchAudience, snid)
|
||||
}
|
||||
|
||||
// IsMatchAudience 是不是比赛场观众
|
||||
|
|
@ -375,3 +388,90 @@ func (cm *ConfigMgr) IsMatchAudience(plt string, snId int32) bool {
|
|||
_, ok := cm.GetConfig(plt).MatchAudience[snId]
|
||||
return ok
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) UpdateRoomType(data *webapi.RoomType) {
|
||||
cm.GetConfig(data.GetPlatform()).RoomType[data.GetId()] = data
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) DelRoomType(plt string, id int32) {
|
||||
delete(cm.GetConfig(plt).RoomType, id)
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) UpdateRoomConfig(data *webapi.RoomConfig) {
|
||||
cm.GetConfig(data.GetPlatform()).RoomConfig[data.GetId()] = data
|
||||
d := cm.GetConfig(data.GetPlatform()).RoomTypeMap[data.GetRoomType()]
|
||||
if d == nil {
|
||||
d = make([]*webapi.RoomConfig, 0)
|
||||
}
|
||||
d = append(d, data)
|
||||
cm.GetConfig(data.GetPlatform()).RoomTypeMap[data.GetRoomType()] = d
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) DelRoomConfig(plt string, id int32) {
|
||||
d := cm.GetConfig(plt).RoomConfig[id]
|
||||
if d != nil {
|
||||
b := cm.GetConfig(plt).RoomTypeMap[d.GetRoomType()]
|
||||
if b != nil {
|
||||
for i, v := range b {
|
||||
if v.GetId() == id {
|
||||
b = append(b[:i], b[i+1:]...)
|
||||
cm.GetConfig(plt).RoomTypeMap[d.GetRoomType()] = b
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
delete(cm.GetConfig(plt).RoomConfig, id)
|
||||
}
|
||||
|
||||
func (cm *ConfigMgr) GetRoomConfig(plt string) *gamehall.SCRoomConfig {
|
||||
pack := &gamehall.SCRoomConfig{}
|
||||
for _, v := range cm.GetConfig(plt).RoomType {
|
||||
if v.GetOn() != common.On {
|
||||
continue
|
||||
}
|
||||
var list []*gamehall.RoomConfigInfo
|
||||
for _, vv := range cm.GetConfig(plt).RoomTypeMap[v.GetId()] {
|
||||
if vv.GetOn() != common.On {
|
||||
continue
|
||||
}
|
||||
var cost, reward []*gamehall.ItemInfo
|
||||
for _, item := range vv.GetCost() {
|
||||
cost = append(cost, &gamehall.ItemInfo{
|
||||
Id: item.GetItemId(),
|
||||
Num: int32(item.GetItemNum()),
|
||||
})
|
||||
}
|
||||
for _, item := range vv.GetReward() {
|
||||
reward = append(reward, &gamehall.ItemInfo{
|
||||
Id: item.GetItemId(),
|
||||
Num: int32(item.GetItemNum()),
|
||||
})
|
||||
}
|
||||
list = append(list, &gamehall.RoomConfigInfo{
|
||||
Id: vv.GetId(),
|
||||
Name: vv.GetName(),
|
||||
RoomType: vv.GetRoomType(),
|
||||
On: vv.GetOn(),
|
||||
SortId: vv.GetSortId(),
|
||||
Cost: cost,
|
||||
Reward: reward,
|
||||
OnChannelName: vv.GetOnChannelName(),
|
||||
GameFreeId: vv.GetGameFreeId(),
|
||||
Round: vv.GetRound(),
|
||||
PlayerNum: vv.GetPlayerNum(),
|
||||
NeedPassword: vv.GetNeedPassword(),
|
||||
CostType: vv.GetCostType(),
|
||||
Voice: vv.GetVoice(),
|
||||
ImageURI: vv.GetImageURI(),
|
||||
})
|
||||
}
|
||||
pack.List = append(pack.List, &gamehall.RoomTypeInfo{
|
||||
Id: v.GetId(),
|
||||
Name: v.GetName(),
|
||||
On: v.GetOn(),
|
||||
SortId: v.GetSortId(),
|
||||
List: list,
|
||||
})
|
||||
}
|
||||
return pack
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"github.com/globalsign/mgo/bson"
|
||||
)
|
||||
|
||||
var (
|
||||
DbCustomLogDBName = "log"
|
||||
DbCustomLogCollName = "log_custom"
|
||||
)
|
||||
|
||||
type PlayerInfo struct {
|
||||
SnId int32 // 玩家id
|
||||
Awards []*Item // 奖品
|
||||
}
|
||||
|
||||
type RoundInfo struct {
|
||||
Round int32 // 第几局
|
||||
Ts int64 // 结算时间
|
||||
Score []int64 // 分数
|
||||
LogId string // 牌局记录id
|
||||
}
|
||||
|
||||
type CustomLog struct {
|
||||
Id bson.ObjectId `bson:"_id"`
|
||||
Platform string `bson:"-"`
|
||||
CycleId string // 本轮id,多局游戏属于同一轮
|
||||
RoomConfigId int32 // 房间配置id
|
||||
GameFreeId int32 // 场次id
|
||||
TotalRound int32 // 总局数
|
||||
PlayerNum int32 // 最大人数
|
||||
Password string // 密码
|
||||
CostType int32 // 付费方式 1房主 2AA
|
||||
Voice int32 // 是否开启语音 1开启
|
||||
RoomId int32 // 房间id
|
||||
SnId []PlayerInfo // 所有玩家
|
||||
List []RoundInfo // 对局记录
|
||||
StartTs, EndTs int64 // 开始,结束时间
|
||||
State int32 // 0正常结束 1后台中途解散
|
||||
}
|
||||
|
|
@ -35,15 +35,15 @@ type GameDetailedLogType struct {
|
|||
|
||||
type GameDetailedLog struct {
|
||||
Id bson.ObjectId `bson:"_id"` //记录ID
|
||||
LogId string //记录ID
|
||||
LogId string //记录ID,每局游戏唯一
|
||||
GameId int32 //游戏id
|
||||
ClubId int32 //俱乐部Id
|
||||
ClubRoom string //俱乐部包间
|
||||
Platform string //平台id
|
||||
Channel string //渠道
|
||||
Promoter string //推广员
|
||||
MatchId int64 //比赛ID
|
||||
SceneId int32 //场景ID
|
||||
MatchId int64 //比赛ID,应该用字符串的
|
||||
SceneId int32 //房间id,会重复
|
||||
GameMode int32 //游戏类型
|
||||
GameFreeid int32 //游戏类型房间号
|
||||
PlayerCount int32 //玩家数量
|
||||
|
|
@ -57,6 +57,7 @@ type GameDetailedLog struct {
|
|||
Ts int64 //时间戳
|
||||
CtrlType int // 1控赢 2控输 0不控
|
||||
PlayerPool map[int]int // 个人水池分
|
||||
CycleId string // 本轮id,打一轮有多局
|
||||
}
|
||||
|
||||
func NewGameDetailedLog() *GameDetailedLog {
|
||||
|
|
@ -65,7 +66,8 @@ func NewGameDetailedLog() *GameDetailedLog {
|
|||
}
|
||||
|
||||
func NewGameDetailedLogEx(logid string, gameid, sceneid, gamemode, gamefreeid, playercount, gametiming, gamebasebet int32,
|
||||
gamedetailednote string, platform string, clubId int32, clubRoom string, cpCtx CoinPoolCtx, ver int32, trend20Lately string, ctrlType int, playerPool map[int]int) *GameDetailedLog {
|
||||
gamedetailednote string, platform string, clubId int32, clubRoom string, cpCtx CoinPoolCtx, ver int32,
|
||||
trend20Lately string, ctrlType int, playerPool map[int]int, cycleId string) *GameDetailedLog {
|
||||
cl := NewGameDetailedLog()
|
||||
cl.LogId = logid
|
||||
cl.GameId = gameid
|
||||
|
|
@ -87,6 +89,7 @@ func NewGameDetailedLogEx(logid string, gameid, sceneid, gamemode, gamefreeid, p
|
|||
cl.Ts = time.Now().Unix()
|
||||
cl.CtrlType = ctrlType
|
||||
cl.PlayerPool = playerPool
|
||||
cl.CycleId = cycleId
|
||||
return cl
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,9 +52,10 @@ type GamePlayerListLog struct {
|
|||
MatchId int64
|
||||
MatchType int64 //0.普通场 1.锦标赛 2.冠军赛 3.vip专属
|
||||
Ts int32
|
||||
IsFree bool //拉霸专用 是否免费
|
||||
WinSmallGame int64 //拉霸专用 小游戏奖励
|
||||
WinTotal int64 //拉霸专用 输赢
|
||||
IsFree bool //拉霸专用 是否免费
|
||||
WinSmallGame int64 //拉霸专用 小游戏奖励
|
||||
WinTotal int64 //拉霸专用 输赢
|
||||
CycleId string // 本轮id,打一轮有多局
|
||||
}
|
||||
|
||||
func NewGamePlayerListLog() *GamePlayerListLog {
|
||||
|
|
@ -64,7 +65,7 @@ func NewGamePlayerListLog() *GamePlayerListLog {
|
|||
func NewGamePlayerListLogEx(snid int32, gamedetailedlogid string, platform, channel, promoter, packageTag string, gameid, baseScore,
|
||||
sceneid, gamemode, gamefreeid int32, totalin, totalout int64, clubId int32, clubRoom string, taxCoin, pumpCoin int64, roomType int32,
|
||||
betAmount, winAmountNoAnyTax int64, key, name string, gameClass int32, isFirst bool, matchid, matchType int64,
|
||||
isFree bool, winSmallGame, winTotal int64) *GamePlayerListLog {
|
||||
isFree bool, winSmallGame, winTotal int64, cycleId string) *GamePlayerListLog {
|
||||
cl := NewGamePlayerListLog()
|
||||
cl.SnId = snid
|
||||
cl.GameDetailedLogId = gamedetailedlogid
|
||||
|
|
|
|||
|
|
@ -14,20 +14,21 @@ var (
|
|||
)
|
||||
|
||||
type ItemLog struct {
|
||||
LogId bson.ObjectId `bson:"_id"`
|
||||
Platform string //平台
|
||||
SnId int32 //玩家id
|
||||
LogType int32 //记录类型 0.获取 1.消耗
|
||||
ItemId int32 //道具id
|
||||
ItemName string //道具名称
|
||||
Count int64 //个数
|
||||
CreateTs int64 //记录时间
|
||||
Remark string //备注
|
||||
TypeId int32 // 变化类型
|
||||
GameId int32 // 游戏id,游戏中获得时有值
|
||||
GameFreeId int32 // 场次id,游戏中获得时有值
|
||||
Cost []*ItemInfo // 消耗的道具
|
||||
Id string // 撤销的id,兑换失败
|
||||
LogId bson.ObjectId `bson:"_id"`
|
||||
Platform string //平台
|
||||
SnId int32 //玩家id
|
||||
LogType int32 //记录类型 0.获取 1.消耗
|
||||
ItemId int32 //道具id
|
||||
ItemName string //道具名称
|
||||
Count int64 //个数
|
||||
CreateTs int64 //记录时间
|
||||
Remark string //备注
|
||||
TypeId int32 // 变化类型
|
||||
GameId int32 // 游戏id,游戏中获得时有值
|
||||
GameFreeId int32 // 场次id,游戏中获得时有值
|
||||
Cost []*Item // 消耗的道具
|
||||
Id string // 撤销的id,兑换失败
|
||||
RoomConfigId int32 // 房间配置id
|
||||
}
|
||||
|
||||
func NewItemLog() *ItemLog {
|
||||
|
|
@ -36,18 +37,19 @@ func NewItemLog() *ItemLog {
|
|||
}
|
||||
|
||||
type ItemParam struct {
|
||||
Platform string // 平台
|
||||
SnId int32 // 玩家id
|
||||
LogType int32 // 记录类型 0.获取 1.消耗
|
||||
ItemId int32 // 道具id
|
||||
ItemName string // 道具名称
|
||||
Count int64 // 个数
|
||||
Remark string // 备注
|
||||
TypeId int32 // 变化类型
|
||||
GameId int64 // 游戏id,游戏中获得时有值
|
||||
GameFreeId int64 // 场次id,游戏中获得时有值
|
||||
Cost []*ItemInfo // 消耗的道具
|
||||
LogId string // 撤销的id,兑换失败
|
||||
Platform string // 平台
|
||||
SnId int32 // 玩家id
|
||||
LogType int32 // 记录类型 0.获取 1.消耗
|
||||
ItemId int32 // 道具id
|
||||
ItemName string // 道具名称
|
||||
Count int64 // 个数
|
||||
Remark string // 备注
|
||||
TypeId int32 // 变化类型
|
||||
GameId int64 // 游戏id,游戏中获得时有值
|
||||
GameFreeId int64 // 场次id,游戏中获得时有值
|
||||
Cost []*Item // 消耗的道具
|
||||
LogId string // 撤销的id,兑换失败
|
||||
RoomConfigId int32 // 房间配置id
|
||||
}
|
||||
|
||||
func NewItemLogEx(param ItemParam) *ItemLog {
|
||||
|
|
@ -65,6 +67,7 @@ func NewItemLogEx(param ItemParam) *ItemLog {
|
|||
itemLog.GameFreeId = int32(param.GameFreeId)
|
||||
itemLog.Cost = param.Cost
|
||||
itemLog.Id = param.LogId
|
||||
itemLog.RoomConfigId = param.RoomConfigId
|
||||
return itemLog
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ const (
|
|||
|
||||
const (
|
||||
DBVipGiftLog = "db_vipgift"
|
||||
DBCustomLog = "db_customlog" // 房卡场对局记录
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,14 +30,14 @@ enum OpResultCode {
|
|||
}
|
||||
//自由场协议编号 2320-2339
|
||||
enum CoinSceneGamePacketID {
|
||||
PACKET_CoinSceneGame_ZERO = 0; // 弃用消息号
|
||||
PACKET_CoinSceneGame_ZERO = 0; // 弃用消息号
|
||||
PACKET_CS_COINSCENE_GETPLAYERNUM = 2320;
|
||||
PACKET_SC_COINSCENE_GETPLAYERNUM = 2321;
|
||||
PACKET_CS_COINSCENE_OP = 2322;
|
||||
PACKET_SC_COINSCENE_OP = 2323;
|
||||
PACKET_CS_COINSCENE_LISTROOM = 2324;
|
||||
PACKET_SC_COINSCENE_LISTROOM = 2325;
|
||||
PACKET_SC_COINSCENE_QUEUESTATE = 2326;
|
||||
PACKET_SC_COINSCENE_QUEUESTATE = 2326;
|
||||
}
|
||||
|
||||
//PACKET_CS_COINSCENE_GETPLAYERNUM
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
cd $CCC_CLIENT_DIR/protocol/gamehall
|
||||
npx pbjs --dependency protobufjs/minimal.js --target static-module --wrap commonjs --out gamehall.js ./*.proto
|
||||
npx pbts --main --out ./gamehall.d.ts ./gamehall.js
|
||||
|
||||
cp ./gamehall.d.ts ./gamehall.js $CCC_CLIENT_DIR/vietnam/assets/ScriptCore/protocol
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# 将chesstitians目录拷贝到client工程目录下的protocol文件夹
|
||||
echo WIN88_DIR=$WIN88_DIR
|
||||
echo CCC_CLIENT_DIR=$CCC_CLIENT_DIR
|
||||
cp -R $WIN88_DIR/protocol/gamehall $CCC_CLIENT_DIR/protocol
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# 将chesstitians目录拷贝到client工程目录下的protocol文件夹
|
||||
echo WIN88_DIR=$WIN88_DIR
|
||||
echo CCC_CLIENT_DIR=$CCC_CLIENT_DIR
|
||||
cp -R $CCC_CLIENT_DIR/protocol/gamehall $WIN88_DIR/protocol
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -108,6 +108,7 @@ enum SSPacketID {
|
|||
PACKET_GW_ADDSINGLEADJUST = 1551;
|
||||
PACKET_WG_BUYRECTIMEITEM = 1552;
|
||||
PACKET_WG_UpdateSkin = 1553; // 修改皮肤id
|
||||
PACKET_PlayerChangeItems = 1554; // 修改玩家道具数量
|
||||
}
|
||||
|
||||
//PACKET_SG_BINDGROUPTAG
|
||||
|
|
@ -161,32 +162,49 @@ message ServerNotice {
|
|||
string Text = 1;
|
||||
}
|
||||
|
||||
message Item {
|
||||
int32 Id = 1;
|
||||
int64 Num = 2;
|
||||
}
|
||||
|
||||
message CustomParam {
|
||||
int32 RoomTypeId = 1; // 房间类型id
|
||||
int32 RoomConfigId = 2; // 房间配置id
|
||||
int32 CostType = 3; // 房卡场付费方式 1房主 2AA
|
||||
string Password = 4; // 房间密码
|
||||
int32 Voice = 5; // 是否开启语音 1开启 2关闭
|
||||
}
|
||||
|
||||
message MatchParam {
|
||||
int64 MatchSortId = 1; // 比赛实例id
|
||||
int32 MatchId = 2; // 比赛配置id
|
||||
bool IsFinals = 3; // 是否决赛
|
||||
int32 CurrRound = 4; // 当前第几轮
|
||||
int32 CurrPlayerNum = 5; // 本轮玩家数
|
||||
int32 NextPlayerNum = 6; // 下轮最大玩家数
|
||||
int32 MatchType = 7; // 比赛类型
|
||||
}
|
||||
|
||||
//PACKET_WG_CREATESCENE
|
||||
message WGCreateScene {
|
||||
int32 SceneId = 1;
|
||||
int32 GameId = 2;
|
||||
int32 GameMode = 3;
|
||||
repeated int64 Params = 4;
|
||||
int32 Creator = 5;
|
||||
int32 Agentor = 6;
|
||||
string ReplayCode = 7;
|
||||
repeated int32 ParamsEx = 8;
|
||||
int32 SceneMode = 9;
|
||||
int32 HallId = 10;
|
||||
string Platform = 11;
|
||||
DB_GameFree DBGameFree = 12;
|
||||
int32 GroupId = 13;
|
||||
bool EnterAfterStart = 14;
|
||||
int32 TotalOfGames = 15;
|
||||
int32 Club = 16; //俱乐部Id
|
||||
string ClubRoomId = 17;
|
||||
int32 ClubRoomPos = 18;
|
||||
int32 ClubRate = 19;
|
||||
int32 BaseScore = 20;
|
||||
int32 PlayerNum = 21;
|
||||
bool RealCtrl = 22;
|
||||
repeated int32 ChessRank = 23;
|
||||
int32 MatchInfoId = 24;
|
||||
string Platform = 1; // 平台
|
||||
int32 SceneId = 2; // 房间id
|
||||
int32 GameId = 3; // 游戏id
|
||||
int32 GameMode = 4; // 废弃,游戏模式
|
||||
int32 SceneMode = 5; // 房间模式
|
||||
string ReplayCode = 6; // 回放码
|
||||
DB_GameFree DBGameFree = 7; // 场次配置
|
||||
int32 TotalOfGames = 8; // 总局数
|
||||
int32 PlayerNum = 9; // 最大玩家数
|
||||
bool EnterAfterStart = 10; // 是否开始后可加入
|
||||
int32 Creator = 11; // 创建者id
|
||||
int32 BaseScore = 12; // 底分
|
||||
repeated Item Items = 13; // 获得道具
|
||||
repeated Item CostItems = 14; // 消耗道具
|
||||
CustomParam Custom = 15; // 房卡场参数
|
||||
MatchParam Match = 16; // 比赛场参数
|
||||
repeated int32 ChessRank = 26; // 象棋段位配置
|
||||
repeated int64 Params = 27; // 游戏参数,GameRule中定义,不要有其他用途,含义不明确
|
||||
}
|
||||
|
||||
//PACKET_WG_DESTROYSCENE
|
||||
|
|
@ -440,8 +458,7 @@ message GWFishRecord {
|
|||
//PACKET_GW_SCENESTATE
|
||||
message GWSceneState {
|
||||
int32 RoomId = 1;
|
||||
int32 CurrState = 2;
|
||||
int32 Fishing = 3;
|
||||
int32 RoomState = 2;
|
||||
}
|
||||
|
||||
//PACKET_WR_INVITEROBOT
|
||||
|
|
@ -1000,4 +1017,10 @@ message WGBuyRecTimeItem{
|
|||
message WGUpdateSkin{
|
||||
int32 SnId = 1;
|
||||
int32 Id = 2; // 皮肤id
|
||||
}
|
||||
|
||||
// PACKET_PlayerChangeItems
|
||||
message PlayerChangeItems{
|
||||
int32 SnId = 1;
|
||||
repeated Item Items = 2; // 道具变化数量
|
||||
}
|
||||
|
|
@ -93,6 +93,7 @@ const (
|
|||
TienLenPacketID_PACKET_SCTienLenThinkLongCnt TienLenPacketID = 5385 // 长考次数
|
||||
TienLenPacketID_PACKET_SCTienLenFirstGiveItemItem TienLenPacketID = 5386 // 第一次赠送记牌器道具
|
||||
TienLenPacketID_PACKET_SCTienLenPetSkillRes TienLenPacketID = 5387 //宠物技能
|
||||
TienLenPacketID_PACKET_SCTienLenCycleBilled TienLenPacketID = 5388 // 大结算
|
||||
)
|
||||
|
||||
// Enum value maps for TienLenPacketID.
|
||||
|
|
@ -117,6 +118,7 @@ var (
|
|||
5385: "PACKET_SCTienLenThinkLongCnt",
|
||||
5386: "PACKET_SCTienLenFirstGiveItemItem",
|
||||
5387: "PACKET_SCTienLenPetSkillRes",
|
||||
5388: "PACKET_SCTienLenCycleBilled",
|
||||
}
|
||||
TienLenPacketID_value = map[string]int32{
|
||||
"PACKET_TienLenZERO": 0,
|
||||
|
|
@ -138,6 +140,7 @@ var (
|
|||
"PACKET_SCTienLenThinkLongCnt": 5385,
|
||||
"PACKET_SCTienLenFirstGiveItemItem": 5386,
|
||||
"PACKET_SCTienLenPetSkillRes": 5387,
|
||||
"PACKET_SCTienLenCycleBilled": 5388,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -652,6 +655,13 @@ type SCTienLenRoomInfo struct {
|
|||
IsOutRecord bool `protobuf:"varint,31,opt,name=IsOutRecord,proto3" json:"IsOutRecord,omitempty"` //是否能用记牌器
|
||||
ItemRecExpireTime int64 `protobuf:"varint,32,opt,name=ItemRecExpireTime,proto3" json:"ItemRecExpireTime,omitempty"` //记牌器到期时间
|
||||
TMInfoId int32 `protobuf:"varint,33,opt,name=TMInfoId,proto3" json:"TMInfoId,omitempty"` //比赛配置ID
|
||||
// 房卡场配置
|
||||
RoomTypeId int32 `protobuf:"varint,34,opt,name=RoomTypeId,proto3" json:"RoomTypeId,omitempty"` //房间类型id
|
||||
RoomConfigId int32 `protobuf:"varint,35,opt,name=RoomConfigId,proto3" json:"RoomConfigId,omitempty"` //房间配置id
|
||||
NeedPassword int32 `protobuf:"varint,36,opt,name=NeedPassword,proto3" json:"NeedPassword,omitempty"` //是否需要密码 1需要
|
||||
CostType int32 `protobuf:"varint,37,opt,name=CostType,proto3" json:"CostType,omitempty"` //房卡支付方式 1AA 2房主
|
||||
Voice int32 `protobuf:"varint,38,opt,name=Voice,proto3" json:"Voice,omitempty"` //是否开启语音 1开启
|
||||
Password string `protobuf:"bytes,39,opt,name=Password,proto3" json:"Password,omitempty"` //房间密码
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) Reset() {
|
||||
|
|
@ -896,6 +906,48 @@ func (x *SCTienLenRoomInfo) GetTMInfoId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) GetRoomTypeId() int32 {
|
||||
if x != nil {
|
||||
return x.RoomTypeId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) GetRoomConfigId() int32 {
|
||||
if x != nil {
|
||||
return x.RoomConfigId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) GetNeedPassword() int32 {
|
||||
if x != nil {
|
||||
return x.NeedPassword
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) GetCostType() int32 {
|
||||
if x != nil {
|
||||
return x.CostType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) GetVoice() int32 {
|
||||
if x != nil {
|
||||
return x.Voice
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SCTienLenRoomInfo) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
//房间状态更新
|
||||
type SCTienLenRoomState struct {
|
||||
state protoimpl.MessageState
|
||||
|
|
@ -2299,6 +2351,188 @@ func (x *SCTienLenPetSkillRes) GetPetSkillRes() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
type ItemInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // 道具ID
|
||||
Num int64 `protobuf:"varint,2,opt,name=Num,proto3" json:"Num,omitempty"` // 道具数量
|
||||
}
|
||||
|
||||
func (x *ItemInfo) Reset() {
|
||||
*x = ItemInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tienlen_proto_msgTypes[24]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ItemInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ItemInfo) ProtoMessage() {}
|
||||
|
||||
func (x *ItemInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tienlen_proto_msgTypes[24]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ItemInfo.ProtoReflect.Descriptor instead.
|
||||
func (*ItemInfo) Descriptor() ([]byte, []int) {
|
||||
return file_tienlen_proto_rawDescGZIP(), []int{24}
|
||||
}
|
||||
|
||||
func (x *ItemInfo) GetId() int32 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ItemInfo) GetNum() int64 {
|
||||
if x != nil {
|
||||
return x.Num
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type TienLenCycleBilledInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
SnId int32 `protobuf:"varint,1,opt,name=SnId,proto3" json:"SnId,omitempty"` // 玩家ID
|
||||
RoundScore []int64 `protobuf:"varint,2,rep,packed,name=RoundScore,proto3" json:"RoundScore,omitempty"` // 每轮得分
|
||||
Score int64 `protobuf:"varint,3,opt,name=Score,proto3" json:"Score,omitempty"` // 基础分
|
||||
Award []*ItemInfo `protobuf:"bytes,4,rep,name=Award,proto3" json:"Award,omitempty"` // 奖励道具
|
||||
TotalScore int64 `protobuf:"varint,5,opt,name=TotalScore,proto3" json:"TotalScore,omitempty"` // 总分
|
||||
}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) Reset() {
|
||||
*x = TienLenCycleBilledInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tienlen_proto_msgTypes[25]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TienLenCycleBilledInfo) ProtoMessage() {}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tienlen_proto_msgTypes[25]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TienLenCycleBilledInfo.ProtoReflect.Descriptor instead.
|
||||
func (*TienLenCycleBilledInfo) Descriptor() ([]byte, []int) {
|
||||
return file_tienlen_proto_rawDescGZIP(), []int{25}
|
||||
}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) GetSnId() int32 {
|
||||
if x != nil {
|
||||
return x.SnId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) GetRoundScore() []int64 {
|
||||
if x != nil {
|
||||
return x.RoundScore
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) GetScore() int64 {
|
||||
if x != nil {
|
||||
return x.Score
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) GetAward() []*ItemInfo {
|
||||
if x != nil {
|
||||
return x.Award
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *TienLenCycleBilledInfo) GetTotalScore() int64 {
|
||||
if x != nil {
|
||||
return x.TotalScore
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// PACKET_SCTienLenCycleBilled
|
||||
type SCTienLenCycleBilled struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
List []*TienLenCycleBilledInfo `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SCTienLenCycleBilled) Reset() {
|
||||
*x = SCTienLenCycleBilled{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_tienlen_proto_msgTypes[26]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SCTienLenCycleBilled) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SCTienLenCycleBilled) ProtoMessage() {}
|
||||
|
||||
func (x *SCTienLenCycleBilled) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_tienlen_proto_msgTypes[26]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SCTienLenCycleBilled.ProtoReflect.Descriptor instead.
|
||||
func (*SCTienLenCycleBilled) Descriptor() ([]byte, []int) {
|
||||
return file_tienlen_proto_rawDescGZIP(), []int{26}
|
||||
}
|
||||
|
||||
func (x *SCTienLenCycleBilled) GetList() []*TienLenCycleBilledInfo {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_tienlen_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_tienlen_proto_rawDesc = []byte{
|
||||
|
|
@ -2373,7 +2607,7 @@ var file_tienlen_proto_rawDesc = []byte{
|
|||
0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x4c, 0x65,
|
||||
0x76, 0x65, 0x6c, 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, 0xc7, 0x07, 0x0a, 0x11, 0x53, 0x43, 0x54,
|
||||
0x05, 0x52, 0x05, 0x43, 0x61, 0x72, 0x64, 0x73, 0x22, 0xfd, 0x08, 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,
|
||||
|
|
@ -2434,241 +2668,273 @@ var file_tienlen_proto_rawDesc = []byte{
|
|||
0x01, 0x28, 0x03, 0x52, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x63, 0x45, 0x78, 0x70, 0x69,
|
||||
0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x49, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x54, 0x4d, 0x49, 0x6e, 0x66, 0x6f,
|
||||
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, 0x5b, 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, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x63,
|
||||
0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x49, 0x73, 0x4f, 0x75, 0x74,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 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, 0x22, 0x68, 0x0a,
|
||||
0x20, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
|
||||
0x46, 0x69, 0x72, 0x73, 0x74, 0x47, 0x69, 0x76, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x52, 0x65, 0x63, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x63, 0x45, 0x78, 0x70,
|
||||
0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x14, 0x53, 0x43, 0x54, 0x69, 0x65,
|
||||
0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53,
|
||||
0x6e, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x03, 0x50, 0x6f, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c,
|
||||
0x6c, 0x52, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x50, 0x65, 0x74, 0x53,
|
||||
0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 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, 0x80, 0x05, 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,
|
||||
0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64,
|
||||
0x18, 0x22, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65,
|
||||
0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x49, 0x64, 0x18, 0x23, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x4e, 0x65, 0x65, 0x64, 0x50, 0x61,
|
||||
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x24, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x4e, 0x65,
|
||||
0x65, 0x64, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f,
|
||||
0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f,
|
||||
0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x18,
|
||||
0x26, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x50, 0x61, 0x73, 0x73, 0x77, 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, 0x5b, 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, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x73,
|
||||
0x4f, 0x75, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x0b, 0x49, 0x73, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x53, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64,
|
||||
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, 0x10, 0x84, 0x2a, 0x12, 0x26, 0x0a, 0x21,
|
||||
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, 0x22, 0x68, 0x0a, 0x20, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e,
|
||||
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x46, 0x69, 0x72, 0x73, 0x74, 0x47, 0x69, 0x76, 0x65, 0x49,
|
||||
0x74, 0x65, 0x6d, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12,
|
||||
0x2c, 0x0a, 0x11, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x63, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65,
|
||||
0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x52, 0x65, 0x63, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x5e, 0x0a,
|
||||
0x14, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x65, 0x74, 0x53, 0x6b, 0x69,
|
||||
0x6c, 0x6c, 0x52, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x50,
|
||||
0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0b, 0x50, 0x65, 0x74, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x22, 0x2c, 0x0a,
|
||||
0x08, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0xab, 0x01, 0x0a, 0x16,
|
||||
0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x42, 0x69, 0x6c, 0x6c,
|
||||
0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x6f,
|
||||
0x75, 0x6e, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a,
|
||||
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63,
|
||||
0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65,
|
||||
0x12, 0x27, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x11, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x54, 0x6f, 0x74,
|
||||
0x61, 0x6c, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x54,
|
||||
0x6f, 0x74, 0x61, 0x6c, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x4b, 0x0a, 0x14, 0x53, 0x43, 0x54,
|
||||
0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65,
|
||||
0x64, 0x12, 0x33, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x1f, 0x2e, 0x74, 0x69, 0x65, 0x6e, 0x6c, 0x65, 0x6e, 0x2e, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65,
|
||||
0x6e, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x52, 0x04, 0x4c, 0x69, 0x73, 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, 0xa2, 0x05, 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,
|
||||
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, 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,
|
||||
0x12, 0x26, 0x0a, 0x21, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65,
|
||||
0x6e, 0x4c, 0x65, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x47, 0x69, 0x76, 0x65, 0x49, 0x74, 0x65,
|
||||
0x6d, 0x49, 0x74, 0x65, 0x6d, 0x10, 0x8a, 0x2a, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b,
|
||||
0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x65, 0x74, 0x53,
|
||||
0x6b, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x10, 0x8b, 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,
|
||||
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, 0x12,
|
||||
0x26, 0x0a, 0x21, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e,
|
||||
0x4c, 0x65, 0x6e, 0x46, 0x69, 0x72, 0x73, 0x74, 0x47, 0x69, 0x76, 0x65, 0x49, 0x74, 0x65, 0x6d,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x10, 0x8a, 0x2a, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43, 0x4b, 0x45,
|
||||
0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x50, 0x65, 0x74, 0x53, 0x6b,
|
||||
0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x10, 0x8b, 0x2a, 0x12, 0x20, 0x0a, 0x1b, 0x50, 0x41, 0x43,
|
||||
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x43, 0x54, 0x69, 0x65, 0x6e, 0x4c, 0x65, 0x6e, 0x43, 0x79, 0x63,
|
||||
0x6c, 0x65, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x10, 0x8c, 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 (
|
||||
|
|
@ -2684,7 +2950,7 @@ func file_tienlen_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_tienlen_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_tienlen_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
|
||||
var file_tienlen_proto_msgTypes = make([]protoimpl.MessageInfo, 29)
|
||||
var file_tienlen_proto_goTypes = []interface{}{
|
||||
(OpResultCode)(0), // 0: tienlen.OpResultCode
|
||||
(TienLenPacketID)(0), // 1: tienlen.TienLenPacketID
|
||||
|
|
@ -2712,11 +2978,14 @@ var file_tienlen_proto_goTypes = []interface{}{
|
|||
(*SCTienLenPlayerThinkLongCnt)(nil), // 23: tienlen.SCTienLenPlayerThinkLongCnt
|
||||
(*SCTienLenPlayerFirstGiveItemItem)(nil), // 24: tienlen.SCTienLenPlayerFirstGiveItemItem
|
||||
(*SCTienLenPetSkillRes)(nil), // 25: tienlen.SCTienLenPetSkillRes
|
||||
nil, // 26: tienlen.TienLenPlayerData.ItemsEntry
|
||||
nil, // 27: tienlen.SCTienLenCardTest.GradesEntry
|
||||
(*ItemInfo)(nil), // 26: tienlen.ItemInfo
|
||||
(*TienLenCycleBilledInfo)(nil), // 27: tienlen.TienLenCycleBilledInfo
|
||||
(*SCTienLenCycleBilled)(nil), // 28: tienlen.SCTienLenCycleBilled
|
||||
nil, // 29: tienlen.TienLenPlayerData.ItemsEntry
|
||||
nil, // 30: tienlen.SCTienLenCardTest.GradesEntry
|
||||
}
|
||||
var file_tienlen_proto_depIdxs = []int32{
|
||||
26, // 0: tienlen.TienLenPlayerData.Items:type_name -> tienlen.TienLenPlayerData.ItemsEntry
|
||||
29, // 0: tienlen.TienLenPlayerData.Items:type_name -> tienlen.TienLenPlayerData.ItemsEntry
|
||||
3, // 1: tienlen.TienLenPlayerData.SkillInfo:type_name -> tienlen.PetSkillInfo
|
||||
4, // 2: tienlen.PetSkillInfo.SkillData:type_name -> tienlen.SkillInfo
|
||||
2, // 3: tienlen.SCTienLenRoomInfo.Players:type_name -> tienlen.TienLenPlayerData
|
||||
|
|
@ -2725,12 +2994,14 @@ var file_tienlen_proto_depIdxs = []int32{
|
|||
2, // 6: tienlen.SCTienLenPlayerEnter.Data:type_name -> tienlen.TienLenPlayerData
|
||||
12, // 7: tienlen.TienLenPlayerGameBilled.AddItems:type_name -> tienlen.AddItem
|
||||
13, // 8: tienlen.SCTienLenGameBilled.Datas:type_name -> tienlen.TienLenPlayerGameBilled
|
||||
27, // 9: tienlen.SCTienLenCardTest.Grades:type_name -> tienlen.SCTienLenCardTest.GradesEntry
|
||||
10, // [10:10] is the sub-list for method output_type
|
||||
10, // [10:10] is the sub-list for method input_type
|
||||
10, // [10:10] is the sub-list for extension type_name
|
||||
10, // [10:10] is the sub-list for extension extendee
|
||||
0, // [0:10] is the sub-list for field type_name
|
||||
30, // 9: tienlen.SCTienLenCardTest.Grades:type_name -> tienlen.SCTienLenCardTest.GradesEntry
|
||||
26, // 10: tienlen.TienLenCycleBilledInfo.Award:type_name -> tienlen.ItemInfo
|
||||
27, // 11: tienlen.SCTienLenCycleBilled.List:type_name -> tienlen.TienLenCycleBilledInfo
|
||||
12, // [12:12] is the sub-list for method output_type
|
||||
12, // [12:12] is the sub-list for method input_type
|
||||
12, // [12:12] is the sub-list for extension type_name
|
||||
12, // [12:12] is the sub-list for extension extendee
|
||||
0, // [0:12] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_tienlen_proto_init() }
|
||||
|
|
@ -3027,6 +3298,42 @@ func file_tienlen_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_tienlen_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ItemInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_tienlen_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TienLenCycleBilledInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_tienlen_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SCTienLenCycleBilled); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
|
@ -3034,7 +3341,7 @@ func file_tienlen_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_tienlen_proto_rawDesc,
|
||||
NumEnums: 2,
|
||||
NumMessages: 26,
|
||||
NumMessages: 29,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ enum TienLenPacketID {
|
|||
PACKET_SCTienLenCardTest = 5384;//测试数据
|
||||
PACKET_SCTienLenThinkLongCnt = 5385; // 长考次数
|
||||
PACKET_SCTienLenFirstGiveItemItem = 5386; // 第一次赠送记牌器道具
|
||||
PACKET_SCTienLenPetSkillRes = 5387; //宠物技能
|
||||
PACKET_SCTienLenPetSkillRes = 5387; //宠物技能
|
||||
PACKET_SCTienLenCycleBilled = 5388; // 大结算
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -117,6 +118,14 @@ message SCTienLenRoomInfo {
|
|||
bool IsOutRecord = 31;//是否能用记牌器
|
||||
int64 ItemRecExpireTime = 32; //记牌器到期时间
|
||||
int32 TMInfoId = 33; //比赛配置ID
|
||||
// 房卡场配置
|
||||
int32 RoomTypeId = 34; //房间类型id
|
||||
int32 RoomConfigId = 35; //房间配置id
|
||||
int32 NeedPassword = 36; //是否需要密码 1需要
|
||||
int32 CostType = 37; //房卡支付方式 1AA 2房主
|
||||
int32 Voice = 38; //是否开启语音 1开启
|
||||
string Password = 39; //房间密码
|
||||
// 房卡场配置
|
||||
}
|
||||
|
||||
//房间状态更新
|
||||
|
|
@ -266,4 +275,22 @@ message SCTienLenPetSkillRes{
|
|||
int32 Snid = 1;
|
||||
int32 Pos = 2;
|
||||
bool PetSkillRes = 3; //true生效
|
||||
}
|
||||
|
||||
message ItemInfo {
|
||||
int32 Id = 1; // 道具ID
|
||||
int64 Num = 2; // 道具数量
|
||||
}
|
||||
|
||||
message TienLenCycleBilledInfo {
|
||||
int32 SnId = 1; // 玩家ID
|
||||
repeated int64 RoundScore = 2; // 每轮得分
|
||||
int64 Score = 3; // 基础分
|
||||
repeated ItemInfo Award = 4; // 奖励道具
|
||||
int64 TotalScore = 5; // 总分
|
||||
}
|
||||
|
||||
// PACKET_SCTienLenCycleBilled
|
||||
message SCTienLenCycleBilled {
|
||||
repeated TienLenCycleBilledInfo List = 1;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -225,12 +225,12 @@ message ModInfo {
|
|||
|
||||
message RoomInfo{
|
||||
string Platform = 1;
|
||||
int32 SceneId = 2;//场景id
|
||||
int32 SceneId = 2;//房间id
|
||||
int32 GameId = 3;//游戏id
|
||||
int32 GameMode = 4;//游戏模式
|
||||
int32 SceneMode = 5;//房间模式,参考common.SceneMode_XXX
|
||||
int32 GroupId = 6;//组id
|
||||
int32 GameFreeId = 7;
|
||||
int32 GameFreeId = 7; // 场次id
|
||||
int32 SrvId = 8;//服务器id
|
||||
int32 Creator = 9;//创建者账号id
|
||||
int32 Agentor = 10;//代理者id
|
||||
|
|
@ -242,7 +242,14 @@ message RoomInfo{
|
|||
int32 Start = 16;//0.等待 1.游戏中
|
||||
int64 CreateTime = 17;//创建时间
|
||||
int32 BaseScore = 18;//底分
|
||||
int32 RoomConfigId = 19;//房间配置id
|
||||
int32 CurrRound = 20;//当前局数
|
||||
int32 MaxRound = 21;//最大局数
|
||||
string Password = 22;// 密码
|
||||
int32 CostType = 23;// 付费方式 1房主 2AA
|
||||
int32 Voice = 24;// 语音开关 1开启
|
||||
}
|
||||
|
||||
message PlayerSingleAdjust{
|
||||
string Id = 1;
|
||||
string Platform = 2;
|
||||
|
|
@ -904,4 +911,33 @@ message SpiritConfig {
|
|||
string Platform = 1; // 平台
|
||||
int32 On = 2; // 精灵开关 1开启 2关闭
|
||||
string Url = 3;
|
||||
}
|
||||
|
||||
// etcd /game/room_type
|
||||
message RoomType {
|
||||
string Platform = 1; // 平台
|
||||
int32 Id = 2; // 配置ID
|
||||
string Name = 3; // 类型名称
|
||||
int32 On = 4; // 开关 1开启 2关闭
|
||||
int32 SortId = 5; // 排序ID
|
||||
}
|
||||
|
||||
// etcd /game/room_config
|
||||
message RoomConfig {
|
||||
string Platform = 1; // 平台
|
||||
int32 Id = 2; // 配置id
|
||||
string Name = 3; // 配置名称
|
||||
int32 RoomType = 4; // 房间类型id
|
||||
int32 On = 5; // 开关 1开启 2关闭
|
||||
int32 SortId = 6; // 排序ID
|
||||
repeated ItemInfo Cost = 7; // 进入房间消耗
|
||||
repeated ItemInfo Reward = 8; // 进入房间奖励
|
||||
repeated string OnChannelName = 9; // 开启的渠道名称
|
||||
repeated int32 GameFreeId = 10; // 场次id
|
||||
repeated int32 Round = 11; // 局数
|
||||
repeated int32 PlayerNum = 12; // 人数
|
||||
int32 NeedPassword = 13; // 是否需要密码 1是 2否 3自定义
|
||||
int32 CostType = 14; // 消耗类型 1AA 2房主 3自定义
|
||||
int32 Voice = 15; // 是否开启语音 1是 2否 3自定义
|
||||
string ImageURI = 16; // 奖励图片
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@ const (
|
|||
TagCode_TelExist TagCode = 9 // 手机号已存在
|
||||
TagCode_AccountNotFound TagCode = 10 // 账号未找到
|
||||
TagCode_TelNotBind TagCode = 11 // 手机号未绑定
|
||||
TagCode_NotFound TagCode = 12 // 未找到
|
||||
)
|
||||
|
||||
// Enum value maps for TagCode.
|
||||
|
|
@ -54,6 +55,7 @@ var (
|
|||
9: "TelExist",
|
||||
10: "AccountNotFound",
|
||||
11: "TelNotBind",
|
||||
12: "NotFound",
|
||||
}
|
||||
TagCode_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
|
|
@ -68,6 +70,7 @@ var (
|
|||
"TelExist": 9,
|
||||
"AccountNotFound": 10,
|
||||
"TelNotBind": 11,
|
||||
"NotFound": 12,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -1804,17 +1807,19 @@ type ASListRoom struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"`
|
||||
GameId int32 `protobuf:"varint,2,opt,name=GameId,proto3" json:"GameId,omitempty"`
|
||||
GameMode int32 `protobuf:"varint,3,opt,name=GameMode,proto3" json:"GameMode,omitempty"`
|
||||
GroupId int32 `protobuf:"varint,4,opt,name=GroupId,proto3" json:"GroupId,omitempty"`
|
||||
SnId int32 `protobuf:"varint,5,opt,name=SnId,proto3" json:"SnId,omitempty"`
|
||||
SceneId int32 `protobuf:"varint,6,opt,name=SceneId,proto3" json:"SceneId,omitempty"`
|
||||
PageNo int32 `protobuf:"varint,7,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,8,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
|
||||
ClubId int32 `protobuf:"varint,9,opt,name=ClubId,proto3" json:"ClubId,omitempty"`
|
||||
RoomType int32 `protobuf:"varint,10,opt,name=RoomType,proto3" json:"RoomType,omitempty"` //roomType=0所有房间,roomType=1俱乐部房间,roomType=2个人房间
|
||||
GamefreeId int32 `protobuf:"varint,11,opt,name=GamefreeId,proto3" json:"GamefreeId,omitempty"`
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"`
|
||||
GameId int32 `protobuf:"varint,2,opt,name=GameId,proto3" json:"GameId,omitempty"`
|
||||
GameMode int32 `protobuf:"varint,3,opt,name=GameMode,proto3" json:"GameMode,omitempty"`
|
||||
GroupId int32 `protobuf:"varint,4,opt,name=GroupId,proto3" json:"GroupId,omitempty"`
|
||||
SnId int32 `protobuf:"varint,5,opt,name=SnId,proto3" json:"SnId,omitempty"`
|
||||
SceneId int32 `protobuf:"varint,6,opt,name=SceneId,proto3" json:"SceneId,omitempty"`
|
||||
PageNo int32 `protobuf:"varint,7,opt,name=PageNo,proto3" json:"PageNo,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,8,opt,name=PageSize,proto3" json:"PageSize,omitempty"`
|
||||
ClubId int32 `protobuf:"varint,9,opt,name=ClubId,proto3" json:"ClubId,omitempty"`
|
||||
RoomType int32 `protobuf:"varint,10,opt,name=RoomType,proto3" json:"RoomType,omitempty"` //roomType=0所有房间,roomType=1俱乐部房间,roomType=2个人房间
|
||||
GamefreeId int32 `protobuf:"varint,11,opt,name=GamefreeId,proto3" json:"GamefreeId,omitempty"`
|
||||
IsCustom int32 `protobuf:"varint,12,opt,name=IsCustom,proto3" json:"IsCustom,omitempty"` // 房卡场 1是
|
||||
RoomConfigId int32 `protobuf:"varint,13,opt,name=RoomConfigId,proto3" json:"RoomConfigId,omitempty"` // 房间玩法id
|
||||
}
|
||||
|
||||
func (x *ASListRoom) Reset() {
|
||||
|
|
@ -1926,6 +1931,20 @@ func (x *ASListRoom) GetGamefreeId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (x *ASListRoom) GetIsCustom() int32 {
|
||||
if x != nil {
|
||||
return x.IsCustom
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ASListRoom) GetRoomConfigId() int32 {
|
||||
if x != nil {
|
||||
return x.RoomConfigId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SAListRoom struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
@ -9153,6 +9172,196 @@ func (x *WindowsInfo) GetGainNum() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// 获取对局详情 /api/game/room_info
|
||||
type ASRoomInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
RoomId int32 `protobuf:"varint,1,opt,name=RoomId,proto3" json:"RoomId,omitempty"` // 房间id
|
||||
}
|
||||
|
||||
func (x *ASRoomInfo) Reset() {
|
||||
*x = ASRoomInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[134]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ASRoomInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ASRoomInfo) ProtoMessage() {}
|
||||
|
||||
func (x *ASRoomInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[134]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ASRoomInfo.ProtoReflect.Descriptor instead.
|
||||
func (*ASRoomInfo) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{134}
|
||||
}
|
||||
|
||||
func (x *ASRoomInfo) GetRoomId() int32 {
|
||||
if x != nil {
|
||||
return x.RoomId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type RoundInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Round int32 `protobuf:"varint,1,opt,name=Round,proto3" json:"Round,omitempty"` //局数
|
||||
Ts int64 `protobuf:"varint,2,opt,name=Ts,proto3" json:"Ts,omitempty"` //结束时间
|
||||
Score []int64 `protobuf:"varint,3,rep,packed,name=Score,proto3" json:"Score,omitempty"` //分数
|
||||
LogId string `protobuf:"bytes,4,opt,name=LogId,proto3" json:"LogId,omitempty"` // 牌局记录id
|
||||
}
|
||||
|
||||
func (x *RoundInfo) Reset() {
|
||||
*x = RoundInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[135]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RoundInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RoundInfo) ProtoMessage() {}
|
||||
|
||||
func (x *RoundInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[135]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RoundInfo.ProtoReflect.Descriptor instead.
|
||||
func (*RoundInfo) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{135}
|
||||
}
|
||||
|
||||
func (x *RoundInfo) GetRound() int32 {
|
||||
if x != nil {
|
||||
return x.Round
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RoundInfo) GetTs() int64 {
|
||||
if x != nil {
|
||||
return x.Ts
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *RoundInfo) GetScore() []int64 {
|
||||
if x != nil {
|
||||
return x.Score
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RoundInfo) GetLogId() string {
|
||||
if x != nil {
|
||||
return x.LogId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SARoomInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tag TagCode `protobuf:"varint,1,opt,name=Tag,proto3,enum=webapi.TagCode" json:"Tag,omitempty"` //错误码
|
||||
Msg string `protobuf:"bytes,2,opt,name=Msg,proto3" json:"Msg,omitempty"` //错误信息
|
||||
SnId []int32 `protobuf:"varint,3,rep,packed,name=SnId,proto3" json:"SnId,omitempty"` // 玩家id
|
||||
List []*RoundInfo `protobuf:"bytes,4,rep,name=List,proto3" json:"List,omitempty"` // 每局结算
|
||||
}
|
||||
|
||||
func (x *SARoomInfo) Reset() {
|
||||
*x = SARoomInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_webapi_proto_msgTypes[136]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SARoomInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SARoomInfo) ProtoMessage() {}
|
||||
|
||||
func (x *SARoomInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_webapi_proto_msgTypes[136]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SARoomInfo.ProtoReflect.Descriptor instead.
|
||||
func (*SARoomInfo) Descriptor() ([]byte, []int) {
|
||||
return file_webapi_proto_rawDescGZIP(), []int{136}
|
||||
}
|
||||
|
||||
func (x *SARoomInfo) GetTag() TagCode {
|
||||
if x != nil {
|
||||
return x.Tag
|
||||
}
|
||||
return TagCode_UNKNOWN
|
||||
}
|
||||
|
||||
func (x *SARoomInfo) GetMsg() string {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SARoomInfo) GetSnId() []int32 {
|
||||
if x != nil {
|
||||
return x.SnId
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SARoomInfo) GetList() []*RoundInfo {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_webapi_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_webapi_proto_rawDesc = []byte{
|
||||
|
|
@ -9344,7 +9553,7 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x65, 0x62,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x43, 0x6f, 0x69, 0x6e, 0x50, 0x6f, 0x6f, 0x6c,
|
||||
0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xac, 0x02, 0x0a, 0x0a, 0x41,
|
||||
0x53, 0x74, 0x61, 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xec, 0x02, 0x0a, 0x0a, 0x41,
|
||||
0x53, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61,
|
||||
0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18,
|
||||
|
|
@ -9363,7 +9572,11 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d,
|
||||
0x65, 0x66, 0x72, 0x65, 0x65, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x47,
|
||||
0x61, 0x6d, 0x65, 0x66, 0x72, 0x65, 0x65, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x0a, 0x53, 0x41,
|
||||
0x61, 0x6d, 0x65, 0x66, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x73, 0x43,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x49, 0x73, 0x43,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x52, 0x6f, 0x6f,
|
||||
0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x0a, 0x53, 0x41,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54,
|
||||
0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54, 0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d,
|
||||
|
|
@ -10141,23 +10354,40 @@ var file_webapi_proto_rawDesc = []byte{
|
|||
0x28, 0x05, 0x52, 0x04, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x72, 0x74,
|
||||
0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x50, 0x61, 0x72, 0x74, 0x4e,
|
||||
0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x61, 0x69, 0x6e, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x61, 0x69, 0x6e, 0x4e, 0x75, 0x6d, 0x2a, 0xce, 0x01, 0x0a,
|
||||
0x07, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
|
||||
0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53,
|
||||
0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e,
|
||||
0x0a, 0x0a, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x14,
|
||||
0x0a, 0x10, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52,
|
||||
0x4f, 0x52, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x44, 0x41, 0x54, 0x41,
|
||||
0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f,
|
||||
0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x50, 0x6c, 0x61, 0x79, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x07, 0x12,
|
||||
0x09, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x65,
|
||||
0x6c, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0a, 0x12, 0x0e, 0x0a,
|
||||
0x0a, 0x54, 0x65, 0x6c, 0x4e, 0x6f, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x0b, 0x42, 0x26, 0x5a,
|
||||
0x24, 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, 0x77,
|
||||
0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x61, 0x69, 0x6e, 0x4e, 0x75, 0x6d, 0x22, 0x24, 0x0a, 0x0a,
|
||||
0x41, 0x53, 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, 0x22, 0x5d, 0x0a, 0x09, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
|
||||
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x54, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x54, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03,
|
||||
0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4c,
|
||||
0x6f, 0x67, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4c, 0x6f, 0x67, 0x49,
|
||||
0x64, 0x22, 0x7c, 0x0a, 0x0a, 0x53, 0x41, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x21, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x77,
|
||||
0x65, 0x62, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x03, 0x54,
|
||||
0x61, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x03,
|
||||
0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x52, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x2a,
|
||||
0xdc, 0x01, 0x0a, 0x07, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55,
|
||||
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43,
|
||||
0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10,
|
||||
0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10,
|
||||
0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f,
|
||||
0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4a, 0x59, 0x42, 0x5f, 0x44,
|
||||
0x41, 0x54, 0x41, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x4a,
|
||||
0x59, 0x42, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x45, 0x58, 0x49, 0x53, 0x54, 0x10, 0x06, 0x12,
|
||||
0x11, 0x0a, 0x0d, 0x50, 0x6c, 0x61, 0x79, 0x5f, 0x4e, 0x6f, 0x74, 0x45, 0x58, 0x49, 0x53, 0x54,
|
||||
0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0x08, 0x12, 0x0c, 0x0a,
|
||||
0x08, 0x54, 0x65, 0x6c, 0x45, 0x78, 0x69, 0x73, 0x74, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0a,
|
||||
0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x65, 0x6c, 0x4e, 0x6f, 0x74, 0x42, 0x69, 0x6e, 0x64, 0x10, 0x0b,
|
||||
0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x0c, 0x42, 0x26,
|
||||
0x5a, 0x24, 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,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -10173,7 +10403,7 @@ func file_webapi_proto_rawDescGZIP() []byte {
|
|||
}
|
||||
|
||||
var file_webapi_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_webapi_proto_msgTypes = make([]protoimpl.MessageInfo, 134)
|
||||
var file_webapi_proto_msgTypes = make([]protoimpl.MessageInfo, 137)
|
||||
var file_webapi_proto_goTypes = []interface{}{
|
||||
(TagCode)(0), // 0: webapi.TagCode
|
||||
(*SAPlatformInfo)(nil), // 1: webapi.SAPlatformInfo
|
||||
|
|
@ -10310,93 +10540,96 @@ var file_webapi_proto_goTypes = []interface{}{
|
|||
(*ASPopUpWindowsConfig)(nil), // 132: webapi.ASPopUpWindowsConfig
|
||||
(*SAPopUpWindowsConfig)(nil), // 133: webapi.SAPopUpWindowsConfig
|
||||
(*WindowsInfo)(nil), // 134: webapi.WindowsInfo
|
||||
(*Platform)(nil), // 135: webapi.Platform
|
||||
(*PlatformGameConfig)(nil), // 136: webapi.PlatformGameConfig
|
||||
(*GameConfigGroup)(nil), // 137: webapi.GameConfigGroup
|
||||
(*GameConfigGlobal)(nil), // 138: webapi.GameConfigGlobal
|
||||
(*PlatformDbConfig)(nil), // 139: webapi.PlatformDbConfig
|
||||
(*CoinPoolSetting)(nil), // 140: webapi.CoinPoolSetting
|
||||
(*RoomInfo)(nil), // 141: webapi.RoomInfo
|
||||
(*PlayerSingleAdjust)(nil), // 142: webapi.PlayerSingleAdjust
|
||||
(*PlayerData)(nil), // 143: webapi.PlayerData
|
||||
(*HorseRaceLamp)(nil), // 144: webapi.HorseRaceLamp
|
||||
(*MessageInfo)(nil), // 145: webapi.MessageInfo
|
||||
(*ServerInfo)(nil), // 146: webapi.ServerInfo
|
||||
(*OnlineReport)(nil), // 147: webapi.OnlineReport
|
||||
(*ItemInfo)(nil), // 148: webapi.ItemInfo
|
||||
(*ExchangeShop)(nil), // 149: webapi.ExchangeShop
|
||||
(*ShopWeight)(nil), // 150: webapi.ShopWeight
|
||||
(*ASRoomInfo)(nil), // 135: webapi.ASRoomInfo
|
||||
(*RoundInfo)(nil), // 136: webapi.RoundInfo
|
||||
(*SARoomInfo)(nil), // 137: webapi.SARoomInfo
|
||||
(*Platform)(nil), // 138: webapi.Platform
|
||||
(*PlatformGameConfig)(nil), // 139: webapi.PlatformGameConfig
|
||||
(*GameConfigGroup)(nil), // 140: webapi.GameConfigGroup
|
||||
(*GameConfigGlobal)(nil), // 141: webapi.GameConfigGlobal
|
||||
(*PlatformDbConfig)(nil), // 142: webapi.PlatformDbConfig
|
||||
(*CoinPoolSetting)(nil), // 143: webapi.CoinPoolSetting
|
||||
(*RoomInfo)(nil), // 144: webapi.RoomInfo
|
||||
(*PlayerSingleAdjust)(nil), // 145: webapi.PlayerSingleAdjust
|
||||
(*PlayerData)(nil), // 146: webapi.PlayerData
|
||||
(*HorseRaceLamp)(nil), // 147: webapi.HorseRaceLamp
|
||||
(*MessageInfo)(nil), // 148: webapi.MessageInfo
|
||||
(*ServerInfo)(nil), // 149: webapi.ServerInfo
|
||||
(*OnlineReport)(nil), // 150: webapi.OnlineReport
|
||||
(*ItemInfo)(nil), // 151: webapi.ItemInfo
|
||||
(*ExchangeShop)(nil), // 152: webapi.ExchangeShop
|
||||
(*ShopWeight)(nil), // 153: webapi.ShopWeight
|
||||
}
|
||||
var file_webapi_proto_depIdxs = []int32{
|
||||
0, // 0: webapi.ASPlatformInfo.Tag:type_name -> webapi.TagCode
|
||||
135, // 1: webapi.ASPlatformInfo.Platforms:type_name -> webapi.Platform
|
||||
138, // 1: webapi.ASPlatformInfo.Platforms:type_name -> webapi.Platform
|
||||
0, // 2: webapi.ASGameConfig.Tag:type_name -> webapi.TagCode
|
||||
136, // 3: webapi.ASGameConfig.Configs:type_name -> webapi.PlatformGameConfig
|
||||
139, // 3: webapi.ASGameConfig.Configs:type_name -> webapi.PlatformGameConfig
|
||||
0, // 4: webapi.ASGameConfigGroup.Tag:type_name -> webapi.TagCode
|
||||
137, // 5: webapi.ASGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
140, // 5: webapi.ASGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
0, // 6: webapi.ASGameConfigGlobal.Tag:type_name -> webapi.TagCode
|
||||
138, // 7: webapi.ASGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
141, // 7: webapi.ASGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
0, // 8: webapi.ASDbConfig.Tag:type_name -> webapi.TagCode
|
||||
139, // 9: webapi.ASDbConfig.DbConfigs:type_name -> webapi.PlatformDbConfig
|
||||
135, // 10: webapi.ASUpdatePlatform.Platforms:type_name -> webapi.Platform
|
||||
142, // 9: webapi.ASDbConfig.DbConfigs:type_name -> webapi.PlatformDbConfig
|
||||
138, // 10: webapi.ASUpdatePlatform.Platforms:type_name -> webapi.Platform
|
||||
0, // 11: webapi.SAUpdatePlatform.Tag:type_name -> webapi.TagCode
|
||||
138, // 12: webapi.ASUpdateGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
141, // 12: webapi.ASUpdateGameConfigGlobal.GameStatus:type_name -> webapi.GameConfigGlobal
|
||||
0, // 13: webapi.SAUpdateGameConfigGlobal.Tag:type_name -> webapi.TagCode
|
||||
136, // 14: webapi.ASUpdateGameConfig.Config:type_name -> webapi.PlatformGameConfig
|
||||
139, // 14: webapi.ASUpdateGameConfig.Config:type_name -> webapi.PlatformGameConfig
|
||||
0, // 15: webapi.SAUpdateGameConfig.Tag:type_name -> webapi.TagCode
|
||||
137, // 16: webapi.ASUpdateGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
140, // 16: webapi.ASUpdateGameConfigGroup.GameConfigGroup:type_name -> webapi.GameConfigGroup
|
||||
0, // 17: webapi.SAUpdateGameConfigGroup.Tag:type_name -> webapi.TagCode
|
||||
0, // 18: webapi.SAAddCoinById.Tag:type_name -> webapi.TagCode
|
||||
0, // 19: webapi.SAResetGamePool.Tag:type_name -> webapi.TagCode
|
||||
140, // 20: webapi.ASUpdateGamePool.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
143, // 20: webapi.ASUpdateGamePool.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
0, // 21: webapi.SAUpdateGamePool.Tag:type_name -> webapi.TagCode
|
||||
0, // 22: webapi.SAQueryGamePoolByGameId.Tag:type_name -> webapi.TagCode
|
||||
140, // 23: webapi.SAQueryGamePoolByGameId.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
140, // 24: webapi.CoinPoolStatesInfo.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
143, // 23: webapi.SAQueryGamePoolByGameId.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
143, // 24: webapi.CoinPoolStatesInfo.CoinPoolSetting:type_name -> webapi.CoinPoolSetting
|
||||
0, // 25: webapi.SAQueryAllGamePool.Tag:type_name -> webapi.TagCode
|
||||
26, // 26: webapi.SAQueryAllGamePool.CoinPoolStatesInfo:type_name -> webapi.CoinPoolStatesInfo
|
||||
0, // 27: webapi.SAListRoom.Tag:type_name -> webapi.TagCode
|
||||
141, // 28: webapi.SAListRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
144, // 28: webapi.SAListRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
0, // 29: webapi.SAGetRoom.Tag:type_name -> webapi.TagCode
|
||||
141, // 30: webapi.SAGetRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
144, // 30: webapi.SAGetRoom.RoomInfo:type_name -> webapi.RoomInfo
|
||||
0, // 31: webapi.SADestroyRoom.Tag:type_name -> webapi.TagCode
|
||||
142, // 32: webapi.ASSinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
145, // 32: webapi.ASSinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
0, // 33: webapi.SASinglePlayerAdjust.Tag:type_name -> webapi.TagCode
|
||||
142, // 34: webapi.SASinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
145, // 34: webapi.SASinglePlayerAdjust.PlayerSingleAdjust:type_name -> webapi.PlayerSingleAdjust
|
||||
0, // 35: webapi.SAGetPlayerData.Tag:type_name -> webapi.TagCode
|
||||
143, // 36: webapi.SAGetPlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
146, // 36: webapi.SAGetPlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 37: webapi.SAMorePlayerData.Tag:type_name -> webapi.TagCode
|
||||
143, // 38: webapi.SAMorePlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
146, // 38: webapi.SAMorePlayerData.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 39: webapi.SAKickPlayer.Tag:type_name -> webapi.TagCode
|
||||
42, // 40: webapi.ASUpdatePlayerElement.PlayerEleArgs:type_name -> webapi.PlayerEleArgs
|
||||
0, // 41: webapi.SAUpdatePlayerElement.Tag:type_name -> webapi.TagCode
|
||||
0, // 42: webapi.SAWhiteBlackControl.Tag:type_name -> webapi.TagCode
|
||||
0, // 43: webapi.SAQueryHorseRaceLampList.Tag:type_name -> webapi.TagCode
|
||||
144, // 44: webapi.SAQueryHorseRaceLampList.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
147, // 44: webapi.SAQueryHorseRaceLampList.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
0, // 45: webapi.SACreateHorseRaceLamp.Tag:type_name -> webapi.TagCode
|
||||
0, // 46: webapi.SAGetHorseRaceLampById.Tag:type_name -> webapi.TagCode
|
||||
144, // 47: webapi.SAGetHorseRaceLampById.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
144, // 48: webapi.ASEditHorseRaceLamp.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
147, // 47: webapi.SAGetHorseRaceLampById.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
147, // 48: webapi.ASEditHorseRaceLamp.HorseRaceLamp:type_name -> webapi.HorseRaceLamp
|
||||
0, // 49: webapi.SAEditHorseRaceLamp.Tag:type_name -> webapi.TagCode
|
||||
0, // 50: webapi.SARemoveHorseRaceLampById.Tag:type_name -> webapi.TagCode
|
||||
0, // 51: webapi.SABlackBySnId.Tag:type_name -> webapi.TagCode
|
||||
0, // 52: webapi.SACreateShortMessage.Tag:type_name -> webapi.TagCode
|
||||
0, // 53: webapi.SAQueryShortMessageList.Tag:type_name -> webapi.TagCode
|
||||
145, // 54: webapi.SAQueryShortMessageList.MessageInfo:type_name -> webapi.MessageInfo
|
||||
148, // 54: webapi.SAQueryShortMessageList.MessageInfo:type_name -> webapi.MessageInfo
|
||||
0, // 55: webapi.SADeleteShortMessage.Tag:type_name -> webapi.TagCode
|
||||
0, // 56: webapi.SAQueryOnlineReportList.Tag:type_name -> webapi.TagCode
|
||||
143, // 57: webapi.SAQueryOnlineReportList.PlayerData:type_name -> webapi.PlayerData
|
||||
146, // 57: webapi.SAQueryOnlineReportList.PlayerData:type_name -> webapi.PlayerData
|
||||
0, // 58: webapi.SASrvCtrlClose.Tag:type_name -> webapi.TagCode
|
||||
0, // 59: webapi.SASrvCtrlNotice.Tag:type_name -> webapi.TagCode
|
||||
0, // 60: webapi.SASrvCtrlStartScript.Tag:type_name -> webapi.TagCode
|
||||
0, // 61: webapi.SAListServerStates.Tag:type_name -> webapi.TagCode
|
||||
146, // 62: webapi.SAListServerStates.ServerInfo:type_name -> webapi.ServerInfo
|
||||
149, // 62: webapi.SAListServerStates.ServerInfo:type_name -> webapi.ServerInfo
|
||||
0, // 63: webapi.SAServerStateSwitch.Tag:type_name -> webapi.TagCode
|
||||
0, // 64: webapi.SAResetEtcdData.Tag:type_name -> webapi.TagCode
|
||||
0, // 65: webapi.SAOnlineReportTotal.Tag:type_name -> webapi.TagCode
|
||||
147, // 66: webapi.SAOnlineReportTotal.OnlineReport:type_name -> webapi.OnlineReport
|
||||
150, // 66: webapi.SAOnlineReportTotal.OnlineReport:type_name -> webapi.OnlineReport
|
||||
0, // 67: webapi.SAAddCoinByIdAndPT.Tag:type_name -> webapi.TagCode
|
||||
148, // 68: webapi.JybInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
151, // 68: webapi.JybInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
83, // 69: webapi.ASCreateJYB.Award:type_name -> webapi.JybInfoAward
|
||||
0, // 70: webapi.SACreateJYB.Tag:type_name -> webapi.TagCode
|
||||
0, // 71: webapi.SAUpdateJYB.Tag:type_name -> webapi.TagCode
|
||||
|
|
@ -10408,10 +10641,10 @@ var file_webapi_proto_depIdxs = []int32{
|
|||
94, // 77: webapi.SAGetExchangeOrder.OrderList:type_name -> webapi.ExchangeOrderInfo
|
||||
0, // 78: webapi.SAUpExchangeStatus.Tag:type_name -> webapi.TagCode
|
||||
0, // 79: webapi.SAGetExchangeShop.Tag:type_name -> webapi.TagCode
|
||||
149, // 80: webapi.SAGetExchangeShop.List:type_name -> webapi.ExchangeShop
|
||||
150, // 81: webapi.SAGetExchangeShop.Weight:type_name -> webapi.ShopWeight
|
||||
152, // 80: webapi.SAGetExchangeShop.List:type_name -> webapi.ExchangeShop
|
||||
153, // 81: webapi.SAGetExchangeShop.Weight:type_name -> webapi.ShopWeight
|
||||
0, // 82: webapi.SAThdUpdatePlayerCoin.Tag:type_name -> webapi.TagCode
|
||||
148, // 83: webapi.SACreateOrder.ItemInfo:type_name -> webapi.ItemInfo
|
||||
151, // 83: webapi.SACreateOrder.ItemInfo:type_name -> webapi.ItemInfo
|
||||
0, // 84: webapi.SACallbackPayment.Tag:type_name -> webapi.TagCode
|
||||
0, // 85: webapi.SAResource.Tag:type_name -> webapi.TagCode
|
||||
0, // 86: webapi.SASendSms.Tag:type_name -> webapi.TagCode
|
||||
|
|
@ -10420,17 +10653,19 @@ var file_webapi_proto_depIdxs = []int32{
|
|||
0, // 89: webapi.SAGetImgVerify.Tag:type_name -> webapi.TagCode
|
||||
0, // 90: webapi.SAPlayerDelete.Tag:type_name -> webapi.TagCode
|
||||
0, // 91: webapi.SAPlayerInviteLink.Tag:type_name -> webapi.TagCode
|
||||
148, // 92: webapi.ASAddItemById.ItemInfo:type_name -> webapi.ItemInfo
|
||||
151, // 92: webapi.ASAddItemById.ItemInfo:type_name -> webapi.ItemInfo
|
||||
0, // 93: webapi.SAAddItemById.Tag:type_name -> webapi.TagCode
|
||||
130, // 94: webapi.SASMSConfig.Info:type_name -> webapi.SMSInfo
|
||||
0, // 95: webapi.SASMSConfig.Tag:type_name -> webapi.TagCode
|
||||
134, // 96: webapi.SAPopUpWindowsConfig.Info:type_name -> webapi.WindowsInfo
|
||||
0, // 97: webapi.SAPopUpWindowsConfig.Tag:type_name -> webapi.TagCode
|
||||
98, // [98:98] is the sub-list for method output_type
|
||||
98, // [98:98] is the sub-list for method input_type
|
||||
98, // [98:98] is the sub-list for extension type_name
|
||||
98, // [98:98] is the sub-list for extension extendee
|
||||
0, // [0:98] is the sub-list for field type_name
|
||||
0, // 98: webapi.SARoomInfo.Tag:type_name -> webapi.TagCode
|
||||
136, // 99: webapi.SARoomInfo.List:type_name -> webapi.RoundInfo
|
||||
100, // [100:100] is the sub-list for method output_type
|
||||
100, // [100:100] is the sub-list for method input_type
|
||||
100, // [100:100] is the sub-list for extension type_name
|
||||
100, // [100:100] is the sub-list for extension extendee
|
||||
0, // [0:100] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_webapi_proto_init() }
|
||||
|
|
@ -12048,6 +12283,42 @@ func file_webapi_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[134].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ASRoomInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[135].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RoundInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_webapi_proto_msgTypes[136].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SARoomInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
|
@ -12055,7 +12326,7 @@ func file_webapi_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_webapi_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 134,
|
||||
NumMessages: 137,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ enum TagCode {
|
|||
TelExist =9; // 手机号已存在
|
||||
AccountNotFound =10; // 账号未找到
|
||||
TelNotBind =11; // 手机号未绑定
|
||||
NotFound =12; // 未找到
|
||||
}
|
||||
|
||||
// ===================================================
|
||||
|
|
@ -279,6 +280,8 @@ message ASListRoom{
|
|||
int32 ClubId = 9;
|
||||
int32 RoomType = 10;//roomType=0所有房间,roomType=1俱乐部房间,roomType=2个人房间
|
||||
int32 GamefreeId = 11;
|
||||
int32 IsCustom = 12; // 房卡场 1是
|
||||
int32 RoomConfigId = 13; // 房间玩法id
|
||||
}
|
||||
message SAListRoom{
|
||||
TagCode Tag = 1; //错误码
|
||||
|
|
@ -969,3 +972,22 @@ message WindowsInfo{
|
|||
int32 PartNum = 4;//参与人数
|
||||
int32 GainNum = 5;//领取人数
|
||||
}
|
||||
|
||||
// 获取对局详情 /api/game/room_info
|
||||
message ASRoomInfo{
|
||||
int32 RoomId = 1; // 房间id
|
||||
}
|
||||
|
||||
message RoundInfo{
|
||||
int32 Round = 1; //局数
|
||||
int64 Ts = 2; //结束时间
|
||||
repeated int64 Score = 3; //分数
|
||||
string LogId = 4; // 牌局记录id
|
||||
}
|
||||
|
||||
message SARoomInfo{
|
||||
TagCode Tag = 1; //错误码
|
||||
string Msg = 2; //错误信息
|
||||
repeated int32 SnId = 3; // 玩家id
|
||||
repeated RoundInfo List = 4; // 每局结算
|
||||
}
|
||||
|
|
@ -286,12 +286,13 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
if isF {
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
if item.SaleGold > 0 {
|
||||
n := int64(item.SaleGold) * int64(msg.ItemNum)
|
||||
if item.SaleType == 1 {
|
||||
p.AddCoin(int64(item.SaleGold*msg.ItemNum), 0, common.GainWay_Item_Sale, "sys", remark)
|
||||
pack.Coin = int64(item.SaleGold * msg.ItemNum)
|
||||
p.AddCoin(n, 0, common.GainWay_Item_Sale, "sys", remark)
|
||||
pack.Coin = n
|
||||
} else if item.SaleType == 2 {
|
||||
p.AddDiamond(int64(item.SaleGold*msg.ItemNum), 0, common.GainWay_Item_Sale, "sys", remark)
|
||||
pack.Diamond = int64(item.SaleGold * msg.ItemNum)
|
||||
p.AddDiamond(n, 0, common.GainWay_Item_Sale, "sys", remark)
|
||||
pack.Diamond = n
|
||||
}
|
||||
}
|
||||
pack.NowItemId = item.ItemId
|
||||
|
|
@ -307,9 +308,9 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
send()
|
||||
return nil
|
||||
}
|
||||
bagInfo, _, isF := BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
Change: []*Item{
|
||||
bagInfo, _, isF := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: []*model.Item{
|
||||
{
|
||||
ItemId: msg.GetItemId(),
|
||||
ItemNum: -1,
|
||||
|
|
@ -318,7 +319,7 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
GainWay: common.GainWayItemChange,
|
||||
Operator: "system",
|
||||
Remark: "背包内使用兑换",
|
||||
noLog: false,
|
||||
NoLog: false,
|
||||
})
|
||||
if isF {
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
|
|
@ -332,9 +333,9 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
logger.Logger.Trace("道具分解", msg.ItemId)
|
||||
itemInfo := srvdata.GameItemMgr.Get(p.Platform, msg.ItemId)
|
||||
if msg.ItemNum > 0 && itemInfo != nil {
|
||||
_, _, isF := BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
Change: []*Item{
|
||||
_, _, isF := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: []*model.Item{
|
||||
{
|
||||
ItemId: msg.GetItemId(),
|
||||
ItemNum: int64(-msg.GetItemNum()),
|
||||
|
|
@ -343,23 +344,23 @@ func CSUpBagInfo(s *netlib.Session, packetid int, data interface{}, sid int64) e
|
|||
GainWay: common.GainWayItemFen,
|
||||
Operator: "system",
|
||||
Remark: fmt.Sprintf("道具分解%v", msg.GetItemId()),
|
||||
noLog: false,
|
||||
NoLog: false,
|
||||
})
|
||||
if isF {
|
||||
pack.RetCode = bag.OpResultCode_OPRC_Sucess
|
||||
var changeItems []*Item
|
||||
var changeItems []*model.Item
|
||||
for k, v := range itemInfo.GetGain() {
|
||||
if v > 0 {
|
||||
changeItems = append(changeItems, &Item{
|
||||
changeItems = append(changeItems, &model.Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v * int64(msg.GetItemNum()),
|
||||
})
|
||||
}
|
||||
}
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: changeItems,
|
||||
Cost: []*model.ItemInfo{
|
||||
Cost: []*model.Item{
|
||||
{
|
||||
ItemId: msg.GetItemId(),
|
||||
ItemNum: int64(msg.GetItemNum()),
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ func (this *CSInviteFriendOpHandler) Process(s *netlib.Session, packetid int, da
|
|||
|
||||
dbGameFree := scene.dbGameFree
|
||||
if dbGameFree != nil {
|
||||
limitCoin := srvdata.CreateRoomMgrSington.GetLimitCoinByBaseScore(int32(scene.gameId), int32(scene.gameSite), scene.BaseScore)
|
||||
limitCoin := srvdata.CreateRoomMgrSington.GetLimitCoinByBaseScore(int32(scene.gameId), scene.dbGameFree.GetSceneType(), scene.BaseScore)
|
||||
if p.Coin < limitCoin {
|
||||
logger.Logger.Warn("CSInviteFriendHandler player limitCoin")
|
||||
opRetCode = friend.OpResultCode_OPRC_InviteFriend_CoinLimit //金币不足
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"slices"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
|
|
@ -96,11 +97,18 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
goto failed
|
||||
}
|
||||
|
||||
// 密码是否正确
|
||||
if scene.GetPassword() != "" && scene.GetPassword() != msg.GetPassword() {
|
||||
code = gamehall.OpResultCode_Game_OPRC_PasswordError
|
||||
logger.Logger.Trace("CSEnterRoomHandler password error")
|
||||
goto failed
|
||||
}
|
||||
|
||||
dbGameFree = scene.dbGameFree
|
||||
if dbGameFree != nil {
|
||||
if common.IsLocalGame(scene.gameId) {
|
||||
if !p.IsRob {
|
||||
limitCoin := srvdata.CreateRoomMgrSington.GetLimitCoinByBaseScore(int32(scene.gameId), int32(scene.gameSite), scene.BaseScore)
|
||||
limitCoin := srvdata.CreateRoomMgrSington.GetLimitCoinByBaseScore(int32(scene.gameId), scene.dbGameFree.GetSceneType(), scene.BaseScore)
|
||||
if p.Coin < limitCoin {
|
||||
code = gamehall.OpResultCode_Game_OPRC_CoinNotEnough_Game
|
||||
logger.Logger.Trace("CSEnterRoomHandler scene is closed")
|
||||
|
|
@ -145,9 +153,8 @@ func (this *CSEnterRoomHandler) Process(s *netlib.Session, packetid int, data in
|
|||
}
|
||||
skinId := int32(300001)
|
||||
var tm *TmMatch
|
||||
if len(scene.params) > 3 {
|
||||
sortId := scene.params[0]
|
||||
tm = TournamentMgr.GetTm(sortId)
|
||||
if scene.MatchSortId > 0 {
|
||||
tm = TournamentMgr.GetTm(scene.MatchSortId)
|
||||
if tm != nil && tm.copyRobotGrades != nil && len(tm.copyRobotGrades) > 0 {
|
||||
randIndex := rand.Intn(len(tm.copyRobotGrades))
|
||||
grade = tm.copyRobotGrades[randIndex].grade
|
||||
|
|
@ -222,7 +229,7 @@ func (this *CSReturnRoomHandler) Process(s *netlib.Session, packetid int, data i
|
|||
pack.GameId = proto.Int(scene.gameId)
|
||||
pack.ModeType = proto.Int(scene.gameMode)
|
||||
pack.Params = common.CopySliceInt64ToInt32(scene.params)
|
||||
pack.HallId = proto.Int32(scene.hallId)
|
||||
pack.HallId = proto.Int32(scene.dbGameFree.GetId())
|
||||
gameVers := srvdata.GetGameVers(p.PackageID)
|
||||
if ver, ok := gameVers[fmt.Sprintf("%v,%v", scene.gameId, p.Channel)]; ok {
|
||||
pack.MinApkVer = proto.Int32(ver.MinApkVer)
|
||||
|
|
@ -304,7 +311,7 @@ func (this *CSQueryRoomInfoHandler) ProcessLocalGame(s *netlib.Session, packetid
|
|||
}
|
||||
if p.Platform == scene.limitPlatform.IdStr || isShow {
|
||||
if scene.sceneMode == int(msg.GetSceneMode()) && len(scene.players) != 0 {
|
||||
if scene.gameId == int(gameid) && scene.gameSite == int(msg.GetGameSite()) {
|
||||
if scene.gameId == int(gameid) && scene.dbGameFree.GetSceneType() == msg.GetGameSite() {
|
||||
|
||||
// 私人房需要是好友
|
||||
if scene.sceneMode == common.SceneMode_Private {
|
||||
|
|
@ -854,130 +861,44 @@ func (this *CSCreateRoomHandler) ProcessLocalGame(s *netlib.Session, packetid in
|
|||
maxPlayerNum = 0
|
||||
}
|
||||
|
||||
if srvdata.GameFreeMgr.IsGameDif(dbGameFree.GetGameId(), common.GameDifThirteen) {
|
||||
switch msg.GetMaxPlayerNum() {
|
||||
case 1:
|
||||
maxPlayerNum = 8
|
||||
default:
|
||||
maxPlayerNum = 4
|
||||
}
|
||||
}
|
||||
|
||||
//创建房间
|
||||
csp = CoinSceneMgrSingleton.GetCoinScenePool(p.GetPlatform().IdStr, dbGameFree.GetId())
|
||||
roomId = SceneMgrSingleton.GenOneCoinSceneId()
|
||||
roomId = SceneMgrSingleton.GenOnePrivateSceneId()
|
||||
if roomId == common.RANDID_INVALID {
|
||||
code = gamehall.OpResultCode_Game_OPRC_AllocRoomIdFailed_Game
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v GameId:%v sceneId == -1 ", p.SnId, gameId)
|
||||
goto failed
|
||||
}
|
||||
scene, code = p.CreateLocalGameScene(roomId, int(gameId), int(gameSite), int(msg.GetSceneMode()), maxPlayerNum,
|
||||
params, dbGameFree, baseScore, 0)
|
||||
if scene != nil && code == gamehall.OpResultCode_Game_OPRC_Sucess_Game {
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v Create Sucess GameId:%v", p.SnId, gameId)
|
||||
csp.AddScene(scene)
|
||||
if !scene.PlayerEnter(p, -1, true) {
|
||||
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||
}
|
||||
}
|
||||
|
||||
failed:
|
||||
resp := &gamehall.SCCreateRoom{
|
||||
GameId: msg.GetGameId(),
|
||||
BaseCoin: msg.GetBaseCoin(),
|
||||
SceneMode: msg.GetSceneMode(),
|
||||
MaxPlayerNum: msg.GetMaxPlayerNum(),
|
||||
Params: msg.GetParams(),
|
||||
OpRetCode: code,
|
||||
}
|
||||
proto.SetDefaults(resp)
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_CREATEROOM), resp)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *CSCreateRoomHandler) ProcessThirteen(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
msg, ok := data.(*gamehall.CSCreateRoom)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var code gamehall.OpResultCode_Game
|
||||
var dbGameFree *server.DB_GameFree
|
||||
var dbGameRule *server.DB_GameRule
|
||||
var params = common.CopySliceInt32ToInt64(msg.GetParams())
|
||||
var baseScore = msg.GetBaseCoin()
|
||||
var sp ScenePolicy
|
||||
var gamefreeId = msg.GetId()
|
||||
var gps *webapiproto.GameFree
|
||||
var maxPlayerNum = int(msg.GetMaxPlayerNum())
|
||||
var csp *CoinScenePool
|
||||
var roomId int
|
||||
var scene *Scene
|
||||
var gameId = gamefreeId / 10000
|
||||
var spd *ScenePolicyData
|
||||
|
||||
gps = PlatformMgrSingleton.GetGameFree(p.Platform, gamefreeId)
|
||||
if gps == nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameNotExist_Game
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v GameFreeId:%v not exist", p.SnId, gamefreeId)
|
||||
scene = SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||
CreateId: p.SnId,
|
||||
RoomId: roomId,
|
||||
SceneMode: int(msg.GetSceneMode()),
|
||||
Params: params,
|
||||
Platform: p.GetPlatform(),
|
||||
GF: dbGameFree,
|
||||
PlayerNum: int32(maxPlayerNum),
|
||||
BaseScore: baseScore,
|
||||
})
|
||||
if scene == nil {
|
||||
logger.Logger.Tracef("CSCreateRoomHandler CreateScene fail SnId:%v GameId:%v", p.SnId, gameId)
|
||||
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||
goto failed
|
||||
}
|
||||
|
||||
dbGameFree = gps.DbGameFree
|
||||
if dbGameFree == nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameNotExist_Game
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v GameFreeId:%v not exist", p.SnId, gamefreeId)
|
||||
goto failed
|
||||
}
|
||||
|
||||
//检测房间状态是否开启
|
||||
if !PlatformMgrSingleton.CheckGameState(p.Platform, dbGameFree.Id) {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameHadClosed
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v GameFreeId:%v GameHadClosed", p.SnId, gamefreeId)
|
||||
goto failed
|
||||
}
|
||||
|
||||
dbGameRule = srvdata.PBDB_GameRuleMgr.GetData(dbGameFree.GetGameRule())
|
||||
if dbGameRule == nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameNotExist_Game
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v GameFreeId:%v gamerule not exist", p.SnId, gamefreeId)
|
||||
goto failed
|
||||
}
|
||||
|
||||
sp = GetScenePolicy(int(gameId), 0)
|
||||
if sp == nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameNotExist_Game
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v GameFreeId:%v not exist", p.SnId, gamefreeId)
|
||||
goto failed
|
||||
}
|
||||
spd, ok = sp.(*ScenePolicyData)
|
||||
if ok {
|
||||
//todo 参数校验
|
||||
_ = spd
|
||||
|
||||
}
|
||||
if p.scene != nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_RoomHadExist_Game
|
||||
logger.Logger.Tracef("CSCreateRoomHandler had scene(%d)", p.scene.sceneId)
|
||||
goto failed
|
||||
}
|
||||
|
||||
//创建房间
|
||||
csp = CoinSceneMgrSingleton.GetCoinScenePool(p.GetPlatform().IdStr, dbGameFree.GetId())
|
||||
roomId = SceneMgrSingleton.GenOneCoinSceneId()
|
||||
if roomId == common.RANDID_INVALID {
|
||||
code = gamehall.OpResultCode_Game_OPRC_AllocRoomIdFailed_Game
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v GameId:%v sceneId == -1 ", p.SnId, gameId)
|
||||
goto failed
|
||||
}
|
||||
scene, code = p.CreateLocalGameScene(roomId, int(gameId), int(dbGameFree.GetSceneType()), int(msg.GetSceneMode()),
|
||||
maxPlayerNum, params, dbGameFree, baseScore, 0)
|
||||
if scene != nil {
|
||||
if code == gamehall.OpResultCode_Game_OPRC_Sucess_Game {
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v Create Sucess GameId:%v", p.SnId, gameId)
|
||||
// try enter scene
|
||||
csp.scenes[scene.sceneId] = scene
|
||||
scene.csp = csp
|
||||
if !scene.PlayerEnter(p, -1, true) {
|
||||
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||
}
|
||||
}
|
||||
logger.Logger.Tracef("CSCreateRoomHandler SnId:%v Create Sucess GameId:%v", p.SnId, gameId)
|
||||
csp.AddScene(scene)
|
||||
if !scene.PlayerEnter(p, -1, true) {
|
||||
code = gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||
}
|
||||
|
||||
failed:
|
||||
|
|
@ -1028,7 +949,7 @@ func (this *CSAudienceSitHandler) Process(s *netlib.Session, packetid int, data
|
|||
}
|
||||
if !p.scene.IsTestScene() {
|
||||
// 入场限额检查
|
||||
limitCoin := srvdata.CreateRoomMgrSington.GetLimitCoinByBaseScore(int32(p.scene.gameId), int32(p.scene.gameSite), p.scene.BaseScore)
|
||||
limitCoin := srvdata.CreateRoomMgrSington.GetLimitCoinByBaseScore(int32(p.scene.gameId), p.scene.dbGameFree.GetSceneType(), p.scene.BaseScore)
|
||||
if p.Coin < limitCoin {
|
||||
pack.OpCode = gamehall.OpResultCode_Game_OPRC_MoneyNotEnough_Game
|
||||
newPlayer.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_AUDIENCESIT), pack)
|
||||
|
|
@ -1235,6 +1156,265 @@ failed:
|
|||
return nil
|
||||
}
|
||||
|
||||
func CSRoomConfigHandler(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSRoomConfigHandler Process recv ", data)
|
||||
_, ok := data.(*gamehall.CSRoomConfig)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
pack := PlatformMgrSingleton.GetRoomConfig(p.Platform)
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SCRoomConfig), pack)
|
||||
logger.Logger.Tracef("SCRoomConfig: %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSCreatePrivateRoomHandler(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSCreatePrivateRoomHandler Process recv ", data)
|
||||
msg, ok := data.(*gamehall.CSCreatePrivateRoom)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var needPwd, costType, voice int64
|
||||
var password string
|
||||
code := gamehall.OpResultCode_Game_OPRC_Error_Game
|
||||
pack := &gamehall.SCCreatePrivateRoom{}
|
||||
send := func() {
|
||||
pack.OpRetCode = code
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_CREATEPRIVATEROOM), pack)
|
||||
logger.Logger.Tracef("SCCreatePrivateRoom: %v", pack)
|
||||
}
|
||||
|
||||
// 参数校验
|
||||
cfg := PlatformMgrSingleton.GetConfig(p.Platform).RoomConfig[msg.GetRoomConfigId()]
|
||||
if cfg == nil {
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
// 场次
|
||||
if !slices.Contains(cfg.GetGameFreeId(), msg.GetGameFreeId()) {
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
// 局数
|
||||
if !slices.Contains(cfg.GetRound(), msg.GetRound()) {
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
// 玩家数量
|
||||
if !slices.Contains(cfg.GetPlayerNum(), msg.GetPlayerNum()) {
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
// 密码
|
||||
if cfg.GetNeedPassword() != 3 {
|
||||
needPwd = int64(cfg.GetNeedPassword())
|
||||
} else {
|
||||
needPwd = int64(msg.GetNeedPassword())
|
||||
}
|
||||
if needPwd < 1 || needPwd > 2 {
|
||||
needPwd = 2 // 默认不需要密码
|
||||
}
|
||||
// 房费类型
|
||||
if cfg.GetCostType() != 3 {
|
||||
costType = int64(cfg.GetCostType())
|
||||
} else {
|
||||
costType = int64(msg.GetCostType())
|
||||
}
|
||||
if costType < 1 || costType > 2 {
|
||||
costType = 1 // 默认房主支付
|
||||
}
|
||||
// 语音
|
||||
if cfg.GetVoice() != 3 {
|
||||
voice = int64(cfg.GetVoice())
|
||||
} else {
|
||||
voice = int64(msg.GetVoice())
|
||||
}
|
||||
if voice < 1 || voice > 2 {
|
||||
voice = 1 // 默认开启语音
|
||||
}
|
||||
|
||||
// 场次是否存在
|
||||
gf := PlatformMgrSingleton.GetGameFree(p.Platform, msg.GetGameFreeId())
|
||||
if gf == nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameHadClosed
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
sp := GetScenePolicy(int(gf.GetDbGameFree().GetGameId()), int(gf.GetDbGameFree().GetGameMode()))
|
||||
if sp == nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameHadClosed
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
// 游戏是否开启
|
||||
if cfg.GetOn() != common.On || !gf.GetStatus() {
|
||||
code = gamehall.OpResultCode_Game_OPRC_GameHadClosed
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
if p.scene != nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_RoomHadExist_Game
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
|
||||
// 密码
|
||||
if needPwd == 1 {
|
||||
password = SceneMgrSingleton.GenPassword()
|
||||
}
|
||||
|
||||
// 费用是否充足
|
||||
if len(cfg.GetCost()) > 0 && !sp.CostEnough(int(costType), int(msg.GetPlayerNum()), cfg, p) {
|
||||
code = gamehall.OpResultCode_Game_OPRC_CostNotEnough
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
|
||||
// 创建房间
|
||||
csp := CoinSceneMgrSingleton.GetCoinScenePool(p.GetPlatform().IdStr, msg.GetGameFreeId())
|
||||
roomId := SceneMgrSingleton.GenOnePrivateSceneId()
|
||||
scene := SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||
CreateId: p.SnId,
|
||||
RoomId: roomId,
|
||||
SceneMode: common.SceneMode_Private,
|
||||
CycleTimes: 0,
|
||||
TotalRound: int(msg.GetRound()),
|
||||
Params: common.CopySliceInt32ToInt64(csp.dbGameRule.GetParams()),
|
||||
GS: nil,
|
||||
Platform: PlatformMgrSingleton.GetPlatform(p.Platform),
|
||||
GF: csp.dbGameFree,
|
||||
PlayerNum: msg.GetPlayerNum(),
|
||||
Channel: cfg.GetOnChannelName(),
|
||||
CustomParam: &server.CustomParam{
|
||||
RoomTypeId: cfg.GetRoomType(),
|
||||
RoomConfigId: cfg.GetId(),
|
||||
CostType: int32(costType),
|
||||
Password: password,
|
||||
Voice: int32(voice),
|
||||
},
|
||||
})
|
||||
|
||||
if scene == nil {
|
||||
code = gamehall.OpResultCode_Game_OPRC_SceneServerMaintain_Game
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
|
||||
csp.AddScene(scene)
|
||||
|
||||
if !scene.PlayerEnter(p, -1, true) {
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
|
||||
pack = &gamehall.SCCreatePrivateRoom{
|
||||
OpRetCode: gamehall.OpResultCode_Game_OPRC_Sucess_Game,
|
||||
GameFreeId: msg.GetGameFreeId(),
|
||||
RoomTypeId: msg.GetRoomTypeId(),
|
||||
RoomConfigId: msg.GetRoomConfigId(),
|
||||
Round: msg.GetRound(),
|
||||
PlayerNum: msg.GetPlayerNum(),
|
||||
NeedPassword: int32(needPwd),
|
||||
CostType: int32(costType),
|
||||
Voice: int32(voice),
|
||||
RoomId: int32(roomId),
|
||||
Password: password,
|
||||
}
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSGetPrivateRoomListHandler(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSGetPrivateRoomListHandler Process recv ", data)
|
||||
_, ok := data.(*gamehall.CSGetPrivateRoomList)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
pack := &gamehall.SCGetPrivateRoomList{}
|
||||
scenes := SceneMgrSingleton.FindRoomList(&FindRoomParam{
|
||||
Platform: p.Platform,
|
||||
GameId: nil,
|
||||
GameMode: nil,
|
||||
SceneMode: nil,
|
||||
RoomId: 0,
|
||||
IsCustom: 1,
|
||||
IsFree: 0,
|
||||
GameFreeId: nil,
|
||||
SnId: 0,
|
||||
IsMatch: false,
|
||||
IsRankMatch: false,
|
||||
Channel: []string{p.LastChannel},
|
||||
})
|
||||
for _, v := range scenes {
|
||||
needPassword := 0
|
||||
if v.GetPassword() != "" {
|
||||
needPassword = 1
|
||||
}
|
||||
var players []*gamehall.PrivatePlayerInfo
|
||||
for _, vv := range v.players {
|
||||
players = append(players, &gamehall.PrivatePlayerInfo{
|
||||
SnId: vv.GetSnId(),
|
||||
Name: vv.GetName(),
|
||||
UseRoleId: vv.GetRoleId(),
|
||||
})
|
||||
}
|
||||
d := &gamehall.PrivateRoomInfo{
|
||||
GameFreeId: v.dbGameFree.GetId(),
|
||||
GameId: v.dbGameFree.GetGameId(),
|
||||
RoomTypeId: v.GetRoomTypeId(),
|
||||
RoomConfigId: v.GetRoomConfigId(),
|
||||
RoomId: int32(v.sceneId),
|
||||
NeedPassword: int32(needPassword),
|
||||
CurrRound: v.currRound,
|
||||
MaxRound: v.totalRound,
|
||||
CurrNum: int32(v.GetPlayerCnt()),
|
||||
MaxPlayer: int32(v.playerNum),
|
||||
CreateTs: v.createTime.Unix(),
|
||||
State: v.SceneState,
|
||||
Players: players,
|
||||
}
|
||||
pack.Datas = append(pack.Datas, d)
|
||||
}
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_GETPRIVATEROOMLIST), pack)
|
||||
logger.Logger.Tracef("SCGetPrivateRoomList: %v", pack)
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSTouchTypeHandler(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSTouchTypeHandler Process recv ", data)
|
||||
_, ok := data.(*gamehall.CSTouchType)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
PlayerNotifySingle.AddTime(p.SnId, common.NotifyPrivateRoomList, time.Second*15)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 返回房间
|
||||
common.RegisterHandler(int(gamehall.GameHallPacketID_PACKET_CS_RETURNROOM), &CSReturnRoomHandler{})
|
||||
|
|
@ -1266,4 +1446,12 @@ func init() {
|
|||
|
||||
// 观众进入房间
|
||||
common.Register(int(gamehall.GameHallPacketID_PACKET_CS_AUDIENCE_ENTERROOM), &gamehall.CSEnterRoom{}, CSAudienceEnterRoomHandler)
|
||||
// 竞技馆房间配置列表
|
||||
common.Register(int(gamehall.GameHallPacketID_PACKET_CSRoomConfig), &gamehall.CSRoomConfig{}, CSRoomConfigHandler)
|
||||
// 创建竞技馆房间
|
||||
common.Register(int(gamehall.GameHallPacketID_PACKET_CS_CREATEPRIVATEROOM), &gamehall.CSCreatePrivateRoom{}, CSCreatePrivateRoomHandler)
|
||||
// 竞技馆房间列表
|
||||
common.Register(int(gamehall.GameHallPacketID_PACKET_CS_GETPRIVATEROOMLIST), &gamehall.CSGetPrivateRoomList{}, CSGetPrivateRoomListHandler)
|
||||
// 保持刷新
|
||||
common.Register(int(gamehall.GameHallPacketID_PACKET_CSTouchType), &gamehall.CSTouchType{}, CSTouchTypeHandler)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/netlib"
|
||||
|
||||
|
|
@ -201,290 +199,10 @@ func (this *CSHundredSceneOpHandler) Process(s *netlib.Session, packetid int, da
|
|||
return nil
|
||||
}
|
||||
|
||||
type CSGameObservePacketFactory struct {
|
||||
}
|
||||
type CSGameObserveHandler struct {
|
||||
}
|
||||
|
||||
func (this *CSGameObservePacketFactory) CreatePacket() interface{} {
|
||||
pack := &gamehall.CSGameObserve{}
|
||||
return pack
|
||||
}
|
||||
|
||||
func (this *CSGameObserveHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
logger.Logger.Trace("CSGameObserveHandler Process recv ", data)
|
||||
if msg, ok := data.(*gamehall.CSGameObserve); ok {
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p != nil {
|
||||
if msg.GetStartOrEnd() {
|
||||
gameStateMgr.PlayerRegiste(p, msg.GetGameId(), msg.GetStartOrEnd())
|
||||
pack := &gamehall.SCGameSubList{}
|
||||
statePack := &gamehall.SCGameState{}
|
||||
scenes := HundredSceneMgrSingleton.GetPlatformScene(p.Platform, msg.GetGameId())
|
||||
for _, value := range scenes {
|
||||
pack.List = append(pack.List, &gamehall.GameSubRecord{
|
||||
GameFreeId: proto.Int32(value.dbGameFree.GetId()),
|
||||
NewLog: proto.Int32(-1),
|
||||
LogCnt: proto.Int(len(value.GameLog)),
|
||||
TotleLog: value.GameLog,
|
||||
})
|
||||
leftTime := int64(value.StateSec) - (time.Now().Unix() - value.StateTs)
|
||||
if leftTime < 0 {
|
||||
leftTime = 0
|
||||
}
|
||||
statePack.List = append(statePack.List, &gamehall.GameState{
|
||||
GameFreeId: proto.Int32(value.dbGameFree.GetId()),
|
||||
Ts: proto.Int64(leftTime),
|
||||
Sec: proto.Int32(value.StateSec),
|
||||
})
|
||||
}
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_GAMESUBLIST), pack)
|
||||
logger.Logger.Trace("SCGameSubList:", pack)
|
||||
p.SendToClient(int(gamehall.GameHallPacketID_PACKET_SC_GAMESTATE), statePack)
|
||||
logger.Logger.Trace("SCGameState:", statePack)
|
||||
} else {
|
||||
gameStateMgr.PlayerClear(p)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//type CSHundredSceneGetGameJackpotPacketFactory struct {
|
||||
//}
|
||||
//type CSHundredSceneGetGameJackpotHandler struct {
|
||||
//}
|
||||
//
|
||||
//func (this *CSHundredSceneGetGameJackpotPacketFactory) CreatePacket() interface{} {
|
||||
// pack := &gamehall.CSHundredSceneGetPlayerNum{}
|
||||
// return pack
|
||||
//}
|
||||
//
|
||||
//func (this *CSHundredSceneGetGameJackpotHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
// logger.Logger.Trace("CSHundredSceneGetGameJackpotHandler Process recv ", data)
|
||||
// if _, ok := data.(*gamehall.CSHundredSceneGetPlayerNum); ok {
|
||||
// p := PlayerMgrSington.GetPlayer(sid)
|
||||
// if p != nil {
|
||||
// //gameid := int(msg.GetGameId())
|
||||
// //// 冰河世纪, 百战成神, 财神, 复仇者联盟, 复活岛
|
||||
// //if gameid == common.GameId_IceAge || gameid == common.GameId_TamQuoc || gameid == common.GameId_CaiShen ||
|
||||
// // gameid == common.GameId_Avengers || gameid == common.GameId_EasterIsland {
|
||||
// // gameStateMgr.PlayerRegiste(p, msg.GetGameId(), true)
|
||||
// // pack := &gamehall.SCHundredSceneGetGameJackpot{}
|
||||
// // scenes := HundredSceneMgrSingleton.GetPlatformScene(p.Platform, msg.GetGameId())
|
||||
// // for _, v := range scenes {
|
||||
// // jpfi := &gamehall.GameJackpotFundInfo{
|
||||
// // GameFreeId: proto.Int32(v.dbGameFree.GetId()),
|
||||
// // JackPotFund: proto.Int64(v.JackPotFund),
|
||||
// // }
|
||||
// // pack.GameJackpotFund = append(pack.GameJackpotFund, jpfi)
|
||||
// // }
|
||||
// // proto.SetDefaults(pack)
|
||||
// // p.SendToClient(int(gamehall.HundredScenePacketID_PACKET_SC_GAMEJACKPOT), pack)
|
||||
// // logger.Logger.Trace("SCHundredSceneGetGameJackpot:", pack)
|
||||
// //}
|
||||
// }
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
//
|
||||
//type CSHundredSceneGetGameHistoryInfoPacketFactory struct {
|
||||
//}
|
||||
//type CSHundredSceneGetGameHistoryInfoHandler struct {
|
||||
//}
|
||||
//
|
||||
//func (this *CSHundredSceneGetGameHistoryInfoPacketFactory) CreatePacket() interface{} {
|
||||
// pack := &gamehall.CSHundredSceneGetHistoryInfo{}
|
||||
// return pack
|
||||
//}
|
||||
//
|
||||
//func (this *CSHundredSceneGetGameHistoryInfoHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
|
||||
// logger.Logger.Trace("World CSHundredSceneGetGameHistoryInfoHandler Process recv ", data)
|
||||
// if msg, ok := data.(*gamehall.CSHundredSceneGetHistoryInfo); ok {
|
||||
// gameid := int(msg.GetGameId())
|
||||
// historyModel := msg.GetGameHistoryModel()
|
||||
// p := PlayerMgrSington.GetPlayer(sid)
|
||||
// if p != nil {
|
||||
// switch historyModel {
|
||||
// case PLAYER_HISTORY_MODEL: // 历史记录
|
||||
// task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
// var genPlayerHistoryInfo = func(spinID string, isFree bool, createdTime, totalBetValue, totalPriceValue, totalBonusValue, multiple int64, player *gamehall.PlayerHistoryInfo) {
|
||||
// player.SpinID = proto.String(spinID)
|
||||
// player.CreatedTime = proto.Int64(createdTime)
|
||||
// player.TotalBetValue = proto.Int64(totalBetValue)
|
||||
// player.TotalPriceValue = proto.Int64(totalPriceValue)
|
||||
// player.IsFree = proto.Bool(isFree)
|
||||
// player.TotalBonusValue = proto.Int64(totalBonusValue)
|
||||
// player.Multiple = proto.Int64(multiple)
|
||||
// }
|
||||
//
|
||||
// var genPlayerHistoryInfoMsg = func(spinid string, v *model.NeedGameRecord, gdl *model.GameDetailedLog, player *gamehall.PlayerHistoryInfo) {
|
||||
// switch gameid {
|
||||
// //case common.GameId_IceAge:
|
||||
// // data, err := model.UnMarshalIceAgeGameNote(gdl.GameDetailedNote)
|
||||
// // if err != nil {
|
||||
// // logger.Logger.Errorf("World UnMarshalIceAgeGameNote error:%v", err)
|
||||
// // }
|
||||
// // gnd := data.(*model.IceAgeType)
|
||||
// // genPlayerHistoryInfo(spinid, gnd.IsFree, int64(v.Ts), int64(gnd.Score), gnd.TotalPriceValue, gnd.TotalBonusValue, player)
|
||||
// //case common.GameId_TamQuoc:
|
||||
// // data, err := model.UnMarshalTamQuocGameNote(gdl.GameDetailedNote)
|
||||
// // if err != nil {
|
||||
// // logger.Logger.Errorf("World UnMarshalTamQuocGameNote error:%v", err)
|
||||
// // }
|
||||
// // gnd := data.(*model.TamQuocType)
|
||||
// // genPlayerHistoryInfo(spinid, gnd.IsFree, int64(v.Ts), int64(gnd.Score), gnd.TotalPriceValue, gnd.TotalBonusValue, player)
|
||||
// //case common.GameId_CaiShen:
|
||||
// // data, err := model.UnMarshalCaiShenGameNote(gdl.GameDetailedNote)
|
||||
// // if err != nil {
|
||||
// // logger.Logger.Errorf("World UnMarshalCaiShenGameNote error:%v", err)
|
||||
// // }
|
||||
// // gnd := data.(*model.CaiShenType)
|
||||
// // genPlayerHistoryInfo(spinid, gnd.IsFree, int64(v.Ts), int64(gnd.Score), gnd.TotalPriceValue, gnd.TotalBonusValue, player)
|
||||
// case common.GameId_Crash:
|
||||
// data, err := model.UnMarshalGameNoteByHUNDRED(gdl.GameDetailedNote)
|
||||
// if err != nil {
|
||||
// logger.Logger.Errorf("World UnMarshalAvengersGameNote error:%v", err)
|
||||
// }
|
||||
// jsonString, _ := json.Marshal(data)
|
||||
//
|
||||
// // convert json to struct
|
||||
// gnd := model.CrashType{}
|
||||
// json.Unmarshal(jsonString, &gnd)
|
||||
//
|
||||
// //gnd := data.(*model.CrashType)
|
||||
// for _, curplayer := range gnd.PlayerData {
|
||||
// if curplayer.UserId == p.SnId {
|
||||
// genPlayerHistoryInfo(spinid, false, int64(v.Ts), int64(curplayer.UserBetTotal), curplayer.ChangeCoin, 0, int64(curplayer.UserMultiple), player)
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// case common.GameId_Avengers:
|
||||
// data, err := model.UnMarshalAvengersGameNote(gdl.GameDetailedNote)
|
||||
// if err != nil {
|
||||
// logger.Logger.Errorf("World UnMarshalAvengersGameNote error:%v", err)
|
||||
// }
|
||||
// gnd := data.(*model.GameResultLog)
|
||||
// genPlayerHistoryInfo(spinid, gnd.BaseResult.IsFree, int64(v.Ts), int64(gnd.BaseResult.TotalBet), gnd.BaseResult.WinTotal, gnd.BaseResult.WinSmallGame, 0, player)
|
||||
// //case common.GameId_EasterIsland:
|
||||
// // data, err := model.UnMarshalEasterIslandGameNote(gdl.GameDetailedNote)
|
||||
// // if err != nil {
|
||||
// // logger.Logger.Errorf("World UnMarshalEasterIslandGameNote error:%v", err)
|
||||
// // }
|
||||
// // gnd := data.(*model.EasterIslandType)
|
||||
// // genPlayerHistoryInfo(spinid, gnd.IsFree, int64(v.Ts), int64(gnd.Score), gnd.TotalPriceValue, gnd.TotalBonusValue, player)
|
||||
// default:
|
||||
// logger.Logger.Errorf("World CSHundredSceneGetGameHistoryInfoHandler receive gameid(%v) error", gameid)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// gameclass := int32(2)
|
||||
// spinid := strconv.FormatInt(int64(p.SnId), 10)
|
||||
// dbGameFrees := srvdata.PBDB_GameFreeMgr.Datas.Arr //.GetData(data.DbGameFree.Id)
|
||||
// roomtype := int32(0)
|
||||
// for _, v := range dbGameFrees {
|
||||
// if int32(gameid) == v.GetGameId() {
|
||||
// gameclass = v.GetGameClass()
|
||||
// roomtype = v.GetSceneType()
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// gpl := model.GetPlayerListByHallEx(p.SnId, p.Platform, 0, 50, 0, 0, roomtype, gameclass, gameid)
|
||||
// pack := &gamehall.SCPlayerHistory{}
|
||||
// for _, v := range gpl.Data {
|
||||
// if v.GameDetailedLogId == "" {
|
||||
// logger.Logger.Error("World PlayerHistory GameDetailedLogId is nil")
|
||||
// break
|
||||
// }
|
||||
// gdl := model.GetPlayerHistory(p.Platform, v.GameDetailedLogId)
|
||||
// player := &gamehall.PlayerHistoryInfo{}
|
||||
// genPlayerHistoryInfoMsg(spinid, v, gdl, player)
|
||||
// pack.PlayerHistory = append(pack.PlayerHistory, player)
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
// logger.Logger.Infof("World gameid:%v PlayerHistory:%v ", gameid, pack)
|
||||
// return pack
|
||||
// }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
// if data == nil {
|
||||
// logger.Logger.Error("World PlayerHistory data is nil")
|
||||
// return
|
||||
// }
|
||||
// p.SendToClient(int(gamehall.HundredScenePacketID_PACKET_SC_GAMEPLAYERHISTORY), data)
|
||||
// }), "CSGetPlayerHistoryHandlerWorld").Start()
|
||||
// case BIGWIN_HISTORY_MODEL: // 爆奖记录
|
||||
// jackpotList := JackpotListMgrSington.GetJackpotList(gameid)
|
||||
// //if len(jackpotList) < 1 {
|
||||
// // JackpotListMgrSington.GenJackpot(gameid) // 初始化爆奖记录
|
||||
// // JackpotListMgrSington.after(gameid) // 开启定时器
|
||||
// // jackpotList = JackpotListMgrSington.GetJackpotList(gameid)
|
||||
// //}
|
||||
// pack := JackpotListMgrSington.GetStoCMsg(jackpotList)
|
||||
// pack.GameId = msg.GetGameId()
|
||||
// logger.Logger.Infof("World BigWinHistory: %v %v", gameid, pack)
|
||||
// p.SendToClient(int(gamehall.HundredScenePacketID_PACKET_SC_GAMEBIGWINHISTORY), pack)
|
||||
// case GAME_HISTORY_MODEL:
|
||||
// task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
// var genGameHistoryInfo = func(gameNumber string, createdTime, multiple int64, hash string, gamehistory *gamehall.GameHistoryInfo) {
|
||||
// gamehistory.GameNumber = proto.String(gameNumber)
|
||||
// gamehistory.CreatedTime = proto.Int64(createdTime)
|
||||
// gamehistory.Hash = proto.String(hash)
|
||||
// gamehistory.Multiple = proto.Int64(multiple)
|
||||
// }
|
||||
//
|
||||
// gls := model.GetAllGameDetailedLogsByGameIdAndTs(p.Platform, gameid, 20)
|
||||
//
|
||||
// pack := &gamehall.SCPlayerHistory{}
|
||||
// for _, v := range gls {
|
||||
//
|
||||
// gamehistory := &gamehall.GameHistoryInfo{}
|
||||
//
|
||||
// data, err := model.UnMarshalGameNoteByHUNDRED(v.GameDetailedNote)
|
||||
// if err != nil {
|
||||
// logger.Logger.Errorf("World UnMarshalAvengersGameNote error:%v", err)
|
||||
// }
|
||||
// jsonString, _ := json.Marshal(data)
|
||||
//
|
||||
// // convert json to struct
|
||||
// gnd := model.CrashType{}
|
||||
// json.Unmarshal(jsonString, &gnd)
|
||||
//
|
||||
// genGameHistoryInfo(v.LogId, int64(v.Ts), int64(gnd.Rate), gnd.Hash, gamehistory)
|
||||
// pack.GameHistory = append(pack.GameHistory, gamehistory)
|
||||
// }
|
||||
// proto.SetDefaults(pack)
|
||||
// logger.Logger.Infof("World gameid:%v History:%v ", gameid, pack)
|
||||
// return pack
|
||||
// }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) {
|
||||
// if data == nil {
|
||||
// logger.Logger.Error("World GameHistory data is nil")
|
||||
// return
|
||||
// }
|
||||
// p.SendToClient(int(gamehall.HundredScenePacketID_PACKET_SC_GAMEPLAYERHISTORY), data)
|
||||
// }), "CSGetGameHistoryHandlerWorld").Start()
|
||||
// default:
|
||||
// logger.Logger.Errorf("World CSHundredSceneGetGameHistoryInfoHandler receive historyModel(%v) error", historyModel)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return nil
|
||||
//}
|
||||
|
||||
func init() {
|
||||
common.RegisterHandler(int(gamehall.HundredScenePacketID_PACKET_CS_HUNDREDSCENE_GETPLAYERNUM), &CSHundredSceneGetPlayerNumHandler{})
|
||||
netlib.RegisterFactory(int(gamehall.HundredScenePacketID_PACKET_CS_HUNDREDSCENE_GETPLAYERNUM), &CSHundredSceneGetPlayerNumPacketFactory{})
|
||||
|
||||
common.RegisterHandler(int(gamehall.HundredScenePacketID_PACKET_CS_HUNDREDSCENE_OP), &CSHundredSceneOpHandler{})
|
||||
netlib.RegisterFactory(int(gamehall.HundredScenePacketID_PACKET_CS_HUNDREDSCENE_OP), &CSHundredSceneOpPacketFactory{})
|
||||
//请求游戏列表
|
||||
common.RegisterHandler(int(gamehall.GameHallPacketID_PACKET_CS_GAMEOBSERVE), &CSGameObserveHandler{})
|
||||
netlib.RegisterFactory(int(gamehall.GameHallPacketID_PACKET_CS_GAMEOBSERVE), &CSGameObservePacketFactory{})
|
||||
|
||||
//// 请求奖池信息
|
||||
//common.RegisterHandler(int(gamehall.HundredScenePacketID_PACKET_CS_GAMEJACKPOT), &CSHundredSceneGetGameJackpotHandler{})
|
||||
//netlib.RegisterFactory(int(gamehall.HundredScenePacketID_PACKET_CS_GAMEJACKPOT), &CSHundredSceneGetGameJackpotPacketFactory{})
|
||||
|
||||
////// 请求历史记录和爆奖记录
|
||||
//common.RegisterHandler(int(gamehall.HundredScenePacketID_PACKET_CS_GAMEHISTORYINFO), &CSHundredSceneGetGameHistoryInfoHandler{})
|
||||
//netlib.RegisterFactory(int(gamehall.HundredScenePacketID_PACKET_CS_GAMEHISTORYINFO), &CSHundredSceneGetGameHistoryInfoPacketFactory{})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -529,7 +529,7 @@ func CSSkinUpgrade(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
return nil
|
||||
}
|
||||
|
||||
var change []*Item
|
||||
var change []*model.Item
|
||||
for _, v := range info.GetCost() {
|
||||
e := BagMgrSingleton.GetItem(p.SnId, v.GetId())
|
||||
if e == nil || e.ItemNum < v.GetN() {
|
||||
|
|
@ -538,19 +538,19 @@ func CSSkinUpgrade(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
send()
|
||||
return nil
|
||||
}
|
||||
change = append(change, &Item{
|
||||
change = append(change, &model.Item{
|
||||
ItemId: v.GetId(),
|
||||
ItemNum: -v.GetN(),
|
||||
})
|
||||
}
|
||||
_, _, ok = BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
_, _, ok = BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: change,
|
||||
Add: 0,
|
||||
GainWay: common.GainWaySkinUpGrade,
|
||||
Operator: "system",
|
||||
Remark: "皮肤升级消耗",
|
||||
noLog: false,
|
||||
NoLog: false,
|
||||
})
|
||||
if !ok {
|
||||
logger.Logger.Errorf("CSSkinUpgrade upgrade error")
|
||||
|
|
@ -580,7 +580,7 @@ func SkinUnLock(p *Player, id int32) (*pets.SkinInfo, pets.OpResultCode) {
|
|||
return nil, pets.OpResultCode_OPRC_Error
|
||||
}
|
||||
|
||||
var change []*Item
|
||||
var change []*model.Item
|
||||
if info.GetUnLockType() == common.SkinGetVip {
|
||||
if p.VIP < info.GetNeedVip() {
|
||||
logger.Logger.Errorf("CSSKinUnLock Unlock vip error")
|
||||
|
|
@ -592,19 +592,19 @@ func SkinUnLock(p *Player, id int32) (*pets.SkinInfo, pets.OpResultCode) {
|
|||
if e == nil || e.ItemNum < v.GetN() {
|
||||
return nil, pets.OpResultCode_OPRC_NotEnough
|
||||
}
|
||||
change = append(change, &Item{
|
||||
change = append(change, &model.Item{
|
||||
ItemId: v.GetId(),
|
||||
ItemNum: -v.GetN(),
|
||||
})
|
||||
}
|
||||
_, _, ok := BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
_, _, ok := BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: change,
|
||||
Add: 0,
|
||||
GainWay: common.GainWaySkinUnLock,
|
||||
Operator: "system",
|
||||
Remark: "皮肤解锁消耗",
|
||||
noLog: false,
|
||||
NoLog: false,
|
||||
})
|
||||
if !ok {
|
||||
logger.Logger.Errorf("CSSKinUnLock Unlock error")
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
|
|||
}
|
||||
p.AddDiamond(-diamondNum, 0, common.GainWayDiamondLottery, "sys", "钻石抽奖")
|
||||
pack := &player_proto.SCDiamondLottery{}
|
||||
var items []*Item
|
||||
var items []*model.Item
|
||||
for i := 1; i <= int(count); i++ {
|
||||
weight := 0
|
||||
for _, lotteryInfo := range config.Info {
|
||||
|
|
@ -354,7 +354,7 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
|
|||
|
||||
for _, lotteryInfo := range config.Info {
|
||||
if lotteryInfo.Id == awardId {
|
||||
items = append(items, &Item{
|
||||
items = append(items, &model.Item{
|
||||
ItemId: lotteryInfo.ItemId, // 物品id
|
||||
ItemNum: int64(lotteryInfo.Grade), // 数量
|
||||
})
|
||||
|
|
@ -372,7 +372,7 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
|
|||
value += int(lotteryInfo.Oddrate)
|
||||
if lotteryInfo.Type == 1 {
|
||||
if random <= value {
|
||||
items = append(items, &Item{
|
||||
items = append(items, &model.Item{
|
||||
ItemId: lotteryInfo.ItemId, // 物品id
|
||||
ItemNum: int64(lotteryInfo.Grade), // 数量
|
||||
})
|
||||
|
|
@ -389,10 +389,10 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
|
|||
}
|
||||
}
|
||||
}
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: items,
|
||||
Cost: []*model.ItemInfo{
|
||||
Cost: []*model.Item{
|
||||
{
|
||||
ItemId: common.ItemIDDiamond,
|
||||
ItemNum: diamondNum,
|
||||
|
|
@ -402,9 +402,9 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da
|
|||
GainWay: common.GainWayDiamondLottery,
|
||||
Operator: "system",
|
||||
Remark: "钻石抽奖",
|
||||
gameId: 0,
|
||||
gameFreeId: 0,
|
||||
noLog: false,
|
||||
GameId: 0,
|
||||
GameFreeId: 0,
|
||||
NoLog: false,
|
||||
})
|
||||
pack.LuckyScore = p.DiamondLotteryScore
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_DiamondLottery), pack)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import (
|
|||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/proto"
|
||||
gamehall_proto "mongo.games.com/game/protocol/gamehall"
|
||||
player_proto "mongo.games.com/game/protocol/player"
|
||||
webapi_proto "mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/game/webapi"
|
||||
|
|
@ -2059,13 +2058,13 @@ func CSPlayerData(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
}
|
||||
|
||||
// 给玩家发送三方余额状态
|
||||
statePack := &gamehall_proto.SCThridGameBalanceUpdateState{}
|
||||
if player.thridBalanceReqIsSucces {
|
||||
statePack.OpRetCode = gamehall_proto.OpResultCode_Game_OPRC_Sucess_Game
|
||||
} else {
|
||||
statePack.OpRetCode = gamehall_proto.OpResultCode_Game_OPRC_Error_Game
|
||||
}
|
||||
player.SendRawToClientIncOffLine(sid, s, int(gamehall_proto.GameHallPacketID_PACKET_SC_THRIDGAMEBALANCEUPDATESTATE), statePack)
|
||||
//statePack := &gamehall_proto.SCThridGameBalanceUpdateState{}
|
||||
//if player.thridBalanceReqIsSucces {
|
||||
// statePack.OpRetCode = gamehall_proto.OpResultCode_Game_OPRC_Sucess_Game
|
||||
//} else {
|
||||
// statePack.OpRetCode = gamehall_proto.OpResultCode_Game_OPRC_Error_Game
|
||||
//}
|
||||
//player.SendRawToClientIncOffLine(sid, s, int(gamehall_proto.GameHallPacketID_PACKET_SC_THRIDGAMEBALANCEUPDATESTATE), statePack)
|
||||
|
||||
//抽奖次数兼容老玩家
|
||||
if !player.IsRob && !player.InitLotteryStatus && WelfareMgrSington.GetPhoneLotteryStatus(player.Platform) == model.WelfareOpen {
|
||||
|
|
@ -3102,9 +3101,9 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
|
|||
send()
|
||||
// 获得10v卡
|
||||
if p.GuideStep == 2 {
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
Change: []*Item{
|
||||
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: []*model.Item{
|
||||
{
|
||||
ItemId: common.ItemIDVCard,
|
||||
ItemNum: 10,
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ func init() {
|
|||
case scene.IsMatchScene():
|
||||
if !MatchSceneMgrSingleton.PlayerLeave(p, int(msg.GetReason())) {
|
||||
logger.Logger.Warnf("GWPlayerLeave snid:%v sceneid:%v gameid:%v modeid:%v matchid:%v [matchscene]",
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode, scene.matchId)
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode, scene.MatchSortId)
|
||||
} else {
|
||||
//结算积分
|
||||
if !p.IsRob {
|
||||
|
|
@ -73,21 +73,7 @@ func init() {
|
|||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode)
|
||||
}
|
||||
default:
|
||||
if scene.ClubId > 0 {
|
||||
//if club, ok := clubManager.clubList[scene.ClubId]; ok {
|
||||
// if cp, ok1 := club.memberList[p.SnId]; ok1 {
|
||||
// cp.GameCount += msg.GetGameTimes()
|
||||
// cp.DayCoin += msg.GetTotalConvertibleFlow() - p.TotalConvertibleFlow
|
||||
// }
|
||||
//}
|
||||
//if !ClubSceneMgrSington.PlayerLeave(p, int(msg.GetReason())) {
|
||||
// logger.Logger.Warnf("Club leave room msg snid:%v sceneid:%v gameid:%v modeid:%v [coinscene]",
|
||||
// p.SnId, scene.sceneId, scene.gameId, scene.mode)
|
||||
// scene.PlayerLeave(p, int(msg.GetReason()))
|
||||
//}
|
||||
} else {
|
||||
scene.PlayerLeave(p, int(msg.GetReason()))
|
||||
}
|
||||
scene.PlayerLeave(p, int(msg.GetReason()))
|
||||
}
|
||||
|
||||
if p.scene != nil {
|
||||
|
|
@ -129,7 +115,7 @@ func init() {
|
|||
Platform: p.Platform,
|
||||
})
|
||||
//比赛场不处理下面的内容
|
||||
if !scene.IsMatchScene() {
|
||||
if !scene.IsMatchScene() && !scene.IsCustom() {
|
||||
// 破产检测
|
||||
sdata := srvdata.PBDB_GameSubsidyMgr.GetData(GameSubsidyid)
|
||||
if sdata != nil {
|
||||
|
|
@ -164,39 +150,6 @@ func init() {
|
|||
|
||||
gameCoinTs := msg.GetGameCoinTs()
|
||||
if !p.IsRob && !scene.IsTestScene() {
|
||||
// 同步背包数据
|
||||
diffItems := []*Item{}
|
||||
dbItemArr := srvdata.GameItemMgr.GetArr(p.Platform)
|
||||
if dbItemArr != nil {
|
||||
items := msg.GetItems()
|
||||
if items != nil {
|
||||
for _, dbItem := range dbItemArr {
|
||||
//todo 临时修复,正常应该道具需要使用事务同步
|
||||
switch dbItem.GetId() {
|
||||
case common.ItemIDPermit, common.ItemIDWeekScore:
|
||||
continue
|
||||
}
|
||||
if itemNum, exist := items[dbItem.Id]; exist {
|
||||
oldItem := BagMgrSingleton.GetItem(p.SnId, dbItem.Id)
|
||||
diffNum := itemNum
|
||||
if oldItem != nil {
|
||||
diffNum = itemNum - oldItem.ItemNum
|
||||
}
|
||||
if diffNum != 0 {
|
||||
item := &Item{
|
||||
ItemId: dbItem.Id,
|
||||
ItemNum: diffNum,
|
||||
}
|
||||
diffItems = append(diffItems, item)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if diffItems != nil && len(diffItems) != 0 {
|
||||
BagMgrSingleton.AddItems(p, diffItems, 0, 0, "", "", 0, 0, true)
|
||||
}
|
||||
|
||||
//对账点同步
|
||||
if p.GameCoinTs < gameCoinTs {
|
||||
p.GameCoinTs = gameCoinTs
|
||||
|
|
@ -301,7 +254,6 @@ func init() {
|
|||
}))
|
||||
|
||||
// 房间游戏状态
|
||||
// 捕鱼
|
||||
netlib.RegisterFactory(int(serverproto.SSPacketID_PACKET_GW_SCENESTATE), netlib.PacketFactoryWrapper(func() interface{} {
|
||||
return &serverproto.GWSceneState{}
|
||||
}))
|
||||
|
|
@ -310,8 +262,7 @@ func init() {
|
|||
if msg, ok := pack.(*serverproto.GWSceneState); ok {
|
||||
scene := SceneMgrSingleton.GetScene(int(msg.GetRoomId()))
|
||||
if scene != nil {
|
||||
scene.state = msg.GetCurrState()
|
||||
scene.fishing = msg.GetFishing()
|
||||
scene.sp.OnSceneState(scene, int(msg.GetRoomState()))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
@ -415,7 +366,7 @@ func init() {
|
|||
case scene.IsMatchScene():
|
||||
if !MatchSceneMgrSingleton.PlayerLeave(p, int(msg.GetReason())) {
|
||||
logger.Logger.Warnf("GWPlayerLeave snid:%v sceneid:%v gameid:%v modeid:%v matchid:%v [matchscene]",
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode, scene.matchId)
|
||||
p.SnId, scene.sceneId, scene.gameId, scene.gameMode, scene.MatchSortId)
|
||||
}
|
||||
default:
|
||||
scene.PlayerLeave(p, int(msg.GetReason()))
|
||||
|
|
@ -587,7 +538,7 @@ func init() {
|
|||
if scene != nil {
|
||||
scene.State = msg.GetState()
|
||||
scene.StateSec = msg.GetSec()
|
||||
scene.BankerListNum = msg.GetBankerListNum()
|
||||
//scene.BankerListNum = msg.GetBankerListNum()
|
||||
if scene.State == scene.sp.GetBetState() {
|
||||
scene.StateTs = msg.GetTs()
|
||||
leftTime := int64(scene.StateSec) - (time.Now().Unix() - scene.StateTs)
|
||||
|
|
@ -600,8 +551,8 @@ func init() {
|
|||
Ts: proto.Int64(leftTime),
|
||||
Sec: proto.Int32(scene.StateSec),
|
||||
})
|
||||
gameStateMgr.BrodcastGameState(int32(scene.gameId), scene.limitPlatform.IdStr,
|
||||
int(gamehallproto.GameHallPacketID_PACKET_SC_GAMESTATE), pack)
|
||||
gameStateMgr.BrodcastGameState(
|
||||
int32(scene.gameId), scene.limitPlatform.IdStr, int(gamehallproto.GameHallPacketID_PACKET_SC_GAMESTATE), pack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -664,6 +615,37 @@ func init() {
|
|||
}
|
||||
return nil
|
||||
}))
|
||||
|
||||
// 同步道具数量
|
||||
netlib.Register(int(serverproto.SSPacketID_PACKET_PlayerChangeItems), &serverproto.PlayerChangeItems{}, HandlePlayerChangeItems)
|
||||
}
|
||||
|
||||
func HandlePlayerChangeItems(session *netlib.Session, packetId int, data interface{}) error {
|
||||
logger.Logger.Tracef("HandlePlayerChangeItems recv %v", data)
|
||||
msg, ok := data.(*serverproto.PlayerChangeItems)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
p := PlayerMgrSington.GetPlayerBySnId(msg.GetSnId())
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
var items []*model.Item
|
||||
for _, v := range msg.GetItems() {
|
||||
items = append(items, &model.Item{
|
||||
ItemId: v.GetId(),
|
||||
ItemNum: v.GetNum(),
|
||||
})
|
||||
}
|
||||
_, _, ok = BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: items,
|
||||
NoLog: true,
|
||||
})
|
||||
if !ok {
|
||||
logger.Logger.Errorf("HandlePlayerChangeItems add item failed %v", msg)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 机器人服务器向worldsrv发送
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ func CSRoomList(s *netlib.Session, packetId int, data interface{}, sid int64) er
|
|||
audience := msg.GetTp() == 1
|
||||
scenes := TournamentMgr.GetTmRoom(p.Platform, 0, p.LastChannel, audience, msg.GetId())
|
||||
for _, v := range scenes {
|
||||
tm := TournamentMgr.GetTm(v.matchId)
|
||||
tm := TournamentMgr.GetTm(v.MatchSortId)
|
||||
if tm == nil {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import (
|
|||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/proto"
|
||||
webapi_proto "mongo.games.com/game/protocol/webapi"
|
||||
webapiproto "mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/game/protocol/welfare"
|
||||
"mongo.games.com/game/srvdata"
|
||||
"mongo.games.com/game/webapi"
|
||||
|
|
@ -315,14 +315,14 @@ func CSInviteInfo(s *netlib.Session, packetid int, data interface{}, sid int64)
|
|||
var res []byte
|
||||
var err error
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
req := &webapi_proto.ASPlayerInviteLink{
|
||||
req := &webapiproto.ASPlayerInviteLink{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
}
|
||||
res, err = webapi.ApiGetInviteLink(common.GetAppId(), req)
|
||||
return nil
|
||||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
info := webapi_proto.SAPlayerInviteLink{}
|
||||
info := webapiproto.SAPlayerInviteLink{}
|
||||
if err != nil || res == nil {
|
||||
logger.Logger.Errorf("ApiGetInviteLink err %v or not return", err)
|
||||
} else {
|
||||
|
|
@ -1029,7 +1029,7 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
|
|||
}
|
||||
|
||||
if isExchange {
|
||||
var exchangeConfig *webapi_proto.PermitExchangeConfig
|
||||
var exchangeConfig *webapiproto.PermitExchangeConfig
|
||||
for _, v := range channelConfig.GetExchangeConfig() {
|
||||
if v.GetId() == msg.GetId() {
|
||||
exchangeConfig = v
|
||||
|
|
@ -1038,10 +1038,10 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
|
|||
}
|
||||
if exchangeConfig != nil {
|
||||
// 检查背包是否足够
|
||||
var items []*Item
|
||||
var items []*model.Item
|
||||
var costItems []*Item
|
||||
var cost, gain []model.AwardItem
|
||||
var cost1 []*model.ItemInfo
|
||||
var cost1 []*model.Item
|
||||
for _, v := range exchangeConfig.GetCost() {
|
||||
item := BagMgrSingleton.GetItem(p.SnId, v.GetItemId())
|
||||
if item == nil || item.ItemNum < v.GetItemNum() {
|
||||
|
|
@ -1059,7 +1059,7 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
|
|||
Id: v.GetItemId(),
|
||||
Num: v.GetItemNum(),
|
||||
})
|
||||
cost1 = append(cost1, &model.ItemInfo{
|
||||
cost1 = append(cost1, &model.Item{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: v.GetItemNum(),
|
||||
})
|
||||
|
|
@ -1068,10 +1068,9 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
|
|||
for _, v := range exchangeConfig.GetGain() {
|
||||
info := srvdata.GameItemMgr.Get(p.Platform, v.GetItemId())
|
||||
if info != nil {
|
||||
items = append(items, &Item{
|
||||
items = append(items, &model.Item{
|
||||
ItemId: v.GetItemId(),
|
||||
ItemNum: v.GetItemNum(),
|
||||
Name: info.Name,
|
||||
})
|
||||
gain = append(gain, model.AwardItem{
|
||||
Id: v.GetItemId(),
|
||||
|
|
@ -1085,17 +1084,17 @@ func CSPermitExchange(s *netlib.Session, packetid int, data interface{}, sid int
|
|||
common.GainWayPermitExchangeCost, "system", "赛季通行证兑换消耗", 0, 0, false)
|
||||
}
|
||||
// 增加背包物品
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: items,
|
||||
Cost: cost1,
|
||||
Add: 0,
|
||||
GainWay: common.GainWayPermitExchangeGain,
|
||||
Operator: "system",
|
||||
Remark: "赛季通行证兑换获得",
|
||||
gameId: 0,
|
||||
gameFreeId: 0,
|
||||
noLog: false,
|
||||
GameId: 0,
|
||||
GameFreeId: 0,
|
||||
NoLog: false,
|
||||
})
|
||||
p.WelfData.PermitExchange[msg.GetId()] = append(p.WelfData.PermitExchange[msg.GetId()], now.Unix())
|
||||
// 兑换记录
|
||||
|
|
|
|||
|
|
@ -149,20 +149,37 @@ type ItemParam struct {
|
|||
Add int64 // 加成数量
|
||||
GainWay int32 // 记录类型
|
||||
Operator, Remark string // 操作人,备注
|
||||
gameId, gameFreeId int64 // 游戏id,场次id
|
||||
noLog bool // 是否不记录日志
|
||||
GameId, GameFreeId int64 // 游戏id,场次id
|
||||
NoLog bool // 是否不记录日志
|
||||
LogId string // 撤销的id,道具兑换失败
|
||||
}
|
||||
|
||||
type AddItemParam struct {
|
||||
Cost []*model.ItemInfo // 获得道具时消耗的道具数量
|
||||
LogId string
|
||||
Cost []*model.Item // 获得道具时消耗的道具数量
|
||||
LogId string
|
||||
RoomConfigId int32
|
||||
}
|
||||
|
||||
func (this *BagMgr) AddItemsV2(args *ItemParam) (*BagInfo, bag.OpResultCode, bool) {
|
||||
return this.AddItems(args.P, args.Change, args.Add, args.GainWay, args.Operator, args.Remark, args.gameId, args.gameFreeId, args.noLog, AddItemParam{
|
||||
Cost: args.Cost,
|
||||
LogId: args.LogId,
|
||||
func (this *BagMgr) AddItemsV2(args *model.AddItemParam) (*BagInfo, bag.OpResultCode, bool) {
|
||||
p := PlayerMgrSington.GetPlayerBySnId(args.P.SnId)
|
||||
var items []*Item
|
||||
var costs []*model.Item
|
||||
for _, v := range args.Change {
|
||||
items = append(items, &Item{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
})
|
||||
}
|
||||
for _, v := range args.Cost {
|
||||
costs = append(costs, &model.Item{
|
||||
ItemId: v.ItemId,
|
||||
ItemNum: v.ItemNum,
|
||||
})
|
||||
}
|
||||
return this.AddItems(p, items, args.Add, args.GainWay, args.Operator, args.Remark, args.GameId, args.GameFreeId, args.NoLog, AddItemParam{
|
||||
Cost: costs,
|
||||
LogId: args.LogId,
|
||||
RoomConfigId: args.RoomConfigId,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -173,15 +190,17 @@ func (this *BagMgr) AddItemsV2(args *ItemParam) (*BagInfo, bag.OpResultCode, boo
|
|||
// remark 备注
|
||||
// gameId 游戏id
|
||||
// gameFreeId 场次id
|
||||
// noLog 是否不记录日志
|
||||
// NoLog 是否不记录日志
|
||||
// Deprecated: use [ AddItemsV2 ] instead
|
||||
func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int32, operator, remark string,
|
||||
gameId, gameFreeId int64, noLog bool, params ...AddItemParam) (*BagInfo, bag.OpResultCode, bool) {
|
||||
var cost []*model.ItemInfo
|
||||
var cost []*model.Item
|
||||
var id string
|
||||
var roomConfigId int32
|
||||
if len(params) > 0 {
|
||||
cost = params[0].Cost
|
||||
id = params[0].LogId
|
||||
roomConfigId = params[0].RoomConfigId
|
||||
}
|
||||
|
||||
var items []*Item
|
||||
|
|
@ -310,18 +329,19 @@ func (this *BagMgr) AddItems(p *Player, addItems []*Item, add int64, gainWay int
|
|||
num = -v.ItemNum
|
||||
}
|
||||
log := model.NewItemLogEx(model.ItemParam{
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
LogType: int32(logType),
|
||||
ItemId: v.ItemId,
|
||||
ItemName: item.Name,
|
||||
Count: num,
|
||||
Remark: remark,
|
||||
TypeId: gainWay,
|
||||
GameId: gameId,
|
||||
GameFreeId: gameFreeId,
|
||||
Cost: cost,
|
||||
LogId: id,
|
||||
Platform: p.Platform,
|
||||
SnId: p.SnId,
|
||||
LogType: int32(logType),
|
||||
ItemId: v.ItemId,
|
||||
ItemName: item.Name,
|
||||
Count: num,
|
||||
Remark: remark,
|
||||
TypeId: gainWay,
|
||||
GameId: gameId,
|
||||
GameFreeId: gameFreeId,
|
||||
Cost: cost,
|
||||
LogId: id,
|
||||
RoomConfigId: roomConfigId,
|
||||
})
|
||||
if log != nil {
|
||||
LogChannelSingleton.WriteLog(log)
|
||||
|
|
@ -745,22 +765,22 @@ func (this *BagMgr) ItemExchangeCard(p *Player, itemId int32, money, cardType in
|
|||
}), task.CompleteNotifyWrapper(func(i interface{}, t task.Task) {
|
||||
if err != nil || res.GetCode() == "" || res.GetTag() != webapiproto.TagCode_SUCCESS {
|
||||
//返回道具
|
||||
items := make([]*Item, 0)
|
||||
items = append(items, &Item{
|
||||
items := make([]*model.Item, 0)
|
||||
items = append(items, &model.Item{
|
||||
ItemId: itemId, // 物品id
|
||||
ItemNum: 1, // 数量
|
||||
ObtainTime: time.Now().Unix(),
|
||||
})
|
||||
this.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
this.AddItemsV2(&model.AddItemParam{
|
||||
P: p.PlayerData,
|
||||
Change: items,
|
||||
Add: 0,
|
||||
GainWay: common.GainWayItemChange,
|
||||
Operator: "system",
|
||||
Remark: "背包内使用兑换失败",
|
||||
gameId: 0,
|
||||
gameFreeId: 0,
|
||||
noLog: false,
|
||||
GameId: 0,
|
||||
GameFreeId: 0,
|
||||
NoLog: false,
|
||||
LogId: logId,
|
||||
})
|
||||
logger.Logger.Errorf("获取兑换码失败 snid:%v itemID:%v res:%v err:%v", p.SnId, itemId, res, err)
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ func (this *CacheDataManager) CacheBillNumber(billNo int, platform string) {
|
|||
key := fmt.Sprintf("BillNo-%v-%v", billNo, platform)
|
||||
this.addCacheData(AfterHour, key, key)
|
||||
}
|
||||
|
||||
func (this *CacheDataManager) CacheBillCheck(billNo int, platform string) bool {
|
||||
key := fmt.Sprintf("BillNo-%v-%v", billNo, platform)
|
||||
if _, ok := this.HourCache.Load(key); ok {
|
||||
|
|
@ -121,6 +122,7 @@ func (this *CacheDataManager) CacheBillCheck(billNo int, platform string) bool {
|
|||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func (this *CacheDataManager) ClearCacheBill(billNo int, platform string) {
|
||||
key := fmt.Sprintf("BillNo-%v-%v", billNo, platform)
|
||||
this.HourCache.Delete(key)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ package main
|
|||
import (
|
||||
"sort"
|
||||
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/protocol/gamehall"
|
||||
|
|
@ -211,14 +209,6 @@ func (this *BaseCoinScenePool) AudienceLeave(pool *CoinScenePool, p *Player, rea
|
|||
func (this *BaseCoinScenePool) OnPlayerLeave(pool *CoinScenePool, s *Scene, p *Player) {}
|
||||
|
||||
func (this *BaseCoinScenePool) NewScene(pool *CoinScenePool, p *Player) *Scene {
|
||||
gameId := int(pool.dbGameFree.GetGameId())
|
||||
gs := GameSessMgrSington.GetMinLoadSess(gameId)
|
||||
if gs == nil {
|
||||
logger.Logger.Warnf("Get %v game min session failed.", gameId)
|
||||
return nil
|
||||
}
|
||||
|
||||
gameMode := pool.dbGameFree.GetGameMode()
|
||||
params := common.CopySliceInt32ToInt64(pool.dbGameRule.GetParams())
|
||||
limitPlatform := PlatformMgrSingleton.GetPlatform(pool.platform)
|
||||
if limitPlatform == nil || !limitPlatform.Isolated {
|
||||
|
|
@ -226,9 +216,14 @@ func (this *BaseCoinScenePool) NewScene(pool *CoinScenePool, p *Player) *Scene {
|
|||
}
|
||||
|
||||
sceneId := SceneMgrSingleton.GenOneCoinSceneId()
|
||||
|
||||
scene := SceneMgrSingleton.CreateScene(0, 0, sceneId, gameId, int(gameMode), common.SceneMode_Public,
|
||||
1, -1, params, gs, limitPlatform, 0, pool.dbGameFree, pool.ID())
|
||||
scene := SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||
RoomId: sceneId,
|
||||
SceneMode: common.SceneMode_Public,
|
||||
Params: params,
|
||||
GS: nil,
|
||||
Platform: limitPlatform,
|
||||
GF: pool.dbGameFree,
|
||||
})
|
||||
return scene
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ func init() {
|
|||
RegisterCoinScenePool(common.GameId_TienLen_yl, local)
|
||||
RegisterCoinScenePool(common.GameId_TienLen_toend, local)
|
||||
RegisterCoinScenePool(common.GameId_TienLen_yl_toend, local)
|
||||
RegisterCoinScenePool(common.GameId_TaLa, local)
|
||||
RegisterCoinScenePool(common.GameId_SamLoc, local)
|
||||
RegisterCoinScenePool(common.GameID_ThirteenFree, local)
|
||||
RegisterCoinScenePool(common.GameID_ThirteenFreeLaiZi, local)
|
||||
//RegisterCoinScenePool(common.GameId_TaLa, local)
|
||||
//RegisterCoinScenePool(common.GameId_SamLoc, local)
|
||||
}
|
||||
|
||||
type CoinScenePoolLocal struct {
|
||||
|
|
@ -187,14 +187,7 @@ func (l *CoinScenePoolLocal) PlayerEnter(pool *CoinScenePool, p *Player, exclude
|
|||
|
||||
func (l *CoinScenePoolLocal) NewScene(pool *CoinScenePool, p *Player) *Scene {
|
||||
gameId := int(pool.dbGameFree.GetGameId())
|
||||
gs := GameSessMgrSington.GetMinLoadSess(gameId)
|
||||
if gs == nil {
|
||||
logger.Logger.Errorf("Get %v game min session failed.", gameId)
|
||||
return nil
|
||||
}
|
||||
|
||||
sceneId := SceneMgrSingleton.GenOneCoinSceneId()
|
||||
|
||||
params := pool.dbGameRule.GetParams()
|
||||
limitPlatform := PlatformMgrSingleton.GetPlatform(pool.platform)
|
||||
if limitPlatform == nil || !limitPlatform.Isolated {
|
||||
|
|
@ -203,7 +196,6 @@ func (l *CoinScenePoolLocal) NewScene(pool *CoinScenePool, p *Player) *Scene {
|
|||
|
||||
//根据携带金额取可创房间 DB_Createroom
|
||||
baseScore := int32(0)
|
||||
gameSite := 0
|
||||
playerTakeCoin := p.Coin
|
||||
var dbCreateRoom *serverproto.DB_Createroom
|
||||
arrs := srvdata.PBDB_CreateroomMgr.Datas.Arr
|
||||
|
|
@ -225,26 +217,26 @@ func (l *CoinScenePoolLocal) NewScene(pool *CoinScenePool, p *Player) *Scene {
|
|||
}
|
||||
if len(dbCreateRoom.GetBetRange()) != 0 && dbCreateRoom.GetBetRange()[0] != 0 {
|
||||
baseScore = common.RandInt32Slice(dbCreateRoom.GetBetRange())
|
||||
gameSite = int(dbCreateRoom.GetGameSite())
|
||||
}
|
||||
if baseScore == 0 {
|
||||
logger.Logger.Tracef("CoinScenePool CreateLocalGameNewScene failed! baseScore==0")
|
||||
logger.Logger.Tracef("CoinScenePool CreateLocalGameNewScene failed! BaseScore==0")
|
||||
return nil
|
||||
}
|
||||
|
||||
scene := SceneMgrSingleton.CreateLocalGameScene(p.SnId, sceneId, gameId, gameSite, common.SceneMode_Public, 1, common.CopySliceInt32ToInt64(params),
|
||||
gs, limitPlatform, 0, pool.dbGameFree, baseScore, 0, pool.ID())
|
||||
scene := SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||
CreateId: p.SnId,
|
||||
RoomId: sceneId,
|
||||
SceneMode: common.SceneMode_Public,
|
||||
Params: common.CopySliceInt32ToInt64(params),
|
||||
GS: nil,
|
||||
Platform: limitPlatform,
|
||||
GF: pool.dbGameFree,
|
||||
BaseScore: baseScore,
|
||||
})
|
||||
return scene
|
||||
}
|
||||
|
||||
func (l *CoinScenePoolLocal) NewPreCreateScene(pool *CoinScenePool) *Scene {
|
||||
gameId := int(pool.dbGameRule.GetGameId())
|
||||
gs := GameSessMgrSington.GetMinLoadSess(gameId)
|
||||
if gs == nil {
|
||||
logger.Logger.Warnf("Get %v game min session failed.", gameId)
|
||||
return nil
|
||||
}
|
||||
|
||||
sceneId := SceneMgrSingleton.GenOneCoinSceneId()
|
||||
|
||||
params := pool.dbGameRule.GetParams()
|
||||
|
|
@ -261,7 +253,6 @@ func (l *CoinScenePoolLocal) NewPreCreateScene(pool *CoinScenePool) *Scene {
|
|||
}
|
||||
//根据SceneType随机可创房间 DB_Createroom
|
||||
baseScore := int32(0)
|
||||
gameSite := 0
|
||||
var dbCreateRooms []*serverproto.DB_Createroom
|
||||
arrs := srvdata.PBDB_CreateroomMgr.Datas.Arr
|
||||
for i := len(arrs) - 1; i >= 0; i-- {
|
||||
|
|
@ -281,13 +272,19 @@ func (l *CoinScenePoolLocal) NewPreCreateScene(pool *CoinScenePool) *Scene {
|
|||
dbCreateRoom := dbCreateRooms[randIdx]
|
||||
if len(dbCreateRoom.GetBetRange()) != 0 && dbCreateRoom.GetBetRange()[0] != 0 {
|
||||
baseScore = common.RandInt32Slice(dbCreateRoom.GetBetRange())
|
||||
gameSite = int(dbCreateRoom.GetGameSite())
|
||||
}
|
||||
if baseScore != 0 {
|
||||
scene = SceneMgrSingleton.CreateLocalGameScene(0, sceneId, gameId, gameSite, common.SceneMode_Public, 1, common.CopySliceInt32ToInt64(params),
|
||||
gs, limitPlatform, playerNum, pool.dbGameFree, baseScore, 0, pool.ID())
|
||||
scene = SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||
RoomId: sceneId,
|
||||
SceneMode: common.SceneMode_Public,
|
||||
Params: common.CopySliceInt32ToInt64(params),
|
||||
Platform: limitPlatform,
|
||||
GF: pool.dbGameFree,
|
||||
PlayerNum: int32(playerNum),
|
||||
BaseScore: baseScore,
|
||||
})
|
||||
if scene != nil {
|
||||
logger.Logger.Tracef("CreateLocalGameScene success.gameId:%v gameSite:%v baseScore:%v randIdx:%v", scene.gameId, scene.gameSite, baseScore, randIdx)
|
||||
logger.Logger.Tracef("CreateLocalGameScene success.gameId:%v gameSite:%v BaseScore:%v randIdx:%v", scene.gameId, scene.dbGameFree.GetSceneType(), baseScore, randIdx)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
195
worldsrv/etcd.go
195
worldsrv/etcd.go
|
|
@ -56,7 +56,7 @@ func init() {
|
|||
// 代理
|
||||
etcd.Register(etcd.ETCDKEY_PROMOTER_PREFIX, PromoterConfig{}, handlerEvent)
|
||||
// 赠送
|
||||
etcd.Register(etcd.ETCDKEY_ACT_GIVE_PREFIX, PromoterConfig{}, handlerEvent)
|
||||
etcd.Register(etcd.ETCDKEY_ACT_GIVE_PREFIX, ActGivePlateformConfig{}, handlerEvent)
|
||||
// 7日签到
|
||||
etcd.Register(etcd.ETCDKEY_ACT_7SIGN, webapi.Welfare7SignDateList{}, platformConfigEvent)
|
||||
// 转盘
|
||||
|
|
@ -93,6 +93,80 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_MatchAudience, webapi.MatchAudience{}, handlerEvent)
|
||||
// 小精灵配置
|
||||
etcd.Register(etcd.ETCDKEY_Spirit, webapi.SpiritConfig{}, platformConfigEvent)
|
||||
|
||||
PlatformMgrSingleton.GetConfig("1").RoomType = map[int32]*webapi.RoomType{
|
||||
1: {
|
||||
Platform: "1",
|
||||
Id: 1,
|
||||
Name: "{\"zh\":\"话费赛\",\"kh\":\"话费赛\",\"vi\":\"话费赛\",\"en\":\"话费赛\"}",
|
||||
On: 1,
|
||||
SortId: 1,
|
||||
},
|
||||
2: {
|
||||
Platform: "1",
|
||||
Id: 2,
|
||||
Name: "{\"zh\":\"物品赛\",\"kh\":\"物品赛\",\"vi\":\"物品赛\",\"en\":\"物品赛\"}",
|
||||
On: 1,
|
||||
SortId: 2,
|
||||
},
|
||||
}
|
||||
|
||||
PlatformMgrSingleton.UpdateRoomConfig(&webapi.RoomConfig{
|
||||
Platform: "1",
|
||||
Id: 1,
|
||||
Name: "{\"zh\":\"1元话费赛\",\"kh\":\"1元话费赛\",\"vi\":\"1元话费赛\",\"en\":\"1元话费赛\"}",
|
||||
RoomType: 1,
|
||||
On: 1,
|
||||
SortId: 1,
|
||||
Cost: []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: 100001,
|
||||
ItemNum: 12,
|
||||
},
|
||||
},
|
||||
Reward: []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: 100001,
|
||||
ItemNum: 12,
|
||||
},
|
||||
},
|
||||
OnChannelName: []string{common.ChannelOfficial, common.ChannelWeb, common.ChannelGooglePlay},
|
||||
GameFreeId: []int32{2150001, 2160001, 2170001, 2180001},
|
||||
Round: []int32{1, 2, 3, 4},
|
||||
PlayerNum: []int32{2, 3, 4},
|
||||
NeedPassword: 3,
|
||||
CostType: 3,
|
||||
Voice: 3,
|
||||
ImageURI: "",
|
||||
})
|
||||
PlatformMgrSingleton.UpdateRoomConfig(&webapi.RoomConfig{
|
||||
Platform: "1",
|
||||
Id: 2,
|
||||
Name: "{\"zh\":\"2元话费赛\",\"kh\":\"2元话费赛\",\"vi\":\"2元话费赛\",\"en\":\"2元话费赛\"}",
|
||||
RoomType: 1,
|
||||
On: 1,
|
||||
SortId: 2,
|
||||
Cost: []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: 100001,
|
||||
ItemNum: 12,
|
||||
},
|
||||
},
|
||||
Reward: []*webapi.ItemInfo{
|
||||
{
|
||||
ItemId: 100001,
|
||||
ItemNum: 12,
|
||||
},
|
||||
},
|
||||
OnChannelName: []string{common.ChannelOfficial, common.ChannelWeb, common.ChannelGooglePlay},
|
||||
GameFreeId: []int32{2150001, 2160001, 2170001, 2180001},
|
||||
Round: []int32{1, 2, 3, 4},
|
||||
PlayerNum: []int32{2, 3, 4},
|
||||
NeedPassword: 3,
|
||||
CostType: 3,
|
||||
Voice: 3,
|
||||
ImageURI: "",
|
||||
})
|
||||
}
|
||||
|
||||
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
|
@ -331,12 +405,43 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
|||
}
|
||||
|
||||
func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
if data == nil {
|
||||
return
|
||||
var plt string
|
||||
var param []int
|
||||
equalFunc := func(key string) bool {
|
||||
plt = ""
|
||||
param = param[:0]
|
||||
if strings.HasPrefix(completeKey, key) {
|
||||
arr := strings.Split(strings.TrimPrefix(completeKey, key), "/")
|
||||
for k, v := range arr {
|
||||
if v == "" {
|
||||
continue
|
||||
}
|
||||
if len(v) > 0 {
|
||||
plt = v
|
||||
for _, v := range arr[k+1:] {
|
||||
n, err := strconv.Atoi(v)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
param = append(param, n)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
switch config := data.(type) {
|
||||
case *BlackInfoApi:
|
||||
|
||||
switch {
|
||||
case equalFunc(etcd.ETCDKEY_BLACKLIST_PREFIX):
|
||||
var config *BlackInfoApi
|
||||
if data != nil {
|
||||
config = data.(*BlackInfoApi)
|
||||
}
|
||||
if isInit {
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
BlackListMgrSington.InitBlackInfo(config)
|
||||
} else {
|
||||
switch event.Type {
|
||||
|
|
@ -353,6 +458,9 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
|
|||
}
|
||||
}
|
||||
case clientv3.EventTypePut:
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
BlackListMgrSington.UpsertBlackInfo(config)
|
||||
if (config.Space & int32(BlackState_Login)) != 0 {
|
||||
var targetPlayer []*Player //确定用户是否在线
|
||||
|
|
@ -372,8 +480,16 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
|
|||
}
|
||||
}
|
||||
}
|
||||
case *PromoterConfig:
|
||||
|
||||
case equalFunc(etcd.ETCDKEY_PROMOTER_PREFIX):
|
||||
var config *PromoterConfig
|
||||
if data != nil {
|
||||
config = data.(*PromoterConfig)
|
||||
}
|
||||
if isInit {
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
PromoterMgrSington.AddConfig(config)
|
||||
} else {
|
||||
switch event.Type {
|
||||
|
|
@ -385,16 +501,32 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
|
|||
PromoterMgrSington.RemoveConfigByKey(promoterConfig)
|
||||
}
|
||||
case clientv3.EventTypePut:
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
PromoterMgrSington.AddConfig(config)
|
||||
}
|
||||
}
|
||||
case *ActGivePlateformConfig:
|
||||
|
||||
case equalFunc(etcd.ETCDKEY_ACT_GIVE_PREFIX):
|
||||
var config *ActGivePlateformConfig
|
||||
if data != nil {
|
||||
config = data.(*ActGivePlateformConfig)
|
||||
}
|
||||
if config == nil {
|
||||
return
|
||||
}
|
||||
if isInit || event.Type == clientv3.EventTypePut {
|
||||
ActMgrSington.AddGiveConfig(config, config.Platform)
|
||||
}
|
||||
case *webapi.MatchAudience:
|
||||
|
||||
case equalFunc(etcd.ETCDKEY_MatchAudience):
|
||||
switch event.Type {
|
||||
case clientv3.EventTypePut:
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
config := data.(*webapi.MatchAudience)
|
||||
PlatformMgrSingleton.AddMatchAudience(config)
|
||||
if !isInit {
|
||||
p := PlayerMgrSington.GetPlayerBySnId(config.GetSnId())
|
||||
|
|
@ -403,15 +535,58 @@ func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *c
|
|||
}
|
||||
}
|
||||
case clientv3.EventTypeDelete:
|
||||
PlatformMgrSingleton.DelMatchAudience(config)
|
||||
if plt == "" || len(param) == 0 {
|
||||
return
|
||||
}
|
||||
PlatformMgrSingleton.DelMatchAudience(plt, int32(param[0]))
|
||||
if !isInit {
|
||||
p := PlayerMgrSington.GetPlayerBySnId(config.GetSnId())
|
||||
p := PlayerMgrSington.GetPlayerBySnId(int32(param[0]))
|
||||
if p != nil {
|
||||
p.SCDataConfig(common.DataConfigMatchAudience)
|
||||
}
|
||||
}
|
||||
}
|
||||
case equalFunc(etcd.ETCDKEY_RoomType):
|
||||
switch event.Type {
|
||||
case clientv3.EventTypePut:
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
config := data.(*webapi.RoomType)
|
||||
PlatformMgrSingleton.UpdateRoomType(config)
|
||||
if !isInit {
|
||||
PlayerMgrSington.BroadcastMessageToPlatform(config.GetPlatform(), int(0), nil)
|
||||
}
|
||||
case clientv3.EventTypeDelete:
|
||||
if plt == "" || len(param) == 0 {
|
||||
return
|
||||
}
|
||||
PlatformMgrSingleton.DelRoomType(plt, int32(param[0]))
|
||||
if !isInit {
|
||||
PlayerMgrSington.BroadcastMessageToPlatform(plt, int(0), nil)
|
||||
}
|
||||
}
|
||||
|
||||
case equalFunc(etcd.ETCDKEY_RoomConfig):
|
||||
switch event.Type {
|
||||
case clientv3.EventTypePut:
|
||||
if data == nil {
|
||||
return
|
||||
}
|
||||
config := data.(*webapi.RoomConfig)
|
||||
PlatformMgrSingleton.UpdateRoomConfig(config)
|
||||
if !isInit {
|
||||
//PlayerMgrSington.BroadcastMessageToPlatform(config.GetPlatform(), int(0), nil)
|
||||
}
|
||||
case clientv3.EventTypeDelete:
|
||||
if plt == "" || len(param) == 0 {
|
||||
return
|
||||
}
|
||||
PlatformMgrSingleton.DelRoomConfig(plt, int32(param[0]))
|
||||
if !isInit {
|
||||
//PlayerMgrSington.BroadcastMessageToPlatform(plt, int(0), nil)
|
||||
}
|
||||
}
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,11 +124,7 @@ func UpdateGameConfigPolicy(fullPath string) error {
|
|||
}
|
||||
if err == nil && spd.Init() {
|
||||
for _, m := range spd.GameMode {
|
||||
//logger.Logger.Info("New game config ver:", spd.ConfigVer)
|
||||
if !CheckGameConfigVer(spd.ConfigVer, spd.GameId, m) {
|
||||
//TeaHouseMgr.UpdateGameConfigVer(spd.ConfigVer, spd.GameId, m)
|
||||
}
|
||||
RegisteScenePolicy(int(spd.GameId), int(m), spd)
|
||||
RegisterScenePolicy(int(spd.GameId), int(m), spd)
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -151,70 +151,55 @@ func (this *GameSession) OnStateOff() {
|
|||
this.Send(int(server_proto.SSPacketID_PACKET_WG_SERVER_STATE), pack)
|
||||
}
|
||||
|
||||
func (this *GameSession) AddScene(s *Scene) {
|
||||
this.scenes[s.sceneId] = s
|
||||
type AddSceneParam struct {
|
||||
S *Scene
|
||||
}
|
||||
|
||||
func (this *GameSession) AddScene(args *AddSceneParam) {
|
||||
this.scenes[args.S.sceneId] = args.S
|
||||
//send msg
|
||||
msg := &server_proto.WGCreateScene{
|
||||
SceneId: proto.Int(s.sceneId),
|
||||
GameId: proto.Int(s.gameId),
|
||||
GameMode: proto.Int(s.gameMode),
|
||||
SceneMode: proto.Int(s.sceneMode),
|
||||
Params: s.params,
|
||||
ParamsEx: s.paramsEx,
|
||||
Creator: proto.Int32(s.creator),
|
||||
Agentor: proto.Int32(s.agentor),
|
||||
HallId: proto.Int32(s.hallId),
|
||||
ReplayCode: proto.String(s.replayCode),
|
||||
GroupId: proto.Int32(s.groupId),
|
||||
TotalOfGames: proto.Int32(s.totalRound),
|
||||
BaseScore: proto.Int32(s.BaseScore),
|
||||
PlayerNum: proto.Int(s.playerNum),
|
||||
MatchInfoId: s.MatchInfoId,
|
||||
Platform: args.S.limitPlatform.IdStr,
|
||||
SceneId: int32(args.S.sceneId),
|
||||
GameId: int32(args.S.gameId),
|
||||
GameMode: int32(args.S.gameMode),
|
||||
SceneMode: int32(args.S.sceneMode),
|
||||
ReplayCode: args.S.replayCode,
|
||||
DBGameFree: args.S.dbGameFree,
|
||||
TotalOfGames: args.S.totalRound,
|
||||
PlayerNum: int32(args.S.playerNum),
|
||||
Creator: args.S.creator,
|
||||
BaseScore: args.S.BaseScore,
|
||||
Custom: args.S.CustomParam,
|
||||
Match: args.S.MatchParam,
|
||||
Params: args.S.params,
|
||||
}
|
||||
var platform *Platform
|
||||
if s.limitPlatform != nil {
|
||||
msg.Platform = proto.String(s.limitPlatform.IdStr)
|
||||
platform = s.limitPlatform
|
||||
} else {
|
||||
msg.Platform = proto.String(DefaultPlatform)
|
||||
platform = PlatformMgrSingleton.GetPlatform(DefaultPlatform)
|
||||
}
|
||||
if s.dbGameFree != nil {
|
||||
msg.DBGameFree = s.dbGameFree
|
||||
} else if platform != nil {
|
||||
gps := PlatformMgrSingleton.GetGameFree(platform.IdStr, s.paramsEx[0])
|
||||
if gps != nil {
|
||||
if gps.GroupId == 0 {
|
||||
msg.DBGameFree = gps.DbGameFree
|
||||
} else {
|
||||
pgg := PlatformGameGroupMgrSington.GetGameGroup(gps.GroupId)
|
||||
if pgg != nil {
|
||||
msg.DBGameFree = pgg.DbGameFree
|
||||
}
|
||||
if args.S.GetRoomTypeId() != 0 {
|
||||
cfg := PlatformMgrSingleton.GetConfig(args.S.limitPlatform.IdStr).RoomConfig[args.S.GetRoomTypeId()]
|
||||
if cfg != nil {
|
||||
for _, v := range cfg.GetReward() {
|
||||
msg.Items = append(msg.Items, &server_proto.Item{
|
||||
Id: v.GetItemId(),
|
||||
Num: v.GetItemNum(),
|
||||
})
|
||||
}
|
||||
for _, v := range cfg.GetCost() {
|
||||
msg.CostItems = append(msg.CostItems, &server_proto.Item{
|
||||
Id: v.GetItemId(),
|
||||
Num: v.GetItemNum(),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
if s.IsCoinScene() {
|
||||
if sp, ok := s.sp.(*ScenePolicyData); ok {
|
||||
msg.EnterAfterStart = proto.Bool(sp.EnterAfterStart)
|
||||
}
|
||||
}
|
||||
//if s.ClubId > 0 {
|
||||
// msg.Club = proto.Int32(s.ClubId)
|
||||
// msg.ClubRoomId = proto.String(s.clubRoomID)
|
||||
// msg.ClubRoomPos = proto.Int32(s.clubRoomPos)
|
||||
// msg.ClubRate = proto.Int32(s.clubRoomTax)
|
||||
//}
|
||||
if s.IsHundredScene() {
|
||||
//msg.RealCtrl = WBCtrlCfgMgr.GetRealCtrl(s.limitPlatform.IdStr)
|
||||
if sp, ok := args.S.sp.(*ScenePolicyData); ok {
|
||||
msg.EnterAfterStart = proto.Bool(sp.EnterAfterStart)
|
||||
}
|
||||
// 象棋游戏添加段位配置
|
||||
if s.dbGameFree != nil && s.dbGameFree.GameDif == common.GameDifChess && platform != nil {
|
||||
msg.ChessRank = ChessRankMgrSington.GetChessRankArr(platform.Name, int32(s.gameId))
|
||||
if args.S.dbGameFree != nil && srvdata.GameFreeMgr.IsGameDif(int32(args.S.gameId), common.GameDifChess) {
|
||||
msg.ChessRank = ChessRankMgrSington.GetChessRankArr(args.S.limitPlatform.Name, int32(args.S.gameId))
|
||||
}
|
||||
proto.SetDefaults(msg)
|
||||
this.Send(int(server_proto.SSPacketID_PACKET_WG_CREATESCENE), msg)
|
||||
logger.Logger.Trace("WGCreateScene:", msg)
|
||||
logger.Logger.Tracef("WGCreateScene: %v", msg)
|
||||
}
|
||||
|
||||
func (this *GameSession) DelScene(s *Scene) {
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ func (this *HorseRaceLampMgr) BroadcastHorseRaceLampMsg(horseRaceLamp *HorseRace
|
|||
if len(horseRaceLamp.Target) == 0 {
|
||||
PlayerMgrSington.BroadcastMessageToPlatform(horseRaceLamp.Platform, int(message.MSGPacketID_PACKET_SC_NOTICE), rawpack)
|
||||
} else {
|
||||
PlayerMgrSington.BroadcastMessageToTarget(horseRaceLamp.Platform, horseRaceLamp.Target, int(message.MSGPacketID_PACKET_SC_NOTICE), rawpack)
|
||||
PlayerMgrSington.BroadcastMessageToTarget(horseRaceLamp.Target, int(message.MSGPacketID_PACKET_SC_NOTICE), rawpack)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -201,22 +201,21 @@ func (this *HundredSceneMgr) CreateNewScene(id, groupId int32, limitPlatform *Pl
|
|||
dbGameRule := srvdata.PBDB_GameRuleMgr.GetData(dbGameFree.GetGameRule())
|
||||
if dbGameRule != nil {
|
||||
gameId := int(dbGameRule.GetGameId())
|
||||
gs := GameSessMgrSington.GetMinLoadSess(gameId)
|
||||
if gs != nil {
|
||||
sceneId := SceneMgrSingleton.GenOneHundredSceneId()
|
||||
gameMode := dbGameRule.GetGameMode()
|
||||
params := common.CopySliceInt32ToInt64(dbGameRule.GetParams())
|
||||
scene := SceneMgrSingleton.CreateScene(0, 0, sceneId, gameId, int(gameMode), common.SceneMode_Public, 1, -1, params, gs, limitPlatform, groupId, dbGameFree, id)
|
||||
if scene != nil {
|
||||
logger.Logger.Infof("Create hundred scene %v-%v success.", gameId, sceneId)
|
||||
scene.hallId = id
|
||||
scene.hp = this
|
||||
return scene
|
||||
} else {
|
||||
logger.Logger.Errorf("Create hundred scene %v-%v failed.", gameId, sceneId)
|
||||
}
|
||||
sceneId := SceneMgrSingleton.GenOneHundredSceneId()
|
||||
params := common.CopySliceInt32ToInt64(dbGameRule.GetParams())
|
||||
scene := SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||
RoomId: sceneId,
|
||||
SceneMode: common.SceneMode_Public,
|
||||
Params: params,
|
||||
Platform: limitPlatform,
|
||||
GF: dbGameFree,
|
||||
})
|
||||
if scene != nil {
|
||||
logger.Logger.Infof("Create hundred scene %v-%v success.", gameId, sceneId)
|
||||
scene.hp = this
|
||||
return scene
|
||||
} else {
|
||||
logger.Logger.Errorf("Game %v server session no found.", gameId)
|
||||
logger.Logger.Errorf("Create hundred scene %v-%v failed.", gameId, sceneId)
|
||||
}
|
||||
} else {
|
||||
logger.Logger.Errorf("Game rule data %v no found.", dbGameFree.GetGameRule())
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/srvdata"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
|
|
@ -23,20 +24,12 @@ type MatchSceneMgr struct {
|
|||
// isFinals 是否决赛
|
||||
// round 第几轮
|
||||
func (ms *MatchSceneMgr) NewScene(tm *TmMatch, isFinals bool, round int32) *Scene {
|
||||
sceneId := SceneMgrSingleton.GenOneMatchSceneId()
|
||||
gameId := int(tm.dbGameFree.GameId)
|
||||
gameMode := tm.dbGameFree.GetGameMode()
|
||||
// 获取游戏服务器
|
||||
gs := GameSessMgrSington.GetMinLoadSess(gameId)
|
||||
if gs == nil {
|
||||
logger.Logger.Warn("not found game server, gameid: ", gameId)
|
||||
return nil
|
||||
}
|
||||
// 平台
|
||||
limitPlatform := PlatformMgrSingleton.GetPlatform(tm.Platform)
|
||||
if limitPlatform == nil || !limitPlatform.Isolated {
|
||||
limitPlatform = PlatformMgrSingleton.GetPlatform(DefaultPlatform)
|
||||
}
|
||||
sceneId := SceneMgrSingleton.GenOneMatchSceneId()
|
||||
// 是否决赛
|
||||
finals := int32(0)
|
||||
if isFinals {
|
||||
|
|
@ -54,15 +47,24 @@ func (ms *MatchSceneMgr) NewScene(tm *TmMatch, isFinals bool, round int32) *Scen
|
|||
nextNeed = tm.gmd.MatchPromotion[round]
|
||||
}
|
||||
}
|
||||
groupId := PlatformMgrSingleton.GetGameFreeGroup(tm.Platform, tm.dbGameFree.Id)
|
||||
// 建房参数
|
||||
// 比赛唯一索引,是否决赛,第几轮,本轮总人数,下一轮总人数,赛制类型
|
||||
params := []int64{tm.SortId, int64(finals), int64(round), int64(curPlayerNum), int64(nextNeed), int64(tm.gmd.MatchType)}
|
||||
|
||||
scene := SceneMgrSingleton.CreateScene(0, 0, sceneId, gameId, int(gameMode), common.SceneMode_Match, 1,
|
||||
0, params, gs, limitPlatform, groupId, tm.dbGameFree, tm.dbGameFree.GetId(), tm.gmd.Id)
|
||||
rule := srvdata.PBDB_GameRuleMgr.GetData(tm.dbGameFree.GetGameRule())
|
||||
scene := SceneMgrSingleton.CreateScene(&CreateSceneParam{
|
||||
RoomId: sceneId,
|
||||
SceneMode: common.SceneMode_Match,
|
||||
Params: common.CopySliceInt32ToInt64(rule.GetParams()),
|
||||
Platform: limitPlatform,
|
||||
GF: tm.dbGameFree,
|
||||
MatchParam: &server.MatchParam{
|
||||
MatchId: tm.TMId,
|
||||
MatchSortId: tm.SortId,
|
||||
IsFinals: finals == 1,
|
||||
CurrRound: round,
|
||||
CurrPlayerNum: curPlayerNum,
|
||||
NextPlayerNum: nextNeed,
|
||||
MatchType: tm.gmd.MatchType,
|
||||
},
|
||||
})
|
||||
if scene != nil {
|
||||
scene.matchId = tm.SortId
|
||||
return scene
|
||||
}
|
||||
return nil
|
||||
|
|
@ -158,7 +160,7 @@ func (ms *MatchSceneMgr) PlayerLeave(p *Player, reason int) bool {
|
|||
if p == nil || p.scene == nil {
|
||||
return true
|
||||
}
|
||||
if p.scene.matchId == 0 {
|
||||
if p.scene.MatchSortId == 0 {
|
||||
return true
|
||||
}
|
||||
p.scene.PlayerLeave(p, reason)
|
||||
|
|
@ -187,7 +189,7 @@ func (ms *MatchSceneMgr) AudienceEnter(p *Player, id int32, roomId int, exclude
|
|||
func (ms *MatchSceneMgr) MatchStop(tm *TmMatch) {
|
||||
if SceneMgrSingleton.scenes != nil && tm != nil {
|
||||
for _, scene := range SceneMgrSingleton.scenes {
|
||||
if scene.IsMatchScene() && scene.matchId == tm.SortId {
|
||||
if scene.IsMatchScene() && scene.MatchSortId == tm.SortId {
|
||||
scene.SendGameDestroy(false)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,50 +48,48 @@ type ClubConfig struct {
|
|||
GiveCoinRate []int64 //会长充值额外赠送比例
|
||||
}
|
||||
type Platform struct {
|
||||
Id int32 // 平台ID
|
||||
IdStr string // 字符id
|
||||
Name string // 平台名称
|
||||
Isolated bool // 是否孤立(别的平台看不到)
|
||||
Disable bool // 是否禁用
|
||||
Halls map[int32]*PlatformGameHall //厅
|
||||
GamePlayerNum map[int32]*PlatformGamePlayerNum //游戏人数
|
||||
dirty bool //
|
||||
ServiceUrl string //客服地址
|
||||
BindOption int32 //绑定选项
|
||||
ServiceFlag bool //客服标记 是否支持浏览器跳转 false否 true是
|
||||
UpgradeAccountGiveCoin int32 //升级账号奖励金币
|
||||
NewAccountGiveCoin int32 //新账号奖励金币
|
||||
PerBankNoLimitAccount int32 //同一银行卡号绑定用户数量限制
|
||||
ExchangeMin int32 //最低兑换金额
|
||||
ExchangeLimit int32 //兑换后身上保留最低余额
|
||||
ExchangeTax int32 //兑换税收(万分比)
|
||||
ExchangeFlow int32 //兑换流水比例
|
||||
ExchangeForceTax int32 //强制兑换税收
|
||||
ExchangeGiveFlow int32 //赠送兑换流水
|
||||
ExchangeFlag int32 //兑换标记 二进制 第一位:兑换税收 第二位:流水比例
|
||||
ExchangeVer int32 //兑换版本号
|
||||
ExchangeMultiple int32 //兑换基数(只能兑换此数的整数倍)
|
||||
VipRange []int32 //VIP充值区间
|
||||
OtherParams string //其他参数json串
|
||||
SpreadConfig int32 //0:等级返点 1:保底返佣
|
||||
RankSwitch RankSwitch //排行榜开关
|
||||
ClubConfig *ClubConfig //俱乐部配置
|
||||
VerifyCodeType int32 //注册账号使用验证码方式 0:短信验证码 1:随机字符串 2:滑块验证码 3:不使用
|
||||
RegisterVerifyCodeSwitch bool // 关闭注册验证码
|
||||
ThirdGameMerchant map[int32]int32 //三方游戏平台状态
|
||||
CustomType int32 //客服类型 0:live800 1:美洽 2:cc
|
||||
NeedDeviceInfo bool //需要获取设备信息
|
||||
NeedSameName bool //绑定的银行卡和支付宝用户名字需要相同
|
||||
ExchangeBankMax int32 //银行卡最大兑换金额 0不限制
|
||||
ExchangeAlipayMax int32 //支付宝最大兑换金额 0不限制
|
||||
DgHboConfig int32 //dg hbo配置,默认0,dg 1 hbo 2
|
||||
PerBankNoLimitName int32 //银行卡和支付宝 相同名字最大数量
|
||||
IsCanUserBindPromoter bool //是否允许用户手动绑定推广员
|
||||
UserBindPromoterPrize int32 //手动绑定奖励
|
||||
SpreadWinLose bool //是否打开客损开关
|
||||
GameConfig *GameList //平台游戏配置
|
||||
MerchantKey string //商户秘钥
|
||||
BindTelReward map[int32]int64 // 绑定手机号奖励
|
||||
Id int32 // 平台ID
|
||||
IdStr string // 字符id
|
||||
Name string // 平台名称
|
||||
Isolated bool // 是否孤立(别的平台看不到)
|
||||
Disable bool // 是否禁用
|
||||
dirty bool //
|
||||
ServiceUrl string //客服地址
|
||||
BindOption int32 //绑定选项
|
||||
ServiceFlag bool //客服标记 是否支持浏览器跳转 false否 true是
|
||||
UpgradeAccountGiveCoin int32 //升级账号奖励金币
|
||||
NewAccountGiveCoin int32 //新账号奖励金币
|
||||
PerBankNoLimitAccount int32 //同一银行卡号绑定用户数量限制
|
||||
ExchangeMin int32 //最低兑换金额
|
||||
ExchangeLimit int32 //兑换后身上保留最低余额
|
||||
ExchangeTax int32 //兑换税收(万分比)
|
||||
ExchangeFlow int32 //兑换流水比例
|
||||
ExchangeForceTax int32 //强制兑换税收
|
||||
ExchangeGiveFlow int32 //赠送兑换流水
|
||||
ExchangeFlag int32 //兑换标记 二进制 第一位:兑换税收 第二位:流水比例
|
||||
ExchangeVer int32 //兑换版本号
|
||||
ExchangeMultiple int32 //兑换基数(只能兑换此数的整数倍)
|
||||
VipRange []int32 //VIP充值区间
|
||||
OtherParams string //其他参数json串
|
||||
SpreadConfig int32 //0:等级返点 1:保底返佣
|
||||
RankSwitch RankSwitch //排行榜开关
|
||||
ClubConfig *ClubConfig //俱乐部配置
|
||||
VerifyCodeType int32 //注册账号使用验证码方式 0:短信验证码 1:随机字符串 2:滑块验证码 3:不使用
|
||||
RegisterVerifyCodeSwitch bool // 关闭注册验证码
|
||||
ThirdGameMerchant map[int32]int32 //三方游戏平台状态
|
||||
CustomType int32 //客服类型 0:live800 1:美洽 2:cc
|
||||
NeedDeviceInfo bool //需要获取设备信息
|
||||
NeedSameName bool //绑定的银行卡和支付宝用户名字需要相同
|
||||
ExchangeBankMax int32 //银行卡最大兑换金额 0不限制
|
||||
ExchangeAlipayMax int32 //支付宝最大兑换金额 0不限制
|
||||
DgHboConfig int32 //dg hbo配置,默认0,dg 1 hbo 2
|
||||
PerBankNoLimitName int32 //银行卡和支付宝 相同名字最大数量
|
||||
IsCanUserBindPromoter bool //是否允许用户手动绑定推广员
|
||||
UserBindPromoterPrize int32 //手动绑定奖励
|
||||
SpreadWinLose bool //是否打开客损开关
|
||||
GameConfig *GameList //平台游戏配置
|
||||
MerchantKey string //商户秘钥
|
||||
BindTelReward map[int32]int64 // 绑定手机号奖励
|
||||
}
|
||||
|
||||
type GameList struct {
|
||||
|
|
@ -179,12 +177,10 @@ func CompareGameFreeConfigChanged(oldCfg, newCfg *webapiproto.GameFree) bool {
|
|||
|
||||
func NewPlatform(id int32, isolated bool) *Platform {
|
||||
p := &Platform{
|
||||
Id: id,
|
||||
IdStr: strconv.Itoa(int(id)),
|
||||
Isolated: isolated,
|
||||
Halls: make(map[int32]*PlatformGameHall),
|
||||
GamePlayerNum: make(map[int32]*PlatformGamePlayerNum),
|
||||
ClubConfig: &ClubConfig{},
|
||||
Id: id,
|
||||
IdStr: strconv.Itoa(int(id)),
|
||||
Isolated: isolated,
|
||||
ClubConfig: &ClubConfig{},
|
||||
GameConfig: &GameList{
|
||||
gameFreeId: make(map[int32]*webapiproto.GameFree),
|
||||
gameId: make(map[int32][]*webapiproto.GameFree),
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"mongo.games.com/game/proto"
|
||||
"mongo.games.com/game/protocol/gamehall"
|
||||
"mongo.games.com/game/protocol/server"
|
||||
)
|
||||
|
||||
type PlatformGameHall struct {
|
||||
HallId int32 //游戏厅id
|
||||
Scenes map[int]*Scene //游戏房间列表
|
||||
Players map[int32]*Player //大厅中的玩家
|
||||
p *Platform //所属平台
|
||||
dbGameFree *server.DB_GameFree //厅配置数据(这里都是模板值,非后台实例数据)
|
||||
dbGameRule *server.DB_GameRule //游戏配置数据(这里都是模板值,非后台实例数据)
|
||||
}
|
||||
|
||||
func (pgh *PlatformGameHall) PlayerLeave(p *Player) {
|
||||
delete(pgh.Players, p.SnId)
|
||||
if p.hallId == pgh.HallId {
|
||||
p.hallId = 0
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Player) CreateRoomPlayerInfoProtocol() *gamehall.RoomPlayerInfo {
|
||||
pack := &gamehall.RoomPlayerInfo{
|
||||
SnId: proto.Int32(p.SnId),
|
||||
Head: proto.Int32(p.Head),
|
||||
Sex: proto.Int32(p.Sex),
|
||||
Name: proto.String(p.Name),
|
||||
Pos: proto.Int(p.pos),
|
||||
Flag: proto.Int32(p.flag),
|
||||
HeadOutLine: proto.Int32(p.HeadOutLine),
|
||||
VIP: proto.Int32(p.VIP),
|
||||
}
|
||||
return pack
|
||||
}
|
||||
|
||||
func (pgh *PlatformGameHall) OnPlayerEnterScene(scene *Scene, player *Player) {
|
||||
delete(pgh.Players, player.SnId)
|
||||
pack := &gamehall.SCRoomPlayerEnter{
|
||||
RoomId: proto.Int(scene.sceneId),
|
||||
Player: player.CreateRoomPlayerInfoProtocol(),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
pgh.Broadcast(int(gamehall.GameHallPacketID_PACKET_SC_ROOMPLAYERENTER), pack, player.SnId)
|
||||
}
|
||||
|
||||
func (pgh *PlatformGameHall) OnPlayerLeaveScene(scene *Scene, player *Player) {
|
||||
pack := &gamehall.SCRoomPlayerLeave{
|
||||
RoomId: proto.Int(scene.sceneId),
|
||||
Pos: proto.Int(player.pos),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
pgh.Broadcast(int(gamehall.GameHallPacketID_PACKET_SC_ROOMPLAYERLEAVE), pack, player.SnId)
|
||||
}
|
||||
|
||||
func (pgh *PlatformGameHall) OnDestroyScene(scene *Scene) {
|
||||
delete(pgh.Scenes, scene.sceneId)
|
||||
pack := &gamehall.SCDestroyRoom{
|
||||
RoomId: proto.Int(scene.sceneId),
|
||||
OpRetCode: gamehall.OpResultCode_Game_OPRC_Sucess_Game,
|
||||
IsForce: proto.Int(1),
|
||||
}
|
||||
proto.SetDefaults(pack)
|
||||
pgh.Broadcast(int(gamehall.GameHallPacketID_PACKET_SC_DESTROYROOM), pack, 0)
|
||||
}
|
||||
|
||||
func (pgh *PlatformGameHall) Broadcast(packetid int, packet interface{}, exclude int32) {
|
||||
PlatformMgrSingleton.Broadcast(packetid, packet, pgh.Players, exclude)
|
||||
}
|
||||
|
|
@ -1667,17 +1667,6 @@ func (this *Player) MarshalData() (d []byte, e error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (this *Player) MarshalSingleAdjustData(gamefreeid int32) (d []byte, e error) {
|
||||
if this.IsRob {
|
||||
return
|
||||
}
|
||||
sa := PlayerSingleAdjustMgr.GetSingleAdjust(this.Platform, this.SnId, gamefreeid)
|
||||
if sa != nil {
|
||||
d, e = netlib.Gob.Marshal(sa)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// UnmarshalData 更新玩家数据
|
||||
// 例如游戏服数据同步
|
||||
func (this *Player) UnmarshalData(data []byte, scene *Scene) {
|
||||
|
|
@ -2415,23 +2404,6 @@ func (this *Player) GetIP() string {
|
|||
return this.Ip
|
||||
}
|
||||
|
||||
func (this *Player) CreateLocalGameScene(sceneId, gameId, gameSite, sceneMode, playerNum int, params []int64,
|
||||
dbGameFree *serverproto.DB_GameFree, baseScore, groupId int32) (*Scene, hallproto.OpResultCode_Game) {
|
||||
gs := GameSessMgrSington.GetMinLoadSess(gameId)
|
||||
if gs == nil {
|
||||
logger.Logger.Warnf("(this *Player) CreateLocalGameScene %v, %v GameSessMgrSington.GetMinLoadSess() = nil ", this.SnId, gameId)
|
||||
return nil, hallproto.OpResultCode_Game_OPRC_SceneServerMaintain_Game
|
||||
}
|
||||
|
||||
s := SceneMgrSingleton.CreateLocalGameScene(this.SnId, sceneId, gameId, gameSite, sceneMode, 1, params, gs,
|
||||
this.GetPlatform(), playerNum, dbGameFree, baseScore, groupId, dbGameFree.GetId())
|
||||
if s == nil {
|
||||
logger.Logger.Tracef("(this *Player) EnterScene %v, SceneMgrSingleton.CreateScene() = nil ", this.SnId)
|
||||
return nil, hallproto.OpResultCode_Game_OPRC_Error_Game
|
||||
}
|
||||
return s, hallproto.OpResultCode_Game_OPRC_Sucess_Game
|
||||
}
|
||||
|
||||
func (this *Player) ReturnScene(isLoaded bool) *Scene {
|
||||
logger.Logger.Tracef("(this *Player) ReturnScene %v", this.SnId)
|
||||
if this.scene == nil {
|
||||
|
|
@ -3887,9 +3859,9 @@ func (this *Player) VIPDraw(id, vip int32) {
|
|||
this.AddMoneyPayTotal(addVipExp)
|
||||
pack.Award[common.ItemIDVipExp] = addVipExp
|
||||
default:
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: this,
|
||||
Change: []*Item{
|
||||
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: this.PlayerData,
|
||||
Change: []*model.Item{
|
||||
{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v,
|
||||
|
|
@ -3910,18 +3882,18 @@ func (this *Player) VIPDraw(id, vip int32) {
|
|||
LogChannelSingleton.WriteLog(log)
|
||||
|
||||
case 1:
|
||||
var items []*Item
|
||||
var items []*model.Item
|
||||
var itemInfo []model.ItemInfo
|
||||
for k, v := range data.Privilege9 {
|
||||
items = append(items, &Item{
|
||||
items = append(items, &model.Item{
|
||||
ItemId: int32(k),
|
||||
ItemNum: v,
|
||||
})
|
||||
itemInfo = append(itemInfo, model.ItemInfo{ItemId: int32(k), ItemNum: v})
|
||||
pack.Award[k] = v
|
||||
}
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: this,
|
||||
BagMgrSingleton.AddItemsV2(&model.AddItemParam{
|
||||
P: this.PlayerData,
|
||||
Change: items,
|
||||
GainWay: common.GainWayVipGift9,
|
||||
Operator: "system",
|
||||
|
|
|
|||
|
|
@ -426,20 +426,19 @@ func (this *PlayerMgr) BroadcastMessageToGroup(packetid int, rawpack interface{}
|
|||
}
|
||||
|
||||
// BroadcastMessageToTarget 给某些玩家发消息
|
||||
func (this *PlayerMgr) BroadcastMessageToTarget(platform string, target []int32, packetid int, rawpack interface{}) {
|
||||
players := this.playerOfPlatform[platform]
|
||||
func (this *PlayerMgr) BroadcastMessageToTarget(target []int32, packetid int, rawpack interface{}) {
|
||||
mgs := make(map[*netlib.Session][]*srvproto.MCSessionUnion)
|
||||
for _, p := range players {
|
||||
if p != nil && p.gateSess != nil && p.IsOnLine() /*&& p.Platform == platform*/ {
|
||||
if common.InSliceInt32(target, p.SnId) {
|
||||
mgs[p.gateSess] = append(mgs[p.gateSess], &srvproto.MCSessionUnion{
|
||||
Mccs: &srvproto.MCClientSession{
|
||||
SId: proto.Int64(p.sid),
|
||||
},
|
||||
})
|
||||
}
|
||||
for _, v := range target {
|
||||
d := this.snidMap[v]
|
||||
if d != nil && d.gateSess != nil && d.IsOnLine() {
|
||||
mgs[d.gateSess] = append(mgs[d.gateSess], &srvproto.MCSessionUnion{
|
||||
Mccs: &srvproto.MCClientSession{
|
||||
SId: proto.Int64(d.sid),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for gateSess, v := range mgs {
|
||||
if gateSess != nil && len(v) != 0 {
|
||||
pack, err := common.CreateMulticastPacket(packetid, rawpack, v...)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"mongo.games.com/game/common"
|
||||
)
|
||||
|
||||
func init() {
|
||||
ClockMgrSington.RegisteSinker(PlayerNotifySingle)
|
||||
}
|
||||
|
||||
var PlayerNotifySingle = &PlayerNotify{
|
||||
players: make(map[int32]map[int32]*PlayerNotifyInfo),
|
||||
}
|
||||
|
||||
type PlayerNotifyInfo struct {
|
||||
SnId int32 // 玩家id
|
||||
Ts int64 // 失效时间戳
|
||||
}
|
||||
|
||||
type PlayerNotify struct {
|
||||
BaseClockSinker
|
||||
players map[int32]map[int32]*PlayerNotifyInfo // 消息类型:玩家id:玩家信息
|
||||
}
|
||||
|
||||
func (p *PlayerNotify) InterestClockEvent() int {
|
||||
return 1 << CLOCK_EVENT_MINUTE
|
||||
}
|
||||
|
||||
func (p *PlayerNotify) OnMiniTimer() {
|
||||
now := time.Now()
|
||||
for _, v := range p.players {
|
||||
var ids []int32
|
||||
for k, vv := range v {
|
||||
if vv == nil || vv.Ts <= now.Unix() {
|
||||
ids = append(ids, k)
|
||||
}
|
||||
}
|
||||
for _, id := range ids {
|
||||
delete(v, id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AddTime 延长某个类型消息的通知时间
|
||||
// snid 玩家id
|
||||
// tp 消息类型
|
||||
// d 延长时间
|
||||
func (p *PlayerNotify) AddTime(snid int32, tp common.NotifyType, d time.Duration) {
|
||||
if _, ok := p.players[int32(tp)]; !ok {
|
||||
p.players[int32(tp)] = make(map[int32]*PlayerNotifyInfo)
|
||||
}
|
||||
p.players[int32(tp)][snid] = &PlayerNotifyInfo{
|
||||
SnId: snid,
|
||||
Ts: time.Now().Add(d).Unix(),
|
||||
}
|
||||
}
|
||||
|
||||
// GetPlayers 获取某个类型消息的玩家id
|
||||
// tp 消息类型
|
||||
func (p *PlayerNotify) GetPlayers(tp common.NotifyType) []int32 {
|
||||
now := time.Now()
|
||||
var ret []int32
|
||||
for k, v := range p.players[int32(tp)] {
|
||||
if v == nil || v.Ts <= now.Unix() {
|
||||
continue
|
||||
}
|
||||
ret = append(ret, k)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
// SendToClient 发送消息给客户端
|
||||
// tp 消息类型
|
||||
func (p *PlayerNotify) SendToClient(tp common.NotifyType, packetId int, pack interface{}) {
|
||||
ids := p.GetPlayers(tp)
|
||||
PlayerMgrSington.BroadcastMessageToTarget(ids, packetId, pack)
|
||||
}
|
||||
|
|
@ -1,273 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/globalsign/mgo/bson"
|
||||
"mongo.games.com/game/model"
|
||||
"mongo.games.com/game/protocol/server"
|
||||
"mongo.games.com/game/protocol/webapi"
|
||||
"mongo.games.com/goserver/core/basic"
|
||||
"mongo.games.com/goserver/core/logger"
|
||||
"mongo.games.com/goserver/core/module"
|
||||
"mongo.games.com/goserver/core/task"
|
||||
"time"
|
||||
)
|
||||
|
||||
type PlayerSingleAdjustManager struct {
|
||||
AdjustData map[uint64]*model.PlayerSingleAdjust
|
||||
dirtyList map[uint64]bool
|
||||
cacheDirtyList map[uint64]bool //缓存待删除数据
|
||||
}
|
||||
|
||||
var PlayerSingleAdjustMgr = &PlayerSingleAdjustManager{
|
||||
AdjustData: make(map[uint64]*model.PlayerSingleAdjust),
|
||||
dirtyList: make(map[uint64]bool),
|
||||
cacheDirtyList: make(map[uint64]bool),
|
||||
}
|
||||
|
||||
func (this *PlayerSingleAdjustManager) WebData(msg *webapi.ASSinglePlayerAdjust, p *Player) (sa *webapi.PlayerSingleAdjust) {
|
||||
psa := model.WebSingleAdjustToModel(msg.PlayerSingleAdjust)
|
||||
switch msg.Opration {
|
||||
case 1:
|
||||
this.AddNewSingleAdjust(psa)
|
||||
case 2:
|
||||
this.EditSingleAdjust(psa)
|
||||
case 3:
|
||||
this.DeleteSingleAdjust(psa.Platform, psa.SnId, psa.GameFreeId)
|
||||
case 4:
|
||||
sa = this.WebGetSingleAdjust(psa.Platform, psa.SnId, psa.GameFreeId)
|
||||
return
|
||||
}
|
||||
//同步到游服
|
||||
if p != nil {
|
||||
if p.scene != nil && p.scene.dbGameFree.Id == psa.GameFreeId {
|
||||
gss := GameSessMgrSington.GetGameServerSess(int(psa.GameId))
|
||||
pack := &server.WGSingleAdjust{
|
||||
SceneId: int32(p.scene.sceneId),
|
||||
Option: msg.Opration,
|
||||
PlayerSingleAdjust: model.MarshalSingleAdjust(psa),
|
||||
}
|
||||
for _, gs := range gss {
|
||||
gs.Send(int(server.SSPacketID_PACKET_WG_SINGLEADJUST), pack)
|
||||
}
|
||||
}
|
||||
if p.miniScene != nil {
|
||||
for _, game := range p.miniScene {
|
||||
if game.dbGameFree.Id == psa.GameFreeId {
|
||||
gss := GameSessMgrSington.GetGameServerSess(int(psa.GameId))
|
||||
pack := &server.WGSingleAdjust{
|
||||
SceneId: int32(game.sceneId),
|
||||
Option: msg.Opration,
|
||||
PlayerSingleAdjust: model.MarshalSingleAdjust(psa),
|
||||
}
|
||||
for _, gs := range gss {
|
||||
gs.Send(int(server.SSPacketID_PACKET_WG_SINGLEADJUST), pack)
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (this *PlayerSingleAdjustManager) IsSingleAdjustPlayer(snid int32, gameFreeId int32) (*model.PlayerSingleAdjust, bool) {
|
||||
key := uint64(snid)<<32 + uint64(gameFreeId)
|
||||
if data, ok := this.AdjustData[key]; ok {
|
||||
if data.CurTime < data.TotalTime {
|
||||
return data, true
|
||||
}
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) AddAdjustCount(snid int32, gameFreeId int32) {
|
||||
key := uint64(snid)<<32 + uint64(gameFreeId)
|
||||
if ad, ok := this.AdjustData[key]; ok {
|
||||
ad.CurTime++
|
||||
this.dirtyList[key] = true
|
||||
}
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) GetSingleAdjust(platform string, snid, gameFreeId int32) *model.PlayerSingleAdjust {
|
||||
key := uint64(snid)<<32 + uint64(gameFreeId)
|
||||
if psa, ok := this.AdjustData[key]; ok {
|
||||
return psa
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) WebGetSingleAdjust(platform string, snid, gameFreeId int32) *webapi.PlayerSingleAdjust {
|
||||
key := uint64(snid)<<32 + uint64(gameFreeId)
|
||||
if psa, ok := this.AdjustData[key]; ok {
|
||||
return &webapi.PlayerSingleAdjust{
|
||||
Id: psa.Id.Hex(),
|
||||
Platform: psa.Platform,
|
||||
GameFreeId: psa.GameFreeId,
|
||||
SnId: psa.SnId,
|
||||
Mode: psa.Mode,
|
||||
TotalTime: psa.TotalTime,
|
||||
CurTime: psa.CurTime,
|
||||
BetMin: psa.BetMin,
|
||||
BetMax: psa.BetMax,
|
||||
BankerLoseMin: psa.BankerLoseMin,
|
||||
BankerWinMin: psa.BankerWinMin,
|
||||
CardMin: psa.CardMin,
|
||||
CardMax: psa.CardMax,
|
||||
Priority: psa.Priority,
|
||||
WinRate: psa.WinRate,
|
||||
GameId: psa.GameId,
|
||||
GameMode: psa.GameMode,
|
||||
Operator: psa.Operator,
|
||||
CreateTime: psa.CreateTime,
|
||||
UpdateTime: psa.UpdateTime,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) AddNewSingleAdjust(psa *model.PlayerSingleAdjust) *model.PlayerSingleAdjust {
|
||||
if psa != nil {
|
||||
key := uint64(psa.SnId)<<32 + uint64(psa.GameFreeId)
|
||||
psa.Id = bson.NewObjectId()
|
||||
psa.CreateTime = time.Now().Unix()
|
||||
psa.UpdateTime = time.Now().Unix()
|
||||
|
||||
this.AdjustData[key] = psa
|
||||
logger.Logger.Trace("SinglePlayerAdjust new:", psa)
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.AddNewSingleAdjust(psa)
|
||||
}), nil, "AddNewSingleAdjust").StartByFixExecutor("AddNewSingleAdjust")
|
||||
}
|
||||
return psa
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) EditSingleAdjust(psa *model.PlayerSingleAdjust) {
|
||||
if psa != nil {
|
||||
var inGame bool
|
||||
psa.UpdateTime = time.Now().Unix()
|
||||
for key, value := range this.AdjustData {
|
||||
if value.Id == psa.Id {
|
||||
var tempKey = key
|
||||
if psa.GameFreeId != value.GameFreeId {
|
||||
delete(this.AdjustData, key)
|
||||
delete(this.dirtyList, key)
|
||||
tempKey = uint64(psa.SnId)<<32 + uint64(psa.GameFreeId)
|
||||
}
|
||||
this.AdjustData[tempKey] = psa
|
||||
this.dirtyList[tempKey] = true
|
||||
inGame = true
|
||||
break
|
||||
}
|
||||
}
|
||||
logger.Logger.Trace("SinglePlayerAdjust edit:", *psa)
|
||||
if !inGame {
|
||||
//不在游戏 直接更新库
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.EditSingleAdjust(psa)
|
||||
}), nil, "EditSingleAdjust").StartByFixExecutor("EditSingleAdjust")
|
||||
}
|
||||
}
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) DeleteSingleAdjust(platform string, snid, gameFreeId int32) {
|
||||
key := uint64(snid)<<32 + uint64(gameFreeId)
|
||||
if _, ok := this.AdjustData[key]; ok {
|
||||
delete(this.AdjustData, key)
|
||||
delete(this.dirtyList, key)
|
||||
}
|
||||
logger.Logger.Trace("SinglePlayerAdjust delete:", snid, gameFreeId)
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
return model.DeleteSingleAdjust(&model.PlayerSingleAdjust{SnId: snid, GameFreeId: gameFreeId, Platform: platform})
|
||||
}), nil, "DeleteSingleAdjust").Start()
|
||||
}
|
||||
|
||||
func (this *PlayerSingleAdjustManager) ModuleName() string {
|
||||
return "PlayerSingleAdjustManager"
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) Init() {
|
||||
//data, err := model.QueryAllSingleAdjust("1")
|
||||
//if err != nil {
|
||||
// logger.Logger.Warn("QueryAllSingleAdjust is err:", err)
|
||||
// return
|
||||
//}
|
||||
//if len(data) > 0 {
|
||||
// for _, psa := range data {
|
||||
// _, gameType := srvdata.DataMgr.GetGameFreeIds(psa.GameId, psa.GameMode)
|
||||
// if gameType != common.GameType_Mini {
|
||||
// key := uint64(psa.SnId)<<32 + uint64(psa.GameFreeId)
|
||||
// this.AdjustData[key] = psa
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
// 登录加载
|
||||
func (this *PlayerSingleAdjustManager) LoadSingleAdjustData(platform string, snid int32) {
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
ret, err := model.QueryAllSingleAdjustByKey(platform, snid)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return ret
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
|
||||
if data != nil {
|
||||
ret := data.([]*model.PlayerSingleAdjust)
|
||||
for _, psa := range ret {
|
||||
key := uint64(psa.SnId)<<32 + uint64(psa.GameFreeId)
|
||||
this.AdjustData[key] = psa
|
||||
}
|
||||
}
|
||||
})).StartByFixExecutor("LoadPlayerSingleAdjust")
|
||||
}
|
||||
|
||||
// 掉线删除
|
||||
func (this *PlayerSingleAdjustManager) DelPlayerData(platform string, snid int32) {
|
||||
for _, psa := range this.AdjustData {
|
||||
if psa.Platform == platform && psa.SnId == snid {
|
||||
key := uint64(psa.SnId)<<32 + uint64(psa.GameFreeId)
|
||||
if this.dirtyList[key] {
|
||||
this.cacheDirtyList[key] = true
|
||||
} else {
|
||||
delete(this.AdjustData, key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) Update() {
|
||||
if len(this.dirtyList) == 0 {
|
||||
return
|
||||
}
|
||||
var syncArr []*model.PlayerSingleAdjust
|
||||
for key, _ := range this.dirtyList {
|
||||
syncArr = append(syncArr, this.AdjustData[key])
|
||||
delete(this.dirtyList, key)
|
||||
}
|
||||
task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||
var saveArr [2][]uint64
|
||||
for _, value := range syncArr {
|
||||
err := model.EditSingleAdjust(value)
|
||||
if err != nil {
|
||||
logger.Logger.Error("PlayerSingleAdjustManager edit ", err)
|
||||
saveArr[0] = append(saveArr[0], uint64(value.SnId)<<32+uint64(value.GameFreeId))
|
||||
} else {
|
||||
saveArr[1] = append(saveArr[1], uint64(value.SnId)<<32+uint64(value.GameFreeId))
|
||||
}
|
||||
}
|
||||
return saveArr
|
||||
}), task.CompleteNotifyWrapper(func(data interface{}, tt task.Task) {
|
||||
if saveArr, ok := data.([2][]uint64); ok {
|
||||
//失败处理
|
||||
for _, key := range saveArr[0] {
|
||||
this.dirtyList[key] = true
|
||||
}
|
||||
//成功处理
|
||||
for _, key := range saveArr[1] {
|
||||
if this.cacheDirtyList[key] {
|
||||
delete(this.cacheDirtyList, key)
|
||||
delete(this.AdjustData, key)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
})).StartByFixExecutor("PlayerSingleAdjustManager")
|
||||
}
|
||||
func (this *PlayerSingleAdjustManager) Shutdown() {
|
||||
module.UnregisteModule(this)
|
||||
}
|
||||
func init() {
|
||||
module.RegisteModule(PlayerSingleAdjustMgr, time.Minute*5, 0)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue