Ejemplo n.º 1
0
        public static void Initialize(Menu menu)
        {
            var enemies = HeroManager.Enemies;

            if (enemies.Any(o => o.ChampionName.Equals("Kalista")))
            {
                menu.AddBool("Oathsworn", "Block Oathsworn Knockup (Kalista R)");
            }

            foreach (var unit in
                     enemies)
            {
                var obj = unit;
                foreach (var spell in BlockedSpell.GetBlockedSpells().Where(o => o.Name.Equals(obj.ChampionName)))
                {
                    var name     = unit.ChampionName.Equals("MonkeyKing") ? "Wukong" : unit.ChampionName;
                    var slot     = spell.Slot.Equals(48) ? SpellSlot.R : spell.Slot;
                    var menuName = spell.IsAutoAttack ? unit.ChampionName + "AA" : unit.ChampionName + slot;
                    var display  = "Block " + name + " " + slot + (spell.IsAutoAttack ? " AA" : string.Empty);
                    menu.AddBool(menuName, display, spell.Enabled);
                }
            }
        }
Ejemplo n.º 2
0
        public static bool Contains(Obj_AI_Hero unit, GameObjectProcessSpellCastEventArgs args)
        {
            var name      = unit.ChampionName;
            var spellSlot = unit.GetSpellSlot(args.SData.Name);
            var slot      = spellSlot.Equals(48) ? SpellSlot.R : spellSlot;

            ;
            //Console.WriteLine(slot);

            if (args.SData.Name.Equals("KalistaRAllyDash") && Program.Menu.Item("Oathsworn").IsActive())
            {
                return(true);
            }

            foreach (var spell in
                     BlockedSpell.GetBlockedSpells()
                     .Where(o => o.Name.Equals(name))
                     .Where(spell => !spell.HasModelCondition || unit.CharData.BaseSkinName.Equals(spell.ModelName))
                     .Where(spell => !spell.HasBuffCondition || unit.HasBuff(spell.AutoAttackBuff)))
            {
                if (spell.IsAutoAttack)
                {
                    //Console.WriteLine(args.SData.Name);
                    if (!args.SData.IsAutoAttack())
                    {
                        continue;
                    }

                    var condition = spell.AutoAttackName.Equals(args.SData.Name);

                    if (unit.ChampionName.Equals("Rengar"))
                    {
                        condition = condition && unit.Mana.Equals(5);
                    }

                    condition = condition && Program.Menu.Item(name + "AA") != null &&
                                Program.Menu.Item(name + "AA").IsActive();

                    // Console.WriteLine("CC: " + condition);
                    if (condition)
                    {
                        return(true);
                    }

                    continue;
                }

                if (Program.Menu.Item(name + slot) == null || !Program.Menu.Item(name + slot).IsActive() ||
                    !spell.Slot.Equals(slot))
                {
                    continue;
                }

                // is the buff not always applied? =_//
                if (name.Equals("Riven"))
                {
                    var buff = unit.Buffs.FirstOrDefault(b => b.Name.Equals("RivenTriCleave"));
                    if (buff != null && buff.Count == 3)
                    {
                        return(true);
                    }
                }

                // Console.WriteLine(slot + " " + args.SData.Name);
                return(true);
            }
            return(false);
        }