Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_AlZaharCalloftheVoid.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
using SharpDX;

public class _AlZaharCalloftheVoid : Skillshot
{
private RectanglePoly Rectangle;

#region Constructors and Destructors

public _AlZaharCalloftheVoid()
: base("AlZaharCalloftheVoid")
{
}

#endregion

#region Public Properties

public new Vector2 Direction => base.Direction.Perpendicular();
public new Vector2 StartPosition => base.EndPosition - this.Direction * 400;
public new Vector2 EndPosition => base.EndPosition + this.Direction * 400;

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Rectangle = new RectanglePoly(this.StartPosition, this.EndPosition, 85);
this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Rectangle.ToClipperPath();
}

#endregion
}
}
31 changes: 31 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_DianaArc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
public class _DianaArc : Skillshot
{
private ArcPoly Arc;

#region Constructors and Destructors

public _DianaArc()
: base("DianaArc")
{
}

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Arc = new ArcPoly(this.StartPosition, this.EndPosition, this.SData.ArcAngle, this.SData.Radius);
this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Arc.ToClipperPath();
}

#endregion
}
}
66 changes: 66 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_JarvanIVEQ.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
using LeagueSharp.SDK;

using SharpDX;

public class _JarvanIVEQ : Skillshot
{
private RectanglePoly Rectangle;

#region Constructors and Destructors

public _JarvanIVEQ()
: base("JarvanIVEQ")
{
}

#endregion

#region Public Properties

public new Vector2 EndPosition
{
get
{
var extendedE = new RectanglePoly(this.StartPosition, base.EndPosition + this.Direction * 100, this.SData.Width);
foreach (var skillshot in Tracker.DetectedSkillshots)
{
if (skillshot.Caster.NetworkId == this.Caster.NetworkId && skillshot.SData.Slot == SpellSlot.E)
{
if (extendedE.IsInside(skillshot.EndPosition))
return skillshot.EndPosition;
}
}

foreach (var minion in ObjectManager.Get<Obj_AI_Minion>())
{
if (minion.CharData.BaseSkinName == "jarvanivstandard" && minion.Team == this.Caster.Team)
{
if(extendedE.IsInside(minion.Position))
return minion.Position.ToVector2();
}
}

return base.EndPosition;
}
}

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Rectangle = new RectanglePoly(this.StartPosition, this.EndPosition, this.SData.Radius);
this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Rectangle.ToClipperPath();
}

#endregion
}
}
37 changes: 37 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_OriannaQEnd.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
public class _OriannaQEnd : Skillshot
{
private CirclePoly Circle;

#region Constructors and Destructors

public _OriannaQEnd()
: base("OriannasQ")
{
}

#endregion

#region Public Properties

public new int Delay => this.SData.Delay + (int)this.StartPosition.Distance(this.EndPosition) / this.SData.MissileSpeed;

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Circle = new CirclePoly(this.EndPosition, 80);
this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Circle.ToClipperPath();
}

#endregion
}
}
41 changes: 41 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_SionR.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
using SharpDX;

public class _SionR : Skillshot
{
private RectanglePoly Rectangle;
#region Constructors and Destructors

public _SionR()
: base("SionR")
{
this.SData.MissileSpeed = (int)this.Caster.MoveSpeed;
}

#endregion

#region Public Properties

public new Vector2 Direction => this.Caster.Direction.ToVector2();
public new Vector2 StartPosition => this.Caster.ServerPosition.ToVector2();
public new Vector2 EndPosition => this.StartPosition + this.Direction * this.SData.Radius;

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Rectangle = new RectanglePoly(this.StartPosition, this.EndPosition, this.SData.Width);
this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Rectangle.ToClipperPath();
}

#endregion
}
}
74 changes: 74 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_SyndraE.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
using System;
using System.Linq;
using System.Collections.Generic;
using LeagueSharp.SDK;

using Clipper;
using SharpDX;

public class _SyndraE : Skillshot
{
private Polygon Polygon;

#region Constructors and Destructors

public _SyndraE()
: base("SyndraE")
{
}

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Polygon = new Polygon();

var angle = 60;
var edge1 =
(this.EndPosition - this.Caster.ServerPosition.ToVector2()).Rotated(
-angle / 2 * (float)Math.PI / 180);
var edge2 = edge1.Rotated(angle * (float)Math.PI / 180);

var positions = new List<Vector2>();

//detect syndra q which havent exploded yet
var explodingQ = Tracker.DetectedSkillshots.FirstOrDefault(p => p.SData.SpellName == "SyndraQ");
if (explodingQ != null)
positions.Add(explodingQ.EndPosition);

//detect syndra qs which have already exploded
var seeds = ObjectManager.Get<Obj_AI_Minion>().Where(p => p.Name == "Seed" && !p.IsDead && p.Team == this.Caster.Team).Select(q => q.ServerPosition.ToVector2());
foreach (var seed in seeds)
positions.Add(seed);

foreach (var position in positions)
{
var v = position - this.Caster.ServerPosition.ToVector2();
if (edge1.CrossProduct(v) > 0 && v.CrossProduct(edge2) > 0 &&
position.Distance(this.Caster.ServerPosition) < 800)
{
var start = position;
var end = this.Caster.ServerPosition.ToVector2()
.Extend(
position,
this.Caster.Distance(position) > 200 ? 1300 : 1000);

Polygon.Add(new RectanglePoly(start, end, this.SData.Width));
}
}

this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Polygon.ToClipperPath();
}

#endregion
}
}
32 changes: 32 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_UFSlash.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
public class _UFSlash : Skillshot
{
private CirclePoly Circle;

#region Constructors and Destructors

public _UFSlash()
: base("UFSlash")
{
this.SData.MissileSpeed += (int)this.Caster.MoveSpeed;
}

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Circle = new CirclePoly(this.EndPosition, this.SData.Radius);
this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Circle.ToClipperPath();
}

#endregion
}
}
44 changes: 44 additions & 0 deletions Core/Wrappers/Spells/Tracker/Skillshots/_VelkozQSplit.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
namespace LeagueSharp.SDK.Core.Wrappers.Spells.Tracker.Skillshots
{
using System.Linq;
using LeagueSharp.SDK;

using SharpDX;

public class _VelkozQSplit : Skillshot
{
private RectanglePoly Rectangle;

#region Constructors and Destructors

public _VelkozQSplit()
: base("VelkozQSplit")
{
}

#endregion

#region Public Properties

public new Vector2 Direction => Tracker.DetectedSkillshots.Where(p => p.Caster.NetworkId == this.Caster.NetworkId && p.SData.SpellName == "VelkozQ").FirstOrDefault().Direction.Perpendicular();
public new Vector2 StartPosition => base.StartPosition - this.Direction * 1100;
public new Vector2 EndPosition => base.StartPosition + this.Direction * 1100;

#endregion

#region Public Methods and Operators

internal override void UpdatePolygon()
{
Rectangle = new RectanglePoly(this.StartPosition, this.EndPosition, 55);
this.UpdatePath();
}

internal override void UpdatePath()
{
this.Path = Rectangle.ToClipperPath();
}

#endregion
}
}
Loading