Handler.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. local DrillLogic = require("drill.DrillLogic")
  2. local DrillLogicAttribute = require("drill.DrillLogicAttribute")
  3. function CG_DRILL_QUERY(human)
  4. DrillLogic.queryDrillId(human)
  5. end
  6. -- 选着难度
  7. function CG_DRILL_DIFF_CHOSE(human, msg)
  8. DrillLogic.choseDiff(human, msg.diff)
  9. end
  10. function CG_DRILL_BOX_GET(human, msg)
  11. DrillLogic.drillBoxGet(human, msg.index)
  12. end
  13. -- 下一关卡
  14. function CG_DRILL_INFO(human, msg)
  15. DrillLogic.query(human, msg.drillId)
  16. end
  17. -- 查询英雄状态
  18. function CG_DRILL_HERO(human)
  19. DrillLogic.sendHeroList(human)
  20. end
  21. -- 操作血量
  22. function CG_DRILL_OPER_HP(human, msg)
  23. DrillLogicAttribute.operHp(human, msg.operType, msg.heroIndex)
  24. end
  25. --
  26. function CG_DRILL_REWARD_PREVIEW(human)
  27. DrillLogic.rewardPreview(human)
  28. end
  29. function CG_DRILL_FRIEND_HELP_QUERY(human)
  30. DrillLogic.helpHeroFriendQuery(human)
  31. end
  32. function CG_DRILL_FRIEND_CHOSE(human, msg)
  33. if msg.type == 1 then
  34. DrillLogic.dispatchMyHelpHero(human, msg.index)
  35. else
  36. DrillLogic.choseHelpFriendHero(human, msg.uuid)
  37. end
  38. end
  39. function CG_DRILL_FUHUO_QUERY(human, msg)
  40. DrillLogic.fuhuoQuery(human)
  41. end
  42. function CG_DRILL_SET_HELP_COMBATPOS(human, msg)
  43. DrillLogic.setHelpCombatPos(human, msg.uuid, msg.pos)
  44. end
  45. function CG_DRILL_FIGHT_BY_DIAMON(human, msg)
  46. DrillLogic.ChallengeLevelByDiamond(human, msg.levelID)
  47. end