金币副本
This commit is contained in:
parent
f07822161f
commit
87fe40ed94
@ -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)
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7a7f047a4373bb409eb65b4af05fa01
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user