Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }