Ejemplo n.º 1
0
        public void AddSkillshot(EvadeSkillshot skillshot, bool isProcessSpell = false, bool triggerEvent = true)
        {
            if (LimitDetectionRange && !skillshot.SpellData.IsGlobal &&
                skillshot.GetPosition().Distance(Player.Instance, true) > (2 * skillshot.SpellData.Range).Pow())
            {
                return;
            }

            if (SkillshotActivationDelay <= 10)
            {
                skillshot.IsActive = true;
            }

            DetectedSkillshots.Add(skillshot);

            if (triggerEvent && EvadeMenu.IsSkillshotEnabled(skillshot))
            {
                if (OnSkillshotDetected != null)
                {
                    OnSkillshotDetected(skillshot, isProcessSpell);
                }

                if (OnUpdateSkillshots != null)
                {
                    OnUpdateSkillshots(skillshot, false, isProcessSpell);
                }
            }
        }
Ejemplo n.º 2
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
     //TODO: update
     if (skillshot.ToPolygon().IsInside(Player.Instance))
     {
         LastEvadeResult = null;
     }
 }
Ejemplo n.º 3
0
        public EvadePlus(SkillshotDetector detector)
        {
            Skillshots      = new EvadeSkillshot[] {};
            Polygons        = new Geometry.Polygon[] {};
            ClippedPolygons = new List <Geometry.Polygon>();

            SkillshotDetector = detector;
            SkillshotDetector.OnUpdateSkillshots    += OnUpdateSkillshots;
            SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation;
            SkillshotDetector.OnSkillshotDetected   += OnSkillshotDetected;

            Player.OnIssueOrder += PlayerOnIssueOrder;
        }
Ejemplo n.º 4
0
        private void GameObjectOnCreate(GameObject sender, EventArgs args)
        {
            //if (Utils.GetTeam(sender) == Utils.PlayerTeam())
            //    Chat.Print("create {0} {1} {2} {3}", sender.Team, sender.GetType().ToString(), Utils.GetGameObjectName(sender), sender.Index);

            if (!(sender is Obj_GeneralParticleEmitter))
            {
                EvadeSkillshot skillshot =
                    config.MenuSkillshots.Values.FirstOrDefault(
                        evadeSkillshot => evadeSkillshot.SpellData.MissileSpellName == Utils.GetGameObjectName(sender));

                if (skillshot != null)
                {
                    var nSkillshot = skillshot.NewInstance();
                    nSkillshot.SkillshotDetector = this;
                    nSkillshot.SpawnObject       = sender;
                    nSkillshot.Team = Utils.GetTeam(sender);
                    nSkillshot.OnCreate(sender);

                    if (IsValidTeam(nSkillshot.Team) && (EnableFoWDetection || !nSkillshot.IsFromFow()))
                    {
                        var triggerEvent = true;
                        var missile      = (sender as MissileClient);

                        if (missile != null)
                        {
                            var castSkillshot =
                                DetectedSkillshots.FirstOrDefault(
                                    c => c.Caster != null && c.Caster.IndexEquals(missile.SpellCaster));

                            if (castSkillshot != null)
                            {
                                nSkillshot.TimeDetected    = castSkillshot.TimeDetected;
                                nSkillshot.IsActive        = castSkillshot.IsActive;
                                castSkillshot.CastComplete = true;
                                triggerEvent = false;
                            }
                        }

                        AddSkillshot(nSkillshot, false, triggerEvent);
                    }
                }
            }


            foreach (var c in DetectedSkillshots)
            {
                c.OnCreateObject(sender);
            }
        }
Ejemplo n.º 5
0
 private void OnSkillshotDeleted(EvadeSkillshot skillshot)
 {
     if (RestorePosition && !SkillshotDetector.DetectedSkillshots.Any())
     {
         if (AutoPathing.IsPathing && Player.Instance.IsWalking())
         {
             var destination = AutoPathing.Destination;
             AutoPathing.StopPath();
             Player.IssueOrder(GameObjectOrder.MoveTo, destination.To3DWorld(), false);
         }
         else if (LastEvadeResult != null && Player.Instance.IsMovingTowards(LastEvadeResult.EvadePoint))
         {
             Player.IssueOrder(GameObjectOrder.MoveTo, LastIssueOrderPos.To3DWorld(), false);
         }
     }
 }
Ejemplo n.º 6
0
        public EvadePlus(SkillshotDetector detector)
        {
            Skillshots = new EvadeSkillshot[] {};
            Polygons = new Geometry.Polygon[] {};
            ClippedPolygons = new List<Geometry.Polygon>();
            StatusText = new Text("EvadePlus Enabled", new Font("Lucida Sans Unicode", 7.7F, FontStyle.Bold)); //Lucida Console, 9
            StatusTextShadow = new Text("EvadePlus Enabled", new Font("Lucida Sans Unicode", 7.7F, FontStyle.Bold));

            SkillshotDetector = detector;
            SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots;
            SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation;
            SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected;
            SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted;

            Player.OnIssueOrder += PlayerOnIssueOrder;
            Game.OnTick += Ontick;
            Drawing.OnDraw += OnDraw;
        }
Ejemplo n.º 7
0
        public EvadePlus(SkillshotDetector detector)
        {
            Skillshots       = new EvadeSkillshot[] {};
            Polygons         = new Geometry.Polygon[] {};
            ClippedPolygons  = new List <Geometry.Polygon>();
            StatusText       = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold));
            StatusTextShadow = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold));

            SkillshotDetector = detector;
            SkillshotDetector.OnUpdateSkillshots    += OnUpdateSkillshots;
            SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation;
            SkillshotDetector.OnSkillshotDetected   += OnSkillshotDetected;
            SkillshotDetector.OnSkillshotDeleted    += OnSkillshotDeleted;

            Player.OnIssueOrder += PlayerOnIssueOrder;
            Game.OnTick         += Ontick;
            Drawing.OnDraw      += OnDraw;
        }
Ejemplo n.º 8
0
        public EvadePlus(SkillshotDetector detector)
        {
            Skillshots = new EvadeSkillshot[] {};
            Polygons = new Geometry.Polygon[] {};
            ClippedPolygons = new List<Geometry.Polygon>();
            PathFinding = new PathFinding(this);
            StatusText = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold));
            StatusTextShadow = new Text("EvadePlus Enabled", new Font("Calisto MT", 10F, FontStyle.Bold));

            SkillshotDetector = detector;
            SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots;
            SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation;
            SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected;
            SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted;

            Player.OnIssueOrder += PlayerOnIssueOrder;
            Game.OnTick += Ontick;
        }
Ejemplo n.º 9
0
        public EvadePlus(SkillshotDetector detector)
        {
            Skillshots      = new EvadeSkillshot[] {};
            Polygons        = new Geometry.Polygon[] {};
            ClippedPolygons = new List <Geometry.Polygon>();
            PathFinding     = new PathFinding(this);
            StatusText      = new Text("EvadePlus Enabled", new Font("Euphemia", 10F, FontStyle.Bold)); //Calisto MT

            SkillshotDetector = detector;
            SkillshotDetector.OnUpdateSkillshots    += OnUpdateSkillshots;
            SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation;
            SkillshotDetector.OnSkillshotDetected   += OnSkillshotDetected;
            SkillshotDetector.OnSkillshotDeleted    += OnSkillshotDeleted;

            Player.OnIssueOrder            += PlayerOnIssueOrder;
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
            Dash.OnDash    += OnDash;
            Game.OnTick    += Ontick;
            Drawing.OnDraw += OnDraw;
        }
Ejemplo n.º 10
0
        public EvadePlus(SkillshotDetector detector)
        {
            Skillshots = new EvadeSkillshot[] {};
            Polygons = new Geometry.Polygon[] {};
            ClippedPolygons = new List<Geometry.Polygon>();
            PathFinding = new PathFinding(this);
            StatusText = new Text("EvadePlus Enabled", new Font("Euphemia", 10F, FontStyle.Bold)); //Calisto MT
            _skillshotPolygonCache = new Dictionary<EvadeSkillshot, Geometry.Polygon>();

            SkillshotDetector = detector;
            SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots;
            SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation;
            SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected;
            SkillshotDetector.OnSkillshotDeleted += OnSkillshotDeleted;

            Player.OnIssueOrder += PlayerOnIssueOrder;
            Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
            Dash.OnDash += OnDash;
            Game.OnTick += Ontick;
            Drawing.OnDraw += OnDraw;
        }
Ejemplo n.º 11
0
        public void AddSkillshot(EvadeSkillshot skillshot, bool isProcessSpell = false, bool triggerEvent = true)
        {
            if (LimitDetectionRange && !skillshot.SpellData.IsGlobal &&
                skillshot.GetPosition().Distance(Player.Instance, true) > (2*skillshot.SpellData.Range).Pow())
            {
                return;
            }

            if (SkillshotActivationDelay <= 10)
                skillshot.IsActive = true;

            DetectedSkillshots.Add(skillshot);

            if (triggerEvent && skillShotConfig.IsSkillshotEnabled(skillshot))
            {
                if (OnSkillshotDetected != null)
                    OnSkillshotDetected(skillshot, isProcessSpell);

                if (OnUpdateSkillshots != null)
                    OnUpdateSkillshots(skillshot, false, isProcessSpell);
            }
        }
Ejemplo n.º 12
0
 private void OnUpdateSkillshots(EvadeSkillshot skillshot, bool remove, bool isProcessSpell)
 {
     CacheSkillshots();
     DoEvade();
 }
Ejemplo n.º 13
0
        private void OnSkillshotDeleted(EvadeSkillshot skillshot)
        {
            //if (Player.Instance.IsMoving &&
            //    IsPathSafe(Player.Instance.GetPath(_lastIssueOrderPos.To3DWorld(), true).ToVector2()))
            //{
            //    AutoPathing.StopPath();

            //    if (!Orbwalker.IsAutoAttacking || Orbwalker.CanBeAborted)
            //        Player.IssueOrder(GameObjectOrder.MoveTo, _lastIssueOrderPos.To3DWorld(), false);
            //}
        }
Ejemplo n.º 14
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
     _lastEvadeResult = null;
     DoEvade();
 }
Ejemplo n.º 15
0
        public static bool IsSkillshotDrawingEnabled(EvadeSkillshot skillshot)
        {
            var valueBase = SkillshotMenu[skillshot + "/draw"];

            return(valueBase != null && valueBase.Cast <CheckBox>().CurrentValue);
        }
Ejemplo n.º 16
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
 }
Ejemplo n.º 17
0
 private void OnUpdateSkillshots(EvadeSkillshot skillshot, bool remove, bool isProcessSpell)
 {
     CacheSkillshots();
     DoEvade();
 }
Ejemplo n.º 18
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
     //TODO: update
     if (skillshot.ToPolygon().IsInside(Player.Instance))
     {
         LastEvadeResult = null;
     }
 }
Ejemplo n.º 19
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
 }
Ejemplo n.º 20
0
 private void OnSkillshotActivation(EvadeSkillshot skillshot)
 {
     CacheSkillshots();
     DoEvade();
 }
Ejemplo n.º 21
0
 private void OnSkillshotActivation(EvadeSkillshot skillshot)
 {
     CacheSkillshots();
     DoEvade();
 }
Ejemplo n.º 22
0
 private void OnSkillshotDeleted(EvadeSkillshot skillshot)
 {
     if (RestorePosition && !SkillshotDetector.DetectedSkillshots.Any())
     {
         if (AutoPathing.IsPathing && Player.Instance.IsWalking())
         {
             var destination = AutoPathing.Destination;
             AutoPathing.StopPath();
             Player.IssueOrder(GameObjectOrder.MoveTo, destination.To3DWorld(), false);
         }
         else if (LastEvadeResult != null && Player.Instance.IsMovingTowards(LastEvadeResult.EvadePoint))
         {
             Player.IssueOrder(GameObjectOrder.MoveTo, LastIssueOrderPos.To3DWorld(), false);
         }
     }
 }
Ejemplo n.º 23
0
 public static bool IsSkillshotEnabled(EvadeSkillshot skillshot)
 {
     var valueBase = SkillshotMenu[skillshot + "/enable"];
     return valueBase != null && valueBase.Cast<CheckBox>().CurrentValue;
 }
Ejemplo n.º 24
0
        public EvadePlus(SkillshotDetector detector)
        {
            Skillshots = new EvadeSkillshot[] {};
            Polygons = new Geometry.Polygon[] {};
            ClippedPolygons = new List<Geometry.Polygon>();

            SkillshotDetector = detector;
            SkillshotDetector.OnUpdateSkillshots += OnUpdateSkillshots;
            SkillshotDetector.OnSkillshotActivation += OnSkillshotActivation;
            SkillshotDetector.OnSkillshotDetected += OnSkillshotDetected;

            Player.OnIssueOrder += PlayerOnIssueOrder;
        }