12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178 |
- var Global = require("Global");
- cc.Class({
- extends: cc.Component,
- properties: {
- },
- statics: {
- //controller
- MDM_GR_CONTROL: 300, //控制命令
- SUB_GR_CONTROLUSER: 1, //控制用户
- SUB_GR_CONTROLSTOCK: 2, //控制库存
- SUB_GR_C_CONTROLUSER_REFRESH: 3, ////刷新用户信息 这个是请求刷新 返回的是 SUB_GR_CONTROLUSER_NOTIFY
-
- SUB_GR_CONTROLUSER_SUCCEED: 100, //控制成功
- SUB_GR_STOCKINFO: 200, //更新库存
-
- SUB_GR_CONTROLUSER_REFRESH: 101, //刷新数据
- SUB_GR_CONTROLUSER_NOTIFY: 102, //刷新用户信息
-
-
- //控制用户 SUB_GR_CONTROLUSER
- CMD_C_ControlUserInfo : {
- data:function(){
- var data = {
- dwUserID:0, //DWORD 用户ID
- lControlCode:0, //INT 控制码
- lControlScore:0, //INT 控制赢分
- };
- return data;
- },
- },
-
- //SUB_GR_CONTROLUSER_SUCCEED
- CMD_S_ControlUserSucceed : {
- data:function(){
- var data = {
- dwUserID:0, //DWORD 用户ID
- lControlCode:0, //INT 控制码
- lControlScore:0, //SCORE 控制赢分
- lCurWinScore:0, //SCORE 当前赢分
- };
- return data;
- },
- },
-
- //SUB_GR_CONTROLSTOCK
- CMD_C_StockData: {
- data:function(){
- var data = {
- lStock:[], //SCORE:[8] 库存集 0:小鱼库存 1:大鱼库存
- };
- return data;
- },
- },
-
- //SUB_GR_STOCKINFO
- CMD_S_StockData: {
- data:function(){
- var data = {
- lStock:[], //SCORE:[8] 库存集 0:小鱼库存 1:大鱼库存
- };
- return data;
- },
- },
-
- //SUB_GR_CONTROLUSER_REFRESH
- CMD_S_ControlUserNotify: {
- data:function(){
- var data = {
- dwUserID:0, //DWORD: 用户 I D
- lScore:0, //SCORE: 当前金币
- lCurWinScore:0, //SCORE: 本局输赢金币
- lHisWinScore:0, //SCORE: 历史输赢金币,3
- lConHisScore:0, //SCORE: 历史控制分,4
- iControlCode:0, //INT: 控制码,0
- lControlScore:0, //SCORE: 控制赢分,1
- lControlWinScore:0, //SCORE: 当前控制输赢金币,2
- strNickName:"", //string: 玩家昵称
- };
- return data;
- },
- },
-
- //SUB_GR_CONTROLUSER_NOTIFY
- CMD_S_LKPY_Control : {
- data:function(){
- var data = {
- dwUserID:0, //DWORD 用户ID
- EnterScore:0, //LONGLONG 入场金币
- lNewScore:0, //SCORE 最新金币
- lControlCode:0, //INT 控制码
- lControlScore:0, //SCORE 控制赢分
- lCurWinScore:0, //SCORE 当前赢分
- };
- return data;
- },
- },
- ///////////////////////
- MDM_CM_SYSTEM: 1000, //系统命令
- SUB_CM_SYSTEM_MESSAGE: 1, //系统消息
- SUB_CM_ACTION_MESSAGE: 2, //动作消息
- SUB_CM_DOWN_LOAD_MODULE: 3, //下载消息
- SMT_CHAT: 0x0001, //聊天消息
- SMT_EJECT: 0x0002, //弹出消息
- SMT_GLOBAL: 0x0004, //全局消息
- SMT_PROMPT: 0x0008, //提示消息
- SMT_TABLE_ROLL: 0x0010, //滚动消息
- SMT_CLOSE_ROOM: 0x0100, //关闭房间
- SMT_CLOSE_GAME: 0x0200, //关闭游戏
- SMT_CLOSE_LINK: 0x0400, //中断连接
- SMT_KICK_ROOM: 0x0800, //分数低于踢出房间
- SMT_UPGRADE_ROOM: 0x1000, //分数高于升级房间
- SMT_PRO_ROOM: 0x2000, //分数高于房间提示 (不踢人)
- CMD_CM_SystemMessage: {
- Type:0, //word 消息类型
- Length:0, //word 消息长度
- String:"", //char 消息内容
- },
- //登录命令
- MDM_GR_LOGON: 1, //登录命令
- SUB_GR_LOGON_USERID: 1, //I D 登录
- SUB_GR_LOGON_MOBILE: 2, //手机登录
- SUB_GR_LOGON_ACCOUNTS: 3, //帐户登录
- SUB_GR_LOGON_SUCCESS: 100, //登录成功
- SUB_GR_LOGON_FAILURE: 101, //登录失败
- SUB_GR_LOGON_FINISH: 102, //登录完成
- SUB_GR_UPDATE_NOTIFY: 200, //升级提示
- //升级提示
- CMD_GR_UpdateNotify : {
- data:function(){
- var data = {
- MustUpdatePlaza:0, //byte 强行升级
- MustUpdateClient:0, //byte 强行升级
- AdviceUpdateClient:0, //byte 建议升级
- CurrentPlazaVersion:0, //dword 当前版本
- CurrentFrameVersion:0, //dword 当前版本
- CurrentClientVersion:0, //dword 当前版本
- DownLoadHttp:"", //char 描述消息
- };
- return data;
- },
- },
- //房间 ID 登录
- CMD_GR_LogonUserID : {
- data:function(){
- var data = {
- PlazaVersion:0, //dword 广场版本
- FrameVersion:0, //dword 框架版本
- ProcessVersion:0, //dword 进程版本
- UserID:0, //dword 用户 I D
- Password:"", //char:LEN_MD5 登录密码
- MachineID:"", //char:LEN_MACHINE_ID 机器序列
- KindID:0, //word 类型索引
- };
- return data;
- },
- },
- //登录成功消息
- CMD_GR_LogonSuccess : {
- data:function(){
- var data = {
- UserRight:0, //dword 用户权限
- MasterRight:0, //dword 管理权限
- };
- return data;
- },
- },
- //登录失败
- CMD_GR_LogonError : {
- data:function(){
- var data = {
- ErrorCode:0, //unsigned int 错误代码
- ErrorDescribe:"", //char 错误消息
- };
- return data;
- },
- },
- MDM_GR_CONFIG: 2, //配置信息
- SUB_GR_CONFIG_COLUMN: 100, //列表配置
- SUB_GR_CONFIG_SERVER: 101, //房间配置
- SUB_GR_CONFIG_PROPERTY: 102, //道具配置
- SUB_GR_CONFIG_FINISH: 103, //配置完成
- SUB_GR_CONFIG_USER_RIGHT: 104, //玩家权限
- //列表子项
- tagColumnItem : {
- data:function(){
- var data = {
- ColumnWidth:0, //byte 列表宽度
- DataDescribe:0, //byte 字段类型
- ColumnName:"", //char:16 列表名字
- };
- return data;
- },
- },
- //列表配置
- CMD_GR_ConfigColumn : {
- data:function(){
- var data = {
- ColumnCount:0, //byte 列表数目
- ColumnItem:[], //tagColumnItem:MAX_COLUMN 列表描述
- };
- return data;
- },
- },
- //房间配置
- CMD_GR_ConfigServer : {
- data:function(){
- var data = {
- TableCount:0, //word 桌子数目
- ChairCount:0, //word 椅子数目
- ServerType:0, //word 房间类型
- ServerRule:0, //dword 房间规则
- };
- return data;
- },
- },
- //道具信息
- tagPropertyInfo : {
- data:function(){
- var data = {
- Index:0, //word 道具标识
- Discount:0, //word 会员折扣
- IssueArea:0, //word 发布范围
- PropertyGold:0, //longlong 道具金豆
- PropertyCash:0, //double 道具价格
- SendLoveLiness:0, //longlong 赠送魅力
- RecvLoveLiness:0, //longlong 接受魅力
- };
- return data;
- },
- },
- //道具配置
- CMD_GR_ConfigProperty : {
- data:function(){
- var data = {
- PropertyCount:0, //byte 道具数目
- PropertyInfo:[], //tagPropertyInfo:MAX_PROPERTY 道具描述
- };
- return data;
- },
- },
- //玩家权限
- CMD_GR_ConfigUserRight : {
- data:function(){
- var data = {
- UserRight:0, //dword 玩家权限
- };
- return data;
- },
- },
- MDM_GR_USER:3, //用户信息
- SUB_GR_USER_RULE: 1, //用户规则
- SUB_GR_USER_LOOKON: 2, //旁观请求
- SUB_GR_USER_SITDOWN: 3, //坐下请求
- SUB_GR_USER_STANDUP: 4, //起立请求
- SUB_GR_USER_INVITE: 5, //用户邀请
- SUB_GR_USER_INVITE_REQ: 6, //邀请请求
- SUB_GR_USER_REPULSE_SIT: 7, //拒绝玩家坐下
- SUB_GR_USER_KICK_USER: 8 , //踢出用户
- SUB_GR_USER_INFO_REQ: 9 , //请求用户信息
- SUB_GR_USER_CHAIR_REQ: 10, //请求更换位置
- SUB_GR_USER_CHAIR_INFO_REQ: 11, //请求椅子用户信息
- SUB_GR_USER_CREATE_BALCONY: 12, //金豆场创建包厢
- SUB_GR_USER_JOIN_BALCONY: 13, //金豆场加入包厢
- SUB_GR_USER_DIS_BALCONY: 14, //解散金币场包厢
- SUB_GR_USER_DIS_BALCONY_BACK: 15, //解散金币场包厢返回
- SUB_GR_USER_ENTER: 100, //用户进入
- SUB_GR_USER_SCORE: 101, //用户分数
- SUB_GR_USER_STATUS: 102, //用户状态
- SUB_GR_SIT_FAILED: 103, //请求失败
- SUB_GR_USER_LEAVE: 106, //用户离开
- SUB_GR_USER_CHAT: 201, //聊天消息
- SUB_GR_USER_EXPRESSION: 202, //表情消息
- SUB_GR_WISPER_CHAT: 203, //私聊消息
- SUB_GR_WISPER_EXPRESSION: 204, //私聊表情
- SUB_GR_COLLOQUY_CHAT: 205, //会话消息
- SUB_GR_COLLOQUY_EXPRESSION: 206, //会话表情
- SUB_GR_USER_GPS: 207, //GPS
- SUB_GR_USER_SHARE_ADD_GOLD: 208, //分享获取金豆数
- SUB_GR_USER_SHARE_ADD_GOLD_BACK:209, //分享获取金豆数返回
- SUB_GR_USER_MATCH_LIST: 210, //请求匹配
- SUB_GR_USER_MATCH_LIST_BACK: 211, //请求匹配返回
- SUB_GR_GET_MATCH_SYSTIME: 312, //服务器当前时间
- SUB_GR_GET_ALL_TABLE_INFO: 313, //获取桌子信息(每桌玩家和玩家信息)
- SUB_GR_GET_ALL_TABLE_INFO_BALCONY: 314, //包厢场获取桌子列表
- SUB_GR_BIG_SCORE_TIP: 315, //大金豆提示
- SUB_GR_RED_ENVELOPE: 316, //红包消息
- SUB_GA_TASK_GET_REWARD_SHOW: 510, //获取奖励
- SUB_GR_TASK_RECEIVE_TASK: 504, //获取任务奖励并且获取新任务
- SUB_GA_TASK_EXCHANGE: 511, //兑换
- SUB_GR_GAME_BETINFO_SYNC: 520, //进入游戏同步信息
- SUB_GF_USER_GAME_BET_INFO: 521, //玩家返水信息
- SUB_GR_RUN_HORSE_MESSAGE: 530, //跑马灯
-
- //起立请求
- CMD_GR_UserStandUp : {
- data:function(){
- var data = {
- TableID:0, //word 桌子位置
- ChairID:0, //word 椅子位置
- ForceLeave:0, //byte 强行离开
- };
- return data;
- },
- },
- //创建金豆场包厢请求
- CMD_GR_UserCreateRoom : {
- data:function(){
- var data = {
- bGameTypeIdex:0, //BYTE 游戏类型
- bGameRuleIdex:0, //DWORD 游戏规则
- lScore:0, //LONGLONG 输赢分数
- };
- return data;
- },
- },
- //加入金豆场包厢请求
- CMD_GR_UserJoinRoom : {
- data:function(){
- var data = {
- dwRoomNum:0, //DWORD 房间ID
- };
- return data;
- },
- },
- //用户积分
- tagUserScore : {
- data:function(){
- var data = {
- Score:0, //long long 用户分数
- Grade:0, //long long 用户成绩
- Insure:0, //long long 用户银行
- WinCount:0, //dword 胜利盘数
- LostCount:0, //dword 失败盘数
- DrawCount:0, //dword 和局盘数
- FleeCount:0, //dword 逃跑盘数
- UserMedal:0, //dword 用户奖牌
- Experience:0, //dword 用户经验
- LoveLiness:0, //unsigned int 用户魅力
- };
- return data;
- },
- },
- //用户分数
- CMD_GR_UserScore : {
- data:function(){
- var data = {
- UserID:0, //word 用户标识
- UserScore:0, //tagUserScore 积分信息
-
- };
- return data;
- },
- },
- //请求坐下
- CMD_GR_UserSitDown : {
- data:function(){
- var data = {
- TableID:0, //word 用户标识
- ChairID:0, //word 椅子位置
- TablePass:"", //char:PASS_LEN 桌子密码
- };
- return data;
- },
- },
- //用户状态
- tagUserStatus : {
- data:function(){
- var data = {
- TableID:0, //word 桌子索引
- ChairID:0, //word 椅子位置
- UserStatus:0, //byte 用户状态
- };
- return data;
- },
- },
- //用户状态
- CMD_GR_UserStatus : {
- data:function(){
- var data = {
- UserID:0, //dword 用户标识
- UserStatus:0, //tagUserStatus 用户状态
- };
- return data;
- },
- },
- //用户基本信息结构
- tagUserInfoHead : {
- data:function(){
- var data = {
- GameID:0, //dword 游戏 I D
- UserID:0, //dword 用户 I D
- GroupID:0, //dword 社团 I D
- FaceID:0, //word 头像索引
- CustomID:0, //dword 自定标识
- Gender:0, //byte 用户性别
- MemberOrder:0, //byte 会员等级
- MasterOrder:0, //byte 管理等级
- TableID:0, //word 桌子索引
- ChairID:0, //word 椅子索引
- UserStatus:0, //byte 用户状态
- Score:0, //longlong 用户分数
- Grade:0, //longlong 用户成绩
- Insure:0, //longlong 用户银行
- WinCount:0, //dword 胜利盘数
- LostCount:0, //dword 失败盘数
- DrawCount:0, //dword 和局盘数
- FleeCount:0, //dword 逃跑盘数
- UserMedal:0, //dword 用户奖牌
- Experience:0, //dword 用户经验
- LoveLiness:0, //unsigned int 用户魅力
- };
- return data;
- },
- },
- IPC_GF_UserInfo : {
- data:function(){
- var data = {
- Companion:0, //dword 用户关系
- UserInfoHead:0, //tagUserInfoHead 用户信息
- };
- return data;
- },
- },
- //请求失败
- CMD_GR_RequestFailure : {
- data:function(){
- var data = {
- ErrorCode:0, //unsigned int 错误代码
- DescribeString:0, //char:256 描述信息
- };
- return data;
- },
- },
- CMD_GR_BalconyInfo: {
- data:function(){
- var data = {
- dwRoomNum:0, //DWORD
- bGameTypeIdex:0, //BYTE 游戏类型
- bGameRuleIdex:0, //DWORD 游戏规则
- lScore:0, //LONGLONG 输赢分数
- };
- return data;
- },
- },
- //GPS
- CMD_GR_UserGpsReq: {
- data:function(){
- var data = {
- wTableID:0, //word 桌子位置
- kGps:0, //string GPS信息
- };
- return data;
- },
- },
- CMD_GR_UserGpsRes: {
- data:function(){
- var data = {
- vUserGps:[], //GAME_PLAYER
- };
- return data;
- },
- StreamValue:function(kData, data){
- data.wChair = Global.GetUint16(kData);
- data.kGps = Global.Read2String(kData);
- },
- },
- //请求更换位置
- CMD_GR_ChairUserInfoReq: {
- data:function(){
- var data = {
- wTableID:0, //WORD 桌子位置
- wChairID:0, //WORD 椅子位置
- };
- return data;
- },
- },
- //获取桌子信息(每桌玩家和玩家信息) SUB_GR_GET_ALL_TABLE_INFO
- TableUserItem: {
- data:function(){
- var data = {
- iTableID:0, //DWORD 桌子位置
- iChairID:0, //DWORD 椅子位置
- szNickName:"", //string 用户昵称
- iUserID:0, //DWORD 玩家ID
- sHeadHttp:"", //string 玩家头像
- };
- return data;
- },
- },
- CMD_GR_AllTableInfo: {
- data:function(){
- var data = {
- iTableCount:0, //DWORD 总桌子数
- iPlayerCount:0, //DWORD 每桌玩家数
- v_TableUsers:[], //TableUserItem
- };
- return data;
- },
- },
- //包厢场获取桌子列表 SUB_GR_GET_ALL_TABLE_INFO_BALCONY
- TableInfoBalcony: {
- data:function(){
- var data = {
- nRoomNum:0, //int 房间号
- nPlayerCount:0, //int 椅子位置
- lEnterScore:"", //LONGLONG 入场分数
- lEnterScore:0, //LONGLONG 离场分数
- lCellScore:"", //LONGLONG 底分
- dwGameRuleIdex:0, //DWORD 游戏规则
- };
- return data;
- },
- },
- CMD_GR_AllTableInfoBalcony: {
- data:function(){
- var data = {
- v_TableInfo:[], //TableInfoBalcony
- };
- return data;
- },
- },
- //道具命令
- SUB_GR_PROPERTY_BUY: 300, //购买道具
- SUB_GR_USE_PROP_RESP: 301, //更新道具及相关货币数值
- SUB_GR_PROPERTY_FAILURE: 302, //道具失败
- SUB_GR_PROPERTY_MESSAGE: 303, //道具消息
- SUB_GR_PROPERTY_EFFECT: 304, //道具效应
- SUB_GR_PROPERTY_TRUMPET: 305, //喇叭消息
- SUB_GR_GAME_PROTECT_BACK: 306, //低保信息
- SUB_GR_USER_BALCONY_INFO: 307, //金豆场包厢信息
- SUB_GR_BALCONY_NOTIFY: 308, //金豆场包厢通知协议
- SUB_GR_EXPRESSION_NOTIFY: 309, //魔法表情通知
-
- SUB_GR_GLAD_MESSAGE: 400, //喜报消息
- CMD_GR_C_UseProp: {
- data:function() {
- var data = {
- dwPropID:0, //word //道具ID
- dwPropNum:0, //word //道具数量
- dwTargetUserID:0, //word //使用对象
- };
- return data;
- },
- makeData:function(data) {
- var arrayBuffer = new ArrayBuffer(12 + 8);
- var dv = new DataView(arrayBuffer);
- dv.pos = 8;
- Global.SetUint32(dv, data.dwPropID);
- Global.SetUint32(dv, data.dwPropNum);
- Global.SetUint32(dv, data.dwTargetUserID);
- return dv;
- },
- },
- CMD_GR_C_UseProp_Resp: {
- data:function() {
- var data = {
- dwPropID:0, //word //道具ID
- dwPropNum:0, //word //剩余道具数量
- dwCurrency:0, //word //货币:1-金豆,2-鲜花饼,4-七彩石
- dwPrice:0, //word //扣除的货币数值
- };
- return data;
- },
- analyzeData:function(dataview) {
- dataview.pos = 0;
- var kNetInfo = {};
- kNetInfo.dwPropID = Global.GetUint32(dataview);
- kNetInfo.dwPropNum = Global.GetUint32(dataview);
- kNetInfo.dwCurrency = Global.GetUint32(dataview);
- kNetInfo.dwPrice = Global.GetUint32(dataview);
- return kNetInfo;
- },
- },
- CMD_GR_PropertyFailure: {
- data:function() {
- var data = {
- dwPropID:0, //word //道具ID
- dwPropNum:0, //word //剩余道具数量
- dwSourceUserID:0, //word //目标对象
- dwTargetUserID:0, //word //使用对象
- };
- return data;
- },
- analyzeData:function(dataview) {
- dataview.pos = 0;
- var kNetInfo = {};
- kNetInfo.lErrorCode = Global.GetUint32(dataview); //错误代码
- kNetInfo.szDescribeString = Global.Read2String(dataview); //描述信息
- return kNetInfo;
- },
- },
- CMD_GR_Notify_Expression: {
- data:function() {
- var data = {
- dwPropID:0, //word //道具ID
- dwPropNum:0, //word //剩余道具数量
- dwSourceUserID:0, //word //目标对象
- dwTargetUserID:0, //word //使用对象
- };
- return data;
- },
- analyzeData:function(dataview) {
-
- dataview.pos = 0;
- var kNetInfo = {};
- kNetInfo.dwPropID = Global.GetUint32(dataview);
- kNetInfo.dwPropNum = Global.GetUint32(dataview);
- kNetInfo.dwSourceUserID = Global.GetUint32(dataview);
- kNetInfo.dwTargetUserID = Global.GetUint32(dataview);
-
- return kNetInfo;
- },
- },
- MDM_GR_STATUS: 4, //状态信息
- SUB_GR_TABLE_INFO: 100, //桌子信息
- SUB_GR_TABLE_STATUS: 101, //桌子状态
- CMD_GR_C_TableTalk: {
- TALK_TYPE:0,
- TYPE_WORD:1,
- TYPE_DEFINE:2,
- TYPE_BIAOQING:3,
- data:function(){
- var data = {
- Type:0, //byte 类型
- ChairID:0, //byte 座位
- String:"", //char:128 自定义
- TalkSize:0, //int
- TalkData:[], //char:10000 自定义
- };
- return data;
- },
- },
- CMD_GR_UserSitDown: {
- data:function(){
- var data = {
- TableID:0, //word 桌子位置
- ChairID:0, //word 椅子位置
- TablePass:[], //char:PASS_LEN 桌子密码
- };
- return data;
- },
- },
- //桌子状态
- tagTableStatus : {
- data:function(){
- var data = {
- TableLock:0, //byte 锁定标志
- PlayStatus:0, //byte 游戏标志
- };
- return data;
- },
- },
- //桌子信息
- CMD_GR_TableInfo : {
- data:function(){
- var data = {
- TableCount:0, //word 桌子数目
- TableStatusArray:0, //tagTableStatus:512 桌子状态
- };
- return data;
- },
- },
- //桌子状态
- CMD_GR_TableStatus : {
- data:function(){
- var data = {
- TableID:0, //word 桌子号码
- TableStatus:0, //tagTableStatus 桌子状态
- };
- return data;
- },
- },
- MDM_GR_INSURE: 5, //银行命令
- SUB_GR_QUERY_INSURE_INFO: 1, //查询银行
- SUB_GR_SAVE_SCORE_REQUEST: 2, //存款请求
- SUB_GR_TAKE_SCORE_REQUEST: 3, //取款请求
- SUB_GR_USER_SCORE_REFRESH: 6, //返水活动领取成功后发一个同步命令
- SUB_GR_USER_INSURE_INFO: 100, //银行资料
- SUB_GR_USER_INSURE_SUCCESS: 101, //银行成功
- SUB_GR_USER_INSURE_FAILURE: 102, //银行失败
- SUB_GF_QUERY_GAME_RECORD: 510, //游戏记录
- MDM_GR_MATCH:9, //比赛命令
- SUB_GR_MATCH_FEE: 400, //报名费用
- SUB_GR_MATCH_NUM: 401, //等待人数
- SUB_GR_LEAVE_MATCH: 402, //退出比赛
- SUB_GR_MATCH_INFO: 403, //比赛信息
- SUB_GR_MATCH_WAIT_TIP: 404, //等待提示
- SUB_GR_MATCH_RESULT: 405, //比赛结果
- SUB_GR_MATCH_STATUS: 406, //比赛状态
- SUB_GR_MATCH_GOLDUPDATE: 409, //金豆更新
- SUB_GR_MATCH_ELIMINATE: 410, //比赛淘汰
- SUB_GR_MATCH_JOIN_RESOULT: 411, //加入结果
- SUB_GR_MATCH_SIGNUP_RESOULT: 412, //报名结果
- SUB_GR_MATCH_UNSIGNUP_RESOULT: 413, //退赛结果
- SUB_GR_MATCH_OVER_INFO: 414, //单局比赛结果
- SUB_GR_MATCH_SCORE: 415, //用户比赛积分
- SUB_GR_MATCH_ROUNDS: 416, //比赛局数信息
- SUB_GR_MATCH_COUNTDOWN: 417, //比赛倒计时
- SUB_GR_MATCH_RANK: 418, //当前比赛排名
- SUB_GR_MATCH_OUT_SCORE: 419, //当前淘汰积分
- SUB_GR_MATCH_FISH_PARAM: 421, //捕鱼参数获取比赛参数
- SUB_GR_MATCH_FISH_OVER_INFO: 422, //单据比赛结果
- SUB_GR_MATCH_FISH_RANK_INFO: 423, //比赛排行信息
- SUB_GR_MATCH_FISH_RANK_ALL: 424, //捕鱼比赛总排行信息
- MDM_GR_PRIVATE:10, //私人场
- SUB_GR_PRIVATE_INFO: 401, //私人场信息
- SUB_GR_CREATE_PRIVATE: 402, //创建私人场
- SUB_GR_CREATE_PRIVATE_SUCESS: 403, //创建私人场成功
- SUB_GR_JOIN_PRIVATE: 404, //加入私人场
- SUB_GF_PRIVATE_ROOM_INFO: 405, //私人场房间信息
- SUB_GR_PRIVATE_DISMISS: 406, //私人场请求解散
- SUB_GF_PRIVATE_END: 407, //私人场结算
- SUB_GR_RIVATE_AGAIN: 408 , //创建私人场
- SUB_GR_PRIVATE_AGENT_CREATE: 409, //创建代开桌子
- SUB_GR_PRIVATE_AGENT_CREATE_SUCCESS:410, //创建代开桌子成功
- SUB_GR_PRIVATE_AGENT_DISMISS: 411, //解散代开桌子
- SUB_GR_PRIVATE_AGENT_DISMISS_SUCCESS:412, //解散代开桌子成功
- SUB_GR_JOIN_PRIVATE_DYNAMIC: 413, //加入私人场
- //牌友圈命令
- SUB_GR_CREATE_PYQ: 420, //创建彩云阁房间
- SUB_GR_CREATE_PYQ_SUCCESS: 421, //创建彩云阁房间成功
- SUB_GR_CREATE_PYQ_NEW: 422, //创建彩云阁房间成功
- SUB_GR_CREATE_JOIN_PYQ_NOTIFY: 423, //创建或加入彩云阁房间成功通知
- SUB_GR_JOIN_PYQ_NEW: 424, //加入彩云阁房间
- /*SUB_GR_JOIN_PYQ: 422, //加入彩云阁房间
- SUB_GR_LEAVE_PYQ: 423, //离开彩云阁房间
- SUB_GR_DISMISS_PYQ: 424,*/ //解散彩云阁房间
- //私人场信息
- CMD_GR_Private_Info : {
- data:function(){
- var data = {
- KindID:0, //word
- PlayCout:[], //word:4 玩家局数
- PlayCost:[], //long long:4 消耗点数
- CostGold:0, //long long
- PlayeCostRule:0, //dword 消耗规则
- ConcludeRule:0, //dword 结算规则
- };
- return data;
- },
- },
- RoomType : cc.Enum({
- Type_Private:0,
- Type_Public:1,
- Type_PYQ:2,
- }),
- BuildType : cc.Enum({
- Type_Build_Nomal:0, //0正常桌子
- Type_Build_DKF:1, //1代开桌子
- Type_Build_FZZF:2, //2-房主付桌子
- Type_Build_AA:3, //3-AA制桌子
- Type_Build_DYJ:4, //4-大赢家付
- Type_Build_PYQ:5, //5-彩云阁桌子
- }),
- //创建房间
- CMD_GR_Create_Private : {
- data:function(){
- var data = {
- GameType:0, //byte 游戏类型
- PlayCoutIdex:0, //byte 游戏局数
- GameTypeIdex:0, //byte 游戏类型
- GameRuleIdex:0, //dword 游戏规则
- HttpChannel:"", //char:LEN_NICKNAME http获取
- GameCountType:0, //byte 局数类型
- };
- return data;
- },
- },
- //创建房间成功
- CMD_GR_Create_Private_Sucess : {
- data:function(){
- var data = {
- CurSocre:0, //long long 当前剩余
- RoomNum:0, //dword 房间ID
- };
- return data;
- },
- },
- //加入房间
- CMD_GR_Join_Private : {
- data:function(){
- var data = {
- RoomNum:0, //dword 房间ID
- };
- return data;
- },
- },
- //动态加入私人场房间返回信息
- CMD_GR_Join_Private_Back : {
- data:function(){
- var data = {
- PlayCoutIdex:0, //byte 玩家局数
- GameTypeIdex:0, //byte 游戏类型
- GameRuleIdex:0, //dword 游戏规则
- StartGame:0, //byte 开始游戏
- PlayCout:0, //dword 游戏局数
- RoomNum:0, //dword 房间ID
- CreateUserID:0, //dword 创建者
- PlayTotal:0, //dword 总局数
- PlayCost:0, //dword 加入房间所需鲜花饼数量
- NickName:[], //std::string:n 玩家名称
- };
- return data;
- },
- },
- //私人场房间信息
- CMD_GF_Private_Room_Info : {
- data:function(){
- var data = {
- PlayCoutIdex:0, //byte 玩家局数0 1, 8 或者16局
- GameTypeIdex:0, //byte 游戏类型
- StartGame:0, //byte
- nuse:0, //byte 此变量无用,只为了字节对齐,因在iphone5和5s中release版本会保存
- GameRuleIdex:0, //dword 游戏规则
- PlayCout:0, //dword 游戏局数
- RoomNum:0, //dword
- CreateUserID:0, //dword
- PlayTotal:0, //dword 总局数
- WinLoseScore:[], //int:n
- //GameCountType:0, //byte 局数类型
- };
- return data;
- },
- },
- //解散房间
- CMD_GR_Dismiss_Private : {
- data:function(){
- var data = {
- Dismiss:0, //byte 解散
- };
- return data;
- },
- },
- //重新加入
- CMD_GR_Again_Private : {
- data:function(){
- var data = {
- HttpChannel:"", //char:LEN_NICKNAME
- };
- return data;
- },
- },
- //私人场解散信息
- CMD_GF_Private_Dismiss_Info : {
- data:function(){
- var data = {
- DissUserCout:0, //dword
- DissChairID:[], //dword:MAX_CHAIR-1
- Value1:0, //dword
- NotAgreeUserCout:0, //dword
- NotAgreeChairID:[], //dword:MAX_CHAIR-1
- Value2:0, //dword
- };
- return data;
- },
- },
- //解散代开房间
- CMD_GR_Private_Agent_Dismiss : {
- data:function(){
- var data = {
- Dismiss:0, //byte 解散
- RoomID:0, //dword 房间ID
- };
- return data;
- },
- },
- //解散代开房间
- CMD_GR_Private_Agent_Dismiss_Back : {
- data:function(){
- var data = {
- ResultCode:0, //dword 操作代码
- DescribeString:"", //char:128 消息
- InsureScore:0, //dword 鲜花饼数量
- Score:0, //dword 金豆数量
- CreaterUserID:0, //dword 创建者ID
- RoomID:0, //dword 房间ID
- };
- return data;
- },
- },
- //创建代开房间
- CMD_GR_Private_Agent_Create_Back : {
- data:function(){
- var data = {
- ResultCode:0, //dword 操作代码
- DescribeString:"", //char:128 消息
- InsureScore:0, //dword 鲜花饼数量
- Score:0, //dword 金豆数量
- CreaterUserID:0, //dword 创建者ID
- RoomID:0, //dword 房间ID
- };
- return data;
- },
- },
- //私人场结算信息
- CMD_GF_Private_End_Info : {
- data:function(){
- var data = {
- PlayerWinLose:[], //long long:n
- PlayerAction:[], //byte:n
- };
- return data;
- },
- },
- MDM_GF_FRAME: 100, //框架命
- SUB_GF_GAME_OPTION: 1, //游戏配置
- SUB_GF_USER_READY: 2, //用户准备
- SUB_GF_LOOKON_CONFIG: 3, //旁观配置
- SUB_GF_USER_CHAT: 10, //用户聊天
- SUB_GF_USER_EXPRESSION: 11, //用户表情
- SUB_GR_TABLE_TALK: 12, //用户聊天
- SUB_GR_TABLE_VOICE: 13, //语音聊天
- SUB_GF_REPLACE_ROOM: 400, //更换房间
- SUB_GF_UPDATE_UNIQUE_CODE: 401, //同步对局唯一id
- SUB_GF_GAME_RECORD_BACK: 511, //游戏记录 一条
- SUB_GF_QUERY_JACKPOT_RECORD: 512, //彩金记录
- SUB_GF_JACKPOT_RECORD_BACK: 513, //彩金记录返回
- //游戏配置
- CMD_GF_GameOption : {
- data:function(){
- var data = {
- AllowLookon:0, //byte 旁观标志
- FrameVersion:0, //dword 框架版本
- ClientVersion:0, //dword 游戏版本
- };
- return data;
- },
- },
- //语音聊天
- CMD_GR_TabelVoice: {//SUB_GR_TABLE_VOICE
- data: function() {
- var data = {
- ChairID: 0, //BYTE 椅子id
- SerVerID: "", //string 微信语音服务端下载id
- };
- return data;
- },
- },
- //更换房间
- CMD_GF_ReplaceRoom: {//SUB_GF_REPLACE_ROOM
- data: function() {
- var data = {
- cbReason: 0, //BYTE 0:低房间,1:高房间
- lScore:0, //LONGLONG 玩家积分(金豆)
- };
- return data;
- },
- },
-
- //彩云阁命令
- //创建彩云阁房间
- CMD_GR_CreatePyq : {
- data:function(){
- var data = {
- PyqID:0, //dword 彩云阁ID
- GameType:0, //dword 游戏类型
- PlayCoutIdex:0, //dword 游戏局数
- GameTypeIdex:0, //dword 游戏人数
- UserID:0, //dword 圈主ID
- GameRuleIdex:0, //dword 游戏规则
- HttpChannel:"", //char:LEN_NICKNAME http获取
- GameCountType:0, //byte 局数类型
- };
- return data;
- },
- },
- CMD_GR_CreatePyqNew : {
- data:function(){
- var data = {
- RuleID:0, //dword 玩法规则ID
- PyqID:0, //dword 彩云阁ID
- GameType:0, //dword 游戏类型
- PlayCoutIdex:0, //dword 游戏局数
- GameTypeIdex:0, //dword 游戏人数
- UserID:0, //dword 阁主ID
- GameRuleIdex:0, //dword 游戏规则
- HttpChannel:"", //char:LEN_NICKNAME http获取
- GameCountType:0, //byte 局数类型
- };
- return data;
- },
- },
-
- //加入彩云阁房间
- CMD_GR_JoinPyq : {
- data:function(){
- var data = {
- PyqID:0, //dword 彩云阁ID
- UserID:0, //dword 阁主ID
- RoomID:0, //dword 房间ID
- HttpChannel:"", //char:LEN_NICKNAME http获取
- };
- return data;
- },
- },
- //离开彩云阁房间
- CMD_GR_LeavePyq : {
- data:function(){
- var data = {
- PyqID:0, //dword 彩云阁ID
- MemberID:0, //dword 成员ID
- RoomID:0, //dword 房间ID
- HttpChannel:"", //char:LEN_NICKNAME http获取
- };
- return data;
- },
- },
- CMD_GR_DIsmissPyq : {
- data:function(){
- var data = {
- PyqID:0, //dword 彩云阁ID
- UserID:0, //dword 阁主ID
- RoomID:0, //dword 房间ID
- Dismiss:0, //byte 解散
- HttpChannel:"", //char:LEN_NICKNAME http获取
- };
- return data;
- },
- },
- //游戏信息
- SUB_GF_GAME_STATUS: 100, //游戏状态
- SUB_GF_GAME_SCENE: 101, //游戏场景
- SUB_GF_LOOKON_STATUS: 102, //旁观状态
- SUB_GF_SYSTEM_MESSAGE: 200, //系统消息
- SUB_GF_ACTION_MESSAGE: 201, //动作消息
- //任务消息返回
- SUB_GF_GAME_TASK_BACK: 300, //任务消息返回
- SUB_GF_GAME_QUERYTASK_BACK: 301, //查询当前任务消息返回
- SUB_GF_UPDATE_TASK: 303, //游戏更新任务
- SUB_GF_GET_TASK_BONUS: 304, //游戏领取任务返回
- MDM_GF_GAME:200, //游戏命令
- //////////////////////////////////////////////////////////////////////////////////
- //携带信息
- //其他信息
- DTP_GR_TABLE_PASSWORD: 1, //桌子密码
- //用户属性
- DTP_GR_NICK_NAME: 10, //用户昵称
- DTP_GR_GROUP_NAME: 11, //社团名字
- DTP_GR_UNDER_WRITE: 12, //个性签名
- //附加信息
- DTP_GR_USER_NOTE: 20, //用户备注
- DTP_GR_CUSTOM_FACE: 21, //自定头像
- //////////////////////////////////////////////////////////////////////////////////
- //请求错误
- REQUEST_FAILURE_NORMAL: 0, //常规原因
- REQUEST_FAILURE_NOGOLD: 1, //金豆不足
- REQUEST_FAILURE_NOSCORE: 2, //积分不足
- REQUEST_FAILURE_PASSWORD: 3, //密码错误
- REQUEST_FAILURE_SITDOWN:4 //坐下失败
- },
- start () {
- },
- });
|