yyl
2 天以前 ffd55c202987fb7122e6ce19b5e6f738e33fdf01
Main/System/Battle/Skill/SkillBase.cs
@@ -51,11 +51,38 @@
        tagUseSkillAttack = vNetData;
        battleField = _battleField;
        packList = _packList;
        SafetyCheck();
    }
    private void SafetyCheck()
    {
        bool safety = caster != null
                        && skillConfig != null
                        && tagUseSkillAttack != null
                        && battleField != null
                        && caster.IsDead() == false;
        if (!safety)
        {
            Debug.LogError("SkillBase SafetyCheck failed! Caster or SkillConfig or TagUseSkillAttack or BattleField is null, or Caster is dead.");
            ForceFinished();
        }
    }
    // 技能运行主逻辑:处理技能效果和其他技能动作
    public virtual void Run()
    {
        //  施法者在放技能的时候死亡的容错
        if (caster != null && caster.IsDead())
        {
            ForceFinished();
            return;
        }
        if (skillEffect != null)
        {
            if (skillEffect.IsFinished())