Пример #1
0
        /// <summary> Perform the 'get' operation. </summary>
        /// <param name="arc"></param>
        /// <returns></returns>
        public Commands.Result Get(out Geometry.Arc arc)
        {
            IntPtr ptr_this = NonConstPointer();

            arc = Geometry.Arc.Unset;
            uint rc = UnsafeNativeMethods.RHC_RhinoGetArc(ref arc, ptr_this, IntPtr.Zero);

            return((Commands.Result)rc);
        }
Пример #2
0
        /// <summary>
        /// Attempts to copy the contents of a Pixel.Rhino.Geometry.Arc to a RMA.OpenNURBS.OnArc.
        /// </summary>
        /// <param name="source">A source arc.</param>
        /// <param name="destination">A destination OnArc.</param>
        /// <returns>true if the operation succeeded; false otherwise.</returns>
        /// <since>5.0</since>
        public static bool TryCopyToOnArc(Geometry.Arc source, object destination)
        {
            bool   rc  = false;
            IntPtr ptr = GetInternalPointer(destination, "RMA.OpenNURBS.OnArc");

            if (IntPtr.Zero != ptr)
            {
                UnsafeNativeMethods.ON_Arc_Copy(ptr, ref source, false);
                rc = true;
            }
            return(rc);
        }
Пример #3
0
        /// <summary>
        /// Attempts to copy the contents of a RMA.OpenNURBS.OnArc to a Pixel.Rhino.Geometry.Arc.
        /// </summary>
        /// <param name="source">A source OnArc.</param>
        /// <param name="destination">A destination arc.</param>
        /// <returns>true if the operation succeeded; false otherwise.</returns>
        /// <since>5.0</since>
        public static bool TryCopyFromOnArc(object source, out Geometry.Arc destination)
        {
            destination = new Geometry.Arc();
            bool   rc  = false;
            IntPtr ptr = GetInternalPointer(source, "RMA.OpenNURBS.OnArc");

            if (IntPtr.Zero != ptr)
            {
                UnsafeNativeMethods.ON_Arc_Copy(ptr, ref destination, true);
                rc = true;
            }
            return(rc);
        }
Пример #4
0
        public MainWindow()
        {
            InitializeComponent();

            GenerateSpider();

            Geometry.Line line = new Geometry.Line(0, 0, 1000, 1000);
            //GeometryVisualiserDialog.ShowDialog(line);
            VertexGeometry arc = new Geometry.Arc(new Circle(30, new Geometry.Vector(-50, -50)));
            //GeometryVisualiserDialog.ShowDialog(arc);

            VertexGeometryCollection coll = new VertexGeometryCollection(line, arc);

            GeometryVisualiserDialog.ShowDialog(coll);
        }
Пример #5
0
        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.Circle(CollisionEnd, spellData.Radius);
                break;

            case SkillShotType.SkillshotLine:
                Rectangle = new Geometry.Rectangle(Start, CollisionEnd, spellData.Radius);
                break;

            case SkillShotType.SkillshotMissileLine:
                Rectangle = new Geometry.Rectangle(Start, CollisionEnd, spellData.Radius);
                break;

            case SkillShotType.SkillshotCone:
                Sector = new Geometry.Sector(
                    start, CollisionEnd - start, spellData.Radius * (float)Math.PI / 180, spellData.Range);
                break;

            case SkillShotType.SkillshotRing:
                Ring = new Geometry.Ring(CollisionEnd, spellData.Radius, spellData.RingRadius);
                break;

            case SkillShotType.SkillshotArc:
                Arc = new Geometry.Arc(start, end,
                                       EvadeManager.SkillShotsExtraRadius + (int)ObjectManager.Player.BoundingRadius);
                break;
            }

            UpdatePolygon();
        }
Пример #6
0
        private static void AIHeroClient_OnProcessSpellCast(AIBaseClient sender, AIBaseClientProcessSpellCastEventArgs args)
        {
            var targetz   = TargetSelector.GetTarget(W.Range);
            var useW      = ComboMenu["WLowHp"].GetValue <MenuBool>().Enabled;
            var MinHealth = ComboMenu["minHealth"].GetValue <MenuSlider>().Value;

            if (useW && !_Player.IsRecalling() && targetz.IsValidTarget(425))
            {
                if (Player.Instance.HealthPercent <= MinHealth)
                {
                    W.Cast();
                }
            }

            if ((args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E ||
                 args.Slot == SpellSlot.R) && sender.IsEnemy && Q.IsReady() && _Player.Distance(sender) <= args.SData.CastRange && Orbwalker.ActiveMode.HasFlag(OrbwalkerMode.Combo))
            {
                if (args.SData.TargettingType == SpellDataTargetType.Unit || args.SData.TargettingType == SpellDataTargetType.SelfAndUnit || args.SData.TargettingType == SpellDataTargetType.Self)
                {
                    if ((args.Target.NetworkId == Player.Instance.NetworkId && args.Time < 1.5 ||
                         args.End.Distance(Player.Instance.Position) <= Player.Instance.BoundingRadius * 3) &&
                        Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        QEvade();
                    }
                }
                else if (args.SData.TargettingType == SpellDataTargetType.LocationAoe)
                {
                    var castvector =
                        new Geometry.Circle(args.End, args.SData.CastRadius).IsInside(
                            Player.Instance.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        QEvade();
                    }
                }

                else if (args.SData.TargettingType == SpellDataTargetType.Cone)
                {
                    var castvector =
                        new Geometry.Arc(args.Start, args.End, args.SData.CastConeAngle, args.SData.CastRange)
                        .IsInside(Player.Instance.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        QEvade();
                    }
                }

                else if (args.SData.TargettingType == SpellDataTargetType.SelfAoe)
                {
                    var castvector =
                        new Geometry.Circle(sender.Position, args.SData.CastRadius).IsInside(
                            Player.Instance.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        QEvade();
                    }
                }
                else
                {
                    var castvector =
                        new Geometry.Rectangle(args.Start, args.End, args.SData.LineWidth).IsInside(
                            Player.Instance.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        QEvade();
                    }
                }

                if (args.SData.Name == "yasuoq3w")
                {
                    QEvade();
                }

                if (args.SData.Name == "ZedR")
                {
                    if (Q.IsReady())
                    {
                        QEvade();
                    }
                    else
                    {
                        if (W.IsReady())
                        {
                            W.Cast();
                        }
                    }
                }

                if (args.SData.Name == "KarthusFallenOne")
                {
                    QEvade();
                }

                if (args.SData.Name == "SoulShackles")
                {
                    QEvade();
                }

                if (args.SData.Name == "AbsoluteZero")
                {
                    QEvade();
                }

                if (args.SData.Name == "NocturneUnspeakableHorror")
                {
                    QEvade();
                }
            }
        }
Пример #7
0
        private static void AIHeroClient_OnProcessSpellCast(AIBaseClient sender, AIBaseClientProcessSpellCastEventArgs args)
        {
            if ((args.Slot == SpellSlot.Q || args.Slot == SpellSlot.W || args.Slot == SpellSlot.E ||
                 args.Slot == SpellSlot.R) && sender.IsEnemy && W.IsReady() && _Player.Distance(sender) <= args.SData.CastRange && Orbwalker.ActiveMode == OrbwalkerMode.Combo)
            {
                if (args.SData.TargetingType == SpellDataTargetType.Unit || args.SData.TargetingType == SpellDataTargetType.SelfAndUnit || args.SData.TargetingType == SpellDataTargetType.Self)
                {
                    if ((args.Target.NetworkId == ObjectManager.Player.NetworkId && args.Time < 1.5 ||
                         args.End.Distance(ObjectManager.Player.Position) <= ObjectManager.Player.BoundingRadius * 3) &&
                        Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        W.Cast();
                    }
                }
                else if (args.SData.TargetingType == SpellDataTargetType.LocationAoe)
                {
                    var castvector =
                        new Geometry.Circle(args.End, args.SData.CastRadius).IsInside(
                            ObjectManager.Player.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        W.Cast();
                    }
                }

                else if (args.SData.TargetingType == SpellDataTargetType.Cone)
                {
                    var castvector =
                        new Geometry.Arc(args.Start, args.End, args.SData.CastConeAngle, args.SData.CastRange)
                        .IsInside(ObjectManager.Player.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        W.Cast();
                    }
                }

                else if (args.SData.TargetingType == SpellDataTargetType.SelfAoe)
                {
                    var castvector =
                        new Geometry.Circle(sender.Position, args.SData.CastRadius).IsInside(
                            ObjectManager.Player.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        W.Cast();
                    }
                }
                else
                {
                    var castvector =
                        new Geometry.Rectangle(args.Start, args.End, args.SData.LineWidth).IsInside(
                            ObjectManager.Player.Position);

                    if (castvector && Evade[args.SData.Name].GetValue <MenuBool>().Enabled)
                    {
                        W.Cast();
                    }
                }

                if (args.SData.Name == "yasuoq3w")
                {
                    W.Cast();
                }

                if (args.SData.Name == "ZedR")
                {
                    W.Cast();
                }

                if (args.SData.Name == "KarthusFallenOne")
                {
                    W.Cast();
                }

                if (args.SData.Name == "SoulShackles")
                {
                    W.Cast();
                }

                if (args.SData.Name == "AbsoluteZero")
                {
                    W.Cast();
                }

                if (args.SData.Name == "NocturneUnspeakableHorror")
                {
                    W.Cast();
                }
            }
        }