Handler.lua 8.1 KB

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