每日挑战bug修复

This commit is contained in:
xiekaidong 2023-05-31 21:13:35 +08:00
parent 3259281fe8
commit ebb4a77f18
3 changed files with 3 additions and 1 deletions

View File

@ -119,6 +119,7 @@ function BattleController:onDefDead(callback)
if callback then
callback()
end
self:handleBuffs(BattleConst.SIDE_DEF)
end)
else
if callback then

View File

@ -60,6 +60,7 @@ function BattleControllerStage:_stageGenerateNextMonster()
local monsterComp = spineObject:addLuaComponent(GConst.BattleConst.TYPEOF_LUA_COMP.BATTLE_MONSTER_COMPONENT)
monsterComp:initWithEntity(modelId, unitEntity, self)
self.defTeam:addUnit(monsterComp, true)
self:handleBuffs(GConst.BattleConst.SIDE_DEF)
self.battleUI:refreshDefHp(unitEntity:getHp(), unitEntity:getHpPercent())
local bornTime = monsterComp:getAnimationDuration(GConst.BattleConst.SPINE_ANIMATION_NAME.BORN)
if isBoss then -- 如果是boss就跑过去

View File

@ -293,7 +293,7 @@ function BattleTeam:removeAllBuff()
local count = #self.buffList
for i = count, 1, -1 do
buffEffect = self.buffList[i]
if buffEffect and not buffEffect.buff:isCantRemove() then
if buffEffect then
self:updateBuffState(buffEffect.buff, -1)
table.remove(self.buffList, i)
BattleBuffHandle.removeBuff(self.mainUnit, buffEffect)