只有主线关卡战斗结算显示金猪
This commit is contained in:
parent
09fb4c1fb7
commit
b609f796ba
@ -15,8 +15,8 @@ function BattleManager:showPauseUI(battleType)
|
|||||||
UIManager:showUI("app/ui/battle/battle_pause_ui", {battleType = battleType})
|
UIManager:showUI("app/ui/battle/battle_pause_ui", {battleType = battleType})
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleManager:showBattleResultUI(rewards, combatReport, mysteryBoxIdx)
|
function BattleManager:showBattleResultUI(battleType, rewards, combatReport, mysteryBoxIdx)
|
||||||
UIManager:showUI("app/ui/battle/battle_result_ui", {rewards = rewards, combatReport = combatReport, mysteryBoxIdx = mysteryBoxIdx})
|
UIManager:showUI("app/ui/battle/battle_result_ui", {battleType = battleType, rewards = rewards, combatReport = combatReport, mysteryBoxIdx = mysteryBoxIdx})
|
||||||
end
|
end
|
||||||
|
|
||||||
function BattleManager:showBoxOpenUI(rewards, callback)
|
function BattleManager:showBoxOpenUI(rewards, callback)
|
||||||
|
|||||||
@ -100,7 +100,7 @@ function ChapterManager:endFightFinish(result)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ModuleManager.BattleManager:showBattleResultUI(newRewards, reqData.combatReport, mysteryBoxIdx)
|
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.STAGE, newRewards, reqData.combatReport, mysteryBoxIdx)
|
||||||
DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx)
|
DataManager.ChapterData:fightChapter(reqData.chapter_id, result.max_chapter_id, result.max_wave, reqData.mystery_box_idx)
|
||||||
-- 处理金猪,要在章节更新之后
|
-- 处理金猪,要在章节更新之后
|
||||||
DataManager.GoldPigData:addGoldPigCount()
|
DataManager.GoldPigData:addGoldPigCount()
|
||||||
|
|||||||
@ -99,7 +99,7 @@ function DailyChallengeManager:endChallengeFinish(result)
|
|||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
local reqData = result.reqData
|
local reqData = result.reqData
|
||||||
local rewards = result.rewards
|
local rewards = result.rewards
|
||||||
ModuleManager.BattleManager:showBattleResultUI(rewards, reqData.combatReport)
|
ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE, rewards, reqData.combatReport)
|
||||||
DataManager.DailyChallengeData:init(result.daily_challenge)
|
DataManager.DailyChallengeData:init(result.daily_challenge)
|
||||||
|
|
||||||
ModuleManager.TaskManager:addFightTaskProgress(reqData)
|
ModuleManager.TaskManager:addFightTaskProgress(reqData)
|
||||||
|
|||||||
@ -10,6 +10,7 @@ function BattleResultUI:ctor(params)
|
|||||||
self.rewards = params.rewards
|
self.rewards = params.rewards
|
||||||
self.combatReport = params.combatReport
|
self.combatReport = params.combatReport
|
||||||
self.mysteryBoxIdx = params.mysteryBoxIdx or 0
|
self.mysteryBoxIdx = params.mysteryBoxIdx or 0
|
||||||
|
self.battleType = params.battleType
|
||||||
self.isTryShowGoldPig = false
|
self.isTryShowGoldPig = false
|
||||||
self.totalDmg = 0
|
self.totalDmg = 0
|
||||||
if self.combatReport.atkReport then
|
if self.combatReport.atkReport then
|
||||||
@ -182,6 +183,9 @@ end
|
|||||||
|
|
||||||
function BattleResultUI:tryShowGoldPig()
|
function BattleResultUI:tryShowGoldPig()
|
||||||
self.isTryShowGoldPig = true
|
self.isTryShowGoldPig = true
|
||||||
|
if self.battleType ~= GConst.BattleConst.BATTLE_TYPE.STAGE then
|
||||||
|
return false
|
||||||
|
end
|
||||||
if not DataManager.GoldPigData:getIsOpen() then
|
if not DataManager.GoldPigData:getIsOpen() then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user