每日挑战bug修复

This commit is contained in:
xiekaidong 2023-06-29 17:13:25 +08:00
parent 16c0fe7182
commit 6408b6c028

View File

@ -145,12 +145,12 @@ end
-- 怪物攻击力加成 -- 怪物攻击力加成
function BattleController:getMonsterAtkAddition() function BattleController:getMonsterAtkAddition()
return BattleConst.DEFAULT_FACTOR return 0
end end
-- 怪物血量加成 -- 怪物血量加成
function BattleController:getMonsterHpAddition() function BattleController:getMonsterHpAddition()
return BattleConst.DEFAULT_FACTOR return 0
end end
-- 需要额外加载的资源 -- 需要额外加载的资源
@ -177,7 +177,7 @@ end
function BattleController:initDefUnits(callback) function BattleController:initDefUnits(callback)
local config = self:getChapterConfig()[self.chapterId] local config = self:getChapterConfig()[self.chapterId]
self.battleUI:loadBg(config.scene) self.battleUI:loadBg(config.scene)
local unitEntity = DataManager.BattleData:addMonster(config.monster[1]) local unitEntity = DataManager.BattleData:addMonster(config.monster[1], nil, self)
local modelId = unitEntity:getModelId() local modelId = unitEntity:getModelId()
BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject)
local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT) local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT)
@ -195,7 +195,7 @@ function BattleController:generateNextMonster()
return self:enterNextWave() return self:enterNextWave()
end end
local isBoss = self.defTeam:getIsBoss() local isBoss = self.defTeam:getIsBoss()
local unitEntity = DataManager.BattleData:addMonster(monsterId, true) local unitEntity = DataManager.BattleData:addMonster(monsterId, true, self)
local modelId = unitEntity:getModelId() local modelId = unitEntity:getModelId()
BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject)
self.defTeam:removeAllUnits() self.defTeam:removeAllUnits()
@ -2655,7 +2655,7 @@ function BattleController:findLinkLine(posId, posIdMap, hadSkill, mainElementTyp
end end
function BattleController:generateMonsterById(monsterId, callback) function BattleController:generateMonsterById(monsterId, callback)
local unitEntity = DataManager.BattleData:addMonster(monsterId, true) local unitEntity = DataManager.BattleData:addMonster(monsterId, true, self)
local modelId = unitEntity:getModelId() local modelId = unitEntity:getModelId()
BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject)
self.defTeam:removeAllUnits() self.defTeam:removeAllUnits()