private void AddHealBuster(Action spell) { if (spell == null) { return; } if (GuiHealBustersList.Any(r => r.SpellId == spell.Id)) { return; } Logger.KefkaLog(@"Adding {0} to the Healbuster List.", spell.Name); var newSpell = new HealBuster { SpellName = spell.Name, SpellId = spell.Id, Medica = false, MedicaII = false, Benediction = false, Tetragrammaton = false, DivineBenison = false, PlenaryIndulgence = false, CureII = false, Asylum = false, Adloquium = false, Excogitation = false, Aetherpact = false, Succor = false, SacredSoil = false, Lustrate = false, Rouse = false, BeneficII = false, AspectedBenefic = false, EssentialDignity = false, AspectedHelios = false, CollectiveUnconscious = false }; GuiHealBustersList.Add(newSpell); Save(); }
private void RemoveHealBuster(HealBuster spell) { if (spell == null) { return; } Logger.KefkaLog(@"Removing {0} from the Healbuster List.", spell.SpellName); if (GuiHealBustersList.All(r => r.SpellId != spell.SpellId)) { return; } var HealBuster = GuiHealBustersList.FirstOrDefault(r => r.SpellId == spell.SpellId); GuiHealBustersList.Remove(HealBuster); Save(); }