public void AddSkillshot(EvadeSkillshot skillshot, bool isProcessSpell = false, bool triggerEvent = true) { if (LimitDetectionRange && !skillshot.SpellData.IsGlobal && skillshot.GetPosition().Distance(Player.Instance, true) > (2 * skillshot.SpellData.Range).Pow()) { return; } if (SkillshotActivationDelay <= 10) { skillshot.IsActive = true; } DetectedSkillshots.Add(skillshot); if (triggerEvent && EvadeMenu.IsSkillshotEnabled(skillshot)) { if (OnSkillshotDetected != null) { OnSkillshotDetected(skillshot, isProcessSpell); } if (OnUpdateSkillshots != null) { OnUpdateSkillshots(skillshot, false, isProcessSpell); } } }
private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell) { //TODO: update if (skillshot.ToPolygon().IsInside(Player.Instance)) { LastEvadeResult = null; } }
public EvadePlus(SkillshotDetector detector) { Skillshots = new EvadeSkillshot[] {}; Polygons = new Geometry.Polygon[] {}; ClippedPolygons = new List <Geometry.Polygon>(); SkillshotDetector = detector; SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots; SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation; SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected; Player.OnIssueOrder += PlayerOnIssueOrder; }
private void GameObjectOnCreate(GameObject sender, EventArgs args) { //if (Utils.GetTeam(sender) == Utils.PlayerTeam()) // Chat.Print("create {0} {1} {2} {3}", sender.Team, sender.GetType().ToString(), Utils.GetGameObjectName(sender), sender.Index); if (!(sender is Obj_GeneralParticleEmitter)) { EvadeSkillshot skillshot = config.MenuSkillshots.Values.FirstOrDefault( evadeSkillshot => evadeSkillshot.SpellData.MissileSpellName == Utils.GetGameObjectName(sender)); if (skillshot != null) { var nSkillshot = skillshot.NewInstance(); nSkillshot.SkillshotDetector = this; nSkillshot.SpawnObject = sender; nSkillshot.Team = Utils.GetTeam(sender); nSkillshot.OnCreate(sender); if (IsValidTeam(nSkillshot.Team) && (EnableFoWDetection || !nSkillshot.IsFromFow())) { var triggerEvent = true; var missile = (sender as MissileClient); if (missile != null) { var castSkillshot = DetectedSkillshots.FirstOrDefault( c => c.Caster != null && c.Caster.IndexEquals(missile.SpellCaster)); if (castSkillshot != null) { nSkillshot.TimeDetected = castSkillshot.TimeDetected; nSkillshot.IsActive = castSkillshot.IsActive; castSkillshot.CastComplete = true; triggerEvent = false; } } AddSkillshot(nSkillshot, false, triggerEvent); } } } foreach (var c in DetectedSkillshots) { c.OnCreateObject(sender); } }
private void OnSkillshotDeleted(EvadeSkillshot skillshot) { if (RestorePosition && !SkillshotDetector.DetectedSkillshots.Any()) { if (AutoPathing.IsPathing && Player.Instance.IsWalking()) { var destination = AutoPathing.Destination; AutoPathing.StopPath(); Player.IssueOrder(GameObjectOrder.MoveTo, destination.To3DWorld(), false); } else if (LastEvadeResult != null && Player.Instance.IsMovingTowards(LastEvadeResult.EvadePoint)) { Player.IssueOrder(GameObjectOrder.MoveTo, LastIssueOrderPos.To3DWorld(), false); } } }
public EvadePlus(SkillshotDetector detector) { Skillshots = new EvadeSkillshot[] {}; Polygons = new Geometry.Polygon[] {}; ClippedPolygons = new List<Geometry.Polygon>(); StatusText = new Text("EvadePlus Enabled", new Font("Lucida Sans Unicode", 7.7F, FontStyle.Bold)); //Lucida Console, 9 StatusTextShadow = new Text("EvadePlus Enabled", new Font("Lucida Sans Unicode", 7.7F, FontStyle.Bold)); SkillshotDetector = detector; SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots; SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation; SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected; SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted; Player.OnIssueOrder += PlayerOnIssueOrder; Game.OnTick += Ontick; Drawing.OnDraw += OnDraw; }
public EvadePlus(SkillshotDetector detector) { Skillshots = new EvadeSkillshot[] {}; Polygons = new Geometry.Polygon[] {}; ClippedPolygons = new List <Geometry.Polygon>(); StatusText = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold)); StatusTextShadow = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold)); SkillshotDetector = detector; SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots; SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation; SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected; SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted; Player.OnIssueOrder += PlayerOnIssueOrder; Game.OnTick += Ontick; Drawing.OnDraw += OnDraw; }
public EvadePlus(SkillshotDetector detector) { Skillshots = new EvadeSkillshot[] {}; Polygons = new Geometry.Polygon[] {}; ClippedPolygons = new List<Geometry.Polygon>(); PathFinding = new PathFinding(this); StatusText = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold)); StatusTextShadow = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold)); SkillshotDetector = detector; SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots; SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation; SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected; SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted; Player.OnIssueOrder += PlayerOnIssueOrder; Game.OnTick += Ontick; }
public EvadePlus(SkillshotDetector detector) { Skillshots = new EvadeSkillshot[] {}; Polygons = new Geometry.Polygon[] {}; ClippedPolygons = new List <Geometry.Polygon>(); PathFinding = new PathFinding(this); StatusText = new Text("EvadePlus Enabled", new Font("Euphemia", 10F, FontStyle.Bold)); //Calisto MT SkillshotDetector = detector; SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots; SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation; SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected; SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted; Player.OnIssueOrder += PlayerOnIssueOrder; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Dash.OnDash += OnDash; Game.OnTick += Ontick; Drawing.OnDraw += OnDraw; }
public EvadePlus(SkillshotDetector detector) { Skillshots = new EvadeSkillshot[] {}; Polygons = new Geometry.Polygon[] {}; ClippedPolygons = new List<Geometry.Polygon>(); PathFinding = new PathFinding(this); StatusText = new Text("EvadePlus Enabled", new Font("Euphemia", 10F, FontStyle.Bold)); //Calisto MT _skillshotPolygonCache = new Dictionary<EvadeSkillshot, Geometry.Polygon>(); SkillshotDetector = detector; SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots; SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation; SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected; SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted; Player.OnIssueOrder += PlayerOnIssueOrder; Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; Dash.OnDash += OnDash; Game.OnTick += Ontick; Drawing.OnDraw += OnDraw; }
public void AddSkillshot(EvadeSkillshot skillshot, bool isProcessSpell = false, bool triggerEvent = true) { if (LimitDetectionRange && !skillshot.SpellData.IsGlobal && skillshot.GetPosition().Distance(Player.Instance, true) > (2*skillshot.SpellData.Range).Pow()) { return; } if (SkillshotActivationDelay <= 10) skillshot.IsActive = true; DetectedSkillshots.Add(skillshot); if (triggerEvent && skillShotConfig.IsSkillshotEnabled(skillshot)) { if (OnSkillshotDetected != null) OnSkillshotDetected(skillshot, isProcessSpell); if (OnUpdateSkillshots != null) OnUpdateSkillshots(skillshot, false, isProcessSpell); } }
private void OnUpdateSkillshots(EvadeSkillshot skillshot, bool remove, bool isProcessSpell) { CacheSkillshots(); DoEvade(); }
private void OnSkillshotDeleted(EvadeSkillshot skillshot) { //if (Player.Instance.IsMoving && // IsPathSafe(Player.Instance.GetPath(_lastIssueOrderPos.To3DWorld(), true).ToVector2())) //{ // AutoPathing.StopPath(); // if (!Orbwalker.IsAutoAttacking || Orbwalker.CanBeAborted) // Player.IssueOrder(GameObjectOrder.MoveTo, _lastIssueOrderPos.To3DWorld(), false); //} }
private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell) { _lastEvadeResult = null; DoEvade(); }
public static bool IsSkillshotDrawingEnabled(EvadeSkillshot skillshot) { var valueBase = SkillshotMenu[skillshot + "/draw"]; return(valueBase != null && valueBase.Cast <CheckBox>().CurrentValue); }
private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell) { }
private void OnSkillshotActivation(EvadeSkillshot skillshot) { CacheSkillshots(); DoEvade(); }
public static bool IsSkillshotEnabled(EvadeSkillshot skillshot) { var valueBase = SkillshotMenu[skillshot + "/enable"]; return valueBase != null && valueBase.Cast<CheckBox>().CurrentValue; }
public EvadePlus(SkillshotDetector detector) { Skillshots = new EvadeSkillshot[] {}; Polygons = new Geometry.Polygon[] {}; ClippedPolygons = new List<Geometry.Polygon>(); SkillshotDetector = detector; SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots; SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation; SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected; Player.OnIssueOrder += PlayerOnIssueOrder; }