Struct.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. //////////////////////////////////////////////////////////////////////////////////
  2. //游戏列表
  3. //游戏类型
  4. tagGameType = cc.Class({
  5. ctor :function () {
  6. this._name = "tagGameType";
  7. this.wJoinID = 0; //挂接索引
  8. this.wSortID = 0; //排序索引
  9. this.wTypeID = 0; //类型索引
  10. this.szTypeName = ""; //种类名字
  11. this.len_szTypeName = 64;
  12. },
  13. });
  14. //游戏种类
  15. tagGameKind = cc.Class({
  16. ctor :function () {
  17. this.wTypeID = 0; //类型索引
  18. this.wJoinID = 0; //挂接索引
  19. this.wSortID = 0; //排序索引
  20. this.wKindID = 0; //类型索引
  21. this.wGameID = 0; //模块索引
  22. this.dwOnLineCount = 0;//在线人数
  23. this.dwFullCount = 0; //满员人数
  24. this.szKindName = ""; //游戏名字
  25. this.szProcessName = ""; //进程名字
  26. this.len_szKindName = LEN_KIND*cc.TCHAR_SIZE; //游戏名字
  27. this.len_szProcessName = LEN_PROCESS*cc.TCHAR_SIZE; //进程名字
  28. },
  29. });
  30. //游戏房间
  31. tagGameServer = cc.Class({
  32. ctor :function () {
  33. this.wKindID = 0; //挂接索引
  34. this.wNodeID = 0; //排序索引
  35. this.wSortID = 0; //类型索引
  36. this.wServerID = 0; //房间索引
  37. this.wServerKind = 0; //房间类型
  38. this.wServerType = 0; //房间类型
  39. this.wServerLevel= 0; //房间等级
  40. this.wServerPort = 0; //房间端口
  41. this.llCellScore = 0; //单元积分
  42. this.cbEnterMember= 0; //进入会员
  43. this.llEnterScore = 0; //进入积分
  44. this.dwServerRule = 0; //房间规则
  45. this.dwOnLineCount = 0; //在线人数
  46. this.dwAndroidCount = 0;//机器人数
  47. this.dwFullCount = 0; //满员人数
  48. this.szServerAddr = ''; //房间名称
  49. this.szServerName = ''; //房间名称
  50. //私人房添加
  51. this.dwSurportType= 0; //支持类型
  52. this.wTableCount= 0; //桌子数目
  53. this.len_szServerAddr = cc.TCHAR_SIZE * 32; //房间名称
  54. this.len_szServerName = cc.TCHAR_SIZE * 32; //房间名称
  55. },
  56. });
  57. //房间属性
  58. tagServerAttribute = cc.Class({
  59. ctor :function () {
  60. this.wKindID = 0; //类型标识
  61. this.wServerID = 0; //房间标识
  62. this.wServerType = 0; //游戏类型
  63. this.dwServerRule = 0; //房间规则
  64. this.szServerName = 0; //房间名称
  65. this.wAVServerPort = 0; //视频端口
  66. this.dwAVServerAddr = 0; //视频地址
  67. this.wTableCount = 0; //桌子数目
  68. this.wChairCount = 0; //椅子数目
  69. },
  70. });
  71. //用户信息
  72. tagUserInfoHead = cc.Class({
  73. ctor :function () {
  74. //this._name='tagUserInfoHead'
  75. //用户属性
  76. this.dwGameID = 0; //游戏 I D
  77. this.dwUserID = 0; //用户 I D
  78. this.dwGroupID = 0; //社团 I D
  79. //头像信息
  80. this.wFaceID = 0; //头像索引
  81. this.dwCustomID = 0; //自定标识
  82. //用户属性
  83. this.bIsAndroid = 0; //机器标识
  84. this.cbGender = 0; //用户性別
  85. this.cbMemberOrder = 0; //会员等级
  86. this.cbMasterOrder = 0; //管理等级
  87. //用户状态
  88. this.wTableID = 0; //桌子索引
  89. this.wChairID = 0; //椅子索引
  90. this.cbUserStatus = 0; //用户状态
  91. //积分信息
  92. this.llScore = 0; //用户分数
  93. this.llGrade = 0; //用户成绩
  94. this.llInsure = 0; //用户银行
  95. this.llIngot = 0; //用户元宝
  96. this.dBeans = 0; //用户游戏豆;
  97. //游戏信息
  98. this.dwWinCount = 0; //胜利盘数
  99. this.dwLostCount = 0; //失败盘数
  100. this.dwDrawCount = 0; //和局盘数
  101. this.dwFleeCount = 0; //逃跑盘数
  102. this.dwExperience = 0; //用户经验
  103. this.llIntegralCount = 0; //积分总数(当前房间)
  104. //代理信息
  105. this.dwAgentID = 0; //代理 I D
  106. },
  107. });
  108. tagTimeInfo = cc.Class({
  109. ctor :function () {
  110. this.dwEnterTableTimer = 0; //进出桌子时间
  111. this.dwLeaveTableTimer = 0; //离开桌子时间
  112. this.dwStartGameTimer = 0; //开始游戏时间
  113. this.dwEndGameTimer = 0; //离开游戏时间
  114. },
  115. });
  116. //用户信息
  117. tagUserInfo = cc.Class({
  118. ctor :function () {
  119. this._name = 'tagUserInfo'
  120. //基本属性
  121. this.dwUserID = 0; //用户 I D
  122. this.dwGameID = 0; //游戏 I D
  123. this.dwGroupID = 0; //社团 I D
  124. this.szNickName = ""; //用户昵称
  125. this.szGroupName = ""; //社团名字
  126. this.szUnderWrite = ""; //个性签名
  127. this.szQQ = ""; //QQ号码
  128. this.szMobilePhone = ""; //手机号码
  129. //头像信息
  130. this.wFaceID = 0; //头像索引
  131. this.dwCustomID = 0; //自定标识
  132. //用户资料
  133. this.cbGender = 0; //用户性別
  134. this.cbMemberOrder = 0; //会员等级
  135. this.cbMasterOrder = 0; //管理等级
  136. //用户状态
  137. this.wTableID = 0; //桌子索引
  138. this.wLastTableID = 0; //游戏桌子
  139. this.wChairID = 0; //椅子索引
  140. this.cbUserStatus = 0; //用户状态
  141. //积分信息
  142. this.llScore = 0; //用户分数
  143. this.llGrade = 0; //用户成绩
  144. this.llInsure = 0; //用户银行
  145. this.llIngot = 0; //用户元宝
  146. this.dBeans = 0; //游戏豆
  147. //私人房添加
  148. this.lRoomCard; //钻石数量
  149. //游戏信息
  150. this.dwWinCount = 0; //胜利盘数
  151. this.dwLostCount = 0; //失败盘数
  152. this.dwDrawCount = 0; //和局盘数
  153. this.dwFleeCount = 0; //逃跑盘数
  154. this.dwExperience = 0; //用户经验
  155. this.llIntegralCount = 0; //积分总数(当前房间)
  156. this.dwAgentID = 0; //代理 I D
  157. this.szClientIP='';
  158. //时间信息
  159. this.TimerInfo = new tagTimeInfo(); //时间信息
  160. this.len_szNickName = window.LEN_NICKNAME*cc.TCHAR_SIZE; //用户昵称
  161. this.len_szGroupName = window.LEN_GROUP_NAME*cc.TCHAR_SIZE; //社团名字
  162. this.len_szUnderWrite = window.LEN_UNDER_WRITE*cc.TCHAR_SIZE; //个性签名
  163. this.len_szQQ = LEN_QQ*cc.TCHAR_SIZE; //QQ号码
  164. this.len_szMobilePhone = LEN_MOBILE_PHONE*cc.TCHAR_SIZE; //手机号码
  165. },
  166. });
  167. //桌子状态
  168. tagTableStatus = cc.Class({
  169. ctor:function() {
  170. //this._name = 'CMD_GR_TableStatus'
  171. this.cbTableLock = 0; //锁定标志
  172. this.cbPlayStatus = 0; //游戏标志
  173. this.lCellScore = 0; //单元积分
  174. },
  175. });
  176. //用户状态
  177. tagUserGps = cc.Class({
  178. ctor :function () {
  179. //this._name="tagUserGps"
  180. this.dwUserID = 0;
  181. this.byHide = 0;
  182. this.dlatitude = 0;
  183. this.dlongitude = 0;
  184. this.szAddress = '';
  185. this.len_szAddress = 128*cc.TCHAR_SIZE;
  186. },
  187. });
  188. //用户状态
  189. tagUserStatus = cc.Class({
  190. ctor :function () {
  191. this.wTableID = 0; //桌子索引
  192. this.wChairID = 0; //椅子位置
  193. this.cbUserStatus = 0; //用户状态
  194. },
  195. });
  196. //用户积分
  197. tagUserScore = cc.Class({
  198. ctor :function () {
  199. //积分信息
  200. this.llScore = 0; //用户分数
  201. this.llGrade = 0; //用户成绩
  202. this.llInsure = 0; //用户银行
  203. this.llIngot = 0; //用户元宝
  204. this.dBeans = 0; //用户游戏豆
  205. //输赢信息
  206. this.dwWinCount = 0; //胜利盘数
  207. this.dwLostCount = 0; //失败盘数
  208. this.dwDrawCount = 0; //和局盘数
  209. this.dwFleeCount = 0; //逃跑盘数
  210. this.llIntegralCount; //积分总数(当前房间)
  211. this.dwFlower = []; //鲜花信息
  212. //全局信息
  213. this.dwExperience = 0; //用户经验
  214. this.llLoveLiness = 0; //用户魅力
  215. },
  216. });
  217. //比赛信息
  218. tagGameMatch = cc.Class({
  219. ctor:function () {
  220. //基本信息
  221. this.wServerID = 0; //房间标识
  222. this.dwMatchID = 0; //比赛标识
  223. this.dwMatchNO = 0; //比赛场次
  224. this.cbMatchType = 0; //比赛类型
  225. this.szMatchName = ""; //比赛名称
  226. //比赛信息
  227. this.cbMemberOrder = 0; //会员等级
  228. this.cbMatchFeeType = 0; //扣费类型
  229. this.lMatchFee = 0; //比赛费用
  230. //比赛信息
  231. this.wStartUserCount = 0; //开赛人数
  232. this.wMatchPlayCount = 0; //比赛局数
  233. //比赛奖励
  234. this.wRewardCount = 0; //奖励人数
  235. //比赛时间
  236. this.MatchStartTime = new systemtime(); //开始时间
  237. this.MatchEndTime = new systemtime(); //结束时间
  238. //基本信息
  239. this.index_wServerID = 0; //房间标识
  240. this.index_dwMatchID = 2; //比赛标识
  241. this.index_dwMatchNO = 6; //比赛场次
  242. this.index_cbMatchType = 10; //比赛类型
  243. this.index_szMatchName = 11; //比赛名称
  244. //比赛信息
  245. this.index_cbMemberOrder = 75; //会员等级
  246. this.index_cbMatchFeeType = 76; //扣费类型
  247. this.index_lMatchFee = 77; //比赛费用
  248. //比赛信息
  249. this.index_wStartUserCount = 85; //开赛人数
  250. this.index_wMatchPlayCount = 87; //比赛局数
  251. //比赛奖励
  252. this.index_wRewardCount = 89; //奖励人数
  253. //比赛时间
  254. this.index_MatchStartTime = 91; //开始时间
  255. this.index_MatchEndTime = 107; //结束时间
  256. },
  257. getSize :function()
  258. {
  259. return 123;
  260. }
  261. });
  262. //比赛人数
  263. CMD_GR_Match_Num = cc.Class({
  264. ctor:function() {
  265. //基本信息
  266. this.dwWaitting = 0; //房间标识
  267. this.dwTotal = 0; //比赛标识
  268. this.index_dwWaitting = 0; //房间标识
  269. this.index_dwTotal = 4; //比赛标识
  270. },
  271. getSize:function()
  272. {
  273. return 8;
  274. }
  275. });