主动结算

This commit is contained in:
xiekaidong 2023-09-04 17:14:35 +08:00
parent d8aa8cce2c
commit 11f982bd04
5 changed files with 34 additions and 15 deletions

View File

@ -512,6 +512,7 @@ local localization_global =
["ACT_BOSS_RUSH_DESC_32"] = "限时礼包,倾情回馈!",
["ACT_BOSS_RUSH_DESC_33"] = "阶段{0}解锁",
["NOT_POP_TODAY"] = "今日不在弹出",
["ACT_BOSS_RUSH_DESC_34"] = "退出将立即结算,算否退出",
}
return localization_global

View File

@ -70,6 +70,8 @@ function ActBossRushManager:rspFight(result)
end
end
ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.ACT_BOSS_RUSH, params, function()
UIManager:closeAllUI()
ModuleManager.MaincityManager:showMainCityUI()
ModuleManager.ActBossRushManager:showMainUI()
end)
end
@ -87,7 +89,7 @@ end
function ActBossRushManager:rspEndBattle(result)
if result.err_code == GConst.ERROR_STR.SUCCESS then
if result.reqData then
DataManager.ActBossRushData:addWaveCount(result.reqData.task_stat.pass_wave)
DataManager.ActBossRushData:addWaveCount(result.reqData.task_stat.pass_wave or 0)
end
ModuleManager.BattleManager:showBossRushBattleResultUI(GConst.BattleConst.BATTLE_TYPE.ACT_BOSS_RUSH, result.reqData and result.reqData.combatReport, result.reqData and result.reqData.task_stat)
end

View File

@ -60,8 +60,8 @@ function BattleBossRushResultUI:onLoadRootComplete()
local iconRound = uiMap["battle_boss_rush_result_ui.unit_node.icon_round"]
local txWave = uiMap["battle_boss_rush_result_ui.unit_node.desc_wave"]
local txRound = uiMap["battle_boss_rush_result_ui.unit_node.desc_round"]
txWave:setText(self.taskProgress[GConst.BattleConst.BATTLE_TASK_FIELD.PASS_WAVE] or GConst.EMPTY_STRING)
txRound:setText(self.taskProgress[GConst.BattleConst.BATTLE_TASK_FIELD.TOTAL_TURN] or GConst.EMPTY_STRING)
txWave:setText(self.taskProgress[GConst.BattleConst.BATTLE_TASK_FIELD.PASS_WAVE] or 0)
txRound:setText(self.taskProgress[GConst.BattleConst.BATTLE_TASK_FIELD.TOTAL_TURN] or 0)
GFunc.centerImgAndTx(iconWave, txWave, 10, -136)
GFunc.centerImgAndTx(iconRound, txRound, 10, 136)

View File

@ -28,8 +28,8 @@ end
function BattlePauseUI:ctor(params)
self.battleType = params.battleType
local battleController = ModuleManager.BattleManager.battleController
local map = battleController.battleData:getSelectSkillMap()
self.battleController = ModuleManager.BattleManager.battleController
local map = self.battleController.battleData:getSelectSkillMap()
self.skillList = {}
for skillId, info in pairs(map) do
local cfg = SKILL_ROGUE_CFG[skillId]
@ -54,6 +54,18 @@ end
function BattlePauseUI:_addListeners()
local uiMap = self.root:genAllChildren()
uiMap["battle_pause_ui.home_btn"]:addClickListener(function()
if self.battleType == GConst.BattleConst.BATTLE_TYPE.ACT_BOSS_RUSH then
local params = {
content = I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_34),
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL,
okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK),
cancelText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_CANCEL),
okFunc = function()
self.battleController:controllBattleEnd()
end,
}
GFunc.showMessageBox(params)
else
local params = {
content = I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_1),
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL,
@ -64,6 +76,7 @@ function BattlePauseUI:_addListeners()
end,
}
GFunc.showMessageBox(params)
end
end)
uiMap["battle_pause_ui.continue_btn"]:addClickListener(function()

View File

@ -1,6 +1,9 @@
local UnitResultReportCell = class("UnitResultReportCell", BaseCell)
function UnitResultReportCell:refresh(info, maxValue)
if maxValue <= 0 then
maxValue = 1
end
local uiMap = self:getUIMap()
local icon = ModuleManager.HeroManager:getHeroIcon(info.heroId)
if icon then