bug修复

This commit is contained in:
xiekaidong 2023-05-26 20:03:33 +08:00
parent 2a9933eba3
commit 2430e09f7e
2 changed files with 11 additions and 6 deletions

View File

@ -288,10 +288,7 @@ function BattleUnitComp:getKeyFrameTime(skill, blockIndex, animationName)
time = self:getAnimationKeyFrameTime(animationName, blockIndex)
end
end
-- Logger.logHighlight(animationName .. " blockIndex " .. blockIndex)
-- Logger.printTable(blockList)
-- Logger.printTable(self.validEffectIdx)
return time
end
@ -962,9 +959,9 @@ function BattleUnitComp:updateSkillAttack(dt)
end
return
else
self:checkPassiveEvent(PASSIVE_EVENT.ON_ACTIVE_SKILL_BEFORE, self)
self.currActiveSkill:startUse()
self:doNextSkillAttack()
self:checkPassiveEvent(PASSIVE_EVENT.ON_ACTIVE_SKILL_BEFORE, self)
end
else -- 继续普攻
self:doNextNormalAttack()
@ -1593,8 +1590,8 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d
if self.unitEntity:getIsDead() then
self:changeState(UNIT_STATE.DEAD)
if damageOrCureType == BattleConst.BUFF_NAME.BURN then
local target = self.battleController:getOtherSideMainUnit(self.side)
target:checkPassiveEvent(BattleConst.PASSIVE_EVENT.ON_DEAD_BY_BURN, target)
local team = self.battleController:getOtherSideTeam(self.side)
team:checkPassiveEvent(BattleConst.PASSIVE_EVENT.ON_DEAD_BY_BURN)
end
elseif damage < 0 then
self:playHurt()

View File

@ -365,6 +365,14 @@ function BattleController:getOtherSideMainUnit(side)
end
end
function BattleController:getOtherSideTeam(side)
if side == BattleConst.SIDE_ATK then
return self.defTeam
else
return self.atkTeam
end
end
function BattleController:onLoadComplete()
self:battleStart()
end