示例#1
0
        protected virtual void OnSkillRemoved(SkillEventArgs args)
        {
            if (!args.AbilitySkill.IsTemporary)
            {
                this.skills.Remove(args.AbilitySkill.SkillHandle);
            }

            if (args.AbilitySkill.ModifierGenerator != null &&
                args.AbilitySkill.ModifierGenerator.Workers.Any(
                    x => x.AffectsAllies || x.AffectsEnemies || x.AffectsEveryone))
            {
                this.modifierGenerators.Remove(args.AbilitySkill.SkillHandle);
            }

            this.SkillRemoved?.Invoke(args);
        }