示例#1
0
        /// <inheritdoc cref="IOrbwalker" />
        public OrbwalkerMode DuplicateMode(OrbwalkerMode mode, string newName, GlobalKey key)
        {
            var newMode = new OrbwalkerMode(newName, key, mode.GetTargetImplementation, mode.ModeBehaviour);

            AddMode(newMode);
            return(newMode);
        }
示例#2
0
        public override AttackableUnit FindTarget(OrbwalkerMode mode)
        {
            if (this.ForcedTarget != null &&
                this.ForcedTarget.IsValidAutoRange())
            {
                return(this.ForcedTarget);
            }

            return(mode?.GetTarget());
        }
示例#3
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) &&
                !_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 (!NoCancelChamps.Contains(Player.ChampionName))
            {
                return(!this.IsWindingUp && this.AttackReady);
            }

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

            return(!this.IsWindingUp && this.AttackReady);
        }
示例#4
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)
            {
                Config.Add(mode.MenuItem);
            }
        }
示例#5
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 (NoCancelChamps.Contains(Player.ChampionName))
            {
                return(true);
            }

            return(!this.IsWindingUp);
        }
示例#6
0
 /// <inheritdoc cref="IOrbwalker" />
 public abstract AttackableUnit FindTarget(OrbwalkerMode mode);