Handler.lua 5.9 KB

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