CMD_ClubServer.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  1. CLUB_KIND_0 = 0;//普通俱乐部
  2. CLUB_KIND_1 = 1;//一级代俱乐部 - 积分
  3. CLUB_KIND_2 = 2;//无限代俱乐部 - 积分
  4. OPERATE_CODE_APPLY = 1 //申请
  5. OPERATE_CODE_SET = 2 //
  6. OPERATE_CODE_DEL = 3
  7. CLUB_SCORE_LOGON_PSW = 0 //积分密码
  8. UpdateCode_Apply = 0x0001 //申请
  9. UpdateCode_Member = 0x0002 //成员
  10. UpdateCode_Score = 0x0004 //积分
  11. CLUB_LEVEL_OWNER = 9 //部长
  12. CLUB_LEVEL_MANAGER = 8 //管理员
  13. CLUB_LEVEL_PARTNER = 6 //合伙人
  14. CLUB_LEVEL_MEMBER = 3 //成员
  15. CLUB_LEVEL_APPLY = 2 //申请
  16. CLUB_LEVEL_BAN = 1 //禁止
  17. CLUB_LEVEL_NONE = 0 //无
  18. CLUB_GAME_RULE_1 = 0x00000001 //大赢家
  19. CLUB_GAME_RULE_2 = 0x00000002 //赢家
  20. CLUB_GAME_RULE_3 = 0x00000004 //所有人
  21. CLUB_GAME_RULE_4 = 0x00000010 //固定
  22. CLUB_GAME_RULE_5 = 0x00000020 //比例
  23. CLUB_SET_RULE_0 = 0x00000004 //显示排行榜
  24. //////////////////////////////////////////////////////////////////////////////////
  25. //主消息
  26. MDM_GC_GAME = 1;
  27. cc.GAME_HEAD_SIZE = 4;
  28. GameHead = cc.Class({
  29. ctor: function () {
  30. this.wMainCmdID = 0;
  31. this.wSubCmdID = 0;
  32. }
  33. });
  34. //////////////////////////////////////////////////////////////////////////////////
  35. //主消息
  36. MDM_GC_QUERY = 2; //查询信息
  37. SUB_GP_MODIFY_TABLE_RULE = 11 //修改桌子规则
  38. SUB_GP_CREATE_CLUB = 33 //创建俱乐部
  39. SUB_GP_JOIN_CLUB = 34 //加入俱乐部
  40. SUB_GP_SET_CLUB_USER_LVL = 35 //设置成员等级
  41. SUB_GP_SET_ALL_JOIN = 36 //全部操作
  42. SUB_GP_SAVE_CLUB_SET = 37 //保存俱乐部设置
  43. SUB_GP_GET_ONLINE_USER = 38 //获取在线用户
  44. SUB_GP_CREAT_ANDROID = 50 //添加机器人
  45. SUB_GP_DELETE_ANDROID = 51 //删除机器人
  46. SUB_GP_ANDROID_LIST = 52 //机器人列表
  47. SUB_GP_CREAT_ANDROID_GROUP = 53 //添加机器人分组
  48. SUB_GP_DELETE_ANDROID_GROUP = 54 //删除机器人分组
  49. SUB_GP_ANDROID_GROUP_LIST = 55 //机器人分组列表
  50. SUB_GP_GET_ANDROID_CNT = 56 //获取机器人数量
  51. SUB_GP_KICK_ROOM_USER = 57 //踢出用户
  52. SUB_GP_CHAT = 70
  53. //SUB_GP_GET_LOBBY_LIST = 80 //大厅列表
  54. //修改桌子规则
  55. CMD_GC_ModifyRoom = cc.Class({
  56. ctor: function () {
  57. this.dwRoomID = 0; //房间ID
  58. //俱乐部规则
  59. this.cbClubKind = 0; //俱乐部类型
  60. this.llSitScore = 0; //参与分
  61. this.llStandScore = 0; //淘汰分
  62. this.dwBigRevRules = 0; //大局表情规则
  63. this.dwBigMinScore = 0; //大局表情起曾分
  64. this.dwBigCnt = 0; //大局百分比或固定数量
  65. this.dwSmallRevRules = 0; //小局表情规则
  66. this.dwSmallMinScore = 0; //小局表情起曾分
  67. this.dwSmallCnt = 0; //小局百分比或固定数量
  68. this.cbReturnType = 0; //反水类型
  69. this.bNegativeScore = 0; //反水类型
  70. this.dwMagnification = 0; //倍率
  71. this.szTag = ''//[10]; //标签
  72. this.len_szTag = 20;
  73. },
  74. });
  75. //查询俱乐部
  76. CMD_GC_QueryClubList = cc.Class({
  77. ctro: function () {
  78. this.dwUserID = 0; //用户ID
  79. }
  80. });
  81. //创建俱乐部
  82. CMD_GC_CreateClub = cc.Class({
  83. ctor: function () {
  84. this.dwUserID = 0; //俱乐部ID
  85. this.szPassWord = '';
  86. this.dwClubID = 0;
  87. this.szClubName = '';
  88. this.wKindID = 0;
  89. this.dwRules = 0;
  90. this.len_szPassWord = 32 * 2;
  91. this.len_szClubName = 32 * 2;
  92. }
  93. });
  94. //加入俱乐部
  95. CMD_GC_JoinClub = cc.Class({
  96. ctor: function () {
  97. this.dwUserID = 0; //用户ID
  98. this.szPassWord = '';
  99. this.dwAllianceID = 0;
  100. this.len_szPassWord = 32 * 2;
  101. }
  102. });
  103. //设置成员等级
  104. CMD_GC_SetClubUesrLvl = cc.Class({
  105. ctor: function () {
  106. this.dwOperateUserID = 0;
  107. this.dwTargetUserID = 0;
  108. this.cbLevel = 0;
  109. this.dwClubID = 0;
  110. this.szPassWord = '';//[32];
  111. this.len_szPassWord = 32 * 2;
  112. }
  113. });
  114. //一键操作
  115. CMD_GC_SetAllJoin = cc.Class({
  116. ctor: function () {
  117. this.dwUserID = 0;
  118. this.cbLevel = 0;
  119. this.dwClubID = 0;
  120. this.szPassWord = '';//[32];
  121. this.len_szPassWord = 32 * 2;
  122. }
  123. });
  124. //保存俱乐部设置
  125. CMD_GC_SaveClubSet = cc.Class({
  126. ctor: function () {
  127. this.dwUserID = 0;
  128. this.szPassWord = '';//[32];
  129. this.dwClubID = 0; //俱乐部ID
  130. this.szClubName = '';//[31]; //俱乐部名字
  131. this.cbJoinLimit = 0; //
  132. this.dwRules = 0; //
  133. this.szNotice = '';//[256]; //俱乐部公告
  134. this.szNotice2 = '';//[256]; //专属公告
  135. this.cbCloseStatus = 0;
  136. this.len_szClubName = 31 * 2;
  137. this.len_szNotice = 256 * 2;
  138. this.len_szNotice2 = 256 * 2;
  139. this.len_szPassWord = 32 * 2;
  140. }
  141. });
  142. //获取在线用户
  143. CMD_GC_GetOnlineUser = cc.Class({
  144. ctor: function () {
  145. this.dwUserID = 0;
  146. this.dwClubID = 0; //俱乐部ID
  147. }
  148. });
  149. //获取机器人数量
  150. CMD_C_GetAndroidCnt = cc.Class({
  151. ctor: function () {
  152. this.dwUserID = 0; //用户ID
  153. this.dwClubID = 0; //俱乐部id
  154. }
  155. });
  156. //创建机器人
  157. CMD_C_CreatAndroid = cc.Class({
  158. ctor: function () {
  159. this.dwUserID = 0; //用户ID
  160. this.dwClubID = 0; //俱乐部id
  161. this.wCnt = 0; //机器人数量
  162. }
  163. });
  164. //删除机器人
  165. CMD_C_DeleteAndroid = cc.Class({
  166. ctor: function () {
  167. this.dwUserID = 0; //用户ID
  168. this.szPassWord = '';
  169. this.dwClubID = 0; //俱乐部ID
  170. this.dwTargetID = 0; //目标ID
  171. this.len_szPassWord = 32 * 2;
  172. }
  173. });
  174. //机器人配置
  175. CMD_C_AndroidGroupInfo = cc.Class({
  176. ctor: function () {
  177. this.dwUserID = 0; //用户ID
  178. this.dwClubID = 0; //俱乐部id
  179. this.dwKindID = 0; //所在游戏类型
  180. this.dwRoomID = 0; //房间号
  181. this.wTotalTimes = 0; //总消耗桌数
  182. this.wMaxPlayingTable = 0; //同时开桌数
  183. this.wMaxSitCount = 0; //每桌最大机器人数
  184. }
  185. });
  186. //删除机器人
  187. CMD_DeleteAndroidGroup = cc.Class({
  188. ctor: function () {
  189. this.dwUserID = 0; //用户ID
  190. this.dwClubID = 0; //俱乐部id
  191. this.dwGroupID = 0; //组ID
  192. },
  193. });
  194. //获取机器人列表
  195. CMD_AndroidGroupList = cc.Class({
  196. ctor: function () {
  197. this.dwUserID = 0; //用户ID
  198. this.dwClubID = 0; //俱乐部id
  199. },
  200. });
  201. //踢出用户
  202. CMD_KickRoomUser = cc.Class({
  203. ctor: function () {
  204. this.dwUserID = 0; //用户ID
  205. this.dwTargetID = 0; //用户ID
  206. this.dwRoomID = 0;
  207. },
  208. });
  209. SUB_GP_CREATE_CLUB_RES = 115 //俱乐部列表
  210. SUB_GP_JOIN_CLUB_RES = 116 //俱乐部列表
  211. SUB_GP_EXIT_CLUB_RES = 117 //退出俱乐部
  212. SUB_GP_ONLINE_USER_RES = 118 //在线用户
  213. SUB_GP_CREAT_ANDROID_RES = 119
  214. SUB_GP_DELETE_ANDROID_RES = 120
  215. SUB_GP_GET_ANDROID_LIST = 121
  216. SUB_GP_CREAT_ANDROID_GROUP_RES = 122
  217. SUB_GP_DELETE_ANDROID_GROUP_RES = 123
  218. SUB_GP_GET_ANDROID_GROUP_LIST = 124
  219. SUB_GP_GET_ANDROID_GROUP_LIST_END = 125
  220. SUB_GP_GET_ANDROID_CNT_INFO = 126
  221. SUB_GP_ONLINE_USER_RES_FINISH = 127 //在线用户
  222. //加入结果
  223. CMD_CS_S_JoinClubRes = cc.Class({
  224. ctor: function () {
  225. this.cbRes = 0;
  226. this.dwClubID = 0;
  227. }
  228. });
  229. //退出俱乐部
  230. CMD_CS_S_EixtClubRes = cc.Class({
  231. ctor: function () {
  232. this.dwClubID = 0;
  233. this.cbDissClub = 0;
  234. },
  235. });
  236. CMD_CS_S_OnlineUserStatus = cc.Class({
  237. ctor: function () {
  238. this.dwUserID = 0;
  239. this.cbInvite = 0;
  240. this.cbUserStatus = 0;
  241. },
  242. });
  243. CMD_CS_S_OperateAndroidGroupRes = cc.Class({
  244. ctor: function () {
  245. this.cbResCode = 0;
  246. },
  247. });
  248. //机器人组信息
  249. CMD_CS_S_AndroidGroupInfo = cc.Class({
  250. ctor: function () {
  251. this.dwGroupID = 0; //组ID
  252. this.dwKindID = 0; //类型ID
  253. this.wAndroidCount = 0; //机器人数量
  254. this.wTotalTimes = 0; //总消耗桌数
  255. this.wMaxPlayingTable = 0; //同时开桌数
  256. this.wMaxSitCount = 0; //每桌最大机器人数
  257. this.wCompleteCnt = 0;
  258. },
  259. });
  260. //机器人数量信息
  261. CMD_CS_S_GetAndroidCnt = cc.Class({
  262. ctor: function () {
  263. this.wFreeCnt = 0; //空闲机器人
  264. this.wPlayCnt = 0; //游戏机器人
  265. }
  266. });
  267. ////////////////////////////////////////////////////////////////////////////////
  268. //俱乐部信息
  269. MDM_GC_CLUB = 3; //俱乐部信息
  270. SUB_CS_C_REGISTER_USER = 151 //注册玩家
  271. SUB_CS_C_LOGOFF_USER = 152 //注销玩家
  272. SUB_CS_C_ENTER_CLUB = 153 //进入俱乐部
  273. SUB_CS_C_EXIT_CLUB = 154 //离开俱乐部
  274. SUB_CS_C_USER_INVITE = 161 //用户邀请
  275. //用户登录
  276. CMD_GC_RegisterUser = cc.Class({
  277. ctor: function () {
  278. this.dwUserID = 0; //玩家标识
  279. }
  280. });
  281. //进入俱乐部
  282. CMD_GC_EnterClub = cc.Class({
  283. ctor: function () {
  284. this.dwUserID = 0;
  285. this.dwClubID = 0;
  286. this.cbClubLevel = 0;
  287. }
  288. });
  289. //离开俱乐部
  290. CMD_GC_ExitClub = cc.Class({
  291. ctor: function () {
  292. this.dwUserID = 0;
  293. this.dwClubID = 0;
  294. }
  295. });
  296. //用户邀请
  297. CMD_GC_InviteUser = cc.Class({
  298. ctor: function () {
  299. this.dwClubID = 0;
  300. this.dwTargetID = 0;
  301. this.dwUserID = 0;
  302. this.dwKindID = 0;
  303. this.dwRoomID = 0;
  304. }
  305. });
  306. SUB_CS_S_FORCED_OFFLINE = 272 //被迫下线
  307. SUB_CS_S_UPDATE_CARD = 275 //刷新房卡
  308. SUB_CS_S_UPDATE_SCORE = 276 //刷新积分
  309. SUB_CS_S_USER_INVITE = 277 //用户邀请
  310. SUB_CS_S_ANDROID_LIST = 288 //机器人列表
  311. SUB_CS_S_ANDROID_LIST_FINISH = 289 //机器人列表
  312. SUB_CS_S_ANDROID_CREAT_RES = 290 //创建机器人
  313. SUB_CS_S_ANDROID_DEL_RES = 291 //删除机器人
  314. SUB_CS_S_OPERATE_FAILURE = 0 //操作失败
  315. //刷新房卡
  316. CMD_CS_S_UpdateRoomCard = cc.Class({
  317. ctor: function () {
  318. this.lRoomCard = 0;
  319. }
  320. })
  321. //刷新积分
  322. CMD_CS_S_UpdateScore = cc.Class({
  323. ctor: function () {
  324. this.dwUserID = 0;
  325. this.dwTagUserID = 0;
  326. this.lScore = 0;
  327. this.cbType = 0;
  328. }
  329. });
  330. //用户邀请
  331. CMD_CS_S_InviteUser = cc.Class({
  332. ctor: function () {
  333. this.dwClubID = 0;
  334. this.dwUserID = 0;
  335. this.dwKindID = 0;
  336. this.dwRoomID = 0;
  337. }
  338. });
  339. CMD_CS_S_AndroidInfo = cc.Class({
  340. ctor: function () {
  341. this.dwKindID = 0; //类型ID
  342. this.wAndroidNum = 0; //机器人数量
  343. this.wTotalTimes = 0; //总消耗桌数
  344. this.wCurrentTimes = 0; //当前消耗
  345. this.wMaxPlayingTable = 0; //同时开桌数
  346. this.wMaxSitNum = 0; //每桌最大机器人数
  347. }
  348. });
  349. //操作失败
  350. CMD_CS_S_OperateFailure = cc.Class({
  351. ctor: function () {
  352. this.cbRrrCode = 0; //错误码
  353. this.szDescribeString = "";//[128]; //错误消息
  354. this.len_szDescribeString = 128 * cc.TCHAR_SIZE;
  355. }
  356. })
  357. ////////////////////////////////////////////////////////////////////////////////
  358. //推送信息
  359. MDM_GC_PUSH = 4 //推送信息
  360. SUB_GP_S_CLUB_LIST_PUSH = 1 //俱乐部列表推送
  361. SUB_GP_S_APPLY_PUSH = 2 //申请信息
  362. SUB_GP_S_USER_LEVEL_PUSH = 3 //用户等级
  363. SUB_GP_S_EXIT_CLUB_PUSH = 4 //退出俱乐部
  364. SUB_GP_S_CLUB_INFO_PUSH = 5 //俱乐部信息
  365. SUB_GP_S_ROOM_INFOR = 6 //房间信息
  366. SUB_GP_S_DIS_ROOM = 7 //解散房间
  367. SUB_GP_S_USER_GAMESTATUS = 8 //游戏状态
  368. SUB_GP_S_CHANGE_CLUB_INFO = 9 //修改俱乐部信息
  369. SUB_GP_S_MODIFY_ROOM_INFOR = 10 //修改房间信息
  370. SUB_GP_S_ONLINE_USER = 11 //在线用户
  371. SUB_GP_S_OFFLINE_USER = 12 //下线用户
  372. SUB_GP_S_CLUB_USER_SOCRE = 13 //用户积分
  373. SUB_GP_S_CLUB_ROOM_INFO = 14 //房间信息
  374. SUB_GP_S_KICK_USER_RES = 15 //踢出结果
  375. SUB_GP_S_CHAT = 20 //
  376. //SUB_GP_S_GET_LOBBY_LIST = 30 //lobby
  377. //用户俱乐部信息
  378. CMD_GP_UserClubInfo = cc.Class({
  379. ctor: function () {
  380. this.dwClubID = 0; //俱乐部ID
  381. this.dwCreaterID = 0; //创建ID
  382. this.wMemberCnt = 0; //
  383. this.cbClubLevel = 0; //
  384. this.cbClubLv = 0; //俱乐部等级
  385. this.szClubName = '';//[31]; //俱乐部名字
  386. this.wKindID = 0; //
  387. this.cbJoinLimit = 0; //
  388. this.dwRules = 0; //
  389. this.szNotice = '';//[256]; //俱乐部公告
  390. this.dwLeagueID = 0; //
  391. this.llScore = 0; //
  392. this.dwAllianceID = 0; //
  393. this.szNotice2 = '';//[256]; //专属公告
  394. this.cbIsInvite = 0; //
  395. this.cbCloseStatus = 0; //
  396. this.wTableCount = 0; //
  397. this.len_szClubName = 31 * 2;
  398. this.len_szNotice = 256 * 2;
  399. this.len_szNotice2 = 256 * 2;
  400. }
  401. });
  402. //解散俱乐部
  403. CMD_GP_S_DisClub = cc.Class({
  404. ctor: function () {
  405. this.dwClubID = 0;
  406. this.cbDissClub = 0;
  407. },
  408. });
  409. //设置成员等级结果
  410. CMD_CS_S_SetMemLevel = cc.Class({
  411. ctor: function () {
  412. this.dwUserID = 0;
  413. this.dwClubID = 0;
  414. this.cbOldLevel = 0;
  415. this.cbCurLevel = 0;
  416. }
  417. });
  418. //解散房间
  419. CMD_CS_S_DisRoom = cc.Class({
  420. ctor: function () {
  421. this.dwClubID = 0;
  422. this.dwUserID = 0; //用户ID
  423. this.dwRoomID = 0; //房间ID
  424. this.byForce = 0; //强制执行
  425. }
  426. });
  427. //在线用户
  428. CMD_CS_S_OnlineUser = cc.Class({
  429. ctor: function () {
  430. this.dwUserID = 0; //用户ID
  431. this.dwClubID = 0;
  432. this.cbUserStatus = 0; //
  433. }
  434. });
  435. //下线用户
  436. CMD_CS_S_OfflineUser = cc.Class({
  437. ctor: function () {
  438. this.dwUserID = 0; //用户ID
  439. }
  440. });
  441. //用户积分
  442. CMD_CS_S_ClubUserScore = cc.Class({
  443. ctor: function () {
  444. this.dwUserID = 0; //用户ID
  445. this.dwClubID = 0;
  446. this.llScore = 0;
  447. }
  448. });
  449. //房间信息
  450. CMD_CS_S_ClubRoomInfo = cc.Class({
  451. ctor: function () {
  452. this.dwRoomID = 0; //用户ID
  453. this.dwClubID = 0;
  454. this.wProgress = 0; //局数
  455. }
  456. });
  457. //踢出结果
  458. CMD_CS_S_KickUserRes = cc.Class({
  459. ctor: function () {
  460. this.bRes = 0;
  461. }
  462. });
  463. //用户聊天
  464. CMD_C_UserChat = cc.Class
  465. ({
  466. ctor: function () {
  467. // this._name = 'CMD_C_UserChat'
  468. this.dwSendUserID = 0;
  469. this.wChatLength = 0; //信息长度
  470. this.wType = 0; //0广播
  471. this.dwTargetUserID = 0; //目标用户
  472. this.szChatString = ''; //聊天信息
  473. this.len_szChatString = 64 * cc.TCHAR_SIZE;
  474. },
  475. });
  476. //用户聊天
  477. CMD_S_UserChat = cc.Class
  478. ({
  479. ctor: function () {
  480. // this._name = 'CMD_C_UserChat'
  481. this.dwSendUserID = 0;
  482. this.wChatLength = 0; //信息长度
  483. this.wType = 0; //0广播
  484. this.dwTargetUserID = 0; //目标用户
  485. this.szChatString = ''; //聊天信息
  486. this.len_szChatString = 64 * cc.TCHAR_SIZE;
  487. },
  488. });
  489. CMD_C_GetLobbyList = cc.Class({
  490. ctor: function () {
  491. // this._name="CMD_GP_C_GetLabbyList";
  492. this.wType = 0;
  493. this.dwUserID = 0;
  494. },
  495. });
  496. CMD_S_GetLobbyList = cc.Class
  497. ({
  498. ctor: function () {
  499. // this._name = 'CMD_C_UserChat'
  500. this.wType = 0;
  501. this.wListCnt = 0; //0广播
  502. },
  503. });
  504. CMD_S_GetLobbyListInfo = cc.Class({
  505. ctor: function () {
  506. this.dwRoomID = 0;//房间ID
  507. this.dwClubID = 0;//俱乐部ID
  508. this.byPartID = 0;//分区ID
  509. this.wKindID = 0;//游戏类型
  510. this.dwRules = new Array(5);//房间规则
  511. this.dwServerRules = 0;//服务器规则
  512. this.wProgress = 0;//当前局数
  513. this.dwCreateTime = 0;//创建时间
  514. this.dwCreaterID = 0;//创建者ID
  515. this.byPlayerCnt = 0;//玩家人数
  516. this.dwUserID = new Array(4);//玩家ID
  517. },
  518. });