Пример #1
0
        public IEnumerable <Tera.Game.Skill> SkillsIdBySource(UserEntity source, Entity target, bool timed)
        {
            IEnumerable <Tera.Game.Skill> result;


            if (!SourceTargetSkill.ContainsKey(source))
            {
                return(new List <Tera.Game.Skill>());
            }
            if (timed || target == null)
            {
                result = from skills in SourceTargetSkill[source].Values
                         from skill in skills
                         select SkillResult.GetSkill(source, skill.Pet, skill.SkillId, skill.HotDot, PacketProcessor.Instance.EntityTracker,
                                                     BasicTeraData.Instance.SkillDatabase, BasicTeraData.Instance.HotDotDatabase, BasicTeraData.Instance.PetSkillDatabase);

                return(result.Distinct());
            }

            if (!SourceTargetSkill[source].ContainsKey(target))
            {
                return(new List <Tera.Game.Skill>());
            }
            result = from skills in SourceTargetSkill[source][target]
                     select SkillResult.GetSkill(source, skills.Pet, skills.SkillId, skills.HotDot, PacketProcessor.Instance.EntityTracker,
                                                 BasicTeraData.Instance.SkillDatabase, BasicTeraData.Instance.HotDotDatabase, BasicTeraData.Instance.PetSkillDatabase);

            return(result.Distinct());
        }
Пример #2
0
        public List <Skill> GetSkillsDealt(Entity source, Entity target, bool timed)
        {
            IEnumerable <Skill> result;

            if (!SourceTargetSkill.ContainsKey(source))
            {
                return(new List <Skill>());
            }
            if (timed || target == null)
            {
                result = from skills in SourceTargetSkill[source].Values from skill in skills select skill;
                return(result.ToList());
            }

            if (!SourceTargetSkill[source].ContainsKey(target))
            {
                return(new List <Skill>());
            }
            result = from skills in SourceTargetSkill[source][target] select skills;
            return(result.ToList());
        }