BCBMGameProtocol.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. var BaseDefine = require("BaseDefine")
  2. var Global = require("Global")
  3. cc.Class({
  4. extends: cc.Component,
  5. properties: {
  6. },
  7. statics: {
  8. GM_PLAYER_JETTON: 2021,
  9. GM_PLAYER_QS: 2060,
  10. GAME_SCENE_FREE: 0, //等待开始
  11. GAME_SCENE_BET: 100, //下注状态
  12. GAME_SCENE_END: 101, //结束状态
  13. MAX_AREA: 8,
  14. MAX_CAR_CNT: 32, //汽车图标个数
  15. MAX_CHIP_COUNT: 6, //最大筹码个数
  16. SUB_S_GAME_FREE: 2002, //空闲状态
  17. SUB_S_SEND_RECORD: 2008,
  18. CMD_S_StatusFree:
  19. {
  20. cbHighTimes: 0, //是否是高倍场 BYTE
  21. cbTimeLeave: 0, //剩余时间 BYTE
  22. nChip: [], //筹码配置 int MAX_CHIP_COUNT
  23. lAreaLimitScore: 0, //区域限制 SCORE
  24. nMinBetScore: 0 //下注需要的最低金额 int
  25. },
  26. CMD_S_StatusPlay:
  27. {
  28. cbHighTimes: 0, //是否是高倍场 BYTE
  29. //全局信息
  30. cbTimeLeave: 0, //剩余时间 BYTE
  31. nChip: [], //筹码配置 int MAX_CHIP_COUNT
  32. lAreaLimitScore: 0, //区域限制 SCORE
  33. lPlayerJettonScore: [], //玩家下的注 SCORE AREA_MAX
  34. lAllJettonScore: [], //所有玩家下的注 SCORE AREA_MAX
  35. lPlayerWinScore: 0, //玩家赢分 SCORE
  36. lPlayerRestScore: 0, //玩家还剩多少钱 SCORE
  37. cbStatus: 0, //当前状态1=下注状态,2=结算状态 3=空闲状态 BYTE
  38. nMinBetScore: 0 //下注需要的最低金额 int
  39. },
  40. SUB_S_SEND_CONTROL_INFO: 2050, //群控信息
  41. CMD_S_ControlInfo:
  42. {
  43. RoomSha: 0, //房间杀率 WORD
  44. RoomWin: 0, //系统赢 WORD
  45. RoomLost: 0, //系统输 WORD
  46. RoomSuiRate: 0, //当前随到 WORD
  47. RoomResult: 0, //控制结果 0无控制 1系统赢 2系统输 BYTE
  48. QunState: 0, //是否需要判断控制 0不需要1需要 BYTE
  49. QunStock: 0, //群控库存 SCORE
  50. IsDanKong: 0, //单控是否生效 1是 BYTE
  51. DanRate: 0, //单控概率 WORD
  52. DanStocks: 0, //单控库存 int
  53. DanSuiRate: 0, //单控随机值 WORD
  54. DanType: 0, //控制结果0无控制 1控制系统赢 2控制系统输 BYTE
  55. DanMinBet: 0, //单控门槛 int
  56. szNickName: [], //单控玩家 TCHAR LEN_NICKNAME
  57. cbControlValue: 0, //控制值 BYTE
  58. },
  59. SUB_S_GAME_FREE: 2002, //游戏空闲
  60. CMD_S_FreeState:
  61. {
  62. cbTimeLeave: 0 //剩余时间 int
  63. },
  64. SUB_S_GAME_START: 2003, //游戏开始
  65. CMD_S_GameStart:
  66. {
  67. cbTimeLeave: 0 //剩余时间 BYTE
  68. },
  69. SUB_S_PLACE_JETTON: 2004, //用户下注
  70. CMD_S_PlaceJetton:
  71. {
  72. wChairID: 0, //用户位置 WORD
  73. cbBetArea: 0, //筹码区域 BYTE
  74. lBetScore: 0, //加注数目 SCORE
  75. lPlayerRestScore: 0 //下注玩家剩余金币 SCORE
  76. },
  77. SUB_S_PLACE_JETTON_FAIL: 2009, //下注失败
  78. CMD_S_PlaceBetFail:
  79. {
  80. wCode: 0 //描述信息编码 WORD
  81. },
  82. SUB_S_GAME_END: 2005, //游戏结束
  83. CMD_S_GameEnd:
  84. {
  85. cbEarlyOpenFlag: 0, //提前开牌标识 BYTE
  86. lPlayAreaScore: [], //玩家成绩 SCORE AREA_MAX
  87. lPlayerWinScore: 0, //玩家赢的钱 SCORE
  88. lPlayerRestScore: 0, //玩家还剩多少钱 SCORE
  89. cbTimeLeave: 0, //结束阶段剩余时间 int
  90. cbWinIndex: 0, // BYTE
  91. },
  92. SUB_C_PLACE_JETTON: 100, //用户下注
  93. CMD_C_PlaceJetton:
  94. {
  95. cbJettonArea: 0, //筹码区域 BYTE
  96. lJettonScore: 0 //加注数目 SCORE
  97. },
  98. SUB_C_CARTEST: 888, //
  99. CMD_C_CarTest:
  100. {
  101. cbCarArea: 0 //区域 BYTE
  102. },
  103. AREA_RANG:
  104. {
  105. area_h_bsj: 0, //保时捷
  106. area_h_bm: 1, //宝马
  107. area_h_bc: 2, //奔驰
  108. area_h_dz: 3, //大众
  109. area_l_bsj: 4, //迷你保时捷
  110. area_l_bm: 5, //迷你宝马
  111. area_l_bc: 6, //迷你奔驰
  112. area_l_dz: 7, //迷你大众
  113. AREA_MAX: 8
  114. },
  115. CAR_KIND:
  116. {
  117. ik_h_bsj: 1, //保时捷
  118. ik_h_bm: 2, //宝马
  119. ik_h_bc: 3, //奔驰
  120. ik_h_dz: 4, //大众
  121. ik_l_bsj: 5, //迷你保时捷
  122. ik_l_bm: 6, //迷你宝马
  123. ik_l_bc: 7, //迷你奔驰
  124. ik_l_dz: 8 //迷你大众
  125. },
  126. CarMult:
  127. {
  128. mult_h_bsj: 40, //保时捷
  129. mult_h_bm: 30, //宝马
  130. mult_h_bc: 20, //奔驰
  131. mult_h_dz: 10, //大众
  132. mult_l_bsj: 5, //迷你保时捷
  133. mult_l_bm: 5, //迷你宝马
  134. mult_l_bc: 5, //迷你奔驰
  135. mult_l_dz: 5, //迷你大众
  136. },
  137. },
  138. });