Handler.lua 6.3 KB

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