Exemplo n.º 1
0
        public bool CanMove(OrbwalkerMode mode)
        {
            if (mode == null)
            {
                return(false);
            }

            if (!this.MovingEnabled || !mode.MovingEnabled)
            {
                return(false);
            }

            if (Player.Distance(Game.CursorPos) < this.HoldPositionRadius)
            {
                return(false);
            }

            if (this.NoCancelChamps.Contains(Player.ChampionName))
            {
                return(true);
            }

            if (this.IsWindingUp)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        /// <inheritdoc cref="IOrbwalker" />
        public OrbwalkerMode DuplicateMode(OrbwalkerMode mode, string newName, GlobalKey key)
        {
            var newMode = new OrbwalkerMode(newName, key, mode.GetTargetImplementation, mode.ModeBehaviour);

            this.AddMode(newMode);
            return(newMode);
        }
Exemplo n.º 3
0
        public override AttackableUnit FindTarget(OrbwalkerMode mode)
        {
            if (this.ForcedTarget != null &&
                this.ForcedTarget.IsValidAutoRange())
            {
                return(this.ForcedTarget);
            }

            return(mode?.GetTarget());
        }
Exemplo n.º 4
0
        public bool CanAttack(OrbwalkerMode mode)
        {
            if (mode == null)
            {
                return(false);
            }

            if (!this.AttackingEnabled || !mode.AttackingEnabled)
            {
                return(false);
            }

            if (Player.HasBuffOfType(BuffType.Polymorph))
            {
                return(false);
            }

            if (Player.HasBuffOfType(BuffType.Blind) &&
                !this.noWasteAttackChamps.Contains(Player.ChampionName))
            {
                return(false);
            }

            if (Player.ChampionName.Equals("Jhin") && Player.HasBuff("JhinPassiveReload"))
            {
                return(false);
            }

            if (Player.ChampionName.Equals("Graves") && !Player.HasBuff("GravesBasicAttackAmmo1"))
            {
                return(false);
            }

            if (this.NoCancelChamps.Contains(Player.ChampionName))
            {
                if (Player.ChampionName.Equals("Kalista") && this.Config["Misc"]["KalistaFly"].Enabled)
                {
                    return(true);
                }
            }

            if (this.IsWindingUp)
            {
                return(false);
            }

            return(this.AttackReady);
        }
Exemplo n.º 5
0
        /// <inheritdoc cref="IOrbwalker" />
        public void AddMode(OrbwalkerMode mode)
        {
            this.Logger.Info($"Adding mode {mode.Name}");
            if (this.OrbwalkerModes.Any(x => x.Name == mode.Name))
            {
                this.Logger.Error($"Unable to add mode with the name \"{mode.Name}\" because it already exists.");
                return;
            }

            mode.ParentInstance = this;

            this.OrbwalkerModes.Add(mode);

            if (!mode.UsingGlobalKey)
            {
                this.Config.Add(mode.MenuItem);
            }
        }
Exemplo n.º 6
0
 /// <inheritdoc cref="IOrbwalker" />
 public abstract AttackableUnit FindTarget(OrbwalkerMode mode);