Beispiel #1
0
        public void OnUpdate_AutoLastHit()
        {
            if (Game.IsPaused)
            {
                //this.pause = Game.IsPaused;
                return;
            }

            if (this.pause || Variables.Hero == null || !Variables.Hero.IsValid || !Variables.Hero.IsAlive)
            {
                return;
            }
            if (!Variables.InAutoLasthiMode)
            {
                return;
            }
            if (!Variables.Familiars.Any(x => x != null) || !Variables.Familiars.Any(x => x.IsAlive) || !Variables.Familiars.Any(x => x.IsValid))
            {
                return;
            }
            Variables.Familiars = ObjectManager.GetEntities <Unit>().Where(unit => unit.Name.Contains("npc_dota_visage_familiar") && unit.IsAlive).ToList();

            if (Familiars == null)
            {
                return;
            }
            familiarAutoLastHit.Execute(Familiars);
        }
Beispiel #2
0
        public void OnUpdate_AutoLastHit()
        {
            if (Game.IsPaused)
            {
                //this.pause = Game.IsPaused;
                return;
            }

            if (this.pause || Variables.Hero == null || !Variables.Hero.IsValid || !Variables.Hero.IsAlive)
            {
                return;
            }
            if (!Variables.InAutoLasthiMode)
            {
                return;
            }
            if (!Variables.Familiars.Any(x => x != null) || !Variables.Familiars.Any(x => x.IsAlive) || !Variables.Familiars.Any(x => x.IsValid))
            {
                return;
            }
            Variables.Familiars = ObjectManager.GetEntities <Unit>().Where(unit => unit.ClassId.Equals(ClassId.CDOTA_Unit_VisageFamiliar) && unit.IsAlive).ToList();

            if (Familiars == null)
            {
                return;
            }
            familiarAutoLastHit.Execute(Familiars);
        }