|
- local message=MJFramework.MJFrameworkClassImprot("mj.luaScript.Protocol.MJMessage")
-
- message.XiaPiao=defClass("XiaPiao"
- -- 飘风
- , defVar("nPiaoNum", VT_Int, 0)
-
- )
-
- message.XiaPiaoResponse=defClass("XiaPiaoResponse"
- -- 用户ID
- , defVar("nUserId", VT_Int, 0)
- -- 飘风
- , defVar("nPiaoNum", VT_Int, 0)
-
- )
-
- --重连回复桌面牌
- message.RecoverOperateCard = defClass("RecoverOperateCard"
- -- 用户id
- , defVar("nUserId", VT_Int, -1)
- -- 桌面组合牌
- , defVar("operates", VT_Vector(message.OperateCard1), {})
- )
-
- message.XiaPiaoTime=defClass("XiaPiaoTime"
- -- 飘风剩余时间
- , defVar("nPiaoLeftTime", VT_Int, 0)
- )
-
-
- -- 玩家的牌桌信息
- message.playerInfo = defClass("playerInfo"
- --用户的USER ID
- , defVar("nUserId", VT_Int, 0)
- --用户的TABLE ID
- , defVar("nSeatId", VT_UChar, 0)
- --用户的游戏状态标识
- , defVar("nPlayerFlag", VT_UChar, 0)
- --玩家解散状态 0:初始状态, 1:发起解散 2: 同意解散 3:不同意解散
- , defVar("nDisbandStatus", VT_UChar, 255)
- --是否在线 0:离线 1:在线
- , defVar("nOnlineStatus", VT_UChar, 255)
- --用户信息
- , defVar("userInfo", VT_String, "")
- --当前局分数
- , defVar("nTurnScore", VT_String, -1)
- --总分
- , defVar("nTotalMoney", VT_String, -1)
- --听牌状态,1听牌状态,0不听牌
- , defVar("nTingStatus", VT_UChar, 0)
- --是否可以操作,用于闹钟 此用户是否可以操作,0:不可以 1: 可以
- -- , defVar("isCanOperate", VT_UChar, 255)
- -- -- 弃胡玩家弃胡状态 0: 无弃胡 1:待弃胡 2: 已弃胡 (当玩家需要出牌且此值为1时则展示弃胡按钮提示玩家是否弃胡)
- -- , defVar("nQiHuStatus", VT_Short, 0)
- -- 桌面组合牌
- ,defVar("gruoupCards",VT_Vector(message.OperateCard),{})
- --玩家手牌
- ,defVar("handCards",VT_Vector(message.Card),{})
- --桌面弃牌
- ,defVar("outCards",VT_Vector(message.Card),{})
-
- --飘风
- -- ,defVar("nPiaoNum", VT_Short, -1)
- )
-
- -- --断线重连
- message.GameReconnection = defClass("GameReconnection"
- -- 用户房间号
- , defVar("gameId", VT_Short, 0)
- -- 用户房间号
- , defVar("nShowTableId", VT_Int, 0)
- -- 房间最大人数
- , defVar("nMaxPlayCount", VT_Int, 0)
- -- 用户房主
- , defVar("nRoomOwnedUid", VT_Int, 0)
- -- 总的局数
- , defVar("nTotalGameNum", VT_Short, 0)
- --底注
- , defVar("nBaseChips", VT_Int, 0)
- -- 游戏信息
- , defVar("strGameInfo", VT_String, "")
- -- 当前局数
- , defVar("nGameStartCount", VT_Short, 0)
- -- 游戏状态
- , defVar("nStatus", VT_UChar, 0)
- -- 庄家座位
- , defVar("nBankSeatId", VT_UChar, 0)
- -- 我的座位
- , defVar("nMySeatId", VT_UChar, 0)
-
- -- 是否有人发起解散
- , defVar("bUserDisbandGame", VT_UChar, 0)
- -- 解散剩余时间,没人发起解散,此值为0
- , defVar("nDismissStateTime", VT_Int, 0)
-
- --
- -- , defVar("userCount", VT_Short, 0)
-
- -- -- 牌桌信息
- -- , defVar("usersInfo",VT_Vector())
- ,defVar("playerInfos", VT_VectorToMap(message.playerInfo, "nUserId"))
-
- -- --剩余的底牌
- ,defVar("leaveCards",VT_Vector(message.Card))
-
-
-
- --天胡的庄家\翻牌者\出牌者的seatId(可通过状态判断具体的角色)
- ,defVar("outCardUserId",VT_Int,0)
- -- --亮出的牌(庄家的天胡的操作状态时showCard == 0)
- -- ,defVar("showCard",VT_UChar,0)
- -- --自己的操作码
- -- ,defVar("mainOpCode",VT_Short,0)
- -- --是否已经操作过 0表示没用,非0表示已经提交了操作
- -- ,defVar("isSubmitOp",VT_UChar,255)
- -- -- 摸牌显示 为空操作的玩家是否能够看到牌,0;不能 1:能
- -- , defVar("showCardFlag", VT_UChar, -1)
- -- --[[
- -- state:
- -- GAME_STATUS_WAIT_OUT_CARDS
- -- ]]
- --出牌者的seatId
- ,defVar("outCardSeatId",VT_UChar,255)
- -- --出牌者上一次的操作
- -- ,defVar("lastOperate",VT_Short,-1)
- -- --出牌者上一次操作了虾米牌
- ,defVar("lastOpCard",VT_UChar,255)
- --操作列表
- ,defVar("operates",VT_Vector(message.OperateCard),{})
- --出牌ID
- ,defVar("needOutCardId",VT_Int,0)
-
- --上次出的牌
- ,defVar("lastOutCardId",VT_Int,0)
- --上次出的牌
- ,defVar("lastOutCard",VT_UChar,0)
-
- --
- ,defVar("stopFlag",VT_UChar,255)
- --结算信息
- ,defVar("strResultInfo",VT_String,"")
- --结算玩家列表
- ,defVar("resultInfos",VT_Vector(message.PlayerResultInfo))
-
- --操作统计
- ,defVar("opsCntMapString",VT_String,"")
-
- --分数统计
- ,defVar("soreCntMapString",VT_String,"")
-
- --飘风列表
- ,defVar("playerPiaoInfos",VT_Vector(message.XiaPiaoResponse),{})
-
- --额外信息
- ,defVar("extJson", VT_String, "")
- --桌面组合牌
- ,defVar("tableGroupCards",VT_Vector(message.RecoverOperateCard))
-
- --洗牌消耗数量
- ,defVar("shuffleNum", VT_Int, 2)
- -- --[[
- -- state:
- -- GAME_STATUS_AUTO_DISCSRD
- -- ]]
- -- --弃牌者的seatId
- -- ,defVar("disCardSeatId",VT_UChar,255)
- -- --要弃的牌(即别人出的牌或翻的牌)
- -- ,defVar("disCard",VT_UChar,255)
- -- --一局结束原因
- -- ,defVar("stopFlag",VT_UChar,255)
- -- --赢家uid, -1则表示黄局 (对于黄局下面4个字段是无用的)
- -- ,defVar("winUserId",VT_Int,255)
- -- --点炮胡时,表示为点炮用户,赔包子时为吃包子用户,自摸胡时此值无意义
- -- ,defVar("dianPaoUserId",VT_Int,255)
- -- --胡数
- -- ,defVar("huShu",VT_UChar,255)
- -- --胡的类型(如地胡、抬炮胡等)
- -- ,defVar("huType",VT_Short,255)
- -- --倍数
- -- ,defVar("multiNum",VT_UChar,255)
- -- --醒牌
- -- ,defVar("xingCard",VT_UChar,255)
- -- --醒的倍数
- -- ,defVar("xingCardNum",VT_UChar,255)
- -- --胡的牌
- -- ,defVar("huCard",VT_UChar,255)
- -- --听牌张数
- -- ,defVar("tingCards",VT_Vector(TingCard),{})
- -- --解散总时间
- -- ,defVar("nDismissToTalTime",VT_Short,0)
- )
-
-
-
- -----------------------------------------------------------
- -- 快速开始请求
-
- --[[
- FAST_START_REQ_TYPE_START = 1, //请求开始游戏
- FAST_START_REQ_TYPE_AGREE = 2, //同意开始游戏
- FAST_START_REQ_TYPE_DISAGREE = 3, //拒绝开始游戏
- FAST_START_REQ_TYPE_INIT = 4,
- FAST_START_REQ_TYPE_NEW_OR_OUT = 5, //有人进来或者退出
- FAST_START_REQ_TYPE_TIMEOUT = 6,
- --]]
- message.FastStartRequest = defClass("FastStartRequest"
- , defVar("tp", VT_UChar, 0)
- )
-
- -- 快速开始请求结果
- --[[
- FAST_START_GAME_RET_SUCC = 0, //成功
- FAST_START_GAME_RET_NOT_ENOUGH = 1, //人数不够
- FAST_START_GAME_OTHER_REQ = 2, //其他人已请求
- FAST_START_GAME_RET_ENOUGH = 3, //人数已满
- FAST_START_GAME_RET_INVALID = 4, //非法操作
-
- --]]
- message.FastStartRequestResult = defClass("FastStartRequestResult"
- , defVar("result", VT_Short, -1)
- )
-
- -- 服务器广播快速开始状态
- message.FastPlayer = defClass("FastPlayer"
- , defVar("nUserId", VT_Int, 0)
- , defVar("nStatus", VT_UChar, 0)
- )
- message.FastStartStatus = defClass("FastStartStatus"
- , defVar("nUserId", VT_Int, 0)
- , defVar("nStatus", VT_Short, 0)
- , defVar("pList", VT_Vector(message.FastPlayer), {})
- , defVar("timeOut", VT_Short, 0)
- )
-
- -- 游戏快速开始
- message.FastSuccessPlayer = defClass("FastSuccessPlayer"
- , defVar("nUserId", VT_Int, 0)
- , defVar("nSeatId", VT_UChar, 0)
- )
- message.UpdateSeatIds = defClass("UpdateSeatIds"
- , defVar("pList", VT_Vector(message.FastSuccessPlayer), {})
- )
-
- -- 同步托管倒计时
- message.UpdateDirectionTime = defClass("UpdateDirectionTime"
- , defVar("nTime", VT_Int, 0)
- )
-
- -- 托管状态
- message.HostingRequest = defClass("HostingRequest"
- , defVar("nUserId", VT_Int, 0)
- -- 1:是托管状态, 0取消托管
- , defVar("status", VT_Short,0)
- )
-
- --
- message.UserPass = defClass("UserPass"
- , defVar("nUserId", VT_Int, 0)
- )
-
-
- message.XiaojuPlayerInfo=defClass("GameXiaoJuResponse"
- --玩家的id
- , defVar("nUserId", VT_Int, 0)
- --当前局分数
- , defVar("nTurnScore", VT_String, 0)
- --总分
- , defVar("nTotalMoney", VT_String, 0)
- --番数
- , defVar("fanshu", VT_Int, 0)
- --玩家本局输赢情况 0不胡不输 1胡,2点炮或者输
- , defVar("result", VT_UChar, 0)
- -- 胡牌牌类型-7对胡、平胡,0为输或者不胡不输
- , defVar("huType", VT_Short, 0)
- -- 桌面组合牌
- ,defVar("gruoupCards",VT_Vector(message.OperateCard),{})
- --玩家手牌
- ,defVar("handCards",VT_Vector(message.Card),{})
- --桌面弃牌
- ,defVar("outCards",VT_Vector(message.Card),{})
- )
-
- message.GameXiaoJuResponse = defClass("GameXiaoJuResponse"
- -- 一局结束的原因
- , defVar("stopFlag", VT_UChar, -1)
- -- 房间信息
- , defVar("strGameInfo", VT_String, "")
- --结算信息
- , defVar("strResultInfo",VT_String,"")
- --玩家信息
- , defVar("playerInfos",VT_Vector(message.XiaojuPlayerInfo),{})
- --是否大局结束,结束是1
- , defVar("isGameOver", VT_Short, 0)
- --操作统计
- ,defVar("opsCntMapString",VT_String,"")
- --分数统计
- ,defVar("soreCntMapString",VT_String,"")
- )
-
- -- --总结算玩家列表
- message.DaJuPlayerInfo = defClass("DaJuPlayerInfo"
- --玩家Uid
- , defVar("nUserId", VT_Int, 0)
- --总输赢分数
- , defVar("nTotalScore", VT_String, 0)
- --json格式,暂无数据,后续扩展
- , defVar("nTotalInfo", VT_String, 0)
- )
-
- message.GameDaJuResponse = defClass("GameDaJuResponse"
- --多少个玩家
- , defVar("nTotalPlayerInfos", VT_VectorToMap(message.DaJuPlayerInfo,"nUserId"))
- )
-
- return message
|