add cm goo proto and mouse.go

This commit is contained in:
tomas 2024-12-02 10:40:19 +08:00
parent 126f9579c5
commit 5dcd4175f9
10 changed files with 2505 additions and 7 deletions

View File

@ -0,0 +1,22 @@
package fortunemouse
// 房间类型
const (
RoomMode_Classic int = iota //经典
RoomMode_Max
)
// 场景状态
const (
FortuneMouseStateStart int = iota //默认状态
FortuneMouseStateMax
)
// 玩家操作
const (
FortuneMousePlayerOpStart int = iota
FortuneMousePlayerOpSwitch
)
const NowByte int64 = 10000
const GameDataKey = "FortuneData"

View File

@ -0,0 +1,46 @@
package fortunemouse
import (
"mongo.games.com/game/common"
"mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/protocol/fortunemouse"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib"
)
type CSFortuneMouseOpPacketFactory struct {
}
type CSFortuneMouseOpHandler struct {
}
func (this *CSFortuneMouseOpPacketFactory) CreatePacket() interface{} {
pack := &fortunemouse.CSFortuneMouseOp{}
return pack
}
func (this *CSFortuneMouseOpHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error {
if op, ok := data.(*fortunemouse.CSFortuneMouseOp); ok {
p := base.PlayerMgrSington.GetPlayer(sid)
if p == nil {
logger.Logger.Warn("CSFortuneMouseOpHandler p == nil")
return nil
}
scene := p.GetScene()
if scene == nil {
logger.Logger.Warn("CSFortuneMouseOpHandler p.scene == nil")
return nil
}
if !scene.HasPlayer(p) {
return nil
}
if scene.GetScenePolicy() != nil {
scene.GetScenePolicy().OnPlayerOp(scene, p, int(op.GetOpCode()), op.GetParams())
}
return nil
}
return nil
}
func init() {
common.RegisterHandler(int(fortunemouse.FortuneMousePID_PACKET_FORTUNEMOUSE_CSFORTUNEMOUSEOP), &CSFortuneMouseOpHandler{})
netlib.RegisterFactory(int(fortunemouse.FortuneMousePID_PACKET_FORTUNEMOUSE_CSFORTUNEMOUSEOP), &CSFortuneMouseOpPacketFactory{})
}

View File

@ -0,0 +1,51 @@
package fortunemouse
import (
"mongo.games.com/game/gamerule/fortunemouse"
"mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/gamesrv/slotspkg/slots"
)
type FortuneMousePlayerData struct {
*base.Player
leaveTime int32 //离开时间
SlotsSession *base.SlotsSession
BetSizeIndex int64 `json:"bsi"` //选中的单注下标
BetLevelIndex int64 `json:"bli"` //选中的等级下标
BetLineIndex int64 `json:"bii"` //选中的线数下标
BetMode int64 `json:"bm,optional"` //0.常规 1.必中
taxCoin int64
winCoin int64
currentLogId string
totalBet int64
isRespin bool //只用于判断是否可以离开
}
type SpinLock struct {
ReSpinStatus int `json:"rs,omitempty"` //0.默认 1.第一次触发 2.进行中 3.结束
//OXSpecial
NewSuperStack []int64 `json:"nss,omitempty"`
}
func (p *FortuneMousePlayerData) init() {
p.SlotsSession = base.NewSession(uint64(p.SnId), p.Coin*fortunemouse.NowByte)
}
func (p *FortuneMousePlayerData) Clear() {
p.taxCoin = 0
p.winCoin = 0
p.currentLogId = ""
}
// 需要带到world上进行数据处理
func (p *FortuneMousePlayerData) PushPlayer() map[string]string {
cache := slots.SlotsMgrSington.PushPlayer(p.SlotsSession)
return cache
}
// 进房的时候需要带进来
func (p *FortuneMousePlayerData) PullPlayer(data map[string]string) {
slots.SlotsMgrSington.PullPlayer(p.SlotsSession, data)
}

View File

@ -0,0 +1,45 @@
package fortunemouse
import (
"mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/gamesrv/slotspkg/assemble"
)
type FortuneMouseSceneData struct {
*base.Scene //场景
players map[int32]*FortuneMousePlayerData //玩家信息
BetConfig *assemble.BetConfig
}
func NewFortuneMouseSceneData(s *base.Scene) *FortuneMouseSceneData {
sceneEx := &FortuneMouseSceneData{
Scene: s,
players: make(map[int32]*FortuneMousePlayerData),
}
sceneEx.Init()
return sceneEx
}
func (s *FortuneMouseSceneData) Init() {
}
func (s *FortuneMouseSceneData) Clear() {
//应该是水池变一次就判断修改一次
//s.slotRateWeight = s.slotRateWeightTotal[0]
}
func (s *FortuneMouseSceneData) SceneDestroy(force bool) {
//销毁房间
s.Scene.Destroy(force)
}
func (s *FortuneMouseSceneData) delPlayer(SnId int32) {
if _, exist := s.players[SnId]; exist {
delete(s.players, SnId)
}
}
func (s *FortuneMouseSceneData) OnPlayerLeave(p *base.Player, reason int) {
if /*playerEx*/ _, ok := p.ExtraData.(*FortuneMousePlayerData); ok {
}
s.delPlayer(p.SnId)
}

View File

@ -0,0 +1,585 @@
package fortunemouse
import (
"encoding/json"
"mongo.games.com/game/common"
"mongo.games.com/game/gamerule/fortunemouse"
"mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/gamesrv/slotspkg/assemble"
"mongo.games.com/game/gamesrv/slotspkg/slots"
"mongo.games.com/game/model"
"mongo.games.com/game/proto"
protocol "mongo.games.com/game/protocol/fortunemouse"
"mongo.games.com/game/protocol/server"
"mongo.games.com/goserver/core"
"mongo.games.com/goserver/core/logger"
"time"
)
// ////////////////////////////////////////////////////////////
var ScenePolicyFortuneMouseSington = &ScenePolicyFortuneMouse{}
type ScenePolicyFortuneMouse struct {
base.BaseScenePolicy
states [fortunemouse.FortuneMouseStateMax]base.SceneState
}
// 创建场景扩展数据
func (this *ScenePolicyFortuneMouse) CreateSceneExData(s *base.Scene) interface{} {
sceneEx := NewFortuneMouseSceneData(s)
if sceneEx != nil {
if sceneEx.GetInit() {
s.SetExtraData(sceneEx)
}
}
return sceneEx
}
// 创建玩家扩展数据
func (this *ScenePolicyFortuneMouse) CreatePlayerExData(s *base.Scene, p *base.Player) interface{} {
playerEx := &FortuneMousePlayerData{Player: p}
p.SetExtraData(playerEx)
return playerEx
}
// 场景开启事件
func (this *ScenePolicyFortuneMouse) OnStart(s *base.Scene) {
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnStart, sceneId=", s.GetSceneId())
sceneEx := NewFortuneMouseSceneData(s)
if sceneEx != nil {
if sceneEx.GetInit() {
s.SetExtraData(sceneEx)
s.ChangeSceneState(fortunemouse.FortuneMouseStateStart)
}
}
}
// 场景关闭事件
func (this *ScenePolicyFortuneMouse) OnStop(s *base.Scene) {
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnStop , sceneId=", s.GetSceneId())
}
// 场景心跳事件
func (this *ScenePolicyFortuneMouse) OnTick(s *base.Scene) {
if s == nil {
return
}
if s.GetSceneState() != nil {
s.GetSceneState().OnTick(s)
}
}
// 玩家进入事件
func (this *ScenePolicyFortuneMouse) OnPlayerEnter(s *base.Scene, p *base.Player) {
if s == nil || p == nil {
return
}
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnPlayerEnter, sceneId=", s.GetSceneId(), " player=", p.Name)
if sceneEx, ok := s.GetExtraData().(*FortuneMouseSceneData); ok {
playerEx := &FortuneMousePlayerData{Player: p}
playerEx.init()
d := p.GameData[fortunemouse.GameDataKey]
if d != nil {
m := make(map[string]string)
json.Unmarshal(d.Data.([]byte), &m)
playerEx.PullPlayer(m)
} else {
m := make(map[string]string)
//json.Unmarshal(d.Data.([]byte), &m)
playerEx.PullPlayer(m)
}
playerEx.SlotsSession.SetCoin(playerEx.Coin * fortunemouse.NowByte)
playerEx.Clear()
sceneEx.players[p.SnId] = playerEx
p.SetExtraData(playerEx)
FortuneMouseSendRoomInfo(s, sceneEx, playerEx)
s.FirePlayerEvent(p, base.PlayerEventEnter, nil)
}
}
// 玩家离开事件
func (this *ScenePolicyFortuneMouse) OnPlayerLeave(s *base.Scene, p *base.Player, reason int) {
if s == nil || p == nil {
return
}
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnPlayerLeave, sceneId=", s.GetSceneId(), " player=", p.SnId)
if playerEx, ok := p.ExtraData.(*FortuneMousePlayerData); ok {
m := playerEx.PushPlayer()
if m != nil && len(m) > 0 {
b, err := json.Marshal(m)
if err != nil {
logger.Logger.Error("OnPlayerLeave, json.Marshal error:", err)
} else {
p.GameData[fortunemouse.GameDataKey] = &model.PlayerGameData{
Platform: p.Platform,
SnId: p.SnId,
Id: fortunemouse.GameDataKey,
Data: b,
}
}
}
}
if sceneEx, ok := s.ExtraData.(*FortuneMouseSceneData); ok {
s.FirePlayerEvent(p, base.PlayerEventLeave, nil)
sceneEx.OnPlayerLeave(p, reason)
}
}
// 玩家掉线
func (this *ScenePolicyFortuneMouse) OnPlayerDropLine(s *base.Scene, p *base.Player) {
if s == nil || p == nil {
return
}
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnPlayerDropLine, sceneId=", s.GetSceneId(), " player=", p.SnId)
s.FirePlayerEvent(p, base.PlayerEventDropLine, nil)
}
// 玩家重连
func (this *ScenePolicyFortuneMouse) OnPlayerRehold(s *base.Scene, p *base.Player) {
if s == nil || p == nil {
return
}
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnPlayerRehold, sceneId=", s.GetSceneId(), " player=", p.SnId)
if sceneEx, ok := s.GetExtraData().(*FortuneMouseSceneData); ok {
if playerEx, ok := p.GetExtraData().(*FortuneMousePlayerData); ok {
FortuneMouseSendRoomInfo(s, sceneEx, playerEx)
}
}
}
// 返回房间
func (this *ScenePolicyFortuneMouse) OnPlayerReturn(s *base.Scene, p *base.Player) {
if s == nil || p == nil {
return
}
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnPlayerReturn, GetSceneId()=", s.GetSceneId(), " player=", p.Name)
if sceneEx, ok := s.GetExtraData().(*FortuneMouseSceneData); ok {
if playerEx, ok := p.GetExtraData().(*FortuneMousePlayerData); ok {
//if p.IsMarkFlag(base.PlayerState_Auto) {
// p.UnmarkFlag(base.PlayerState_Auto)
// p.SyncFlag()
//}
//发送房间信息给自己
FortuneMouseSendRoomInfo(s, sceneEx, playerEx)
s.FirePlayerEvent(p, base.PlayerEventReturn, nil)
}
}
}
func FortuneMouseSendRoomInfo(s *base.Scene, sceneEx *FortuneMouseSceneData, playerEx *FortuneMousePlayerData) {
pack := FortuneMouseCreateRoomInfoPacket(s, sceneEx, playerEx)
logger.Logger.Trace("RoomInfo: ", pack)
playerEx.SendToClient(int(protocol.FortuneMousePID_PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMINFO), pack)
}
func FortuneMouseCreateRoomInfoPacket(s *base.Scene, sceneEx *FortuneMouseSceneData, playerEx *FortuneMousePlayerData) interface{} {
//房间信息
pack := &protocol.SCFortuneMouseRoomInfo{
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.GetDBGameFree().OtherIntParams,
GameFreeId: proto.Int32(s.GetDBGameFree().Id),
//BetLimit: s.GetDBGameFree().BetLimit,
}
//自己的信息
if playerEx != nil {
pd := &protocol.FortuneMousePlayerData{
SnId: proto.Int32(playerEx.SnId),
Name: proto.String(playerEx.Name),
Head: proto.Int32(playerEx.Head),
Sex: proto.Int32(playerEx.Sex),
Coin: proto.Int64(playerEx.Coin),
Pos: proto.Int(playerEx.Pos),
Flag: proto.Int(playerEx.GetFlag()),
City: proto.String(playerEx.City),
HeadOutLine: proto.Int32(playerEx.HeadOutLine),
VIP: proto.Int32(playerEx.VIP),
}
pack.Player = pd
}
//get data
Response, err := slots.SlotsMgrSington.Enter(playerEx.SlotsSession, int64(s.GameId))
if err == nil {
data := assemble.DataToCli(Response).(assemble.TableInfo)
pi, _ := json.Marshal(data)
pack.PlayerInfo = string(pi)
if sceneEx.BetConfig == nil {
sceneEx.BetConfig = &data.BetConfig
}
} else {
logger.Logger.Error("slots enter err:", err)
}
proto.SetDefaults(pack)
return pack
}
func (this *ScenePolicyFortuneMouse) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
if s == nil || p == nil {
return false
}
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnPlayerOp, sceneId=", s.GetSceneId(), " player=", p.SnId, " opcode=", opcode, " params=", params)
if s.GetSceneState() != nil {
if s.GetSceneState().OnPlayerOp(s, p, opcode, params) {
p.SetLastOPTimer(time.Now())
return true
}
return false
}
return true
}
func (this *ScenePolicyFortuneMouse) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
if s == nil || p == nil {
return
}
logger.Logger.Trace("(this *ScenePolicyFortuneMouse) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " eventcode=", evtcode, " params=", params)
if s.GetSceneState() != nil {
s.GetSceneState().OnPlayerEvent(s, p, evtcode, params)
}
}
// 当前状态能否换桌
func (this *ScenePolicyFortuneMouse) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
if s == nil || p == nil {
return false
}
if s.GetSceneState() != nil {
return s.GetSceneState().CanChangeCoinScene(s, p)
}
return false
}
// 状态基类
type SceneBaseStateFortuneMouse struct {
}
func (this *SceneBaseStateFortuneMouse) GetTimeout(s *base.Scene) int {
if sceneEx, ok := s.GetExtraData().(*FortuneMouseSceneData); ok {
return int(time.Now().Sub(sceneEx.GetStateStartTime()) / time.Second)
}
return 0
}
func (this *SceneBaseStateFortuneMouse) CanChangeTo(s base.SceneState) bool {
return true
}
// 当前状态能否换桌
func (this *SceneBaseStateFortuneMouse) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
return true
}
func (this *SceneBaseStateFortuneMouse) OnEnter(s *base.Scene) {
if sceneEx, ok := s.GetExtraData().(*FortuneMouseSceneData); ok {
sceneEx.SetStateStartTime(time.Now())
}
}
func (this *SceneBaseStateFortuneMouse) OnLeave(s *base.Scene) {}
func (this *SceneBaseStateFortuneMouse) OnTick(s *base.Scene) {
if time.Now().Sub(s.GameStartTime) > time.Second*3 {
if sceneEx, ok := s.ExtraData.(*FortuneMouseSceneData); ok {
for _, p := range sceneEx.players {
if p.IsOnLine() {
p.leaveTime = 0
continue
}
p.leaveTime++
if p.leaveTime < 60*2 {
continue
}
//踢出玩家
sceneEx.PlayerLeave(p.Player, common.PlayerLeaveReason_LongTimeNoOp, true)
}
}
s.GameStartTime = time.Now()
}
}
func (this *SceneBaseStateFortuneMouse) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
return false
}
func (this *SceneBaseStateFortuneMouse) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
}
// ////////////////////////////////////////////////////////////
// 开始状态
// ////////////////////////////////////////////////////////////
type SceneStateStartFortuneMouse struct {
SceneBaseStateFortuneMouse
}
func (this *SceneStateStartFortuneMouse) GetState() int {
return fortunemouse.FortuneMouseStateStart
}
func (this *SceneStateStartFortuneMouse) CanChangeTo(s base.SceneState) bool {
return false
}
// 当前状态能否换桌
func (this *SceneStateStartFortuneMouse) CanChangeCoinScene(s *base.Scene, p *base.Player) bool {
if playerEx, ok := p.GetExtraData().(*FortuneMousePlayerData); ok {
if playerEx.isRespin {
return false
}
}
return true
}
func (this *SceneStateStartFortuneMouse) GetTimeout(s *base.Scene) int {
return 0
}
func (this *SceneStateStartFortuneMouse) OnEnter(s *base.Scene) {
this.SceneBaseStateFortuneMouse.OnEnter(s)
if sceneEx, ok := s.GetExtraData().(*FortuneMouseSceneData); ok {
sceneEx.SetGameNowTime(time.Now())
}
}
// 状态离开时
func (this *SceneStateStartFortuneMouse) OnLeave(s *base.Scene) {
this.SceneBaseStateFortuneMouse.OnLeave(s)
logger.Logger.Tracef("(this *SceneStateStartFortuneMouse) OnLeave, sceneid=%v", s.GetSceneId())
}
// 玩家操作
func (this *SceneStateStartFortuneMouse) OnPlayerOp(s *base.Scene, p *base.Player, opcode int, params []int64) bool {
logger.Logger.Tracef("(this *SceneStateStartFortuneMouse) OnPlayerOp, sceneid=%v params=%v", s.GetSceneId(), params)
if this.SceneBaseStateFortuneMouse.OnPlayerOp(s, p, opcode, params) {
return true
}
if sceneEx, ok := s.GetExtraData().(*FortuneMouseSceneData); ok {
if playerEx, ok := p.GetExtraData().(*FortuneMousePlayerData); ok {
switch opcode {
case fortunemouse.FortuneMousePlayerOpStart:
playerEx.Clear()
if len(params) < 3 {
pack := &protocol.SCFortuneMouseBilled{
OpRetCode: proto.Int32(1),
}
proto.SetDefaults(pack)
logger.Logger.Trace("SCFortuneMouseBilled", pack.String())
playerEx.SendToClient(int(protocol.FortuneMousePID_PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED), pack)
return true
}
playerEx.BetSizeIndex = params[0]
playerEx.BetLevelIndex = params[1]
playerEx.BetLineIndex = params[2]
//playerEx.BetMode = params[3]
needCoin := sceneEx.BetConfig.BetSize[params[0]] * float64(sceneEx.BetConfig.BetLevel[params[1]]) *
float64(sceneEx.BetConfig.BetLines[params[2]])
if needCoin > float64(playerEx.Coin) {
pack := &protocol.SCFortuneMouseBilled{
OpRetCode: proto.Int32(1),
}
proto.SetDefaults(pack)
logger.Logger.Trace("SCFortuneMouseBilled:", pack.String())
playerEx.SendToClient(int(protocol.FortuneMousePID_PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED), pack)
return true
}
//playerEx.SlotsSession.SetCoin(playerEx.Coin * fortunemouse.NowByte)
//logger.Logger.Trace("=============init dif coin", playerEx.Coin-playerEx.SlotsSession.Coin()/fortunemouse.NowByte)
//get data
Response, err := slots.SlotsMgrSington.Play(playerEx.SlotsSession, &base.SpinReq{
GameId: int64(sceneEx.GameId),
BetSizeIndex: playerEx.BetSizeIndex,
BetLevelIndex: playerEx.BetLevelIndex,
BetLineIndex: playerEx.BetLineIndex,
BetMode: playerEx.BetMode,
Ts: time.Now().Unix(),
})
var gameEndStr string
var data assemble.GameEnd
if err == nil {
data = assemble.DataToCli(Response).(assemble.GameEnd)
var respinStatus int
if data.Results[0].ArrSpins[0].Special != nil {
sp, _ := json.Marshal(data.Results[0].ArrSpins[0].Special)
var spinLock SpinLock
json.Unmarshal(sp, &spinLock)
respinStatus = spinLock.ReSpinStatus
}
if respinStatus == 0 || respinStatus == 1 {
//第一次触发或者正常模式
//logger.Logger.Trace("=============addcoin1111 ", -data.TotalBet)
playerEx.AddCoin(int64(-data.TotalBet), common.GainWay_HundredSceneLost, base.SyncFlag_ToClient, "system", s.GetSceneName())
playerEx.totalBet = int64(data.TotalBet)
//logger.Logger.Trace("=======bet======dif++++ ", float64(playerEx.Coin)-data.BetAfterCoin)
}
var taxCoin float64
if data.RoundReward > 0 {
//税收比例
taxRate := sceneEx.GetDBGameFree().GetTaxRate()
if taxRate < 0 || taxRate > 10000 {
taxRate = 500
}
taxCoin = data.RoundReward * float64(taxRate) / 10000
data.RoundReward = data.RoundReward - taxCoin
playerEx.AddServiceFee(int64(taxCoin))
playerEx.taxCoin = int64(taxCoin)
playerEx.winCoin = int64(data.RoundReward)
}
pi, _ := json.Marshal(data)
gameEndStr = string(pi)
if respinStatus == 0 || respinStatus == 3 {
//logger.Logger.Trace("===win==========addcoin222 ", data.RoundReward)
playerEx.AddCoin(int64(data.RoundReward), common.GainWay_HundredSceneWin, 0, "system", s.GetSceneName())
//logger.Logger.Trace("=======win======dif++++ ", float64(playerEx.Coin)-data.FinalCoin)
//免费游戏结束或者正常模式
sceneEx.StaticsLaba(&base.StaticLabaParam{
SnId: playerEx.SnId,
Gain: int64(data.RoundReward - data.TotalBet),
GainTax: int64(taxCoin),
IsAddTimes: true,
})
}
if respinStatus == 0 || respinStatus == 3 {
playerEx.isRespin = false
} else {
playerEx.isRespin = true
}
} else {
logger.Logger.Error("slots Play err:", err)
}
playerEx.SlotsSession.SetCoin(int64(data.FinalCoin) * fortunemouse.NowByte)
//logger.Logger.Trace("======end=======init dif coin", playerEx.Coin-playerEx.SlotsSession.Coin()/fortunemouse.NowByte)
if playerEx.Coin != int64(data.FinalCoin) {
logger.Logger.Error("==========playerEx.Coin != data.FinalCoin==============", (float64(playerEx.Coin)-data.FinalCoin)/10000)
}
pack := &protocol.SCFortuneMouseBilled{
OpRetCode: proto.Int32(0),
GameEndStr: proto.String(gameEndStr),
}
proto.SetDefaults(pack)
logger.Logger.Trace("SCFortuneMouseBilled", pack.String())
playerEx.SendToClient(int(protocol.FortuneMousePID_PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED), pack)
// 记录本次操作
FortuneMouseAndSaveLog(sceneEx, playerEx, data)
}
}
}
return true
}
// 玩家事件
func (this *SceneStateStartFortuneMouse) OnPlayerEvent(s *base.Scene, p *base.Player, evtcode int, params []int64) {
logger.Logger.Trace("(this *SceneStateStartFortuneMouse) OnPlayerEvent, sceneId=", s.GetSceneId(), " player=", p.SnId, " evtcode=", evtcode)
this.SceneBaseStateFortuneMouse.OnPlayerEvent(s, p, evtcode, params)
}
func (this *SceneStateStartFortuneMouse) OnTick(s *base.Scene) {
this.SceneBaseStateFortuneMouse.OnTick(s)
}
// //////////////////////////////////////////////////////////////////////////////
func (this *ScenePolicyFortuneMouse) RegisteSceneState(state base.SceneState) {
if state == nil {
return
}
stateid := state.GetState()
if stateid < 0 || stateid >= fortunemouse.FortuneMouseStateMax {
return
}
this.states[stateid] = state
}
func (this *ScenePolicyFortuneMouse) GetSceneState(s *base.Scene, stateid int) base.SceneState {
if stateid >= 0 && stateid < fortunemouse.FortuneMouseStateMax {
return this.states[stateid]
}
return nil
}
func FortuneMouseAndSaveLog(sceneEx *FortuneMouseSceneData, playerEx *FortuneMousePlayerData, data assemble.GameEnd) {
if !playerEx.IsRob {
data.SnId = playerEx.SnId
if data.Results[0].FreeStatus != 1 && data.Results[0].FreeNumMax != 0 {
data.TotalBet = 0
}
info, err := model.MarshalGameNoteByROLL(data)
if err == nil {
logid, _ := model.AutoIncGameLogId()
playerEx.currentLogId = logid
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
var totalin, totalout int64
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
totalin = playerEx.totalBet
}
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
totalout = int64(data.RoundReward) + playerEx.taxCoin
}
validFlow := totalin + totalout
validBet := common.AbsI64(totalin - totalout)
logParam := &base.SaveGamePlayerListLogParam{
Platform: playerEx.Platform,
Channel: playerEx.Channel,
Promoter: playerEx.BeUnderAgentCode,
PackageTag: playerEx.PackageID,
InviterId: playerEx.InviterId,
LogId: logid,
TotalIn: totalin,
TotalOut: totalout,
TaxCoin: playerEx.taxCoin,
BetAmount: playerEx.totalBet,
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
ValidBet: validBet,
ValidFlow: validFlow,
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
}
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
}
}
//统计输下注金币数
if !sceneEx.Testing && !playerEx.IsRob {
playerBet := &server.PlayerData{
SnId: proto.Int32(playerEx.SnId),
Bet: proto.Int64(playerEx.CurrentBet),
Gain: proto.Int64(int64(data.RoundReward) + playerEx.taxCoin),
Tax: proto.Int64(playerEx.taxCoin),
Coin: proto.Int64(playerEx.GetCoin()),
GameCoinTs: proto.Int64(playerEx.GameCoinTs),
}
gwPlayerBet := &server.GWPlayerData{
SceneId: sceneEx.SceneId,
GameFreeId: proto.Int32(sceneEx.GetDBGameFree().GetId()),
}
gwPlayerBet.Datas = append(gwPlayerBet.Datas, playerBet)
sceneEx.SyncPlayerDatas(&base.PlayerDataParam{
HasRobotGaming: false,
Data: gwPlayerBet,
})
}
playerEx.taxCoin = 0
playerEx.winCoin = 0
if sceneEx.CheckNeedDestroy() && data.Results[0].FreeNum <= 0 {
sceneEx.SceneDestroy(true)
}
}
func init() {
//主状态
ScenePolicyFortuneMouseSington.RegisteSceneState(&SceneStateStartFortuneMouse{})
core.RegisteHook(core.HOOK_BEFORE_START, func() error {
base.RegisteScenePolicy(common.GameId_FortuneMouse, fortunemouse.RoomMode_Classic, ScenePolicyFortuneMouseSington)
return nil
})
}

View File

@ -0,0 +1,799 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1-devel
// protoc v3.19.4
// source: protocol/cashmania/cashmania.proto
package cashmania
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//cashmania
//龙
type CashManiaPID int32
const (
CashManiaPID_PACKET_CASHMANIA_ZERO CashManiaPID = 0 // 弃用消息号
CashManiaPID_PACKET_CASHMANIA_SCCASHMANIAROOMINFO CashManiaPID = 5650 //房间信息
CashManiaPID_PACKET_CASHMANIA_CSCASHMANIAOP CashManiaPID = 5651
CashManiaPID_PACKET_CASHMANIA_SCCASHMANIAOP CashManiaPID = 5652
CashManiaPID_PACKET_CASHMANIA_SCCASHMANIAROOMSTATE CashManiaPID = 5653
CashManiaPID_PACKET_CASHMANIA_SCCASHMANIABILLED CashManiaPID = 5654
)
// Enum value maps for CashManiaPID.
var (
CashManiaPID_name = map[int32]string{
0: "PACKET_CASHMANIA_ZERO",
5650: "PACKET_CASHMANIA_SCCASHMANIAROOMINFO",
5651: "PACKET_CASHMANIA_CSCASHMANIAOP",
5652: "PACKET_CASHMANIA_SCCASHMANIAOP",
5653: "PACKET_CASHMANIA_SCCASHMANIAROOMSTATE",
5654: "PACKET_CASHMANIA_SCCASHMANIABILLED",
}
CashManiaPID_value = map[string]int32{
"PACKET_CASHMANIA_ZERO": 0,
"PACKET_CASHMANIA_SCCASHMANIAROOMINFO": 5650,
"PACKET_CASHMANIA_CSCASHMANIAOP": 5651,
"PACKET_CASHMANIA_SCCASHMANIAOP": 5652,
"PACKET_CASHMANIA_SCCASHMANIAROOMSTATE": 5653,
"PACKET_CASHMANIA_SCCASHMANIABILLED": 5654,
}
)
func (x CashManiaPID) Enum() *CashManiaPID {
p := new(CashManiaPID)
*p = x
return p
}
func (x CashManiaPID) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CashManiaPID) Descriptor() protoreflect.EnumDescriptor {
return file_protocol_cashmania_cashmania_proto_enumTypes[0].Descriptor()
}
func (CashManiaPID) Type() protoreflect.EnumType {
return &file_protocol_cashmania_cashmania_proto_enumTypes[0]
}
func (x CashManiaPID) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CashManiaPID.Descriptor instead.
func (CashManiaPID) EnumDescriptor() ([]byte, []int) {
return file_protocol_cashmania_cashmania_proto_rawDescGZIP(), []int{0}
}
type CashManiaPlayerData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` //名字
SnId int32 `protobuf:"varint,2,opt,name=SnId,proto3" json:"SnId,omitempty"` //账号
Head int32 `protobuf:"varint,3,opt,name=Head,proto3" json:"Head,omitempty"` //头像
Sex int32 `protobuf:"varint,4,opt,name=Sex,proto3" json:"Sex,omitempty"` //性别
Coin int64 `protobuf:"varint,5,opt,name=Coin,proto3" json:"Coin,omitempty"` //金币
Pos int32 `protobuf:"varint,6,opt,name=Pos,proto3" json:"Pos,omitempty"` //座位位置
Flag int32 `protobuf:"varint,7,opt,name=Flag,proto3" json:"Flag,omitempty"` //二进制标记
Params []string `protobuf:"bytes,8,rep,name=Params,proto3" json:"Params,omitempty"` //其他数据 如:ip 等
City string `protobuf:"bytes,9,opt,name=City,proto3" json:"City,omitempty"` //城市
HeadOutLine int32 `protobuf:"varint,10,opt,name=HeadOutLine,proto3" json:"HeadOutLine,omitempty"` //头像框
VIP int32 `protobuf:"varint,11,opt,name=VIP,proto3" json:"VIP,omitempty"`
}
func (x *CashManiaPlayerData) Reset() {
*x = CashManiaPlayerData{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CashManiaPlayerData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CashManiaPlayerData) ProtoMessage() {}
func (x *CashManiaPlayerData) ProtoReflect() protoreflect.Message {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CashManiaPlayerData.ProtoReflect.Descriptor instead.
func (*CashManiaPlayerData) Descriptor() ([]byte, []int) {
return file_protocol_cashmania_cashmania_proto_rawDescGZIP(), []int{0}
}
func (x *CashManiaPlayerData) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CashManiaPlayerData) GetSnId() int32 {
if x != nil {
return x.SnId
}
return 0
}
func (x *CashManiaPlayerData) GetHead() int32 {
if x != nil {
return x.Head
}
return 0
}
func (x *CashManiaPlayerData) GetSex() int32 {
if x != nil {
return x.Sex
}
return 0
}
func (x *CashManiaPlayerData) GetCoin() int64 {
if x != nil {
return x.Coin
}
return 0
}
func (x *CashManiaPlayerData) GetPos() int32 {
if x != nil {
return x.Pos
}
return 0
}
func (x *CashManiaPlayerData) GetFlag() int32 {
if x != nil {
return x.Flag
}
return 0
}
func (x *CashManiaPlayerData) GetParams() []string {
if x != nil {
return x.Params
}
return nil
}
func (x *CashManiaPlayerData) GetCity() string {
if x != nil {
return x.City
}
return ""
}
func (x *CashManiaPlayerData) GetHeadOutLine() int32 {
if x != nil {
return x.HeadOutLine
}
return 0
}
func (x *CashManiaPlayerData) GetVIP() int32 {
if x != nil {
return x.VIP
}
return 0
}
//房间信息
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMINFO
type SCCashManiaRoomInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RoomId int32 `protobuf:"varint,1,opt,name=RoomId,proto3" json:"RoomId,omitempty"` //房间id
GameFreeId int32 `protobuf:"varint,2,opt,name=GameFreeId,proto3" json:"GameFreeId,omitempty"`
GameId int32 `protobuf:"varint,3,opt,name=GameId,proto3" json:"GameId,omitempty"` //游戏id
RoomMode int32 `protobuf:"varint,4,opt,name=RoomMode,proto3" json:"RoomMode,omitempty"` //游戏模式
Params []int32 `protobuf:"varint,5,rep,packed,name=Params,proto3" json:"Params,omitempty"` //规则参数
NumOfGames int32 `protobuf:"varint,6,opt,name=NumOfGames,proto3" json:"NumOfGames,omitempty"` //当前第几局
State int32 `protobuf:"varint,7,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态
ParamsEx []int64 `protobuf:"varint,8,rep,packed,name=ParamsEx,proto3" json:"ParamsEx,omitempty"` //其他参数
SceneType int32 `protobuf:"varint,9,opt,name=SceneType,proto3" json:"SceneType,omitempty"` //房间模式
Player *CashManiaPlayerData `protobuf:"bytes,10,opt,name=Player,proto3" json:"Player,omitempty"` //房间内的玩家信息
PlayerInfo string `protobuf:"bytes,11,opt,name=PlayerInfo,proto3" json:"PlayerInfo,omitempty"`
}
func (x *SCCashManiaRoomInfo) Reset() {
*x = SCCashManiaRoomInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCCashManiaRoomInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCCashManiaRoomInfo) ProtoMessage() {}
func (x *SCCashManiaRoomInfo) ProtoReflect() protoreflect.Message {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SCCashManiaRoomInfo.ProtoReflect.Descriptor instead.
func (*SCCashManiaRoomInfo) Descriptor() ([]byte, []int) {
return file_protocol_cashmania_cashmania_proto_rawDescGZIP(), []int{1}
}
func (x *SCCashManiaRoomInfo) GetRoomId() int32 {
if x != nil {
return x.RoomId
}
return 0
}
func (x *SCCashManiaRoomInfo) GetGameFreeId() int32 {
if x != nil {
return x.GameFreeId
}
return 0
}
func (x *SCCashManiaRoomInfo) GetGameId() int32 {
if x != nil {
return x.GameId
}
return 0
}
func (x *SCCashManiaRoomInfo) GetRoomMode() int32 {
if x != nil {
return x.RoomMode
}
return 0
}
func (x *SCCashManiaRoomInfo) GetParams() []int32 {
if x != nil {
return x.Params
}
return nil
}
func (x *SCCashManiaRoomInfo) GetNumOfGames() int32 {
if x != nil {
return x.NumOfGames
}
return 0
}
func (x *SCCashManiaRoomInfo) GetState() int32 {
if x != nil {
return x.State
}
return 0
}
func (x *SCCashManiaRoomInfo) GetParamsEx() []int64 {
if x != nil {
return x.ParamsEx
}
return nil
}
func (x *SCCashManiaRoomInfo) GetSceneType() int32 {
if x != nil {
return x.SceneType
}
return 0
}
func (x *SCCashManiaRoomInfo) GetPlayer() *CashManiaPlayerData {
if x != nil {
return x.Player
}
return nil
}
func (x *SCCashManiaRoomInfo) GetPlayerInfo() string {
if x != nil {
return x.PlayerInfo
}
return ""
}
//玩家操作
//PACKET_FORTUNEMOUSE_CSFORTUNEMOUSEOP
type CSCashManiaOp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` //操作码 0.spin
Params []int64 `protobuf:"varint,2,rep,packed,name=Params,proto3" json:"Params,omitempty"` //操作参数 下注索引编号
}
func (x *CSCashManiaOp) Reset() {
*x = CSCashManiaOp{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CSCashManiaOp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CSCashManiaOp) ProtoMessage() {}
func (x *CSCashManiaOp) ProtoReflect() protoreflect.Message {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CSCashManiaOp.ProtoReflect.Descriptor instead.
func (*CSCashManiaOp) Descriptor() ([]byte, []int) {
return file_protocol_cashmania_cashmania_proto_rawDescGZIP(), []int{2}
}
func (x *CSCashManiaOp) GetOpCode() int32 {
if x != nil {
return x.OpCode
}
return 0
}
func (x *CSCashManiaOp) GetParams() []int64 {
if x != nil {
return x.Params
}
return nil
}
//玩家操作返回
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEOP
type SCCashManiaOp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` //操作码
OpRetCode int32 `protobuf:"varint,2,opt,name=OpRetCode,proto3" json:"OpRetCode,omitempty"` //操作结果 1.金币不足 2.低于该值不能押注
Params []int64 `protobuf:"varint,3,rep,packed,name=Params,proto3" json:"Params,omitempty"` //操作参数
}
func (x *SCCashManiaOp) Reset() {
*x = SCCashManiaOp{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCCashManiaOp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCCashManiaOp) ProtoMessage() {}
func (x *SCCashManiaOp) ProtoReflect() protoreflect.Message {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[3]
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 SCCashManiaOp.ProtoReflect.Descriptor instead.
func (*SCCashManiaOp) Descriptor() ([]byte, []int) {
return file_protocol_cashmania_cashmania_proto_rawDescGZIP(), []int{3}
}
func (x *SCCashManiaOp) GetOpCode() int32 {
if x != nil {
return x.OpCode
}
return 0
}
func (x *SCCashManiaOp) GetOpRetCode() int32 {
if x != nil {
return x.OpRetCode
}
return 0
}
func (x *SCCashManiaOp) GetParams() []int64 {
if x != nil {
return x.Params
}
return nil
}
//房间状态
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMSTATE
type SCCashManiaRoomState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
State int32 `protobuf:"varint,1,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态
SubState int32 `protobuf:"varint,2,opt,name=SubState,proto3" json:"SubState,omitempty"` //房间当前子状态
Params []int32 `protobuf:"varint,3,rep,packed,name=Params,proto3" json:"Params,omitempty"` //状态参数
}
func (x *SCCashManiaRoomState) Reset() {
*x = SCCashManiaRoomState{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCCashManiaRoomState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCCashManiaRoomState) ProtoMessage() {}
func (x *SCCashManiaRoomState) ProtoReflect() protoreflect.Message {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[4]
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 SCCashManiaRoomState.ProtoReflect.Descriptor instead.
func (*SCCashManiaRoomState) Descriptor() ([]byte, []int) {
return file_protocol_cashmania_cashmania_proto_rawDescGZIP(), []int{4}
}
func (x *SCCashManiaRoomState) GetState() int32 {
if x != nil {
return x.State
}
return 0
}
func (x *SCCashManiaRoomState) GetSubState() int32 {
if x != nil {
return x.SubState
}
return 0
}
func (x *SCCashManiaRoomState) GetParams() []int32 {
if x != nil {
return x.Params
}
return nil
}
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED
type SCCashManiaBilled struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpRetCode int32 `protobuf:"varint,1,opt,name=OpRetCode,proto3" json:"OpRetCode,omitempty"` //0.spin成功 1.spin失败
GameEndStr string `protobuf:"bytes,2,opt,name=GameEndStr,proto3" json:"GameEndStr,omitempty"`
}
func (x *SCCashManiaBilled) Reset() {
*x = SCCashManiaBilled{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCCashManiaBilled) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCCashManiaBilled) ProtoMessage() {}
func (x *SCCashManiaBilled) ProtoReflect() protoreflect.Message {
mi := &file_protocol_cashmania_cashmania_proto_msgTypes[5]
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 SCCashManiaBilled.ProtoReflect.Descriptor instead.
func (*SCCashManiaBilled) Descriptor() ([]byte, []int) {
return file_protocol_cashmania_cashmania_proto_rawDescGZIP(), []int{5}
}
func (x *SCCashManiaBilled) GetOpRetCode() int32 {
if x != nil {
return x.OpRetCode
}
return 0
}
func (x *SCCashManiaBilled) GetGameEndStr() string {
if x != nil {
return x.GameEndStr
}
return ""
}
var File_protocol_cashmania_cashmania_proto protoreflect.FileDescriptor
var file_protocol_cashmania_cashmania_proto_rawDesc = []byte{
0x0a, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x61, 0x73, 0x68, 0x6d,
0x61, 0x6e, 0x69, 0x61, 0x2f, 0x63, 0x61, 0x73, 0x68, 0x6d, 0x61, 0x6e, 0x69, 0x61, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x61, 0x73, 0x68, 0x6d, 0x61, 0x6e, 0x69, 0x61, 0x22,
0xfd, 0x01, 0x0a, 0x13, 0x43, 0x61, 0x73, 0x68, 0x4d, 0x61, 0x6e, 0x69, 0x61, 0x50, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53,
0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x12,
0x12, 0x0a, 0x04, 0x48, 0x65, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x48,
0x65, 0x61, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x53, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x18, 0x05, 0x20,
0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x50, 0x6f, 0x73,
0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x46,
0x6c, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12,
0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52,
0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x18,
0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x48,
0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x56, 0x49, 0x50, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x56, 0x49, 0x50, 0x22,
0xe1, 0x02, 0x0a, 0x13, 0x53, 0x43, 0x43, 0x61, 0x73, 0x68, 0x4d, 0x61, 0x6e, 0x69, 0x61, 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,
0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12,
0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d,
0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d,
0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20,
0x03, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x4e,
0x75, 0x6d, 0x4f, 0x66, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x4e, 0x75, 0x6d, 0x4f, 0x66, 0x47, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x53,
0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, 0x18, 0x08, 0x20,
0x03, 0x28, 0x03, 0x52, 0x08, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, 0x12, 0x1c, 0x0a,
0x09, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x50,
0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x61,
0x73, 0x68, 0x6d, 0x61, 0x6e, 0x69, 0x61, 0x2e, 0x43, 0x61, 0x73, 0x68, 0x4d, 0x61, 0x6e, 0x69,
0x61, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06, 0x50, 0x6c, 0x61,
0x79, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x6e, 0x66,
0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49,
0x6e, 0x66, 0x6f, 0x22, 0x3f, 0x0a, 0x0d, 0x43, 0x53, 0x43, 0x61, 0x73, 0x68, 0x4d, 0x61, 0x6e,
0x69, 0x61, 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, 0x16, 0x0a, 0x06,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x22, 0x5d, 0x0a, 0x0d, 0x53, 0x43, 0x43, 0x61, 0x73, 0x68, 0x4d, 0x61,
0x6e, 0x69, 0x61, 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, 0x1c, 0x0a,
0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72,
0x61, 0x6d, 0x73, 0x22, 0x60, 0x0a, 0x14, 0x53, 0x43, 0x43, 0x61, 0x73, 0x68, 0x4d, 0x61, 0x6e,
0x69, 0x61, 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, 0x1a, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a,
0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x50,
0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x51, 0x0a, 0x11, 0x53, 0x43, 0x43, 0x61, 0x73, 0x68, 0x4d,
0x61, 0x6e, 0x69, 0x61, 0x42, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x70,
0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4f,
0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65,
0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x47, 0x61,
0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x2a, 0xf3, 0x01, 0x0a, 0x0c, 0x43, 0x61, 0x73,
0x68, 0x4d, 0x61, 0x6e, 0x69, 0x61, 0x50, 0x49, 0x44, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x41, 0x53, 0x48, 0x4d, 0x41, 0x4e, 0x49, 0x41, 0x5f, 0x5a, 0x45,
0x52, 0x4f, 0x10, 0x00, 0x12, 0x29, 0x0a, 0x24, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
0x41, 0x53, 0x48, 0x4d, 0x41, 0x4e, 0x49, 0x41, 0x5f, 0x53, 0x43, 0x43, 0x41, 0x53, 0x48, 0x4d,
0x41, 0x4e, 0x49, 0x41, 0x52, 0x4f, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x92, 0x2c, 0x12,
0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43, 0x41, 0x53, 0x48, 0x4d, 0x41,
0x4e, 0x49, 0x41, 0x5f, 0x43, 0x53, 0x43, 0x41, 0x53, 0x48, 0x4d, 0x41, 0x4e, 0x49, 0x41, 0x4f,
0x50, 0x10, 0x93, 0x2c, 0x12, 0x23, 0x0a, 0x1e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x43,
0x41, 0x53, 0x48, 0x4d, 0x41, 0x4e, 0x49, 0x41, 0x5f, 0x53, 0x43, 0x43, 0x41, 0x53, 0x48, 0x4d,
0x41, 0x4e, 0x49, 0x41, 0x4f, 0x50, 0x10, 0x94, 0x2c, 0x12, 0x2a, 0x0a, 0x25, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x43, 0x41, 0x53, 0x48, 0x4d, 0x41, 0x4e, 0x49, 0x41, 0x5f, 0x53, 0x43,
0x43, 0x41, 0x53, 0x48, 0x4d, 0x41, 0x4e, 0x49, 0x41, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41,
0x54, 0x45, 0x10, 0x95, 0x2c, 0x12, 0x27, 0x0a, 0x22, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x43, 0x41, 0x53, 0x48, 0x4d, 0x41, 0x4e, 0x49, 0x41, 0x5f, 0x53, 0x43, 0x43, 0x41, 0x53, 0x48,
0x4d, 0x41, 0x4e, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x96, 0x2c, 0x42, 0x29,
0x5a, 0x27, 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,
0x63, 0x61, 0x73, 0x68, 0x6d, 0x61, 0x6e, 0x69, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_protocol_cashmania_cashmania_proto_rawDescOnce sync.Once
file_protocol_cashmania_cashmania_proto_rawDescData = file_protocol_cashmania_cashmania_proto_rawDesc
)
func file_protocol_cashmania_cashmania_proto_rawDescGZIP() []byte {
file_protocol_cashmania_cashmania_proto_rawDescOnce.Do(func() {
file_protocol_cashmania_cashmania_proto_rawDescData = protoimpl.X.CompressGZIP(file_protocol_cashmania_cashmania_proto_rawDescData)
})
return file_protocol_cashmania_cashmania_proto_rawDescData
}
var file_protocol_cashmania_cashmania_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_protocol_cashmania_cashmania_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_protocol_cashmania_cashmania_proto_goTypes = []interface{}{
(CashManiaPID)(0), // 0: cashmania.CashManiaPID
(*CashManiaPlayerData)(nil), // 1: cashmania.CashManiaPlayerData
(*SCCashManiaRoomInfo)(nil), // 2: cashmania.SCCashManiaRoomInfo
(*CSCashManiaOp)(nil), // 3: cashmania.CSCashManiaOp
(*SCCashManiaOp)(nil), // 4: cashmania.SCCashManiaOp
(*SCCashManiaRoomState)(nil), // 5: cashmania.SCCashManiaRoomState
(*SCCashManiaBilled)(nil), // 6: cashmania.SCCashManiaBilled
}
var file_protocol_cashmania_cashmania_proto_depIdxs = []int32{
1, // 0: cashmania.SCCashManiaRoomInfo.Player:type_name -> cashmania.CashManiaPlayerData
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_protocol_cashmania_cashmania_proto_init() }
func file_protocol_cashmania_cashmania_proto_init() {
if File_protocol_cashmania_cashmania_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_protocol_cashmania_cashmania_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CashManiaPlayerData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_cashmania_cashmania_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCCashManiaRoomInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_cashmania_cashmania_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSCashManiaOp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_cashmania_cashmania_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCCashManiaOp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_cashmania_cashmania_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCCashManiaRoomState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_cashmania_cashmania_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCCashManiaBilled); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_protocol_cashmania_cashmania_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_protocol_cashmania_cashmania_proto_goTypes,
DependencyIndexes: file_protocol_cashmania_cashmania_proto_depIdxs,
EnumInfos: file_protocol_cashmania_cashmania_proto_enumTypes,
MessageInfos: file_protocol_cashmania_cashmania_proto_msgTypes,
}.Build()
File_protocol_cashmania_cashmania_proto = out.File
file_protocol_cashmania_cashmania_proto_rawDesc = nil
file_protocol_cashmania_cashmania_proto_goTypes = nil
file_protocol_cashmania_cashmania_proto_depIdxs = nil
}

View File

@ -0,0 +1,68 @@
syntax = "proto3";
package cashmania;
option go_package = "mongo.games.com/game/protocol/cashmania";
//cashmania
//
enum CashManiaPID {
PACKET_CASHMANIA_ZERO = 0;//
PACKET_CASHMANIA_SCCASHMANIAROOMINFO = 5650; //
PACKET_CASHMANIA_CSCASHMANIAOP = 5651;
PACKET_CASHMANIA_SCCASHMANIAOP = 5652;
PACKET_CASHMANIA_SCCASHMANIAROOMSTATE = 5653;
PACKET_CASHMANIA_SCCASHMANIABILLED = 5654;
}
message CashManiaPlayerData {
string Name = 1; //
int32 SnId = 2; //
int32 Head = 3; //
int32 Sex = 4; //
int64 Coin = 5; //
int32 Pos = 6; //
int32 Flag = 7; //
repeated string Params = 8; // :ip
string City = 9; //
int32 HeadOutLine = 10; //
int32 VIP = 11;
}
//
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMINFO
message SCCashManiaRoomInfo {
int32 RoomId = 1; //id
int32 GameFreeId = 2;
int32 GameId = 3; //id
int32 RoomMode = 4; //
repeated int32 Params = 5; //
int32 NumOfGames = 6; //
int32 State = 7; //
repeated int64 ParamsEx = 8; //
int32 SceneType = 9; //
CashManiaPlayerData Player = 10; //
string PlayerInfo = 11;
}
//
//PACKET_FORTUNEMOUSE_CSFORTUNEMOUSEOP
message CSCashManiaOp {
int32 OpCode = 1; // 0.spin
repeated int64 Params = 2; //
}
//
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEOP
message SCCashManiaOp {
int32 OpCode = 1; //
int32 OpRetCode = 2; // 1. 2.
repeated int64 Params = 3; //
}
//
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMSTATE
message SCCashManiaRoomState {
int32 State = 1; //
int32 SubState = 2; //
repeated int32 Params = 3; //
}
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED
message SCCashManiaBilled{
int32 OpRetCode = 1;//0.spin成功 1.spin失败
string GameEndStr = 2;
}

View File

@ -159,31 +159,39 @@
### samloc.proto
- 5550~5569
### thirteen.protp
### thirteen.proto
- 5570~5580
### smallrocket.protp
### smallrocket.proto
- 5581~5599
### fortunedragon.prot
### fortunedragon.proto
- 5600~5609
### fortunerabbit.prot
### fortunerabbit.proto
- 5610~5619
### fortuneox.prot
### fortuneox.proto
- 5620~5629
### fortunetiger.prot
### fortunetiger.proto
- 5630~5639
### fortunemouse.prot
### fortunemouse.proto
- 5640~5649
### cashmania.proto
- 5650~5659
### gatesofolympus.proto
- 5660~5669
### game.proto(玩家离开)
- 8000~8099

View File

@ -0,0 +1,806 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1-devel
// protoc v3.19.4
// source: protocol/gatesofolympus/gatesofolympus.proto
package gatesofolympus
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
//gatesofolympus
//龙
type GatesOfOlympusPID int32
const (
GatesOfOlympusPID_PACKET_GATESOFOLYMPUS_ZERO GatesOfOlympusPID = 0 // 弃用消息号
GatesOfOlympusPID_PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMINFO GatesOfOlympusPID = 5660 //房间信息
GatesOfOlympusPID_PACKET_GATESOFOLYMPUS_CSGATESOFOLYMPUSOP GatesOfOlympusPID = 5661
GatesOfOlympusPID_PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSOP GatesOfOlympusPID = 5662
GatesOfOlympusPID_PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMSTATE GatesOfOlympusPID = 5663
GatesOfOlympusPID_PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSBILLED GatesOfOlympusPID = 5664
)
// Enum value maps for GatesOfOlympusPID.
var (
GatesOfOlympusPID_name = map[int32]string{
0: "PACKET_GATESOFOLYMPUS_ZERO",
5660: "PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMINFO",
5661: "PACKET_GATESOFOLYMPUS_CSGATESOFOLYMPUSOP",
5662: "PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSOP",
5663: "PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMSTATE",
5664: "PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSBILLED",
}
GatesOfOlympusPID_value = map[string]int32{
"PACKET_GATESOFOLYMPUS_ZERO": 0,
"PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMINFO": 5660,
"PACKET_GATESOFOLYMPUS_CSGATESOFOLYMPUSOP": 5661,
"PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSOP": 5662,
"PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMSTATE": 5663,
"PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSBILLED": 5664,
}
)
func (x GatesOfOlympusPID) Enum() *GatesOfOlympusPID {
p := new(GatesOfOlympusPID)
*p = x
return p
}
func (x GatesOfOlympusPID) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GatesOfOlympusPID) Descriptor() protoreflect.EnumDescriptor {
return file_protocol_gatesofolympus_gatesofolympus_proto_enumTypes[0].Descriptor()
}
func (GatesOfOlympusPID) Type() protoreflect.EnumType {
return &file_protocol_gatesofolympus_gatesofolympus_proto_enumTypes[0]
}
func (x GatesOfOlympusPID) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GatesOfOlympusPID.Descriptor instead.
func (GatesOfOlympusPID) EnumDescriptor() ([]byte, []int) {
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP(), []int{0}
}
type GatesOfOlympusPlayerData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` //名字
SnId int32 `protobuf:"varint,2,opt,name=SnId,proto3" json:"SnId,omitempty"` //账号
Head int32 `protobuf:"varint,3,opt,name=Head,proto3" json:"Head,omitempty"` //头像
Sex int32 `protobuf:"varint,4,opt,name=Sex,proto3" json:"Sex,omitempty"` //性别
Coin int64 `protobuf:"varint,5,opt,name=Coin,proto3" json:"Coin,omitempty"` //金币
Pos int32 `protobuf:"varint,6,opt,name=Pos,proto3" json:"Pos,omitempty"` //座位位置
Flag int32 `protobuf:"varint,7,opt,name=Flag,proto3" json:"Flag,omitempty"` //二进制标记
Params []string `protobuf:"bytes,8,rep,name=Params,proto3" json:"Params,omitempty"` //其他数据 如:ip 等
City string `protobuf:"bytes,9,opt,name=City,proto3" json:"City,omitempty"` //城市
HeadOutLine int32 `protobuf:"varint,10,opt,name=HeadOutLine,proto3" json:"HeadOutLine,omitempty"` //头像框
VIP int32 `protobuf:"varint,11,opt,name=VIP,proto3" json:"VIP,omitempty"`
}
func (x *GatesOfOlympusPlayerData) Reset() {
*x = GatesOfOlympusPlayerData{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GatesOfOlympusPlayerData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GatesOfOlympusPlayerData) ProtoMessage() {}
func (x *GatesOfOlympusPlayerData) ProtoReflect() protoreflect.Message {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GatesOfOlympusPlayerData.ProtoReflect.Descriptor instead.
func (*GatesOfOlympusPlayerData) Descriptor() ([]byte, []int) {
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP(), []int{0}
}
func (x *GatesOfOlympusPlayerData) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *GatesOfOlympusPlayerData) GetSnId() int32 {
if x != nil {
return x.SnId
}
return 0
}
func (x *GatesOfOlympusPlayerData) GetHead() int32 {
if x != nil {
return x.Head
}
return 0
}
func (x *GatesOfOlympusPlayerData) GetSex() int32 {
if x != nil {
return x.Sex
}
return 0
}
func (x *GatesOfOlympusPlayerData) GetCoin() int64 {
if x != nil {
return x.Coin
}
return 0
}
func (x *GatesOfOlympusPlayerData) GetPos() int32 {
if x != nil {
return x.Pos
}
return 0
}
func (x *GatesOfOlympusPlayerData) GetFlag() int32 {
if x != nil {
return x.Flag
}
return 0
}
func (x *GatesOfOlympusPlayerData) GetParams() []string {
if x != nil {
return x.Params
}
return nil
}
func (x *GatesOfOlympusPlayerData) GetCity() string {
if x != nil {
return x.City
}
return ""
}
func (x *GatesOfOlympusPlayerData) GetHeadOutLine() int32 {
if x != nil {
return x.HeadOutLine
}
return 0
}
func (x *GatesOfOlympusPlayerData) GetVIP() int32 {
if x != nil {
return x.VIP
}
return 0
}
//房间信息
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMINFO
type SCGatesOfOlympusRoomInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RoomId int32 `protobuf:"varint,1,opt,name=RoomId,proto3" json:"RoomId,omitempty"` //房间id
GameFreeId int32 `protobuf:"varint,2,opt,name=GameFreeId,proto3" json:"GameFreeId,omitempty"`
GameId int32 `protobuf:"varint,3,opt,name=GameId,proto3" json:"GameId,omitempty"` //游戏id
RoomMode int32 `protobuf:"varint,4,opt,name=RoomMode,proto3" json:"RoomMode,omitempty"` //游戏模式
Params []int32 `protobuf:"varint,5,rep,packed,name=Params,proto3" json:"Params,omitempty"` //规则参数
NumOfGames int32 `protobuf:"varint,6,opt,name=NumOfGames,proto3" json:"NumOfGames,omitempty"` //当前第几局
State int32 `protobuf:"varint,7,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态
ParamsEx []int64 `protobuf:"varint,8,rep,packed,name=ParamsEx,proto3" json:"ParamsEx,omitempty"` //其他参数
SceneType int32 `protobuf:"varint,9,opt,name=SceneType,proto3" json:"SceneType,omitempty"` //房间模式
Player *GatesOfOlympusPlayerData `protobuf:"bytes,10,opt,name=Player,proto3" json:"Player,omitempty"` //房间内的玩家信息
PlayerInfo string `protobuf:"bytes,11,opt,name=PlayerInfo,proto3" json:"PlayerInfo,omitempty"`
}
func (x *SCGatesOfOlympusRoomInfo) Reset() {
*x = SCGatesOfOlympusRoomInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCGatesOfOlympusRoomInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCGatesOfOlympusRoomInfo) ProtoMessage() {}
func (x *SCGatesOfOlympusRoomInfo) ProtoReflect() protoreflect.Message {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SCGatesOfOlympusRoomInfo.ProtoReflect.Descriptor instead.
func (*SCGatesOfOlympusRoomInfo) Descriptor() ([]byte, []int) {
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP(), []int{1}
}
func (x *SCGatesOfOlympusRoomInfo) GetRoomId() int32 {
if x != nil {
return x.RoomId
}
return 0
}
func (x *SCGatesOfOlympusRoomInfo) GetGameFreeId() int32 {
if x != nil {
return x.GameFreeId
}
return 0
}
func (x *SCGatesOfOlympusRoomInfo) GetGameId() int32 {
if x != nil {
return x.GameId
}
return 0
}
func (x *SCGatesOfOlympusRoomInfo) GetRoomMode() int32 {
if x != nil {
return x.RoomMode
}
return 0
}
func (x *SCGatesOfOlympusRoomInfo) GetParams() []int32 {
if x != nil {
return x.Params
}
return nil
}
func (x *SCGatesOfOlympusRoomInfo) GetNumOfGames() int32 {
if x != nil {
return x.NumOfGames
}
return 0
}
func (x *SCGatesOfOlympusRoomInfo) GetState() int32 {
if x != nil {
return x.State
}
return 0
}
func (x *SCGatesOfOlympusRoomInfo) GetParamsEx() []int64 {
if x != nil {
return x.ParamsEx
}
return nil
}
func (x *SCGatesOfOlympusRoomInfo) GetSceneType() int32 {
if x != nil {
return x.SceneType
}
return 0
}
func (x *SCGatesOfOlympusRoomInfo) GetPlayer() *GatesOfOlympusPlayerData {
if x != nil {
return x.Player
}
return nil
}
func (x *SCGatesOfOlympusRoomInfo) GetPlayerInfo() string {
if x != nil {
return x.PlayerInfo
}
return ""
}
//玩家操作
//PACKET_FORTUNEMOUSE_CSFORTUNEMOUSEOP
type CSGatesOfOlympusOp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` //操作码 0.spin
Params []int64 `protobuf:"varint,2,rep,packed,name=Params,proto3" json:"Params,omitempty"` //操作参数 下注索引编号
}
func (x *CSGatesOfOlympusOp) Reset() {
*x = CSGatesOfOlympusOp{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CSGatesOfOlympusOp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CSGatesOfOlympusOp) ProtoMessage() {}
func (x *CSGatesOfOlympusOp) ProtoReflect() protoreflect.Message {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CSGatesOfOlympusOp.ProtoReflect.Descriptor instead.
func (*CSGatesOfOlympusOp) Descriptor() ([]byte, []int) {
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP(), []int{2}
}
func (x *CSGatesOfOlympusOp) GetOpCode() int32 {
if x != nil {
return x.OpCode
}
return 0
}
func (x *CSGatesOfOlympusOp) GetParams() []int64 {
if x != nil {
return x.Params
}
return nil
}
//玩家操作返回
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEOP
type SCGatesOfOlympusOp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpCode int32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` //操作码
OpRetCode int32 `protobuf:"varint,2,opt,name=OpRetCode,proto3" json:"OpRetCode,omitempty"` //操作结果 1.金币不足 2.低于该值不能押注
Params []int64 `protobuf:"varint,3,rep,packed,name=Params,proto3" json:"Params,omitempty"` //操作参数
}
func (x *SCGatesOfOlympusOp) Reset() {
*x = SCGatesOfOlympusOp{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCGatesOfOlympusOp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCGatesOfOlympusOp) ProtoMessage() {}
func (x *SCGatesOfOlympusOp) ProtoReflect() protoreflect.Message {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[3]
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 SCGatesOfOlympusOp.ProtoReflect.Descriptor instead.
func (*SCGatesOfOlympusOp) Descriptor() ([]byte, []int) {
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP(), []int{3}
}
func (x *SCGatesOfOlympusOp) GetOpCode() int32 {
if x != nil {
return x.OpCode
}
return 0
}
func (x *SCGatesOfOlympusOp) GetOpRetCode() int32 {
if x != nil {
return x.OpRetCode
}
return 0
}
func (x *SCGatesOfOlympusOp) GetParams() []int64 {
if x != nil {
return x.Params
}
return nil
}
//房间状态
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMSTATE
type SCGatesOfOlympusRoomState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
State int32 `protobuf:"varint,1,opt,name=State,proto3" json:"State,omitempty"` //房间当前状态
SubState int32 `protobuf:"varint,2,opt,name=SubState,proto3" json:"SubState,omitempty"` //房间当前子状态
Params []int32 `protobuf:"varint,3,rep,packed,name=Params,proto3" json:"Params,omitempty"` //状态参数
}
func (x *SCGatesOfOlympusRoomState) Reset() {
*x = SCGatesOfOlympusRoomState{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCGatesOfOlympusRoomState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCGatesOfOlympusRoomState) ProtoMessage() {}
func (x *SCGatesOfOlympusRoomState) ProtoReflect() protoreflect.Message {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[4]
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 SCGatesOfOlympusRoomState.ProtoReflect.Descriptor instead.
func (*SCGatesOfOlympusRoomState) Descriptor() ([]byte, []int) {
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP(), []int{4}
}
func (x *SCGatesOfOlympusRoomState) GetState() int32 {
if x != nil {
return x.State
}
return 0
}
func (x *SCGatesOfOlympusRoomState) GetSubState() int32 {
if x != nil {
return x.SubState
}
return 0
}
func (x *SCGatesOfOlympusRoomState) GetParams() []int32 {
if x != nil {
return x.Params
}
return nil
}
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED
type SCGatesOfOlympusBilled struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpRetCode int32 `protobuf:"varint,1,opt,name=OpRetCode,proto3" json:"OpRetCode,omitempty"` //0.spin成功 1.spin失败
GameEndStr string `protobuf:"bytes,2,opt,name=GameEndStr,proto3" json:"GameEndStr,omitempty"`
}
func (x *SCGatesOfOlympusBilled) Reset() {
*x = SCGatesOfOlympusBilled{}
if protoimpl.UnsafeEnabled {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SCGatesOfOlympusBilled) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SCGatesOfOlympusBilled) ProtoMessage() {}
func (x *SCGatesOfOlympusBilled) ProtoReflect() protoreflect.Message {
mi := &file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[5]
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 SCGatesOfOlympusBilled.ProtoReflect.Descriptor instead.
func (*SCGatesOfOlympusBilled) Descriptor() ([]byte, []int) {
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP(), []int{5}
}
func (x *SCGatesOfOlympusBilled) GetOpRetCode() int32 {
if x != nil {
return x.OpRetCode
}
return 0
}
func (x *SCGatesOfOlympusBilled) GetGameEndStr() string {
if x != nil {
return x.GameEndStr
}
return ""
}
var File_protocol_gatesofolympus_gatesofolympus_proto protoreflect.FileDescriptor
var file_protocol_gatesofolympus_gatesofolympus_proto_rawDesc = []byte{
0x0a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x73,
0x6f, 0x66, 0x6f, 0x6c, 0x79, 0x6d, 0x70, 0x75, 0x73, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x73, 0x6f,
0x66, 0x6f, 0x6c, 0x79, 0x6d, 0x70, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e,
0x67, 0x61, 0x74, 0x65, 0x73, 0x6f, 0x66, 0x6f, 0x6c, 0x79, 0x6d, 0x70, 0x75, 0x73, 0x22, 0x82,
0x02, 0x0a, 0x18, 0x47, 0x61, 0x74, 0x65, 0x73, 0x4f, 0x66, 0x4f, 0x6c, 0x79, 0x6d, 0x70, 0x75,
0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x4e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x53, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53,
0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x65, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x04, 0x48, 0x65, 0x61, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x53, 0x65, 0x78, 0x18, 0x04,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x53, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x69,
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x10, 0x0a,
0x03, 0x50, 0x6f, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x50, 0x6f, 0x73, 0x12,
0x12, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x46,
0x6c, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20,
0x03, 0x28, 0x09, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x43,
0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x69, 0x74, 0x79, 0x12,
0x20, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x48, 0x65, 0x61, 0x64, 0x4f, 0x75, 0x74, 0x4c, 0x69, 0x6e,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x56, 0x49, 0x50, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x56, 0x49, 0x50, 0x22, 0xf0, 0x02, 0x0a, 0x18, 0x53, 0x43, 0x47, 0x61, 0x74, 0x65, 0x73, 0x4f,
0x66, 0x4f, 0x6c, 0x79, 0x6d, 0x70, 0x75, 0x73, 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, 0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65,
0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x47, 0x61,
0x6d, 0x65, 0x46, 0x72, 0x65, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x47, 0x61, 0x6d, 0x65,
0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x47, 0x61, 0x6d, 0x65, 0x49, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x08, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06,
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x4e, 0x75, 0x6d, 0x4f, 0x66, 0x47, 0x61, 0x6d,
0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4e, 0x75, 0x6d, 0x4f, 0x66, 0x47,
0x61, 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20,
0x01, 0x28, 0x05, 0x52, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, 0x18, 0x08, 0x20, 0x03, 0x28, 0x03, 0x52, 0x08, 0x50, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x45, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x63, 0x65, 0x6e, 0x65, 0x54,
0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x53, 0x63, 0x65, 0x6e, 0x65,
0x54, 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x06, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x73, 0x6f, 0x66, 0x6f, 0x6c,
0x79, 0x6d, 0x70, 0x75, 0x73, 0x2e, 0x47, 0x61, 0x74, 0x65, 0x73, 0x4f, 0x66, 0x4f, 0x6c, 0x79,
0x6d, 0x70, 0x75, 0x73, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x52, 0x06,
0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72,
0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x50, 0x6c, 0x61, 0x79,
0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x44, 0x0a, 0x12, 0x43, 0x53, 0x47, 0x61, 0x74, 0x65,
0x73, 0x4f, 0x66, 0x4f, 0x6c, 0x79, 0x6d, 0x70, 0x75, 0x73, 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, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02,
0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x62, 0x0a, 0x12,
0x53, 0x43, 0x47, 0x61, 0x74, 0x65, 0x73, 0x4f, 0x66, 0x4f, 0x6c, 0x79, 0x6d, 0x70, 0x75, 0x73,
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, 0x1c, 0x0a, 0x09, 0x4f, 0x70,
0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4f,
0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x22, 0x65, 0x0a, 0x19, 0x53, 0x43, 0x47, 0x61, 0x74, 0x65, 0x73, 0x4f, 0x66, 0x4f, 0x6c, 0x79,
0x6d, 0x70, 0x75, 0x73, 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, 0x1a, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x53, 0x75, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52,
0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x56, 0x0a, 0x16, 0x53, 0x43, 0x47, 0x61, 0x74,
0x65, 0x73, 0x4f, 0x66, 0x4f, 0x6c, 0x79, 0x6d, 0x70, 0x75, 0x73, 0x42, 0x69, 0x6c, 0x6c, 0x65,
0x64, 0x12, 0x1c, 0x0a, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x4f, 0x70, 0x52, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x1e, 0x0a, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0a, 0x47, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x64, 0x53, 0x74, 0x72, 0x2a,
0xaf, 0x02, 0x0a, 0x11, 0x47, 0x61, 0x74, 0x65, 0x73, 0x4f, 0x66, 0x4f, 0x6c, 0x79, 0x6d, 0x70,
0x75, 0x73, 0x50, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d, 0x50, 0x55, 0x53, 0x5f, 0x5a,
0x45, 0x52, 0x4f, 0x10, 0x00, 0x12, 0x33, 0x0a, 0x2e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d, 0x50, 0x55, 0x53, 0x5f, 0x53,
0x43, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d, 0x50, 0x55, 0x53, 0x52,
0x4f, 0x4f, 0x4d, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x9c, 0x2c, 0x12, 0x2d, 0x0a, 0x28, 0x50, 0x41,
0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d,
0x50, 0x55, 0x53, 0x5f, 0x43, 0x53, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59,
0x4d, 0x50, 0x55, 0x53, 0x4f, 0x50, 0x10, 0x9d, 0x2c, 0x12, 0x2d, 0x0a, 0x28, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d, 0x50,
0x55, 0x53, 0x5f, 0x53, 0x43, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d,
0x50, 0x55, 0x53, 0x4f, 0x50, 0x10, 0x9e, 0x2c, 0x12, 0x34, 0x0a, 0x2f, 0x50, 0x41, 0x43, 0x4b,
0x45, 0x54, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d, 0x50, 0x55,
0x53, 0x5f, 0x53, 0x43, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46, 0x4f, 0x4c, 0x59, 0x4d, 0x50,
0x55, 0x53, 0x52, 0x4f, 0x4f, 0x4d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x9f, 0x2c, 0x12, 0x31,
0x0a, 0x2c, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f, 0x46,
0x4f, 0x4c, 0x59, 0x4d, 0x50, 0x55, 0x53, 0x5f, 0x53, 0x43, 0x47, 0x41, 0x54, 0x45, 0x53, 0x4f,
0x46, 0x4f, 0x4c, 0x59, 0x4d, 0x50, 0x55, 0x53, 0x42, 0x49, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0xa0,
0x2c, 0x42, 0x2e, 0x5a, 0x2c, 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, 0x67, 0x61, 0x74, 0x65, 0x73, 0x6f, 0x66, 0x6f, 0x6c, 0x79, 0x6d, 0x70, 0x75,
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_protocol_gatesofolympus_gatesofolympus_proto_rawDescOnce sync.Once
file_protocol_gatesofolympus_gatesofolympus_proto_rawDescData = file_protocol_gatesofolympus_gatesofolympus_proto_rawDesc
)
func file_protocol_gatesofolympus_gatesofolympus_proto_rawDescGZIP() []byte {
file_protocol_gatesofolympus_gatesofolympus_proto_rawDescOnce.Do(func() {
file_protocol_gatesofolympus_gatesofolympus_proto_rawDescData = protoimpl.X.CompressGZIP(file_protocol_gatesofolympus_gatesofolympus_proto_rawDescData)
})
return file_protocol_gatesofolympus_gatesofolympus_proto_rawDescData
}
var file_protocol_gatesofolympus_gatesofolympus_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_protocol_gatesofolympus_gatesofolympus_proto_goTypes = []interface{}{
(GatesOfOlympusPID)(0), // 0: gatesofolympus.GatesOfOlympusPID
(*GatesOfOlympusPlayerData)(nil), // 1: gatesofolympus.GatesOfOlympusPlayerData
(*SCGatesOfOlympusRoomInfo)(nil), // 2: gatesofolympus.SCGatesOfOlympusRoomInfo
(*CSGatesOfOlympusOp)(nil), // 3: gatesofolympus.CSGatesOfOlympusOp
(*SCGatesOfOlympusOp)(nil), // 4: gatesofolympus.SCGatesOfOlympusOp
(*SCGatesOfOlympusRoomState)(nil), // 5: gatesofolympus.SCGatesOfOlympusRoomState
(*SCGatesOfOlympusBilled)(nil), // 6: gatesofolympus.SCGatesOfOlympusBilled
}
var file_protocol_gatesofolympus_gatesofolympus_proto_depIdxs = []int32{
1, // 0: gatesofolympus.SCGatesOfOlympusRoomInfo.Player:type_name -> gatesofolympus.GatesOfOlympusPlayerData
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_protocol_gatesofolympus_gatesofolympus_proto_init() }
func file_protocol_gatesofolympus_gatesofolympus_proto_init() {
if File_protocol_gatesofolympus_gatesofolympus_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GatesOfOlympusPlayerData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCGatesOfOlympusRoomInfo); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CSGatesOfOlympusOp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCGatesOfOlympusOp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCGatesOfOlympusRoomState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SCGatesOfOlympusBilled); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_protocol_gatesofolympus_gatesofolympus_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_protocol_gatesofolympus_gatesofolympus_proto_goTypes,
DependencyIndexes: file_protocol_gatesofolympus_gatesofolympus_proto_depIdxs,
EnumInfos: file_protocol_gatesofolympus_gatesofolympus_proto_enumTypes,
MessageInfos: file_protocol_gatesofolympus_gatesofolympus_proto_msgTypes,
}.Build()
File_protocol_gatesofolympus_gatesofolympus_proto = out.File
file_protocol_gatesofolympus_gatesofolympus_proto_rawDesc = nil
file_protocol_gatesofolympus_gatesofolympus_proto_goTypes = nil
file_protocol_gatesofolympus_gatesofolympus_proto_depIdxs = nil
}

View File

@ -0,0 +1,68 @@
syntax = "proto3";
package gatesofolympus;
option go_package = "mongo.games.com/game/protocol/gatesofolympus";
//gatesofolympus
//
enum GatesOfOlympusPID {
PACKET_GATESOFOLYMPUS_ZERO = 0;//
PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMINFO = 5660; //
PACKET_GATESOFOLYMPUS_CSGATESOFOLYMPUSOP = 5661;
PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSOP = 5662;
PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSROOMSTATE = 5663;
PACKET_GATESOFOLYMPUS_SCGATESOFOLYMPUSBILLED = 5664;
}
message GatesOfOlympusPlayerData {
string Name = 1; //
int32 SnId = 2; //
int32 Head = 3; //
int32 Sex = 4; //
int64 Coin = 5; //
int32 Pos = 6; //
int32 Flag = 7; //
repeated string Params = 8; // :ip
string City = 9; //
int32 HeadOutLine = 10; //
int32 VIP = 11;
}
//
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMINFO
message SCGatesOfOlympusRoomInfo {
int32 RoomId = 1; //id
int32 GameFreeId = 2;
int32 GameId = 3; //id
int32 RoomMode = 4; //
repeated int32 Params = 5; //
int32 NumOfGames = 6; //
int32 State = 7; //
repeated int64 ParamsEx = 8; //
int32 SceneType = 9; //
GatesOfOlympusPlayerData Player = 10; //
string PlayerInfo = 11;
}
//
//PACKET_FORTUNEMOUSE_CSFORTUNEMOUSEOP
message CSGatesOfOlympusOp {
int32 OpCode = 1; // 0.spin
repeated int64 Params = 2; //
}
//
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEOP
message SCGatesOfOlympusOp {
int32 OpCode = 1; //
int32 OpRetCode = 2; // 1. 2.
repeated int64 Params = 3; //
}
//
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMSTATE
message SCGatesOfOlympusRoomState {
int32 State = 1; //
int32 SubState = 2; //
repeated int32 Params = 3; //
}
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED
message SCGatesOfOlympusBilled{
int32 OpRetCode = 1;//0.spin成功 1.spin失败
string GameEndStr = 2;
}