From 79bad73dfe6dabff3781b87cb4d6354e445148af Mon Sep 17 00:00:00 2001 From: chenxi Date: Fri, 21 Apr 2023 10:55:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=93=E8=B5=A2=E5=90=8E=E5=8E=BB?= =?UTF-8?q?=E4=B8=8B=E4=B8=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/chapter/chapter_manager.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/app/module/chapter/chapter_manager.lua b/lua/app/module/chapter/chapter_manager.lua index cbc0decd..08dbf08a 100644 --- a/lua/app/module/chapter/chapter_manager.lua +++ b/lua/app/module/chapter/chapter_manager.lua @@ -53,6 +53,9 @@ function ChapterManager:endFight(id, combatReport) GFunc.addRewards(result.rewards, BIReport.ITEM_GET_TYPE.FIGHT_END) ModuleManager.BattleManager:showBattleResultUI(result.rewards, combatReport) DataManager.ChapterData:init(result.chapterData, true) + if combatReport.victory and DataManager.ChapterData:getChapterId() == DataManager.ChapterData:getMaxChapterId() then + DataManager.ChapterData:goNextChapter() + end DataManager.ChapterData:setDirty() end end) From 3abfa8ce27a40138df545794e20d7cfbadac8936 Mon Sep 17 00:00:00 2001 From: chenxi Date: Fri, 21 Apr 2023 10:56:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=93=E8=B5=A2=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E5=85=B3=E5=8D=A1=E5=8E=BB=E4=B8=8B=E4=B8=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/chapter/chapter_manager.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/app/module/chapter/chapter_manager.lua b/lua/app/module/chapter/chapter_manager.lua index 08dbf08a..048cbbc1 100644 --- a/lua/app/module/chapter/chapter_manager.lua +++ b/lua/app/module/chapter/chapter_manager.lua @@ -50,12 +50,12 @@ function ChapterManager:endFight(id, combatReport) } ServerDataManager:dataOperate(GConst.ServerDataConst.DATA_OP_BEHAVIOR.END_FIGHT, parmas, function(result) if result.status == 0 then + if combatReport.victory and DataManager.ChapterData:getChapterId() == DataManager.ChapterData:getMaxChapterId() + 1 then + DataManager.ChapterData:goNextChapter() + end GFunc.addRewards(result.rewards, BIReport.ITEM_GET_TYPE.FIGHT_END) ModuleManager.BattleManager:showBattleResultUI(result.rewards, combatReport) DataManager.ChapterData:init(result.chapterData, true) - if combatReport.victory and DataManager.ChapterData:getChapterId() == DataManager.ChapterData:getMaxChapterId() then - DataManager.ChapterData:goNextChapter() - end DataManager.ChapterData:setDirty() end end)