diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua index bc67a3a650..8d24f51db1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua @@ -77,7 +77,7 @@ function SkillCaster:OnSkillCast(skill) -- elseif self.owner.SkillAttackDisplaceoffset then -- displaceoffset=self.owner.SkillAttackDisplaceoffset -- end - if skill.AttackDisplaceOffset and tonumber(skill.AttackDisplaceOffset)~nil then + if skill.AttackDisplaceOffset and tonumber(skill.AttackDisplaceOffset) ~= nil then displaceoffset=skill.AttackDisplaceOffset end self.owner.GameObject:SetActive(false) @@ -98,13 +98,13 @@ function SkillCaster:OnSkillCast(skill) -- 播放 -- 这里相当于技能前摇,等待立绘播放到需要释放关键帧的时间时继续释放技能(人物前摇特效) if combat.AttackDisplacement ==1 then - local displaceoffset={[1]={[1]=0.4,[2]=-0.2}} + local displaceoffset={[1]=0.4,[2]=-0.2} -- if skill.type==2 and self.owner.superSkillAttackDisplaceoffset then -- displaceoffset=self.owner.superSkillAttackDisplaceoffset -- elseif self.owner.SkillAttackDisplaceoffset then -- displaceoffset=self.owner.SkillAttackDisplaceoffset -- end - if skill.AttackDisplaceOffset then + if skill.AttackDisplaceOffset and tonumber(skill.AttackDisplaceOffset) ~= nil then displaceoffset=skill.AttackDisplaceOffset end self.owner.GameObject:SetActive(false)