Handler.lua 11 KB

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