ActiveServerReq.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. var BaseDefine = require("BaseDefine")
  2. var Global = require("Global")
  3. var ProtocolActiveServer = require("ProtocolActiveServer")
  4. import { SendPacketHelper } from 'PacketHelper'
  5. cc.Class({
  6. extends: cc.Component,
  7. properties: {
  8. },
  9. statics: {
  10. GetActivityIndianaConfig: function (data) {//SUB_GP_INDIANA_GET_CONFIG
  11. var arrayBuffer = new ArrayBuffer(4 + 8);
  12. var dv = new DataView(arrayBuffer);
  13. dv.pos = 8;
  14. Global.SetUint32(dv, data.dwCurrentID);
  15. return dv;
  16. },
  17. ActivityIndianaExchang:function(data){//SUB_GP_INDIANA_EXCHANGE
  18. var arrayBuffer = new ArrayBuffer(12+8);
  19. var dv = new DataView(arrayBuffer);
  20. dv.pos =8;
  21. Global.SetUint32(dv, data.dwUserID);
  22. Global.SetUint32(dv, data.dwCurrentID);
  23. Global.SetUint32(dv, data.dwCount);
  24. return dv;
  25. },
  26. ActivityIndianaGetTicket:function(data){//SUB_GP_INDIANA_GET_TICKET
  27. var arrayBuffer = new ArrayBuffer(4+8);
  28. var dv = new DataView(arrayBuffer);
  29. dv.pos = 8;
  30. Global.SetUint32(dv, data.dwUserID);
  31. return dv;
  32. },
  33. GetActivityIndianaUsers:function(data){//SUB_GP_INDIANA_GET_USERS
  34. var arrayBuffer = new ArrayBuffer(4+8);
  35. var dv = new DataView(arrayBuffer);
  36. dv.pos = 8;
  37. Global.SetUint32(dv, data.dwUserID);
  38. return dv;
  39. },
  40. GetActivityShopGetGoods:function(data){//SUB_GA_SHOP_GET_GOODS
  41. var arrayBuffer = new ArrayBuffer(4+8);
  42. var dv = new DataView(arrayBuffer);
  43. dv.pos = 8;
  44. Global.SetUint32(dv, data.dwUserID);
  45. return dv;
  46. },
  47. ActivityShopExchange:function(data){//SUB_GA_SHOP_EXCHANGE
  48. var arrayBuffer = new ArrayBuffer(12+8);
  49. var dv = new DataView(arrayBuffer);
  50. dv.pos =8;
  51. Global.SetUint32(dv, data.dwUserID);
  52. Global.SetUint32(dv, data.dwGoodsID);
  53. Global.SetUint32(dv, data.dwCount);
  54. return dv;
  55. },
  56. GetActivityShopGetUserRecord:function(data){//SUB_GA_SHOP_GET_RECORD
  57. var arrayBuffer = new ArrayBuffer(4+8);
  58. var dv = new DataView(arrayBuffer);
  59. dv.pos = 8;
  60. Global.SetUint32(dv, data.dwUserID);
  61. return dv;
  62. },
  63. ClearActivityShopUserRecord:function(data){//SUB_GA_SHOP_CLEAR_RECORD
  64. var arrayBuffer = new ArrayBuffer(4+8);
  65. var dv = new DataView(arrayBuffer);
  66. dv.pos = 8;
  67. Global.SetUint32(dv, data.dwUserID);
  68. return dv;
  69. },
  70. GetActivityTurntableInfo:function(data){//SUB_GA_TURNTABLE_GET_INFO
  71. var arrayBuffer = new ArrayBuffer(4+8);
  72. var dv = new DataView(arrayBuffer);
  73. dv.pos = 8;
  74. Global.SetUint32(dv, data.dwUserID);
  75. return dv;
  76. },
  77. ActivityTurntableAddTimes:function(data){//SUB_GA_TURNTABLE_ADD_TIMES
  78. var arrayBuffer = new ArrayBuffer(8+8);
  79. var dv = new DataView(arrayBuffer);
  80. dv.pos = 8;
  81. Global.SetUint32(dv, data.dwUserID);
  82. Global.SetUint32(dv, data.dwType);
  83. return dv;
  84. },
  85. ActivityTurntableUse:function(data){//SUB_GA_TURNTABLE_USE
  86. var arrayBuffer = new ArrayBuffer(4+8);
  87. var dv = new DataView(arrayBuffer);
  88. dv.pos = 8;
  89. Global.SetUint32(dv, data.dwUserID);
  90. return dv;
  91. }
  92. },//statics
  93. start() {
  94. },
  95. });