CMD_ClubServer.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  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. //修改桌子规则
  53. CMD_GC_ModifyRoom = cc.Class({
  54. ctor:function(){
  55. this.dwRoomID = 0; //房间ID
  56. //俱乐部规则
  57. this.cbClubKind =0; //俱乐部类型
  58. this.llSitScore =0; //参与分
  59. this.llStandScore =0; //淘汰分
  60. this.dwBigRevRules = 0; //大局表情规则
  61. this.dwBigMinScore = 0; //大局表情起曾分
  62. this.dwBigCnt = 0; //大局百分比或固定数量
  63. this.dwSmallRevRules = 0; //小局表情规则
  64. this.dwSmallMinScore = 0; //小局表情起曾分
  65. this.dwSmallCnt = 0; //小局百分比或固定数量
  66. this.cbReturnType =0; //反水类型
  67. this.bNegativeScore =0; //反水类型
  68. this.dwMagnification = 0; //倍率
  69. this.szTag = ''//[10]; //标签
  70. this.len_szTag = 20;
  71. },
  72. });
  73. //查询俱乐部
  74. CMD_GC_QueryClubList = cc.Class({
  75. ctro:function(){
  76. this.dwUserID = 0; //用户ID
  77. }
  78. });
  79. //创建俱乐部
  80. CMD_GC_CreateClub = cc.Class({
  81. ctor: function () {
  82. this.dwUserID = 0; //俱乐部ID
  83. this.szPassWord = '';
  84. this.dwClubID = 0;
  85. this.szClubName = '';
  86. this.wKindID = 0;
  87. this.dwRules = 0;
  88. this.len_szPassWord = 32*2;
  89. this.len_szClubName = 32*2;
  90. }
  91. });
  92. //加入俱乐部
  93. CMD_GC_JoinClub = cc.Class({
  94. ctor: function () {
  95. this.dwUserID = 0; //用户ID
  96. this.szPassWord = '';
  97. this.dwAllianceID = 0;
  98. this.len_szPassWord = 32*2;
  99. }
  100. });
  101. //设置成员等级
  102. CMD_GC_SetClubUesrLvl = cc.Class({
  103. ctor:function(){
  104. this.dwOperateUserID = 0;
  105. this.dwTargetUserID = 0;
  106. this.cbLevel = 0;
  107. this.dwClubID = 0;
  108. this.szPassWord = '';//[32];
  109. this.len_szPassWord = 32*2;
  110. }
  111. });
  112. //一键操作
  113. CMD_GC_SetAllJoin = cc.Class({
  114. ctor:function(){
  115. this.dwUserID = 0;
  116. this.cbLevel = 0;
  117. this.dwClubID = 0;
  118. this.szPassWord = '';//[32];
  119. this.len_szPassWord = 32*2;
  120. }
  121. });
  122. //保存俱乐部设置
  123. CMD_GC_SaveClubSet = cc.Class({
  124. ctor:function(){
  125. this.dwUserID = 0;
  126. this.szPassWord = '';//[32];
  127. this.dwClubID = 0; //俱乐部ID
  128. this.szClubName = '';//[31]; //俱乐部名字
  129. this.cbJoinLimit = 0; //
  130. this.dwRules = 0; //
  131. this.szNotice = '';//[256]; //俱乐部公告
  132. this.szNotice2 = '';//[256]; //专属公告
  133. this.cbCloseStatus = 0;
  134. this.len_szClubName = 31*2;
  135. this.len_szNotice = 256*2;
  136. this.len_szNotice2 = 256*2;
  137. this.len_szPassWord = 32*2;
  138. }
  139. });
  140. //获取在线用户
  141. CMD_GC_GetOnlineUser = cc.Class({
  142. ctor:function(){
  143. this.dwUserID = 0;
  144. this.dwClubID = 0; //俱乐部ID
  145. }
  146. });
  147. //获取机器人数量
  148. CMD_C_GetAndroidCnt = cc.Class({
  149. ctor:function(){
  150. this.dwUserID = 0; //用户ID
  151. this.dwClubID = 0; //俱乐部id
  152. }
  153. });
  154. //创建机器人
  155. CMD_C_CreatAndroid = cc.Class({
  156. ctor:function(){
  157. this.dwUserID = 0; //用户ID
  158. this.dwClubID = 0; //俱乐部id
  159. this.wCnt = 0; //机器人数量
  160. }
  161. });
  162. //删除机器人
  163. CMD_C_DeleteAndroid = cc.Class({
  164. ctor:function(){
  165. this.dwUserID = 0; //用户ID
  166. this.szPassWord = '';
  167. this.dwClubID = 0; //俱乐部ID
  168. this.dwTargetID = 0; //目标ID
  169. this.len_szPassWord = 32*2;
  170. }
  171. });
  172. //机器人配置
  173. CMD_C_AndroidGroupInfo = cc.Class({
  174. ctor:function(){
  175. this.dwUserID = 0; //用户ID
  176. this.dwClubID = 0; //俱乐部id
  177. this.dwKindID = 0; //所在游戏类型
  178. this.dwRoomID = 0; //房间号
  179. this.wTotalTimes = 0; //总消耗桌数
  180. this.wMaxPlayingTable = 0; //同时开桌数
  181. this.wMaxSitCount = 0; //每桌最大机器人数
  182. }
  183. });
  184. //删除机器人
  185. CMD_DeleteAndroidGroup = cc.Class({
  186. ctor:function(){
  187. this.dwUserID = 0; //用户ID
  188. this.dwClubID = 0; //俱乐部id
  189. this.dwGroupID = 0; //组ID
  190. },
  191. });
  192. //获取机器人列表
  193. CMD_AndroidGroupList = cc.Class({
  194. ctor:function(){
  195. this.dwUserID = 0; //用户ID
  196. this.dwClubID = 0; //俱乐部id
  197. },
  198. });
  199. //踢出用户
  200. CMD_KickRoomUser = cc.Class({
  201. ctor:function(){
  202. this.dwUserID = 0; //用户ID
  203. this.dwTargetID = 0; //用户ID
  204. this.dwRoomID = 0;
  205. },
  206. });
  207. SUB_GP_CREATE_CLUB_RES = 115 //俱乐部列表
  208. SUB_GP_JOIN_CLUB_RES = 116 //俱乐部列表
  209. SUB_GP_EXIT_CLUB_RES = 117 //退出俱乐部
  210. SUB_GP_ONLINE_USER_RES = 118 //在线用户
  211. SUB_GP_CREAT_ANDROID_RES = 119
  212. SUB_GP_DELETE_ANDROID_RES = 120
  213. SUB_GP_GET_ANDROID_LIST = 121
  214. SUB_GP_CREAT_ANDROID_GROUP_RES = 122
  215. SUB_GP_DELETE_ANDROID_GROUP_RES = 123
  216. SUB_GP_GET_ANDROID_GROUP_LIST = 124
  217. SUB_GP_GET_ANDROID_GROUP_LIST_END = 125
  218. SUB_GP_GET_ANDROID_CNT_INFO = 126
  219. SUB_GP_ONLINE_USER_RES_FINISH= 127 //在线用户
  220. //加入结果
  221. CMD_CS_S_JoinClubRes = cc.Class({
  222. ctor:function(){
  223. this.cbRes = 0;
  224. this.dwClubID = 0;
  225. }
  226. });
  227. //退出俱乐部
  228. CMD_CS_S_EixtClubRes = cc.Class({
  229. ctor:function(){
  230. this.dwClubID = 0;
  231. this.cbDissClub = 0;
  232. },
  233. });
  234. CMD_CS_S_OnlineUserStatus = cc.Class({
  235. ctor:function(){
  236. this.dwUserID=0;
  237. this.cbInvite = 0;
  238. this.cbUserStatus = 0;
  239. },
  240. });
  241. CMD_CS_S_OperateAndroidGroupRes = cc.Class({
  242. ctor:function(){
  243. this.cbResCode = 0;
  244. },
  245. });
  246. //机器人组信息
  247. CMD_CS_S_AndroidGroupInfo = cc.Class({
  248. ctor:function(){
  249. this.dwGroupID = 0; //组ID
  250. this.dwKindID = 0; //类型ID
  251. this.wAndroidCount = 0; //机器人数量
  252. this.wTotalTimes = 0; //总消耗桌数
  253. this.wMaxPlayingTable = 0; //同时开桌数
  254. this.wMaxSitCount = 0; //每桌最大机器人数
  255. this.wCompleteCnt = 0;
  256. },
  257. });
  258. //机器人数量信息
  259. CMD_CS_S_GetAndroidCnt = cc.Class({
  260. ctor:function(){
  261. this.wFreeCnt = 0; //空闲机器人
  262. this.wPlayCnt = 0; //游戏机器人
  263. }
  264. });
  265. ////////////////////////////////////////////////////////////////////////////////
  266. //俱乐部信息
  267. MDM_GC_CLUB = 3; //俱乐部信息
  268. SUB_CS_C_REGISTER_USER = 151 //注册玩家
  269. SUB_CS_C_LOGOFF_USER = 152 //注销玩家
  270. SUB_CS_C_ENTER_CLUB = 153 //进入俱乐部
  271. SUB_CS_C_EXIT_CLUB = 154 //离开俱乐部
  272. SUB_CS_C_USER_INVITE = 161 //用户邀请
  273. //用户登录
  274. CMD_GC_RegisterUser = cc.Class({
  275. ctor: function () {
  276. this.dwUserID = 0; //玩家标识
  277. }
  278. });
  279. //进入俱乐部
  280. CMD_GC_EnterClub = cc.Class({
  281. ctor: function () {
  282. this.dwUserID = 0;
  283. this.dwClubID = 0;
  284. this.cbClubLevel = 0;
  285. }
  286. });
  287. //离开俱乐部
  288. CMD_GC_ExitClub = cc.Class({
  289. ctor: function () {
  290. this.dwUserID = 0;
  291. this.dwClubID = 0;
  292. }
  293. });
  294. //用户邀请
  295. CMD_GC_InviteUser = cc.Class({
  296. ctor: function () {
  297. this.dwClubID = 0;
  298. this.dwTargetID = 0;
  299. this.dwUserID = 0;
  300. this.dwKindID = 0;
  301. this.dwRoomID = 0;
  302. }
  303. });
  304. SUB_CS_S_FORCED_OFFLINE = 272 //被迫下线
  305. SUB_CS_S_UPDATE_CARD = 275 //刷新房卡
  306. SUB_CS_S_UPDATE_SCORE = 276 //刷新积分
  307. SUB_CS_S_USER_INVITE = 277 //用户邀请
  308. SUB_CS_S_ANDROID_LIST = 288 //机器人列表
  309. SUB_CS_S_ANDROID_LIST_FINISH = 289 //机器人列表
  310. SUB_CS_S_ANDROID_CREAT_RES = 290 //创建机器人
  311. SUB_CS_S_ANDROID_DEL_RES = 291 //删除机器人
  312. SUB_CS_S_OPERATE_FAILURE = 0 //操作失败
  313. //刷新房卡
  314. CMD_CS_S_UpdateRoomCard = cc.Class({
  315. ctor: function () {
  316. this.lRoomCard = 0;
  317. }
  318. })
  319. //刷新积分
  320. CMD_CS_S_UpdateScore = cc.Class({
  321. ctor: function () {
  322. this.dwUserID = 0;
  323. this.dwTagUserID = 0;
  324. this.lScore = 0;
  325. this.cbType = 0;
  326. }
  327. });
  328. //用户邀请
  329. CMD_CS_S_InviteUser = cc.Class({
  330. ctor: function () {
  331. this.dwClubID = 0;
  332. this.dwUserID = 0;
  333. this.dwKindID = 0;
  334. this.dwRoomID = 0;
  335. }
  336. });
  337. CMD_CS_S_AndroidInfo = cc.Class({
  338. ctor:function(){
  339. this.dwKindID = 0; //类型ID
  340. this.wAndroidNum = 0; //机器人数量
  341. this.wTotalTimes = 0; //总消耗桌数
  342. this.wCurrentTimes = 0; //当前消耗
  343. this.wMaxPlayingTable = 0; //同时开桌数
  344. this.wMaxSitNum = 0; //每桌最大机器人数
  345. }
  346. });
  347. //操作失败
  348. CMD_CS_S_OperateFailure = cc.Class({
  349. ctor: function () {
  350. this.cbRrrCode = 0; //错误码
  351. this.szDescribeString = "";//[128]; //错误消息
  352. this.len_szDescribeString = 128 * cc.TCHAR_SIZE;
  353. }
  354. })
  355. ////////////////////////////////////////////////////////////////////////////////
  356. //推送信息
  357. MDM_GC_PUSH = 4 //推送信息
  358. SUB_GP_S_CLUB_LIST_PUSH = 1 //俱乐部列表推送
  359. SUB_GP_S_APPLY_PUSH = 2 //申请信息
  360. SUB_GP_S_USER_LEVEL_PUSH = 3 //用户等级
  361. SUB_GP_S_EXIT_CLUB_PUSH = 4 //退出俱乐部
  362. SUB_GP_S_CLUB_INFO_PUSH = 5 //俱乐部信息
  363. SUB_GP_S_ROOM_INFOR = 6 //房间信息
  364. SUB_GP_S_DIS_ROOM = 7 //解散房间
  365. SUB_GP_S_USER_GAMESTATUS = 8 //游戏状态
  366. SUB_GP_S_CHANGE_CLUB_INFO= 9 //修改俱乐部信息
  367. SUB_GP_S_MODIFY_ROOM_INFOR = 10 //修改房间信息
  368. SUB_GP_S_ONLINE_USER = 11 //在线用户
  369. SUB_GP_S_OFFLINE_USER= 12 //下线用户
  370. SUB_GP_S_CLUB_USER_SOCRE = 13 //用户积分
  371. SUB_GP_S_CLUB_ROOM_INFO = 14 //房间信息
  372. SUB_GP_S_KICK_USER_RES = 15 //踢出结果
  373. //用户俱乐部信息
  374. CMD_GP_UserClubInfo = cc.Class({
  375. ctor:function(){
  376. this.dwClubID = 0; //俱乐部ID
  377. this.dwCreaterID = 0; //创建ID
  378. this.wMemberCnt = 0; //
  379. this.cbClubLevel = 0; //
  380. this.cbClubLv = 0; //俱乐部等级
  381. this.szClubName = '';//[31]; //俱乐部名字
  382. this.wKindID = 0; //
  383. this.cbJoinLimit = 0; //
  384. this.dwRules = 0; //
  385. this.szNotice = '';//[256]; //俱乐部公告
  386. this.dwLeagueID = 0; //
  387. this.llScore = 0; //
  388. this.dwAllianceID = 0; //
  389. this.szNotice2 = '';//[256]; //专属公告
  390. this.cbIsInvite = 0; //
  391. this.cbCloseStatus = 0; //
  392. this.wTableCount = 0; //
  393. this.len_szClubName = 31*2;
  394. this.len_szNotice = 256*2;
  395. this.len_szNotice2 = 256*2;
  396. }
  397. });
  398. //解散俱乐部
  399. CMD_GP_S_DisClub = cc.Class({
  400. ctor:function(){
  401. this.dwClubID = 0;
  402. this.cbDissClub = 0;
  403. },
  404. });
  405. //设置成员等级结果
  406. CMD_CS_S_SetMemLevel = cc.Class({
  407. ctor:function(){
  408. this.dwUserID = 0;
  409. this.dwClubID = 0;
  410. this.cbOldLevel = 0;
  411. this.cbCurLevel = 0;
  412. }
  413. });
  414. //解散房间
  415. CMD_CS_S_DisRoom = cc.Class({
  416. ctor: function () {
  417. this.dwClubID = 0;
  418. this.dwUserID = 0; //用户ID
  419. this.dwRoomID = 0; //房间ID
  420. this.byForce = 0; //强制执行
  421. }
  422. });
  423. //在线用户
  424. CMD_CS_S_OnlineUser = cc.Class({
  425. ctor:function(){
  426. this.dwUserID = 0; //用户ID
  427. this.dwClubID = 0;
  428. this.cbUserStatus = 0; //
  429. }
  430. });
  431. //下线用户
  432. CMD_CS_S_OfflineUser = cc.Class({
  433. ctor:function(){
  434. this.dwUserID = 0; //用户ID
  435. }
  436. });
  437. //用户积分
  438. CMD_CS_S_ClubUserScore = cc.Class({
  439. ctor:function(){
  440. this.dwUserID=0; //用户ID
  441. this.dwClubID=0;
  442. this.llScore=0;
  443. }
  444. });
  445. //房间信息
  446. CMD_CS_S_ClubRoomInfo = cc.Class({
  447. ctor:function(){
  448. this.dwRoomID = 0; //用户ID
  449. this.dwClubID = 0;
  450. this.wProgress =0 ; //局数
  451. }
  452. });
  453. //踢出结果
  454. CMD_CS_S_KickUserRes = cc.Class({
  455. ctor:function(){
  456. this.bRes = 0;
  457. }
  458. });