Handler.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. local BattleLogic = require("battle.BattleLogic")
  2. local BreakThroughTheme = require("battle.BreakThroughTheme")
  3. local BattleGift = require("battle.BattleGift")
  4. function CG_BATTLE_QUERY(human)
  5. --print("[CG_BATTLE_QUERY] 战役主界面查询开始")
  6. BattleLogic.query(human)
  7. --print("[CG_BATTLE_QUERY] 战役主界面查询结束")
  8. end
  9. function CG_BATTLE_HANG_GET(human)
  10. BattleLogic.hangGet(human)
  11. end
  12. function CG_BATTLE_NODE_SET(human, msg)
  13. BattleLogic.nodeSet(human, msg.battleID)
  14. end
  15. function CG_BATTLE_NODE_DETAIL_QUERY(human, msg)
  16. BattleLogic.nodeDetailQuery(human, msg.battleID)
  17. end
  18. function CG_BATTLE_HANG_FIGHT(human,msg)
  19. BattleLogic.hangFightQuery(human, msg.mapID)
  20. end
  21. function CG_BATTLE_MOPUP_QUERY(human)
  22. BattleLogic.mopupQuery(human)
  23. end
  24. function CG_BATTLE_MOPUP_FIGHT(human)
  25. BattleLogic.mopupFight(human)
  26. end
  27. function CG_BATTLE_TONGGUAN_REWARD_GET(human,msg)
  28. BattleLogic.getTongGuanReward(human,msg.index)
  29. end
  30. function CG_BATTLE_SHARK_QUERY(human,msg)
  31. BattleLogic.battleSharkQuery(human,msg.battleID)
  32. end
  33. function CG_BATTLE_WORLD_MAP_ROLELIST_QUERY(human,msg)
  34. BattleLogic.worldMapRoleListQuery(human,msg.worldMapId)
  35. end
  36. function CG_BATTLE_HANG_QUERY(human)
  37. BattleLogic.onHookQuery(human)
  38. end
  39. function CG_BATTLE_NODE_QUERY(human,msg)
  40. BattleLogic.battleNodeQuery(human,msg.mapID)
  41. end
  42. function CG_BATTLE_WORLD_MAP_QUERY(human)
  43. BattleLogic.battleWorldMapQuery(human)
  44. end
  45. function CG_BATTLE_MAP_DROPITEMS_LIST(human)
  46. BattleLogic.sendMapDroItemsList(human)
  47. end
  48. function CG_BATTLE_MAP_DROPITEMS_DETAIL(human, msg)
  49. BattleLogic.sendMapDroItemsDetail(human, msg.mapID)
  50. end
  51. function CG_BATTLE_CHAPTER_REWARD(human, msg)
  52. BattleLogic.battleChapterReward(human, msg.mapID)
  53. end
  54. function CG_ELITE_SELECT(human,msg)
  55. --print("1:CG_ELITE_SELECT")
  56. BattleLogic.CG_ELITE_SELECT(human,msg.index)
  57. --print("2:CG_ELITE_SELECT")
  58. end
  59. function CG_ELITE_OPEN(human)
  60. --print("[CG_ELITE_OPEN] 开始查询当前难度")
  61. BattleLogic.CG_ELITE_OPEN(human)
  62. --print("2:CG_ELITE_OPEN")
  63. end
  64. function CG_BATTLE_QUERY_ALL(human,msg)
  65. -- print("1:CG_BATTLE_QUERY_ALL")
  66. BattleLogic.CG_BATTLE_QUERY_ALL(human,msg.index,msg.curIndex)
  67. --print("2:CG_BATTLE_QUERY_ALL")
  68. end
  69. function CG_BATTLE_TONGGUAN_REWARD_GET_COPY(human,msg)
  70. BattleLogic.CG_BATTLE_TONGGUAN_REWARD_GET_COPY(human,msg.index)
  71. end
  72. --获得小游戏奖励
  73. function CG_BATTLE_GETGAMEREWARD(human,msg)
  74. BattleLogic.GetGameReward(human,msg.indexStr)
  75. end
  76. ---------------------------------------------------肉鸽玩法---------------------------------------------------
  77. function CG_ISNEEDSELECTATTR(human,msg)
  78. BattleLogic.QueryDiffBattleUnSelectAttr(human)
  79. end
  80. function CG_GETCHOOSEATTR_INFO(human,msg)
  81. BattleLogic.GetNowBattleModeUnSelectAttr(human)
  82. end
  83. function CG_GETALLATTR_INFO(human,msg)
  84. BattleLogic.GetNowBattleModeAllAttr(human)
  85. end
  86. function CG_CHOOSE_ATTR(human,msg)
  87. BattleLogic.ChooseAttr(human, msg.idx)
  88. end
  89. function CG_REFRESH_ATTR(human,msg)
  90. BattleLogic.RefreshAttr(human, msg.type, msg.id)
  91. end
  92. ------------------------------------------多队伍战斗------------------------------------------
  93. function CG_BATTLE_TEAM_COUNT(human,msg)
  94. BattleLogic.QueryLevelTeamCnt(human)
  95. end
  96. ------------------------------闯关主题-----------------------------------------------------
  97. function CG_BREATHROUGHTHEME_LINEUP_QUERY(human,msg)
  98. BreakThroughTheme.BreakThrough_Lineup_Query(human)
  99. end
  100. function CG_BREATHROUGHTHEME_BREAKTHROUGHREWARD_QUERY(human,msg)
  101. BreakThroughTheme.BreakThrough_BreakThroughReward_Query(human)
  102. end
  103. function CG_BREATHROUGHTHEME_ADVANCEDREWARD_QUERY(human,msg)
  104. BreakThroughTheme.BreakThrough_AdvancedReward_Query(human)
  105. end
  106. function CG_BREATHROUGHTHEME_GET_REWARD(human,msg)
  107. BreakThroughTheme.BreakThrough_GetReward(human, msg.rewardType)
  108. end
  109. function CG_BREATHROUGHTHEME_SHOW_TIPS(human,msg)
  110. BreakThroughTheme.BreakThrough_UpdateShowTipsState(human, msg.rewardType)
  111. end
  112. ------------------------------闯关礼金-----------------------------------------------------
  113. function CG_BATTLEGIFT_QUERY(human,msg)
  114. BattleGift.BattleGift_Query(human)
  115. end
  116. function CG_BATTLEGIFT_GET(human,msg)
  117. BattleGift.BattleGift_Get(human)
  118. end