예제 #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);
                }
            }
        }
예제 #2
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
     //TODO: update
     if (skillshot.ToPolygon().IsInside(Player.Instance))
     {
         LastEvadeResult = null;
     }
 }
예제 #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;
        }
예제 #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);
            }
        }
예제 #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);
         }
     }
 }
예제 #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;
        }
예제 #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;
        }
예제 #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;
        }
예제 #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;
        }
예제 #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;
        }
예제 #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);
            }
        }
예제 #12
0
 private void OnUpdateSkillshots(EvadeSkillshot skillshot, bool remove, bool isProcessSpell)
 {
     CacheSkillshots();
     DoEvade();
 }
예제 #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);
            //}
        }
예제 #14
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
     _lastEvadeResult = null;
     DoEvade();
 }
예제 #15
0
        public static bool IsSkillshotDrawingEnabled(EvadeSkillshot skillshot)
        {
            var valueBase = SkillshotMenu[skillshot + "/draw"];

            return(valueBase != null && valueBase.Cast <CheckBox>().CurrentValue);
        }
예제 #16
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
 }
예제 #17
0
 private void OnUpdateSkillshots(EvadeSkillshot skillshot, bool remove, bool isProcessSpell)
 {
     CacheSkillshots();
     DoEvade();
 }
예제 #18
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
     //TODO: update
     if (skillshot.ToPolygon().IsInside(Player.Instance))
     {
         LastEvadeResult = null;
     }
 }
예제 #19
0
 private void OnSkillshotDetected(EvadeSkillshot skillshot, bool isProcessSpell)
 {
 }
예제 #20
0
 private void OnSkillshotActivation(EvadeSkillshot skillshot)
 {
     CacheSkillshots();
     DoEvade();
 }
예제 #21
0
 private void OnSkillshotActivation(EvadeSkillshot skillshot)
 {
     CacheSkillshots();
     DoEvade();
 }
예제 #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);
         }
     }
 }
예제 #23
0
 public static bool IsSkillshotEnabled(EvadeSkillshot skillshot)
 {
     var valueBase = SkillshotMenu[skillshot + "/enable"];
     return valueBase != null && valueBase.Cast<CheckBox>().CurrentValue;
 }
예제 #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;
        }