Handler.lua 7.4 KB

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