예제 #1
0
        private static void UseW()
        {
            if (Player.HealthPercent <= Misc.GetSlider("Healing.MinHPME") || Misc.Active("onlywincdmg"))
            {
                return;
            }

            if (Spells[SpellSlot.W].IsReady())
            {
                var alliesinneed =
                    HeroManager.Allies.Where(
                        hero => !hero.IsMe && !hero.IsDead && (!Misc.Active("Misc.Nohealshop") || !hero.InShop()) && !hero.IsZombie && hero.Distance(Player) <= Spells[SpellSlot.W].Range &&
                        Misc.Active("w" + hero.ChampionName) &&
                        hero.HealthPercent <= Misc.GetSlider("wpct" + hero.ChampionName) && hero.HealthPercent >= Misc.GetSlider("Healing.MinHP"))
                    .ToList();

                if (Misc.Active("wonlyadc") && alliesinneed.Any(x => x.NetworkId == myADC.NetworkId))
                {
                    Spells[SpellSlot.W].CastOnUnit(myADC);
                }

                else if (!Misc.Active("wonlyadc"))
                {
                    AIHeroClient allytoheal = null;

                    allytoheal = SorakaMenu.PriorityType() == SorakaMenu.HealPriority.PriorityList ? alliesinneed.MaxOrDefault(h => h.GetSetPriority()) : alliesinneed.MinOrDefault(x => x.HealthPercent);

                    if (allytoheal != null)
                    {
                        Spells[SpellSlot.W].CastOnUnit(allytoheal);
                    }
                }
            }
        }
예제 #2
0
        private static void UseW()
        {
            if (Spells[SpellSlot.W].IsReady())
            {
                var alliesinneed =
                    HeroManager.Allies.Where(
                        hero => !hero.IsMe &&
                        !hero.IsDead && (!Misc.Active("Misc.Nohealshop") || !hero.InShop()) && !hero.IsZombie && hero.Distance(Player) <= Spells[SpellSlot.W].Range &&
                        Misc.Active("w" + hero.ChampionName) &&
                        hero.HealthPercent <= Misc.GetSlider("wpct" + hero.ChampionName))
                    .ToList();

                if (Misc.Active("wonlyadc") && alliesinneed.Contains(myADC) && Player.Distance(myADC) <= Spells[SpellSlot.W].Range)
                {
                    Spells[SpellSlot.W].CastOnUnit(myADC);
                }

                else if (!Misc.Active("wonlyadc"))
                {
                    Obj_AI_Hero allytoheal = null;

                    allytoheal = SorakaMenu.PriorityType() == SorakaMenu.HealPriority.PriorityList ? alliesinneed.MaxOrDefault(h => h.GetSetPriority()) : alliesinneed.MinOrDefault(x => x.HealthPercent);

                    if (allytoheal != null)
                    {
                        Spells[SpellSlot.W].CastOnUnit(allytoheal);
                    }
                }
            }
        }