예제 #1
0
        private static void ObjSpellMissileOnCreate(GameObject sender, EventArgs args)
        {
            var missile = sender as MissileClient;

            if (missile == null || !missile.IsValid)
            {
                return;
            }
            var caster = missile.SpellCaster as AIHeroClient;

            if (caster == null || !caster.IsValid || caster.Team == ObjectManager.Player.Team || !(missile.Target != null && missile.Target.IsMe))
            {
                return;
            }

            var spellData = Spells.FirstOrDefault(i => i.SpellNames.Contains(missile.SData.Name.ToLower()) && evadeMenu[i.MissileName] != null ? getCheckBoxItem(evadeMenu, i.MissileName) : false);

            if (spellData == null && Orbwalking.IsAutoAttack(missile.SData.Name) && (!missile.SData.Name.ToLower().Contains("crit")
                        ? getCheckBoxItem(evadeMenu, "B") &&
                                                                                     ObjectManager.Player.HealthPercent < getSliderItem(evadeMenu, "BHpU")
                        : getCheckBoxItem(evadeMenu, "C") &&
                                                                                     ObjectManager.Player.HealthPercent < getSliderItem(evadeMenu, "CHpU")))
            {
                spellData = new SpellData {
                    ChampionName = caster.ChampionName, SpellNames = new[] { missile.SData.Name }
                };
            }
            if (spellData == null)
            {
                return;
            }
            DetectedTargets.Add(new Targets {
                Start = caster.ServerPosition, Obj = missile
            });
        }
예제 #2
0
        private static void ObjSpellMissileOnCreate(GameObject sender, EventArgs args)
        {
            var missile = sender as MissileClient;

            if (missile == null || !missile.IsValid)
            {
                return;
            }
            var caster = missile.SpellCaster as AIHeroClient;

            if (caster == null || !caster.IsValid || caster.Team == Player.Team || !(missile.Target != null && missile.Target.IsMe))
            {
                return;
            }
            var spellData =
                Spells.FirstOrDefault(
                    i =>
                    i.SpellNames.Contains(missile.SData.Name.ToLower()) &&
                    Menu.SubMenu("EvadeTarget").SubMenu(i.ChampionName.ToLowerInvariant()).Item(i.MissileName).GetValue <bool>());

            if (spellData == null && Orbwalking.IsAutoAttack(missile.SData.Name) &&
                (!missile.SData.Name.ToLower().Contains("crit")
                        ? Menu.SubMenu("EvadeTarget").SubMenu("AA").Item("B").GetValue <bool>() &&
                 Player.HealthPercent < Menu.SubMenu("EvadeTarget").SubMenu("AA").Item("BHpU").GetValue <Slider>().Value
                        : Menu.SubMenu("EvadeTarget").SubMenu("AA").Item("C").GetValue <bool>() &&
                 Player.HealthPercent < Menu.SubMenu("EvadeTarget").SubMenu("AA").Item("CHpU").GetValue <Slider>().Value))
            {
                spellData = new SpellData {
                    ChampionName = caster.ChampionName, SpellNames = new[] { missile.SData.Name }
                };
            }
            if (spellData == null)
            {
                return;
            }
            DetectedTargets.Add(new Targets {
                Start = caster.ServerPosition, Obj = missile
            });
        }