Beispiel #1
0
        static void DrawArrow(Slide slide)
        {
            if (!DrawRObject && !DrawRObject)
            {
                return;
            }

            var color = slide.Type == 1 ? Color.DarkRed : Color.DeepPink;
            var width = 4;

            var circle = new Geometry.Circle2(slide.Position.LSTo2D(), 150f, Game.Time * 300 - slide.StartTime * 300, slide.EndTime * 300 - slide.StartTime * 300).ToPolygon();

            circle.Draw(color, width);

            var startpos = ObjectManager.Player.Position;
            var endpos   = slide.Position;

            if (startpos.LSDistance(endpos) > 100)
            {
                var endpos1 = slide.Position + (startpos - endpos).LSTo2D().LSNormalized().LSRotated(25 * (float)Math.PI / 180).To3D() * 75;
                var endpos2 = slide.Position + (startpos - endpos).LSTo2D().LSNormalized().LSRotated(-25 * (float)Math.PI / 180).To3D() * 75;

                var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                x1.Draw(color, width - 2);
                var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos1);
                y1.Draw(color, width - 2);
                var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos2);
                z1.Draw(color, width - 2);
            }
        }
Beispiel #2
0
        static void DrawArrow(Slide slide)
        {
            if (!DrawRObject && !DrawRObject)
            {
                return;
            }

            var color = slide.Type == 1 ? Color.DarkRed : Color.DeepPink;
            var width = 4;

            var circle = new Geometry.Circle2(slide.Position.To2D(), 150f, Game.Time * 300 - slide.StartTime * 300, slide.EndTime * 300 - slide.StartTime * 300).ToPolygon();
            circle.Draw(color, width);

            var startpos = ObjectManager.Player.Position;
            var endpos = slide.Position;
            if (startpos.Distance(endpos) > 100)
            {
                var endpos1 = slide.Position + (startpos - endpos).To2D().Normalized().Rotated(25 * (float)Math.PI / 180).To3D() * 75;
                var endpos2 = slide.Position + (startpos - endpos).To2D().Normalized().Rotated(-25 * (float)Math.PI / 180).To3D() * 75;

                var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                x1.Draw(color, width - 2);
                var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos1);
                y1.Draw(color, width - 2);
                var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos2);
                z1.Draw(color, width - 2);
            }
        }
Beispiel #3
0
        private static void DrawingOnOnDraw(EventArgs args)
        {
            if (Program.Config.Item("Objects.EStunStatus").GetValue <bool>())
            {
                foreach (var e in ObjectManager.Get <Obj_AI_Base>())
                {
                    if (e.Buffs.Find(buff => buff.DisplayName.Equals("Leblancshacklebeam", StringComparison.InvariantCultureIgnoreCase)) != null)
                    {
                        BuffInstance b = e.Buffs.Find(buff => buff.DisplayName.Equals("Leblancshacklebeam", StringComparison.InvariantCultureIgnoreCase));
                        if (b != null)
                        {
                            var circle1 =
                                new Geometry.Circle2(new Vector2(e.Position.X + 3, e.Position.Y - 3), e.BoundingRadius * 2,
                                                     Game.Time * 300 - b.StartTime * 300, b.EndTime * 300 - b.StartTime * 300).ToPolygon();
                            circle1.Draw(Color.Black, 3);


                            var circle =
                                new Geometry.Circle2(e.Position.To2D(), e.BoundingRadius * 2,
                                                     Game.Time * 300 - b.StartTime * 300, b.EndTime * 300 - b.StartTime * 300).ToPolygon();
                            circle.Draw(Color.DarkRed, 3);
                        }
                    }

                    if (e.Buffs.Find(buff => buff.DisplayName.Equals("Leblancshacklebeamm", StringComparison.InvariantCultureIgnoreCase)) != null)
                    {
                        BuffInstance b = e.Buffs.Find(buff => buff.DisplayName.Equals("Leblancshacklebeamm", StringComparison.InvariantCultureIgnoreCase));
                        if (b != null)
                        {
                            var circle1 =
                                new Geometry.Circle2(new Vector2(e.Position.X + 3, e.Position.Y - 3), e.BoundingRadius * 2,
                                                     Game.Time * 300 - b.StartTime * 300, b.EndTime * 300 - b.StartTime * 300).ToPolygon();
                            circle1.Draw(Color.Black, 3);


                            var circle =
                                new Geometry.Circle2(e.Position.To2D(), e.BoundingRadius * 2,
                                                     Game.Time * 300 - b.StartTime * 300, b.EndTime * 300 - b.StartTime * 300).ToPolygon();
                            circle.Draw(Color.DarkRed, 3);
                        }
                    }
                }
            }

            //foreach (var eObjects in ObjectManager.Get<Obj_AI_Base>().Where(e => e.IsEnemy && !e.IsDead && e.IsValidTarget(1500)))
            //{
            //    if (LeblancSoulShackle.EndTime >= Game.Time && eObjects.NetworkId == LeblancSoulShackle.Object.NetworkId)
            //    {
            //        var circle1 = new Geometry.Circle2(new Vector2(LeblancSoulShackle.Object.Position.X + 3, LeblancSoulShackle.Object.Position.X - 3), 170f, Game.Time * 300 - LeblancSoulShackle.StartTime * 300, LeblancSoulShackle.EndTime * 300 - LeblancSoulShackle.StartTime * 300).ToPolygon();
            //        circle1.Draw(Color.Black, 5);

            //        var circle = new Geometry.Circle2(LeblancSoulShackle.Object.Position.To2D(), 170f, Game.Time * 300 - LeblancSoulShackle.StartTime * 300, LeblancSoulShackle.EndTime * 300 - LeblancSoulShackle.StartTime * 300).ToPolygon();
            //        circle.Draw(Color.GreenYellow, 5);
            //    }

            //    if (LeblancSoulShackleM.EndTime >= Game.Time && eObjects.NetworkId == LeblancSoulShackleM.Object.NetworkId)
            //    {
            //        var circle1 = new Geometry.Circle2(new Vector2(LeblancSoulShackleM.Object.Position.X + 3, LeblancSoulShackleM.Object.Position.X - 3), 170f, Game.Time * 300 - LeblancSoulShackleM.StartTime * 300, LeblancSoulShackleM.EndTime * 300 - LeblancSoulShackleM.StartTime * 300).ToPolygon();
            //        circle1.Draw(Color.Black, 5);

            //        var circle = new Geometry.Circle2(LeblancSoulShackleM.Object.Position.To2D(), 190f, Game.Time * 300 - LeblancSoulShackleM.StartTime * 300, LeblancSoulShackleM.EndTime * 300 - LeblancSoulShackleM.StartTime * 300).ToPolygon();
            //        circle.Draw(Color.DarkRed, 5);
            //    }
            //}

            if (Program.Config.Item("Objects.WPosition").GetValue <bool>())
            {
                foreach (var x in ExistingSlide)
                {
                    if (x.EndTime >= Game.Time)
                    {
                        var color = x.Type == 1 ? Color.DarkRed : Color.DeepPink;
                        var width = 4;

                        var circle1 =
                            new Geometry.Circle2(new Vector2(x.Position.X + 3, x.Position.Y - 3), 150f,
                                                 Game.Time * 300 - x.StartTime * 300, x.EndTime * 300 - x.StartTime * 300).ToPolygon();
                        circle1.Draw(Color.Black, 4);

                        var circle =
                            new Geometry.Circle2(x.Position.To2D(), 150f, Game.Time * 300 - x.StartTime * 300,
                                                 x.EndTime * 300 - x.StartTime * 300).ToPolygon();
                        circle.Draw(color, width);

                        var startpos = ObjectManager.Player.Position;
                        var endpos   = x.Position;
                        if (startpos.Distance(endpos) > 100)
                        {
                            var endpos1 = x.Position +
                                          (startpos - endpos).To2D().Normalized().Rotated(25 * (float)Math.PI / 180).To3D() *
                                          75;
                            var endpos2 = x.Position +
                                          (startpos - endpos).To2D()
                                          .Normalized()
                                          .Rotated(-25 * (float)Math.PI / 180)
                                          .To3D() * 75;

                            var x1 = new LeagueSharp.Common.Geometry.Polygon.Line(startpos, endpos);
                            x1.Draw(color, width - 2);
                            var y1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos1);
                            y1.Draw(color, width - 2);
                            var z1 = new LeagueSharp.Common.Geometry.Polygon.Line(endpos, endpos2);
                            z1.Draw(color, width - 2);
                        }
                    }
                }
            }
        }