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

View File

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