fix bug
This commit is contained in:
parent
59fe749817
commit
317802ca5f
@ -1493,10 +1493,11 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx)
|
||||
end
|
||||
end
|
||||
|
||||
if isFinalBlock and targetIsSelf then -- 死亡判定
|
||||
local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side)
|
||||
otherSideTarget:checkDeadStatus(target)
|
||||
end
|
||||
-- 有伤害才判断敌人是否死亡,防止给自己上buff导致对面先倒
|
||||
-- if isFinalBlock and targetIsSelf then -- 死亡判定
|
||||
-- local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side)
|
||||
-- otherSideTarget:checkDeadStatus(target)
|
||||
-- end
|
||||
|
||||
if succ then
|
||||
if skill:getIsHurtType() then
|
||||
@ -1505,8 +1506,18 @@ function BattleUnitComp:onSkillTakeEffect(skill, isFinalBlock, validEffectIdx)
|
||||
if isFinalBlock then
|
||||
if skill:getIsNormalType() then -- 普攻攻击成功的话
|
||||
self:checkPassiveEvent(PASSIVE_EVENT.USE_NORMAL_SKILL, target)
|
||||
-- 有伤害才判断敌人是否死亡,防止给自己上buff导致对面先倒
|
||||
if isFinalBlock and targetIsSelf then -- 死亡判定
|
||||
local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side)
|
||||
otherSideTarget:checkDeadStatus(target)
|
||||
end
|
||||
elseif skill:getIsActiveType() then
|
||||
self:checkPassiveEvent(PASSIVE_EVENT.ACTIVE_SKILL_HIT, target)
|
||||
-- 有伤害才判断敌人是否死亡,防止给自己上buff导致对面先倒
|
||||
if isFinalBlock and targetIsSelf then -- 死亡判定
|
||||
local otherSideTarget = self.battleController:getOtherSideMainUnit(self.side)
|
||||
otherSideTarget:checkDeadStatus(target)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -312,7 +312,7 @@ function HeroComp:onClickHero(cell, heroId)
|
||||
local targetPos = cell:getBaseObject():getTransform().position
|
||||
local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos)
|
||||
targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.content:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent())
|
||||
self.largeHeroCell:getBaseObject():setAnchoredPosition(targetPos.x, targetPos.y + 116)
|
||||
self.largeHeroCell:getBaseObject():setAnchoredPosition(targetPos.x, targetPos.y + 115)
|
||||
self.largeHeroCell:getBaseObject():getTransform():SetAsLastSibling()
|
||||
self.largeHeroCell:refresh(entity, not entity:isActived(), self.onClickUseFunc, self.battleType)
|
||||
self.largeHeroCell:showCheck(self.curFormation[entity:getMatchType()] == heroId)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user