private void RemoveTankBuster(TankBuster spell) { if (spell == null) { return; } Logger.KefkaLog(@"Removing {0} from the Tankbuster List.", spell.SpellName); if (GuiTankBustersList.All(r => r.SpellId != spell.SpellId)) { return; } var tankBuster = GuiTankBustersList.FirstOrDefault(r => r.SpellId == spell.SpellId); GuiTankBustersList.Remove(tankBuster); Save(); }
private void AddTankBuster(Action spell) { if (spell == null) { return; } if (GuiTankBustersList.Any(r => r.SpellId == spell.Id)) { return; } Logger.KefkaLog(@"Adding {0} to the Tankbuster List.", spell.Name); var newSpell = new TankBuster { SpellName = spell.Name, SpellId = spell.Id, Convalescence = false, Awareness = false, DivineVeil = false, Sheltron = false, HallowedGround = false, Sentinel = false, Foresight = false, Bulwark = false, Rampart = false, ThrillofBattle = false, Holmgang = false, Vengeance = false, Equilibrium = false, RawIntuition = false, Anticipation = false, ShadowWall = false, DarkMind = false, BlackestNight = false, LivingDead = false, Palisade = false }; GuiTankBustersList.Add(newSpell); Save(); }
private void TransferSpellToTankbusters(SpellInfo spell) { if (spell == null) { return; } if (TankBustersViewModel.Instance.GuiTankBustersList.Any(r => r.SpellId == spell.SpellId)) { return; } Logger.KefkaLog(@"Adding {0} to the Tankbuster List.", spell.SpellName); var newSpell = new TankBuster { SpellName = spell.SpellName, SpellId = spell.SpellId, Convalescence = false, Awareness = false, DivineVeil = false, Sheltron = false, HallowedGround = false, Sentinel = false, Foresight = false, Bulwark = false, Rampart = false, ThrillofBattle = false, Holmgang = false, Vengeance = false, Equilibrium = false, ShadowWall = false, DarkMind = false, LivingDead = false }; TankBustersViewModel.Instance.GuiTankBustersList.Add(newSpell); TankBustersViewModel.Instance.Save(); }