GameSocket.lua 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971
  1. -------------------------------------------------
  2. -- 本文件由代码生成器自动生成,
  3. -- 千万不要修改本文件的任何代码,
  4. -- 修改的的任何代码都会被覆盖掉!
  5. ----------------------------------------------------
  6. local Socket = require "Xmds.Pomelo.LuaGameSocket"
  7. require "base64"
  8. --------------------------------Pomelo-------------------------------
  9. Pomelo = Pomelo or {}
  10. --------------------------------GameSocket-------------------------------
  11. Pomelo.GameSocket = {}
  12. local function bagItemUpdatePushDecoder(stream)
  13. local res = bagHandler_pb.BagItemUpdatePush()
  14. res:ParseFromString(stream)
  15. return res
  16. end
  17. function Pomelo.GameSocket.bagItemUpdatePush(cb)
  18. Socket.On("area.bagPush.bagItemUpdatePush", function(res)
  19. Pomelo.GameSocket.lastBagItemUpdatePush = res
  20. cb(nil,res)
  21. end, bagItemUpdatePushDecoder)
  22. end
  23. local function bagNewItemPushDecoder(stream)
  24. local res = bagHandler_pb.BagNewItemPush()
  25. res:ParseFromString(stream)
  26. return res
  27. end
  28. function Pomelo.GameSocket.bagNewItemPush(cb)
  29. Socket.On("area.bagPush.bagNewItemPush", function(res)
  30. Pomelo.GameSocket.lastBagNewItemPush = res
  31. cb(nil,res)
  32. end, bagNewItemPushDecoder)
  33. end
  34. local function bagNewEquipPushDecoder(stream)
  35. local res = bagHandler_pb.BagNewEquipPush()
  36. res:ParseFromString(stream)
  37. return res
  38. end
  39. function Pomelo.GameSocket.bagNewEquipPush(cb)
  40. Socket.On("area.bagPush.bagNewEquipPush", function(res)
  41. Pomelo.GameSocket.lastBagNewEquipPush = res
  42. cb(nil,res)
  43. end, bagNewEquipPushDecoder)
  44. end
  45. local function bagGridFullPushDecoder(stream)
  46. local res = bagHandler_pb.BagGridFullPush()
  47. res:ParseFromString(stream)
  48. return res
  49. end
  50. function Pomelo.GameSocket.bagGridFullPush(cb)
  51. Socket.On("area.bagPush.bagGridFullPush", function(res)
  52. Pomelo.GameSocket.lastBagGridFullPush = res
  53. cb(nil,res)
  54. end, bagGridFullPushDecoder)
  55. end
  56. local function bagGridNumPushDecoder(stream)
  57. local res = bagHandler_pb.BagGridNumPush()
  58. res:ParseFromString(stream)
  59. return res
  60. end
  61. function Pomelo.GameSocket.bagGridNumPush(cb)
  62. Socket.On("area.bagPush.bagGridNumPush", function(res)
  63. Pomelo.GameSocket.lastBagGridNumPush = res
  64. cb(nil,res)
  65. end, bagGridNumPushDecoder)
  66. end
  67. local function bagNewItemFromResFubenPushDecoder(stream)
  68. local res = bagHandler_pb.BagNewItemFromResFubenPush()
  69. res:ParseFromString(stream)
  70. return res
  71. end
  72. function Pomelo.GameSocket.bagNewItemFromResFubenPush(cb)
  73. Socket.On("area.bagPush.bagNewItemFromResFubenPush", function(res)
  74. Pomelo.GameSocket.lastBagNewItemFromResFubenPush = res
  75. cb(nil,res)
  76. end, bagNewItemFromResFubenPushDecoder)
  77. end
  78. local function throwPointItemListPushDecoder(stream)
  79. local res = battleHandler_pb.ThrowPointItemListPush()
  80. res:ParseFromString(stream)
  81. return res
  82. end
  83. function Pomelo.GameSocket.throwPointItemListPush(cb)
  84. Socket.On("area.battlePush.throwPointItemListPush", function(res)
  85. Pomelo.GameSocket.lastThrowPointItemListPush = res
  86. cb(nil,res)
  87. end, throwPointItemListPushDecoder)
  88. end
  89. local function throwPointResultPushDecoder(stream)
  90. local res = battleHandler_pb.ThrowPointResultPush()
  91. res:ParseFromString(stream)
  92. return res
  93. end
  94. function Pomelo.GameSocket.throwPointResultPush(cb)
  95. Socket.On("area.battlePush.throwPointResultPush", function(res)
  96. Pomelo.GameSocket.lastThrowPointResultPush = res
  97. cb(nil,res)
  98. end, throwPointResultPushDecoder)
  99. end
  100. local function biddingInfoPushDecoder(stream)
  101. local res = battleHandler_pb.BiddingInfoPush()
  102. res:ParseFromString(stream)
  103. return res
  104. end
  105. function Pomelo.GameSocket.biddingInfoPush(cb)
  106. Socket.On("area.battlePush.biddingInfoPush", function(res)
  107. Pomelo.GameSocket.lastBiddingInfoPush = res
  108. cb(nil,res)
  109. end, biddingInfoPushDecoder)
  110. end
  111. local function fightLevelResultPushDecoder(stream)
  112. local res = battleHandler_pb.FightLevelResultPush()
  113. res:ParseFromString(stream)
  114. return res
  115. end
  116. function Pomelo.GameSocket.fightLevelResultPush(cb)
  117. Socket.On("area.battlePush.fightLevelResultPush", function(res)
  118. Pomelo.GameSocket.lastFightLevelResultPush = res
  119. cb(nil,res)
  120. end, fightLevelResultPushDecoder)
  121. end
  122. local function itemDropPushDecoder(stream)
  123. local res = battleHandler_pb.ItemDropPush()
  124. res:ParseFromString(stream)
  125. return res
  126. end
  127. function Pomelo.GameSocket.itemDropPush(cb)
  128. Socket.On("area.battlePush.itemDropPush", function(res)
  129. Pomelo.GameSocket.lastItemDropPush = res
  130. cb(nil,res)
  131. end, itemDropPushDecoder)
  132. end
  133. local function sceneNamePushDecoder(stream)
  134. local res = battleHandler_pb.SceneNamePush()
  135. res:ParseFromString(stream)
  136. return res
  137. end
  138. function Pomelo.GameSocket.sceneNamePush(cb)
  139. Socket.On("area.battlePush.sceneNamePush", function(res)
  140. Pomelo.GameSocket.lastSceneNamePush = res
  141. cb(nil,res)
  142. end, sceneNamePushDecoder)
  143. end
  144. local function resourceDungeonResultPushDecoder(stream)
  145. local res = battleHandler_pb.ResourceDungeonResultPush()
  146. res:ParseFromString(stream)
  147. return res
  148. end
  149. function Pomelo.GameSocket.resourceDungeonResultPush(cb)
  150. Socket.On("area.battlePush.resourceDungeonResultPush", function(res)
  151. Pomelo.GameSocket.lastResourceDungeonResultPush = res
  152. cb(nil,res)
  153. end, resourceDungeonResultPushDecoder)
  154. end
  155. local function dailyActivityScheduleShowPushDecoder(stream)
  156. local res = dailyActivityHandler_pb.DailyActivityScheduleShowPush()
  157. res:ParseFromString(stream)
  158. return res
  159. end
  160. function Pomelo.GameSocket.dailyActivityScheduleShowPush(cb)
  161. Socket.On("area.dailyActivityPush.dailyActivityScheduleShowPush", function(res)
  162. Pomelo.GameSocket.lastDailyActivityScheduleShowPush = res
  163. cb(nil,res)
  164. end, dailyActivityScheduleShowPushDecoder)
  165. end
  166. local function equipmentSimplePushDecoder(stream)
  167. local res = equipHandler_pb.EquipmentSimplePush()
  168. res:ParseFromString(stream)
  169. return res
  170. end
  171. function Pomelo.GameSocket.equipmentSimplePush(cb)
  172. Socket.On("area.equipPush.equipmentSimplePush", function(res)
  173. Pomelo.GameSocket.lastEquipmentSimplePush = res
  174. cb(nil,res)
  175. end, equipmentSimplePushDecoder)
  176. end
  177. local function equipInheritPushDecoder(stream)
  178. local res = equipHandler_pb.EquipInheritPush()
  179. res:ParseFromString(stream)
  180. return res
  181. end
  182. function Pomelo.GameSocket.equipInheritPush(cb)
  183. Socket.On("area.equipPush.equipInheritPush", function(res)
  184. Pomelo.GameSocket.lastEquipInheritPush = res
  185. cb(nil,res)
  186. end, equipInheritPushDecoder)
  187. end
  188. local function equipStrengthPosPushDecoder(stream)
  189. local res = equipHandler_pb.StrengthPosPush()
  190. res:ParseFromString(stream)
  191. return res
  192. end
  193. function Pomelo.GameSocket.equipStrengthPosPush(cb)
  194. Socket.On("area.equipPush.equipStrengthPosPush", function(res)
  195. Pomelo.GameSocket.lastStrengthPosPush = res
  196. cb(nil,res)
  197. end, equipStrengthPosPushDecoder)
  198. end
  199. local function onMagicMatrixActionPushDecoder(stream)
  200. local res = guildMagicMatrixHandler_pb.OnMagicMatrixActionPush()
  201. res:ParseFromString(stream)
  202. return res
  203. end
  204. function Pomelo.GameSocket.onMagicMatrixActionPush(cb)
  205. Socket.On("area.guildMagicMatrixPush.onMagicMatrixActionPush", function(res)
  206. Pomelo.GameSocket.lastOnMagicMatrixActionPush = res
  207. cb(nil,res)
  208. end, onMagicMatrixActionPushDecoder)
  209. end
  210. local function fishItemPushDecoder(stream)
  211. local res = itemHandler_pb.FishItemPush()
  212. res:ParseFromString(stream)
  213. return res
  214. end
  215. function Pomelo.GameSocket.fishItemPush(cb)
  216. Socket.On("area.itemPush.fishItemPush", function(res)
  217. Pomelo.GameSocket.lastFishItemPush = res
  218. cb(nil,res)
  219. end, fishItemPushDecoder)
  220. end
  221. local function countItemChangePushDecoder(stream)
  222. local res = itemHandler_pb.CountItemChangePush()
  223. res:ParseFromString(stream)
  224. return res
  225. end
  226. function Pomelo.GameSocket.countItemChangePush(cb)
  227. Socket.On("area.itemPush.countItemChangePush", function(res)
  228. Pomelo.GameSocket.lastCountItemChangePush = res
  229. cb(nil,res)
  230. end, countItemChangePushDecoder)
  231. end
  232. local function itemDetailPushDecoder(stream)
  233. local res = itemHandler_pb.ItemDetailPush()
  234. res:ParseFromString(stream)
  235. return res
  236. end
  237. function Pomelo.GameSocket.itemDetailPush(cb)
  238. Socket.On("area.itemPush.itemDetailPush", function(res)
  239. Pomelo.GameSocket.lastItemDetailPush = res
  240. cb(nil,res)
  241. end, itemDetailPushDecoder)
  242. end
  243. local function rewardItemPushDecoder(stream)
  244. local res = itemHandler_pb.RewardItemPush()
  245. res:ParseFromString(stream)
  246. return res
  247. end
  248. function Pomelo.GameSocket.rewardItemPush(cb)
  249. Socket.On("area.itemPush.rewardItemPush", function(res)
  250. Pomelo.GameSocket.lastRewardItemPush = res
  251. cb(nil,res)
  252. end, rewardItemPushDecoder)
  253. end
  254. local function onMessageAddPushDecoder(stream)
  255. local res = messageHandler_pb.OnMessageAddPush()
  256. res:ParseFromString(stream)
  257. return res
  258. end
  259. function Pomelo.GameSocket.onMessageAddPush(cb)
  260. Socket.On("area.messagePush.onMessageAddPush", function(res)
  261. Pomelo.GameSocket.lastOnMessageAddPush = res
  262. cb(nil,res)
  263. end, onMessageAddPushDecoder)
  264. end
  265. local function onNewPetDetailPushDecoder(stream)
  266. local res = petNewHandler_pb.OnNewPetDetailPush()
  267. res:ParseFromString(stream)
  268. return res
  269. end
  270. function Pomelo.GameSocket.onNewPetDetailPush(cb)
  271. Socket.On("area.petNewPush.onNewPetDetailPush", function(res)
  272. Pomelo.GameSocket.lastOnNewPetDetailPush = res
  273. cb(nil,res)
  274. end, onNewPetDetailPushDecoder)
  275. end
  276. local function petExpUpdatePushDecoder(stream)
  277. local res = petNewHandler_pb.PetExpUpdatePush()
  278. res:ParseFromString(stream)
  279. return res
  280. end
  281. function Pomelo.GameSocket.petExpUpdatePush(cb)
  282. Socket.On("area.petNewPush.petExpUpdatePush", function(res)
  283. Pomelo.GameSocket.lastPetExpUpdatePush = res
  284. cb(nil,res)
  285. end, petExpUpdatePushDecoder)
  286. end
  287. local function petInfoUpdatePushDecoder(stream)
  288. local res = petNewHandler_pb.PetInfoUpdatePush()
  289. res:ParseFromString(stream)
  290. return res
  291. end
  292. function Pomelo.GameSocket.petInfoUpdatePush(cb)
  293. Socket.On("area.petNewPush.petInfoUpdatePush", function(res)
  294. Pomelo.GameSocket.lastPetInfoUpdatePush = res
  295. cb(nil,res)
  296. end, petInfoUpdatePushDecoder)
  297. end
  298. local function caiLianEndPushDecoder(stream)
  299. local res = pickLotusAreaHandler_pb.CaiLianEndPush()
  300. res:ParseFromString(stream)
  301. return res
  302. end
  303. function Pomelo.GameSocket.caiLianEndPush(cb)
  304. Socket.On("area.pickLotusAreaPush.caiLianEndPush", function(res)
  305. Pomelo.GameSocket.lastCaiLianEndPush = res
  306. cb(nil,res)
  307. end, caiLianEndPushDecoder)
  308. end
  309. local function killbossInfoPushDecoder(stream)
  310. local res = pickLotusAreaHandler_pb.KillbossInfoPush()
  311. res:ParseFromString(stream)
  312. return res
  313. end
  314. function Pomelo.GameSocket.killbossInfoPush(cb)
  315. Socket.On("area.pickLotusAreaPush.killbossInfoPush", function(res)
  316. Pomelo.GameSocket.lastKillbossInfoPush = res
  317. cb(nil,res)
  318. end, killbossInfoPushDecoder)
  319. end
  320. local function clientConfigPushDecoder(stream)
  321. local res = playerHandler_pb.ClientConfigPush()
  322. res:ParseFromString(stream)
  323. return res
  324. end
  325. function Pomelo.GameSocket.clientConfigPush(cb)
  326. Socket.On("area.playerPush.clientConfigPush", function(res)
  327. Pomelo.GameSocket.lastClientConfigPush = res
  328. cb(nil,res)
  329. end, clientConfigPushDecoder)
  330. end
  331. local function battleEventPushDecoder(stream)
  332. local res = playerHandler_pb.BattleEventPush()
  333. res:ParseFromString(stream)
  334. return res
  335. end
  336. function Pomelo.GameSocket.battleEventPush(cb)
  337. Socket.On("area.playerPush.battleEventPush", function(res)
  338. Pomelo.GameSocket.lastBattleEventPush = res
  339. cb(nil,res)
  340. end, battleEventPushDecoder)
  341. end
  342. local function battleClearPushDecoder(stream)
  343. local res = playerHandler_pb.BattleClearPush()
  344. res:ParseFromString(stream)
  345. return res
  346. end
  347. function Pomelo.GameSocket.battleClearPush(cb)
  348. Socket.On("area.playerPush.battleClearPush", function(res)
  349. Pomelo.GameSocket.lastBattleClearPush = res
  350. cb(nil,res)
  351. end, battleClearPushDecoder)
  352. end
  353. local function onSuperScriptPushDecoder(stream)
  354. local res = playerHandler_pb.SuperScriptPush()
  355. res:ParseFromString(stream)
  356. return res
  357. end
  358. function Pomelo.GameSocket.onSuperScriptPush(cb)
  359. Socket.On("area.playerPush.onSuperScriptPush", function(res)
  360. Pomelo.GameSocket.lastSuperScriptPush = res
  361. cb(nil,res)
  362. end, onSuperScriptPushDecoder)
  363. end
  364. local function changeAreaPushDecoder(stream)
  365. local res = playerHandler_pb.ChangeAreaPush()
  366. res:ParseFromString(stream)
  367. return res
  368. end
  369. function Pomelo.GameSocket.changeAreaPush(cb)
  370. Socket.On("area.playerPush.changeAreaPush", function(res)
  371. Pomelo.GameSocket.lastChangeAreaPush = res
  372. cb(nil,res)
  373. end, changeAreaPushDecoder)
  374. end
  375. local function playerDynamicPushDecoder(stream)
  376. local res = playerHandler_pb.PlayerDynamicPush()
  377. res:ParseFromString(stream)
  378. return res
  379. end
  380. function Pomelo.GameSocket.playerDynamicPush(cb)
  381. Socket.On("area.playerPush.playerDynamicPush", function(res)
  382. Pomelo.GameSocket.lastPlayerDynamicPush = res
  383. cb(nil,res)
  384. end, playerDynamicPushDecoder)
  385. end
  386. local function playerRelivePushDecoder(stream)
  387. local res = playerHandler_pb.PlayerRelivePush()
  388. res:ParseFromString(stream)
  389. return res
  390. end
  391. function Pomelo.GameSocket.playerRelivePush(cb)
  392. Socket.On("area.playerPush.playerRelivePush", function(res)
  393. Pomelo.GameSocket.lastPlayerRelivePush = res
  394. cb(nil,res)
  395. end, playerRelivePushDecoder)
  396. end
  397. local function playerSaverRebirthPushDecoder(stream)
  398. local res = playerHandler_pb.PlayerSaverRebirthPush()
  399. res:ParseFromString(stream)
  400. return res
  401. end
  402. function Pomelo.GameSocket.playerSaverRebirthPush(cb)
  403. Socket.On("area.playerPush.playerSaverRebirthPush", function(res)
  404. Pomelo.GameSocket.lastPlayerSaverRebirthPush = res
  405. cb(nil,res)
  406. end, playerSaverRebirthPushDecoder)
  407. end
  408. local function simulateDropPushDecoder(stream)
  409. local res = playerHandler_pb.SimulateDataPush()
  410. res:ParseFromString(stream)
  411. return res
  412. end
  413. function Pomelo.GameSocket.simulateDropPush(cb)
  414. Socket.On("area.playerPush.simulateDropPush", function(res)
  415. Pomelo.GameSocket.lastSimulateDataPush = res
  416. cb(nil,res)
  417. end, simulateDropPushDecoder)
  418. end
  419. local function kickPlayerPushDecoder(stream)
  420. local res = playerHandler_pb.KickPlayerPush()
  421. res:ParseFromString(stream)
  422. return res
  423. end
  424. function Pomelo.GameSocket.kickPlayerPush(cb)
  425. Socket.On("area.playerPush.kickPlayerPush", function(res)
  426. Pomelo.GameSocket.lastKickPlayerPush = res
  427. cb(nil,res)
  428. end, kickPlayerPushDecoder)
  429. end
  430. local function suitPropertyUpPushDecoder(stream)
  431. local res = playerHandler_pb.SuitPropertyUpPush()
  432. res:ParseFromString(stream)
  433. return res
  434. end
  435. function Pomelo.GameSocket.suitPropertyUpPush(cb)
  436. Socket.On("area.playerPush.suitPropertyUpPush", function(res)
  437. Pomelo.GameSocket.lastSuitPropertyUpPush = res
  438. cb(nil,res)
  439. end, suitPropertyUpPushDecoder)
  440. end
  441. local function commonPropertyPushDecoder(stream)
  442. local res = playerHandler_pb.CommonPropertyPush()
  443. res:ParseFromString(stream)
  444. return res
  445. end
  446. function Pomelo.GameSocket.commonPropertyPush(cb)
  447. Socket.On("area.playerPush.commonPropertyPush", function(res)
  448. Pomelo.GameSocket.lastCommonPropertyPush = res
  449. cb(nil,res)
  450. end, commonPropertyPushDecoder)
  451. end
  452. local function buffPropertyPushDecoder(stream)
  453. local res = playerHandler_pb.BuffPropertyPush()
  454. res:ParseFromString(stream)
  455. return res
  456. end
  457. function Pomelo.GameSocket.buffPropertyPush(cb)
  458. Socket.On("area.playerPush.buffPropertyPush", function(res)
  459. Pomelo.GameSocket.lastBuffPropertyPush = res
  460. cb(nil,res)
  461. end, buffPropertyPushDecoder)
  462. end
  463. local function playerBattleAttributePushDecoder(stream)
  464. local res = playerHandler_pb.PlayerBattleAttributePush()
  465. res:ParseFromString(stream)
  466. return res
  467. end
  468. function Pomelo.GameSocket.playerBattleAttributePush(cb)
  469. Socket.On("area.playerPush.playerBattleAttributePush", function(res)
  470. Pomelo.GameSocket.lastPlayerBattleAttributePush = res
  471. cb(nil,res)
  472. end, playerBattleAttributePushDecoder)
  473. end
  474. local function payGiftStatePushDecoder(stream)
  475. local res = playerHandler_pb.PayGiftStatePush()
  476. res:ParseFromString(stream)
  477. return res
  478. end
  479. function Pomelo.GameSocket.payGiftStatePush(cb)
  480. Socket.On("area.playerPush.payGiftStatePush", function(res)
  481. Pomelo.GameSocket.lastPayGiftStatePush = res
  482. cb(nil,res)
  483. end, payGiftStatePushDecoder)
  484. end
  485. local function playerNoticeMsgPushDecoder(stream)
  486. local res = playerHandler_pb.PlayerNoticeMsgPush()
  487. res:ParseFromString(stream)
  488. return res
  489. end
  490. function Pomelo.GameSocket.playerNoticeMsgPush(cb)
  491. Socket.On("area.playerPush.playerNoticeMsgPush", function(res)
  492. Pomelo.GameSocket.lastPlayerNoticeMsgPush = res
  493. cb(nil,res)
  494. end, playerNoticeMsgPushDecoder)
  495. end
  496. local function playerSameMapTransPushDecoder(stream)
  497. local res = playerHandler_pb.PlayerSameMapTransPush()
  498. res:ParseFromString(stream)
  499. return res
  500. end
  501. function Pomelo.GameSocket.playerSameMapTransPush(cb)
  502. Socket.On("area.playerPush.playerSameMapTransPush", function(res)
  503. Pomelo.GameSocket.lastPlayerSameMapTransPush = res
  504. cb(nil,res)
  505. end, playerSameMapTransPushDecoder)
  506. end
  507. local function refrushNewDayPushDecoder(stream)
  508. local res = playerHandlerExt_pb.RefrushNewDayPush()
  509. res:ParseFromString(stream)
  510. return res
  511. end
  512. function Pomelo.GameSocket.refrushNewDayPush(cb)
  513. Socket.On("area.playerPushExt.refrushNewDayPush", function(res)
  514. Pomelo.GameSocket.lastRefrushNewDayPush = res
  515. cb(nil,res)
  516. end, refrushNewDayPushDecoder)
  517. end
  518. local function paySuccessPushDecoder(stream)
  519. local res = prepaidHandler_pb.PaySuccessPush()
  520. res:ParseFromString(stream)
  521. return res
  522. end
  523. function Pomelo.GameSocket.paySuccessPush(cb)
  524. Socket.On("area.prepaidHandler.paySuccessPush", function(res)
  525. Pomelo.GameSocket.lastPaySuccessPush = res
  526. cb(nil,res)
  527. end, paySuccessPushDecoder)
  528. end
  529. local function skillUpdatePushDecoder(stream)
  530. local res = skillHandler_pb.SkillUpdatePush()
  531. res:ParseFromString(stream)
  532. return res
  533. end
  534. function Pomelo.GameSocket.skillUpdatePush(cb)
  535. Socket.On("area.skillPush.skillUpdatePush", function(res)
  536. Pomelo.GameSocket.lastSkillUpdatePush = res
  537. cb(nil,res)
  538. end, skillUpdatePushDecoder)
  539. end
  540. local function skillKeyUpdatePushDecoder(stream)
  541. local res = skillKeysHandler_pb.SkillKeyUpdatePush()
  542. res:ParseFromString(stream)
  543. return res
  544. end
  545. function Pomelo.GameSocket.skillKeyUpdatePush(cb)
  546. Socket.On("area.skillKeysPush.skillKeyUpdatePush", function(res)
  547. Pomelo.GameSocket.lastSkillKeyUpdatePush = res
  548. cb(nil,res)
  549. end, skillKeyUpdatePushDecoder)
  550. end
  551. local function taskUpdatePushDecoder(stream)
  552. local res = taskHandler_pb.TaskUpdatePush()
  553. res:ParseFromString(stream)
  554. return res
  555. end
  556. function Pomelo.GameSocket.taskUpdatePush(cb)
  557. Socket.On("area.taskPush.taskUpdatePush", function(res)
  558. Pomelo.GameSocket.lastTaskUpdatePush = res
  559. cb(nil,res)
  560. end, taskUpdatePushDecoder)
  561. end
  562. local function taskAutoPushDecoder(stream)
  563. local res = taskHandler_pb.TaskAutoPush()
  564. res:ParseFromString(stream)
  565. return res
  566. end
  567. function Pomelo.GameSocket.taskAutoPush(cb)
  568. Socket.On("area.taskPush.taskAutoPush", function(res)
  569. Pomelo.GameSocket.lastTaskAutoPush = res
  570. cb(nil,res)
  571. end, taskAutoPushDecoder)
  572. end
  573. local function treasureScenePointPushDecoder(stream)
  574. local res = taskHandler_pb.TreasureScenePointPush()
  575. res:ParseFromString(stream)
  576. return res
  577. end
  578. function Pomelo.GameSocket.treasureScenePointPush(cb)
  579. Socket.On("area.taskPush.treasureScenePointPush", function(res)
  580. Pomelo.GameSocket.lastTreasureScenePointPush = res
  581. cb(nil,res)
  582. end, treasureScenePointPushDecoder)
  583. end
  584. local function loopResultPushDecoder(stream)
  585. local res = taskHandler_pb.LoopResultPush()
  586. res:ParseFromString(stream)
  587. return res
  588. end
  589. function Pomelo.GameSocket.loopResultPush(cb)
  590. Socket.On("area.taskPush.loopResultPush", function(res)
  591. Pomelo.GameSocket.lastLoopResultPush = res
  592. cb(nil,res)
  593. end, loopResultPushDecoder)
  594. end
  595. local function guideTaskPushDecoder(stream)
  596. local res = taskHandler_pb.GuideTaskPush()
  597. res:ParseFromString(stream)
  598. return res
  599. end
  600. function Pomelo.GameSocket.guideTaskPush(cb)
  601. Socket.On("area.taskPush.guideTaskPush", function(res)
  602. Pomelo.GameSocket.lastGuideTaskPush = res
  603. cb(nil,res)
  604. end, guideTaskPushDecoder)
  605. end
  606. local function onSummonTeamPushDecoder(stream)
  607. local res = teamHandler_pb.OnSummonTeamPush()
  608. res:ParseFromString(stream)
  609. return res
  610. end
  611. function Pomelo.GameSocket.onSummonTeamPush(cb)
  612. Socket.On("area.teamPush.onSummonTeamPush", function(res)
  613. Pomelo.GameSocket.lastOnSummonTeamPush = res
  614. cb(nil,res)
  615. end, onSummonTeamPushDecoder)
  616. end
  617. local function onTeamUpdatePushDecoder(stream)
  618. local res = teamHandler_pb.OnTeamUpdatePush()
  619. res:ParseFromString(stream)
  620. return res
  621. end
  622. function Pomelo.GameSocket.onTeamUpdatePush(cb)
  623. Socket.On("area.teamPush.onTeamUpdatePush", function(res)
  624. Pomelo.GameSocket.lastOnTeamUpdatePush = res
  625. cb(nil,res)
  626. end, onTeamUpdatePushDecoder)
  627. end
  628. local function onTeamMemberUpdatePushDecoder(stream)
  629. local res = teamHandler_pb.OnTeamMemberUpdatePush()
  630. res:ParseFromString(stream)
  631. return res
  632. end
  633. function Pomelo.GameSocket.onTeamMemberUpdatePush(cb)
  634. Socket.On("area.teamPush.onTeamMemberUpdatePush", function(res)
  635. Pomelo.GameSocket.lastOnTeamMemberUpdatePush = res
  636. cb(nil,res)
  637. end, onTeamMemberUpdatePushDecoder)
  638. end
  639. local function onTeamTargetPushDecoder(stream)
  640. local res = teamHandler_pb.OnTeamTargetPush()
  641. res:ParseFromString(stream)
  642. return res
  643. end
  644. function Pomelo.GameSocket.onTeamTargetPush(cb)
  645. Socket.On("area.teamPush.onTeamTargetPush", function(res)
  646. Pomelo.GameSocket.lastOnTeamTargetPush = res
  647. cb(nil,res)
  648. end, onTeamTargetPushDecoder)
  649. end
  650. local function onAcrossTeamInfoPushDecoder(stream)
  651. local res = teamHandler_pb.OnAcrossTeamInfoPush()
  652. res:ParseFromString(stream)
  653. return res
  654. end
  655. function Pomelo.GameSocket.onAcrossTeamInfoPush(cb)
  656. Socket.On("area.teamPush.onAcrossTeamInfoPush", function(res)
  657. Pomelo.GameSocket.lastOnAcrossTeamInfoPush = res
  658. cb(nil,res)
  659. end, onAcrossTeamInfoPushDecoder)
  660. end
  661. local function onTeamMumberHurtPushDecoder(stream)
  662. local res = teamHandler_pb.OnTeamMumberHurtPush()
  663. res:ParseFromString(stream)
  664. return res
  665. end
  666. function Pomelo.GameSocket.onTeamMumberHurtPush(cb)
  667. Socket.On("area.teamPush.onTeamMumberHurtPush", function(res)
  668. Pomelo.GameSocket.lastOnTeamMumberHurtPush = res
  669. cb(nil,res)
  670. end, onTeamMumberHurtPushDecoder)
  671. end
  672. local function onAppliedPlayersPushDecoder(stream)
  673. local res = teamHandler_pb.OnAppliedPlayersPush()
  674. res:ParseFromString(stream)
  675. return res
  676. end
  677. function Pomelo.GameSocket.onAppliedPlayersPush(cb)
  678. Socket.On("area.teamPush.onAppliedPlayersPush", function(res)
  679. Pomelo.GameSocket.lastOnAppliedPlayersPush = res
  680. cb(nil,res)
  681. end, onAppliedPlayersPushDecoder)
  682. end
  683. local function loginQueuePushDecoder(stream)
  684. local res = entryHandler_pb.LoginQueuePush()
  685. res:ParseFromString(stream)
  686. return res
  687. end
  688. function Pomelo.GameSocket.loginQueuePush(cb)
  689. Socket.On("connector.entryPush.loginQueuePush", function(res)
  690. Pomelo.GameSocket.lastLoginQueuePush = res
  691. cb(nil,res)
  692. end, loginQueuePushDecoder)
  693. end
  694. local function hudBuffListPushDecoder(stream)
  695. local res = entryHandler_pb.HUDBuffListPush()
  696. res:ParseFromString(stream)
  697. return res
  698. end
  699. function Pomelo.GameSocket.hudBuffListPush(cb)
  700. Socket.On("connector.entryPush.hudBuffListPush", function(res)
  701. Pomelo.GameSocket.lastHUDBuffListPush = res
  702. cb(nil,res)
  703. end, hudBuffListPushDecoder)
  704. end
  705. local function isOpenArtifactPushDecoder(stream)
  706. local res = openArtifactHandler_pb.IsOpenArtifactPush()
  707. res:ParseFromString(stream)
  708. return res
  709. end
  710. function Pomelo.GameSocket.isOpenArtifactPush(cb)
  711. Socket.On("openArtifact.openArtifactPush.isOpenArtifactPush", function(res)
  712. Pomelo.GameSocket.lastIsOpenArtifactPush = res
  713. cb(nil,res)
  714. end, isOpenArtifactPushDecoder)
  715. end
  716. local function addPetPushDecoder(stream)
  717. local res = petHandler_pb.AddPetPush()
  718. res:ParseFromString(stream)
  719. return res
  720. end
  721. function Pomelo.GameSocket.addPetPush(cb)
  722. Socket.On("pet.petPush.addPetPush", function(res)
  723. Pomelo.GameSocket.lastAddPetPush = res
  724. cb(nil,res)
  725. end, addPetPushDecoder)
  726. end
  727. local function updatePetPushDecoder(stream)
  728. local res = petHandler_pb.UpdatePetPush()
  729. res:ParseFromString(stream)
  730. return res
  731. end
  732. function Pomelo.GameSocket.updatePetPush(cb)
  733. Socket.On("pet.petPush.updatePetPush", function(res)
  734. Pomelo.GameSocket.lastUpdatePetPush = res
  735. cb(nil,res)
  736. end, updatePetPushDecoder)
  737. end
  738. local function deletePetPushDecoder(stream)
  739. local res = petHandler_pb.DeletePetPush()
  740. res:ParseFromString(stream)
  741. return res
  742. end
  743. function Pomelo.GameSocket.deletePetPush(cb)
  744. Socket.On("pet.petPush.deletePetPush", function(res)
  745. Pomelo.GameSocket.lastDeletePetPush = res
  746. cb(nil,res)
  747. end, deletePetPushDecoder)
  748. end
  749. local function playerYaoQiSharePushDecoder(stream)
  750. local res = zhanYaoHandler_pb.PlayerYaoQiSharePush()
  751. res:ParseFromString(stream)
  752. return res
  753. end
  754. function Pomelo.GameSocket.playerYaoQiSharePush(cb)
  755. Socket.On("zhanyao.zhanYaoPush.playerYaoQiSharePush", function(res)
  756. Pomelo.GameSocket.lastPlayerYaoQiSharePush = res
  757. cb(nil,res)
  758. end, playerYaoQiSharePushDecoder)
  759. end
  760. --------------------------------Pomelo-------------------------------
  761. return Pomelo