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()