Ejemplo n.º 1
0
        private void AddCleanse(Status spell)
        {
            if (spell == null)
            {
                return;
            }

            if (GuiCleansesList.Any(r => r.SpellId == spell.Id))
            {
                return;
            }

            Logger.KefkaLog(@"Adding {0} to the Cleanse List.", spell.Name);

            var newSpell = new Cleanse
            {
                SpellName        = spell.Name,
                SpellId          = spell.Id,
                Leeches          = false,
                Esuna            = false,
                ExaltedDetriment = false,
            };

            GuiCleansesList.Add(newSpell);
            Save();
        }
Ejemplo n.º 2
0
        private void RemoveCleanse(Cleanse spell)
        {
            if (spell == null)
            {
                return;
            }

            Logger.KefkaLog(@"Removing {0} from the Cleanse List.", spell.SpellName);

            if (GuiCleansesList.All(r => r.SpellId != spell.SpellId))
            {
                return;
            }

            var cleanse = GuiCleansesList.FirstOrDefault(r => r.SpellId == spell.SpellId);

            GuiCleansesList.Remove(cleanse);
            Save();
        }