コード例 #1
0
ファイル: AutoBuff.cs プロジェクト: Orden4/WCSharp
        /// <inheritdoc/>
        public sealed override void Dispose()
        {
            OnDispose();

            if (Effect != null)
            {
                DestroyEffect(Effect);
            }

            BuffSystem.Remove(this);
        }
コード例 #2
0
        /// <inheritdoc/>
        public sealed override void Dispose()
        {
            OnDispose();

            if (Effect != null)
            {
                DestroyEffect(Effect);
            }

            BuffSystem.Remove(this);

            if (this.auraId > 0)
            {
                if (BuffSystem.GetBuffsOnUnit(Target).OfType <BoundBuff>().All(x => x.auraId != this.auraId))
                {
                    UnitRemoveAbility(Target, this.auraId);
                    UnitRemoveAbility(Target, this.buffId);
                }
            }
            else if (BuffSystem.GetBuffsOnUnit(Target).OfType <BoundBuff>().All(x => x.buffId != this.buffId))
            {
                UnitRemoveAbility(Target, this.buffId);
            }
        }