From 6408b6c0287aa2ae722bb10742a25a10b8723018 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 29 Jun 2023 17:13:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8C=91=E6=88=98bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/controller/battle_controller.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index a2651514..9d7cd2cb 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -145,12 +145,12 @@ end -- 怪物攻击力加成 function BattleController:getMonsterAtkAddition() - return BattleConst.DEFAULT_FACTOR + return 0 end -- 怪物血量加成 function BattleController:getMonsterHpAddition() - return BattleConst.DEFAULT_FACTOR + return 0 end -- 需要额外加载的资源 @@ -177,7 +177,7 @@ end function BattleController:initDefUnits(callback) local config = self:getChapterConfig()[self.chapterId] 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() BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT) @@ -195,7 +195,7 @@ function BattleController:generateNextMonster() return self:enterNextWave() end local isBoss = self.defTeam:getIsBoss() - local unitEntity = DataManager.BattleData:addMonster(monsterId, true) + local unitEntity = DataManager.BattleData:addMonster(monsterId, true, self) local modelId = unitEntity:getModelId() BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) self.defTeam:removeAllUnits() @@ -2655,7 +2655,7 @@ function BattleController:findLinkLine(posId, posIdMap, hadSkill, mainElementTyp end function BattleController:generateMonsterById(monsterId, callback) - local unitEntity = DataManager.BattleData:addMonster(monsterId, true) + local unitEntity = DataManager.BattleData:addMonster(monsterId, true, self) local modelId = unitEntity:getModelId() BattleHelper:loadBattleHeroModel(modelId, self.battleUI:getBattleNode(), function(spineObject) self.defTeam:removeAllUnits()