/// <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); }
public override AttackableUnit FindTarget(OrbwalkerMode mode) { if (this.ForcedTarget != null && this.ForcedTarget.IsValidAutoRange()) { return(this.ForcedTarget); } return(mode?.GetTarget()); }
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); }
/// <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); } }
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); }
/// <inheritdoc cref="IOrbwalker" /> public abstract AttackableUnit FindTarget(OrbwalkerMode mode);