Exemple #1
0
        private Buff GetBuff(string buffName, ActorSkill skill = null)
        {
            if (buffs == null)
            {
                if (showErrors)
                {
                    LogError("Requested buff retrieval, but buff list is empty.", 1);
                }
                return(null);
            }

            return(buffs.FirstOrDefault(b => string.Compare(b.Name, buffName, StringComparison.OrdinalIgnoreCase) == 0 &&
                                        (skill == null || b.SkillIndex() == skill.SlotIdentifier())));
        }
Exemple #2
0
        private bool?HasBuff(string buffName, ActorSkill skill = null)
        {
            if (buffs == null)
            {
                if (showErrors)
                {
                    LogError("Requested buff check, but buff list is empty.", 1);
                }
                return(null);
            }

            return(buffs.Any(b => string.Compare(b.Name, buffName, StringComparison.OrdinalIgnoreCase) == 0 &&
                             (skill == null || b.SkillIndex() == skill.SlotIdentifier())));
        }