diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua b/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua index 06d30f39..4732ba80 100644 --- a/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua +++ b/lua/app/module/battle/controller/battle_controller_dungeon_gold.lua @@ -22,18 +22,21 @@ function BattleControllerDungeonGold:controllBattleEnd() local atkReport = {} local teamEntity = DataManager.BattleData:getAtkTeam() local members = teamEntity:getAllMembers() + local totalDamage = 0 for k, v in pairs(members) do local report = { heroId = v:getId(), dmg = v:getDamageCount(), } + totalDamage = totalDamage + v:getDamageCount() table.insert(atkReport, report) end self.combatReport.atkReport = atkReport if not self.victory then self.combatReport.wave = self.combatReport.wave - 1 end - -- ModuleManager.ChapterManager:endFight(self.chapterId, self.combatReport, self.gotMysteryBoxIndexs, self.taskProgress) + local remainingHp = self.defTeam:getMainUnit().unitEntity:getHp() + ModuleManager.DungeonManager:reqEndChallengeGold(self.chapterId, self.combatReport, self.taskProgress, totalDamage, remainingHp) end function BattleControllerDungeonGold:postWaveOver(atkDead, isQuit) diff --git a/lua/app/module/battle/controller/battle_controller_dungeon_shards.lua.meta b/lua/app/module/battle/controller/battle_controller_dungeon_shards.lua.meta new file mode 100644 index 00000000..c77a89f0 --- /dev/null +++ b/lua/app/module/battle/controller/battle_controller_dungeon_shards.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f7a7f047a4373bb409eb65b4af05fa01 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/dungeon/dungeon_manager.lua b/lua/app/module/dungeon/dungeon_manager.lua index 7230a2d3..7d625dcd 100644 --- a/lua/app/module/dungeon/dungeon_manager.lua +++ b/lua/app/module/dungeon/dungeon_manager.lua @@ -66,14 +66,14 @@ function DungeonManager:respChallengeGold(result) end -- 请求结算金币副本 -function DungeonManager:reqEndChallengeGold() +function DungeonManager:reqEndChallengeGold(id, combatReport, taskProgress, totalDamage, remainingHp) local parmas = { - win = true, - total_damage = nil, - remaining_hp = nil, - chapter_gold_id = nil, - task_stat = nil, - combatReport = nil, + win = combatReport.victory, + total_damage = totalDamage, + remaining_hp = remainingHp, + chapter_gold_id = id, + task_stat = taskProgress, + combatReport = combatReport, } self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterGoldChallengeSettlementReq, parmas, {}, self.respEndChallengeGold, BIReport.ITEM_GET_TYPE.DUNGEON_GOLD_END) end