Handler.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. local HeroLogic = require("hero.HeroLogic")
  2. local HeroBook = require("hero.HeroBook")
  3. local HeroEquip = require("hero.HeroEquip")
  4. local HeroTenZhiHuan = require("hero.HeroTenZhiHuan")
  5. local BagLogic = require("bag.BagLogic")
  6. local HeroStrategyLogic = require("hero.HeroStrategyLogic")
  7. -- 请求英雄详细信息:静态
  8. function CG_HERO_BAG_STATIC(human,msg)
  9. HeroLogic.sendHeroBagStatic(human,msg.id, msg.tuJian)
  10. end
  11. -- 请求英雄详细信息:动态
  12. function CG_HERO_BAG_DYNAMIC(human,msg)
  13. HeroLogic.sendHeroBagDynamic(human, msg.id, msg.index, true)
  14. end
  15. -- 请求英雄详细信息:动态
  16. function CG_HERO_BAG_DYNAMIC_BY_ID(human,msg)
  17. HeroLogic.sendHeroBagDynamicByID(human, msg.heroID,msg.star)
  18. end
  19. -- 请求预览觉醒信息
  20. function CG_HERO_JUEXING_QUERY(human,msg)
  21. HeroLogic.heroJueXingQuery(human,msg.id,msg.index)
  22. end
  23. -- 请求觉醒升星
  24. function CG_HERO_JUEXING_DO(human,msg)
  25. HeroLogic.heroJueXingDo(human,msg.id,msg.index,msg.inputIDList, msg.inputIndexList)
  26. end
  27. -- 购买容量
  28. function CG_HERO_CAP_BUY(human)
  29. HeroLogic.buyHeroCap(human)
  30. end
  31. -- 锁定英雄
  32. function CG_HERO_BAG_LOCK(human, msg)
  33. HeroLogic.lockHero(human, msg.type, msg.heroID, msg.heroIndex)
  34. end
  35. -- 英雄升级
  36. function CG_HERO_LEVEL_UP(human, msg)
  37. HeroLogic.heroLvUp(human, msg.id, msg.index)
  38. end
  39. -- 英雄升阶查询
  40. function CG_HERO_UPGRADE_QUERY(human, msg)
  41. HeroLogic.heroUpgradeQuery(human, msg.id, msg.index)
  42. end
  43. -- 英雄升阶
  44. function CG_HERO_UPGRADE_DO(human, msg)
  45. HeroLogic.heroUpgradeDo(human, msg.id, msg.index)
  46. end
  47. -- 英雄图鉴查询
  48. function CG_HERO_BOOK_QUERY_CS(human, msg)
  49. HeroBook.querySimple_CS(human, msg.camp)
  50. end
  51. -- 英雄图鉴列传
  52. function CG_HERO_BOOK_LIEZHUAN_QUERY(human, msg)
  53. HeroBook.CG_HERO_BOOK_LIEZHUAN_QUERY(human,msg.id)
  54. end
  55. -- 英雄图鉴列传奖励
  56. function CG_HERO_BOOK_LIEZHUAN_GET(human, msg)
  57. HeroBook.CG_HERO_BOOK_LIEZHUAN_GET(human, msg.id)
  58. end
  59. -- 请求英雄装备信息
  60. function CG_HERO_EQUIP_QUERY(human, msg)
  61. HeroEquip.query(human, msg.id, msg.index)
  62. end
  63. -- 穿装备
  64. function CG_HERO_EQUIP_PUTON(human, msg)
  65. HeroEquip.putOn(human, msg.heroID, msg.heroIndex, msg.bagIndex, nil)
  66. end
  67. -- 穿装备 一个英雄到另一个英雄
  68. function CG_HERO_EQUIP_PUTON_ON_PUT(human, msg)
  69. HeroEquip.putOnHero(human, msg.heroID, msg.heroIndex, msg.putHeroID, msg.putHeroIndex, msg.putHeroPos)
  70. end
  71. -- 脱装备
  72. function CG_HERO_EQUIP_PUTOFF(human, msg)
  73. HeroEquip.putOff(human, msg.heroID, msg.heroIndex, msg.pos, nil)
  74. end
  75. -- 一键穿装
  76. function CG_HERO_EQUIP_PUTON_QUICK(human, msg)
  77. HeroEquip.putOnQuick(human, msg.heroID, msg.heroIndex, msg.equipID1, msg.equipID2, msg.equipID3, msg.equipID4, msg.equipID6)
  78. end
  79. -- 一键脱装
  80. function CG_HERO_EQUIP_PUTOFF_QUICK(human, msg)
  81. HeroEquip.putOffQuick(human, msg.heroID, msg.heroIndex)
  82. end
  83. -- 激活水晶
  84. function CG_SHUIJING_JIHUO(human, msg)
  85. HeroEquip.jihuoShuijing(human, msg.heroID, msg.heroIndex)
  86. end
  87. -- 查询水晶转换信息
  88. function CG_SHUIJING_TRANS_QUERY(human, msg)
  89. HeroEquip.shuijingTransQuery(human, msg.heroID, msg.heroIndex)
  90. end
  91. -- 水晶转换
  92. function CG_SHUIJING_TRANS_DO(human, msg)
  93. HeroEquip.shuijingTransDo(human, msg.heroID, msg.heroIndex)
  94. end
  95. -- 水晶保存
  96. function CG_SHUIJING_TRANS_SAVE(human, msg)
  97. HeroEquip.shuijingTransSave(human, msg.heroID, msg.heroIndex)
  98. end
  99. -- 水晶升级信息查询
  100. function CG_SHUIJING_UPLV_QUERY(human, msg)
  101. HeroEquip.shuijingUpLvQuery(human, msg.type, msg.heroID, msg.heroIndex)
  102. end
  103. -- 水晶升级
  104. function CG_SHUIJING_UPLV_DO (human, msg)
  105. HeroEquip.shuijingUpLvDo(human, msg.type, msg.heroID, msg.heroIndex)
  106. end
  107. -- 神器升级查询
  108. function CG_SHENQI_UPLV_QUERY(human, msg)
  109. HeroEquip.shenqiUpLvQuery(human, msg.heroID, msg.heroIndex)
  110. end
  111. -- 神器升级
  112. function CG_SHENQI_UPLV_DO(human, msg)
  113. HeroEquip.shenqiUpLvDo(human, msg.heroID, msg.heroIndex, msg.equipIDList, msg.equipCntList)
  114. end
  115. -- 查看分享英雄的信息
  116. function CG_HERO_SHARE_DATA(human, msg)
  117. HeroLogic.shareData(human, msg.uuid, msg.heroIndex)
  118. end
  119. -- 重生查询
  120. function CG_HERO_CHONGSHENG_QUERY(human,msg)
  121. HeroLogic.heroChongShengQuery(human,msg.id,msg.index)
  122. end
  123. -- 重生操作
  124. function CG_HERO_CHONGSHENG_DO(human,msg)
  125. HeroLogic.heroChongShengDo(human,msg.id,msg.index)
  126. end
  127. -- 回退查询
  128. function CG_HERO_HUITUI_QUERY(human, msg)
  129. HeroLogic.sendHuituiQuery(human, msg.heroID, msg.heroIndex)
  130. end
  131. -- 回退操作
  132. function CG_HERO_HUITUI(human, msg)
  133. HeroLogic.huituiHero(human, msg.heroID, msg.heroIndex)
  134. end
  135. function CG_HERO_LIKE(human)
  136. end
  137. function CG_HERO_STRATEGY_QUERY(human,msg)
  138. HeroStrategyLogic.StrategyQueryByHeroID(human,msg.heroID)
  139. end
  140. function CG_HERO_DETAIL_MSG_QUERY(human,msg)
  141. HeroStrategyLogic.heroDetailMsgQuery(human,msg.uuid,msg.heroIndex,msg.heroID)
  142. end
  143. function CG_HERO_GL_DOT_QUERY(human)
  144. HeroStrategyLogic.heroGlDot(human)
  145. end
  146. function CG_HERO_BAG_DOTS(human)
  147. HeroLogic.sendBagDots(human)
  148. end
  149. function CG_HERO_RESET_QUERY(human, msg)
  150. HeroLogic.resetHeroQuery(human, msg.heroID, msg.heroIndex)
  151. end
  152. function CG_HERO_RESET(human, msg)
  153. HeroLogic.resetHero(human, msg.heroID, msg.heroIndex)
  154. end
  155. function CG_HERO_TEN_ZHIHUAN_QUERY(human)
  156. HeroTenZhiHuan.query(human)
  157. end
  158. function CG_HERO_TEN_ZHIHUAN(human, msg)
  159. HeroTenZhiHuan.zhihuan(human, msg.fiveId, msg.heroIndexList)
  160. end
  161. function CG_HERO_BOOK_SINGLE_QUERY(human,msg)
  162. HeroBook.queryHeroBookById(human,msg.heroID,msg.star)
  163. end