【战斗】========技能释放逻辑修改,技能播放技能攻击动作

dev_chengFeng
wangzhenxing 2021-12-24 16:11:53 +08:00
parent b07d5548e6
commit d3253c5edb
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ function SkillCaster:ctor(unit, actionTime, soundTime, soundName, castingEfectNo
self.castingEfectNode = castingEfectNode -- cast特效资源
self.castingNameNode = castingNameNode -- cast名称资源
self.effectRoot = self.owner.RootPanel.skillEffectRoot
self.roleConfig=ConfigManager.GetConfigData(ConfigName.RoleConfig,unit.roleId)
self.roleConfig=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,unit.roleId)
--
self.owner.role.Event:AddEvent(BattleEventName.SkillCast, self.OnSkillCast, self)
end
@ -52,7 +52,7 @@ function SkillCaster:OnSkillCast(skill)
return
end
local type=0
if self.roleConfig.ReadyAction and self.roleConfig.ReadyAction>0 then
if self.roleConfig and self.roleConfig.ReadyAction and self.roleConfig.ReadyAction>0 and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill)then
type=1
self.actionTime=self.roleConfig.ReadyAction/1000
end
@ -142,7 +142,7 @@ function SkillCaster:PlaySkillCastingEffect(combat, skill, func)
end
-- 调用上层接口
local type=0
if self.roleConfig.ReadyAction and self.roleConfig.ReadyAction>0 then
if self.roleConfig and self.roleConfig.ReadyAction and self.roleConfig.ReadyAction>0 and (skill.type==BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill) then
type=1
end
local _ExtraTime