//------------------------------Methods-------------------------------- private void SummonersOnHit(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, bool useHeal = false) { var polygons = new Geometry.Polygon[] { new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth), new Geometry.Polygon.Circle(args.End, args.SData.CastRadius) }; if (polygons.Any(it => it.IsInside(Player))) { if (useHeal) { heal.Cast(); } else { barrier.Cast(); } } return; }
//----------------------------------------|| Methods ||------------------------------------- private void ZhonyaOnHit(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (args.Target != null) { if (args.Target.IsMe) { zhonya.Cast(); } return; } var polygons = new Geometry.Polygon[] { new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth), new Geometry.Polygon.Circle(args.End, args.SData.CastRadius) }; if (polygons.Any(it => it.IsInside(Player))) { zhonya.Cast(); } return; }
//------------------------------Methods-------------------------------- private void SummonersOnHit(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args, bool useHeal = false) { var polygons = new Geometry.Polygon[] { new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth), new Geometry.Polygon.Circle(args.End, args.SData.CastRadius) }; if (polygons.Any(it => it.IsInside(Player))) { if (useHeal) heal.Cast(); else barrier.Cast(); } return; }
//---------------------------------------Methods----------------------------------- private void ZhonyaOnHit(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (args.Target != null) { if (args.Target.IsMe) zhonya.Cast(); return; } var polygons = new Geometry.Polygon[] { new Geometry.Polygon.Rectangle(args.Start, args.End, args.SData.LineWidth), new Geometry.Polygon.Circle(args.End, args.SData.CastRadius) }; if (polygons.Any(it => it.IsInside(Player))) zhonya.Cast(); return; }