public Skillshot(DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, Obj_AI_Base unit) { DetectionType = detectionType; SpellData = spellData; StartTick = startT; Start = start; End = end; MissilePosition = start; Direction = (end - start).Normalized(); Unit = unit; bestAllies = GameObjects.AllyHeroes .Where(t => t.Distance(ObjectManager.GetLocalPlayer()) < Support_AIO.Bases.Champion.W.Range) .OrderBy(x => x.Health); foreach (var ally in bestAllies) { switch (spellData.Type) { case SkillShotType.SkillshotCircle: Circle = new Geometry.Polygon.Circle(CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotMissileLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: Sector = new Geometry.Polygon.Sector( start, CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: Ring = new Geometry.Polygon.Ring(CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: Arc = new Geometry.Polygon.Arc(start, end, EvadeManager.SkillShotsExtraRadius + (int)ally.BoundingRadius, 22); break; } } UpdatePolygon(); }
public Skillshot( DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, Obj_AI_Base unit) { this.DetectionType = detectionType; this.SpellData = spellData; this.StartTick = startT; this.Start = start; this.End = end; this.Direction = (end - start).Normalized(); this.Unit = unit; switch (spellData.Type) { case SkillShotType.SkillshotCircle: this.Circle = new Geometry.Polygon.Circle(this.CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: case SkillShotType.SkillshotMissileLine: this.Rectangle = new Geometry.Polygon.Rectangle(this.Start, this.CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: this.Sector = new Geometry.Polygon.Sector( start, this.CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: this.Ring = new Geometry.Polygon.Ring(this.CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: this.Arc = new Geometry.Polygon.Arc( start, end, Configs.SkillShotsExtraRadius + (int)ObjectManager.Player.BoundingRadius, 22); break; } this.UpdatePolygon(); }
public Skillshot(DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, Obj_AI_Base unit) { DetectionType = detectionType; SpellData = spellData; StartTick = startT; Start = start; End = end; MissilePosition = start; Direction = (end - start).Normalized(); Unit = unit; switch (spellData.Type) { case SkillShotType.SkillshotCircle: Circle = new Geometry.Polygon.Circle(CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotMissileLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: Sector = new Geometry.Polygon.Sector( start, CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: Ring = new Geometry.Polygon.Ring(CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: Arc = new Geometry.Polygon.Arc(start, end, EvadeManager.SkillShotsExtraRadius + (int)ObjectManager.GetLocalPlayer().BoundingRadius, 22); break; } UpdatePolygon(); }
private static void OnDraw(EventArgs args) { if (!Config.DrawMenu.Checked("draw")) { return; } if (Config.DrawMenu.Checked("drQ")) { Circle.Draw(Spells.Q.IsLearned ? Color.HotPink : Color.Zero, Spells.Q.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("drW")) { Circle.Draw(Spells.W.IsLearned ? Color.Orange : Color.Zero, Spells.W.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("drE")) { Circle.Draw(Spells.E.IsLearned ? Color.Cyan : Color.Zero, Spells.E.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("drR")) { Circle.Draw(Spells.R.IsLearned ? Color.Green : Color.Zero, Spells.R.Range, Player.Instance.Position); } if (Config.DrawMenu.Checked("drEring") && Spells.E.IsInRange(Game.CursorPos)) { var Ring = new Geometry.Polygon.Ring(Game.CursorPos, 300f, 375f); Ring.Draw(Colour.Cyan, 2); } if (Config.DrawMenu.Checked("drminion")) { var minions = EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Player.Instance.Position, Spells.Q.Range).Where(m => m.Health <= Damage.QDamage(m)).ToArray(); if (minions != null) { Circle.Draw(Color.HotPink, 50f, minions); } } }
public Skillshot(DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, AIBaseClient unit) { DetectionType = detectionType; SpellData = spellData; StartTick = startT; Start = start; End = end; MissilePosition = start; Direction = (Vector2)(end - start).ToVector3().Normalized(); Unit = unit; //if (ObjectManager.Player.CharacterName == "Janna" || // ObjectManager.Player.CharacterName == "Rakan" || ObjectManager.Player.CharacterName == "Ivern" || // ObjectManager.Player.CharacterName == "Lulu" || // ObjectManager.Player.CharacterName == "Karma") //{ // bestAllies = GameObjects.AllyHeroes // .Where(t => // t.Distance(ObjectManager.Player) < Helper.Spells[Helper.E].Range) // .OrderBy(x => x.Health); //} //if (ObjectManager.Player.CharacterName == "Lux" || // ObjectManager.Player.CharacterName == "Sona" || // ObjectManager.Player.CharacterName == "Taric") //{ // bestAllies = GameObjects.AllyHeroes // .Where(t => // t.Distance(ObjectManager.Player) < Helper.Spells[Helper.W].Range) // .OrderBy(x => x.Health); //} foreach (var ally in bestAllies) { switch (spellData.Type) { case SkillShotType.SkillshotCircle: Circle = new Geometry.Polygon.Circle(CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotMissileLine: Rectangle = new Geometry.Polygon.Rectangle(Start, CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: Sector = new Geometry.Polygon.Sector( start, CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: Ring = new Geometry.Polygon.Ring(CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: Arc = new Geometry.Polygon.Arc(start, end, EvadeManager.SkillShotsExtraRadius + (int)ally.BoundingRadius, 22); break; } } UpdatePolygon(); }
public static CustomPolygon CreateCircularWall(SpellInfo info, Vector3 position, float radius, float secondRadius) { Geometry.Polygon ring = new Geometry.Polygon.Ring(position, radius, secondRadius); return(new CustomPolygon(ring, info)); }
public Skillshot( DetectionType detectionType, SpellData spellData, int startT, Vector2 start, Vector2 end, Obj_AI_Base unit) { this.DetectionType = detectionType; this.SpellData = spellData; this.StartTick = startT; this.Start = start; this.End = end; this.Direction = (end - start).Normalized(); this.Unit = unit; switch (spellData.Type) { case SkillShotType.SkillshotCircle: this.Circle = new Geometry.Polygon.Circle(this.CollisionEnd, spellData.Radius, 22); break; case SkillShotType.SkillshotLine: case SkillShotType.SkillshotMissileLine: this.Rectangle = new Geometry.Polygon.Rectangle(this.Start, this.CollisionEnd, spellData.Radius); break; case SkillShotType.SkillshotCone: this.Sector = new Geometry.Polygon.Sector( start, this.CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range, 22); break; case SkillShotType.SkillshotRing: this.Ring = new Geometry.Polygon.Ring(this.CollisionEnd, spellData.Radius, spellData.RingRadius, 22); break; case SkillShotType.SkillshotArc: this.Arc = new Geometry.Polygon.Arc( start, end, Configs.SkillShotsExtraRadius + (int)ObjectManager.Player.BoundingRadius, 22); break; } this.UpdatePolygon(); }