示例#1
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (ObjectCache.menuCache.cache["DrawEvadePosition"].Cast <CheckBox>().CurrentValue)
            {
                //Render.Circle.DrawCircle(myHero.Position.ExtendDir(dir, 500), 65, Color.Red, 10);

                /*foreach (var point in myHero.Path)
                 * {
                 *  Render.Circle.DrawCircle(point, 65, Color.Red, 10);
                 * }*/

                if (Evade.lastPosInfo != null)
                {
                    var pos = Evade.lastPosInfo.position; //Evade.lastEvadeCommand.targetPosition;
                    Render.Circle.DrawCircle(new Vector3(pos.X, pos.Y, myHero.Position.Z), 65, Color.Red, 10);
                }
            }

            DrawEvadeStatus();

            if (ObjectCache.menuCache.cache["DrawSkillShots"].Cast <CheckBox>().CurrentValue == false)
            {
                return;
            }

            foreach (KeyValuePair <int, Spell> entry in SpellDetector.drawSpells)
            {
                Spell spell = entry.Value;

                var dangerStr = spell.GetSpellDangerString();
                //var spellDrawingConfig = ObjectCache.menuCache.cache[dangerStr + "Color"].GetValue<Circle>();
                var spellDrawingWidth = ObjectCache.menuCache.cache[dangerStr + "Width"].Cast <Slider>().CurrentValue;

                if (ObjectCache.menuCache.cache[spell.info.spellName + "DrawSpell"].Cast <CheckBox>().CurrentValue)
                {
                    if (spell.spellType == SpellType.Line)
                    {
                        Vector2 spellPos    = spell.currentSpellPosition;
                        Vector2 spellEndPos = spell.GetSpellEndPosition();

                        DrawLineRectangle(spellPos, spellEndPos, (int)spell.radius, spellDrawingWidth, Color.White);

                        /*foreach (var hero in ObjectManager.Get<AIHeroClient>())
                         * {
                         *  Render.Circle.DrawCircle(new Vector3(hero.ServerPosition.X, hero.ServerPosition.Y, myHero.Position.Z), (int)spell.radius, Color.Red, 5);
                         * }*/

                        if (ObjectCache.menuCache.cache["DrawSpellPos"].Cast <CheckBox>().CurrentValue)// && spell.spellObject != null)
                        {
                            //spellPos = SpellDetector.GetCurrentSpellPosition(spell, true, ObjectCache.gamePing);

                            /*if (true)
                             * {
                             *  var spellPos2 = spell.startPos + spell.direction * spell.info.projectileSpeed * (Evade.GetTickCount - spell.startTime - spell.info.spellDelay) / 1000 + spell.direction * spell.info.projectileSpeed * ((float)ObjectCache.gamePing / 1000);
                             *  Render.Circle.DrawCircle(new Vector3(spellPos2.X, spellPos2.Y, myHero.Position.Z), (int)spell.radius, Color.Red, 8);
                             * }*/

                            /*if (spell.spellObject != null && spell.spellObject.IsValid && spell.spellObject.IsVisible &&
                             *    spell.spellObject.Position.To2D().Distance(ObjectCache.myHeroCache.serverPos2D) < spell.info.range + 1000)*/

                            Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), (int)spell.radius, Color.White, spellDrawingWidth);
                        }
                    }
                    else if (spell.spellType == SpellType.Circular)
                    {
                        Render.Circle.DrawCircle(new Vector3(spell.endPos.X, spell.endPos.Y, spell.height), (int)spell.radius, Color.White, spellDrawingWidth);

                        if (spell.info.spellName == "VeigarEventHorizon")
                        {
                            Render.Circle.DrawCircle(new Vector3(spell.endPos.X, spell.endPos.Y, spell.height), (int)spell.radius - 125, Color.White, spellDrawingWidth);
                        }
                    }
                    else if (spell.spellType == SpellType.Arc)
                    {
                        /*var spellRange = spell.startPos.Distance(spell.endPos);
                         * var midPoint = spell.startPos + spell.direction * (spellRange / 2);
                         *
                         * Render.Circle.DrawCircle(new Vector3(midPoint.X, midPoint.Y, myHero.Position.Z), (int)spell.radius, spellDrawingConfig.Color, spellDrawingWidth);
                         *
                         * Drawing.DrawLine(Drawing.WorldToScreen(spell.startPos.To3D()),
                         *               Drawing.WorldToScreen(spell.endPos.To3D()),
                         *               spellDrawingWidth, spellDrawingConfig.Color);*/
                    }
                    else if (spell.spellType == SpellType.Cone)
                    {
                    }
                }
            }
        }
示例#2
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (menu.SubMenu("Draw").Item("DrawSkillShots").GetValue <bool>() == false)
            {
                return;
            }

            if (menu.SubMenu("Draw").Item("DrawEvadePosition").GetValue <bool>())
            {
                if (Evade.lastPosInfo != null)
                {
                    var pos = Evade.lastPosInfo.position;
                    Render.Circle.DrawCircle(new Vector3(pos.X, pos.Y, myHero.Position.Z), 65, Color.Red, 10);
                }
            }

            DrawEvadeStatus();

            foreach (KeyValuePair <int, Spell> entry in SpellDetector.drawSpells)
            {
                Spell spell = entry.Value;

                var dangerStr          = spell.GetSpellDangerString();
                var spellDrawingConfig = Evade.menu.SubMenu("Draw").SubMenu("DangerLevelDrawings")
                                         .SubMenu(dangerStr + "Drawing").Item(dangerStr + "Color").GetValue <Circle>();
                var spellDrawingWidth = Evade.menu.SubMenu("Draw").SubMenu("DangerLevelDrawings")
                                        .SubMenu(dangerStr + "Drawing").Item(dangerStr + "Width").GetValue <Slider>().Value;

                if (Evade.menu.SubMenu("Spells").SubMenu(spell.info.charName + spell.info.spellName + "Settings")
                    .Item(spell.info.spellName + "DrawSpell").GetValue <bool>() &&
                    spellDrawingConfig.Active)
                {
                    if (spell.info.spellType == SpellType.Line)
                    {
                        Vector2 spellPos = spell.GetCurrentSpellPosition();
                        DrawLineRectangle(spellPos, spell.endPos, (int)spell.GetSpellRadius(), spellDrawingWidth, spellDrawingConfig.Color);

                        /*foreach (var hero in ObjectManager.Get<Obj_AI_Hero>())
                         * {
                         *  Render.Circle.DrawCircle(new Vector3(hero.ServerPosition.X, hero.ServerPosition.Y, myHero.Position.Z), (int)spell.GetSpellRadius(), Color.Red, 5);
                         * }*/

                        if (menu.SubMenu("Draw").Item("DrawSpellPos").GetValue <bool>())// && spell.spellObject != null)
                        {
                            //spellPos = SpellDetector.GetCurrentSpellPosition(spell, true, Game.Ping);

                            /*if (true)
                             * {
                             *  var spellPos2 = spell.startPos + spell.direction * spell.info.projectileSpeed * (Evade.GetTickCount() - spell.startTime - spell.info.spellDelay) / 1000 + spell.direction * spell.info.projectileSpeed * ((float)Game.Ping / 1000);
                             *  Render.Circle.DrawCircle(new Vector3(spellPos2.X, spellPos2.Y, myHero.Position.Z), (int)spell.GetSpellRadius(), Color.Red, 8);
                             * }*/

                            Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), (int)spell.GetSpellRadius(), spellDrawingConfig.Color, spellDrawingWidth);
                        }
                    }
                    else if (spell.info.spellType == SpellType.Circular)
                    {
                        Render.Circle.DrawCircle(new Vector3(spell.endPos.X, spell.endPos.Y, myHero.Position.Z), (int)spell.GetSpellRadius(), spellDrawingConfig.Color, spellDrawingWidth);
                    }
                    else if (spell.info.spellType == SpellType.Cone)
                    {
                    }
                }
            }
        }
示例#3
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (ObjectCache.menuCache.cache["DrawEvadePosition"].GetValue <bool>())
            {
                //Render.Circle.DrawCircle(myHero.Position.ExtendDir(dir, 500), 65, Color.Red, 10);

                /*foreach (var point in myHero.Path)
                 * {
                 *  Render.Circle.DrawCircle(point, 65, Color.Red, 10);
                 * }*/

                if (Evade.lastPosInfo != null)
                {
                    var pos = Evade.lastPosInfo.position; //Evade.lastEvadeCommand.targetPosition;
                    Render.Circle.DrawCircle(new Vector3(pos.X, pos.Y, myHero.Position.Z), 65, Color.Red, 10);
                }
            }

            DrawEvadeStatus();

            if (ObjectCache.menuCache.cache["DrawSkillShots"].GetValue <bool>() == false)
            {
                return;
            }

            foreach (KeyValuePair <int, Spell> entry in SpellDetector.drawSpells)
            {
                Spell spell = entry.Value;

                var dangerStr          = spell.GetSpellDangerString();
                var spellDrawingConfig = ObjectCache.menuCache.cache[dangerStr + "Color"].GetValue <Circle>();
                var spellDrawingWidth  = ObjectCache.menuCache.cache[dangerStr + "Width"].GetValue <Slider>().Value;
                var avoidRadius        = ObjectCache.menuCache.cache["ExtraAvoidDistance"].GetValue <Slider>().Value;

                if (ObjectCache.menuCache.cache[spell.info.spellName + "DrawSpell"].GetValue <bool>() &&
                    spellDrawingConfig.Active)
                {
                    bool canEvade = !(Evade.lastPosInfo != null && Evade.lastPosInfo.undodgeableSpells.Contains(spell.spellID)) || !Evade.devModeOn;

                    if (spell.spellType == SpellType.Line)
                    {
                        Vector2 spellPos    = spell.currentSpellPosition;
                        Vector2 spellEndPos = spell.GetSpellEndPosition();

                        DrawLineRectangle(spellPos, spellEndPos, (int)spell.radius,
                                          spellDrawingWidth, !canEvade ? Color.Yellow : spellDrawingConfig.Color);

                        if (ObjectCache.menuCache.cache["DrawSpellPos"].GetValue <bool>())// && spell.spellObject != null)
                        {
                            Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, spell.height), (int)spell.radius, !canEvade ? Color.Yellow : spellDrawingConfig.Color, spellDrawingWidth);
                        }
                    }
                    else if (spell.spellType == SpellType.Circular)
                    {
                        Render.Circle.DrawCircle(new Vector3(spell.endPos.X, spell.endPos.Y, spell.height), (int)spell.radius, !canEvade ? Color.Yellow : spellDrawingConfig.Color, spellDrawingWidth);

                        if (spell.info.spellName == "VeigarEventHorizon")
                        {
                            Render.Circle.DrawCircle(new Vector3(spell.endPos.X, spell.endPos.Y, spell.height), (int)spell.radius - 125, !canEvade ? Color.Yellow : spellDrawingConfig.Color, spellDrawingWidth);
                        }
                        else if (spell.info.spellName == "DariusCleave")
                        {
                            Render.Circle.DrawCircle(new Vector3(spell.endPos.X, spell.endPos.Y, spell.height), (int)spell.radius - 220, !canEvade ? Color.Yellow : spellDrawingConfig.Color, spellDrawingWidth);
                        }
                    }
                    else if (spell.spellType == SpellType.Arc)
                    {
                        /*var spellRange = spell.startPos.Distance(spell.endPos);
                         * var midPoint = spell.startPos + spell.direction * (spellRange / 2);
                         *
                         * Render.Circle.DrawCircle(new Vector3(midPoint.X, midPoint.Y, myHero.Position.Z), (int)spell.radius, spellDrawingConfig.Color, spellDrawingWidth);
                         *
                         * Drawing.DrawLine(Drawing.WorldToScreen(spell.startPos.To3D()),
                         *               Drawing.WorldToScreen(spell.endPos.To3D()),
                         *               spellDrawingWidth, spellDrawingConfig.Color);*/
                    }
                    else if (spell.spellType == SpellType.Cone)
                    {
                        DrawLineTriangle(spell.startPos, spell.endPos, (int)spell.radius, spellDrawingWidth, !canEvade ? Color.Yellow : spellDrawingConfig.Color);
                    }
                }
            }
        }
示例#4
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (ObjectCache.menuCache.cache["DrawSkillShots"].GetValue <bool>() == false)
            {
                return;
            }

            if (ObjectCache.menuCache.cache["DrawEvadePosition"].GetValue <bool>())
            {
                /*Render.Circle.DrawCircle(myHero.Position, 35, Color.White, 10);
                 * Render.Circle.DrawCircle(myHero.ServerPosition, 65, Color.Red, 10);
                 * var dist = (int)myHero.Position.Distance(myHero.ServerPosition);
                 * //Drawing.DrawText(0, 0, Color.White, "Evade: " + (int)dist);
                 * //Console.WriteLine(dist);*/

                if (Evade.lastPosInfo != null)
                {
                    var pos = Evade.lastPosInfo.position; //Evade.lastEvadeCommand.targetPosition;
                    Render.Circle.DrawCircle(new Vector3(pos.X, pos.Y, myHero.Position.Z), 65, Color.Red, 10);
                }
            }

            DrawEvadeStatus();

            foreach (KeyValuePair <int, Spell> entry in SpellDetector.drawSpells)
            {
                Spell spell = entry.Value;

                var dangerStr          = spell.GetSpellDangerString();
                var spellDrawingConfig = ObjectCache.menuCache.cache[dangerStr + "Color"].GetValue <Circle>();
                var spellDrawingWidth  = ObjectCache.menuCache.cache[dangerStr + "Width"].GetValue <Slider>().Value;

                if (ObjectCache.menuCache.cache[spell.info.spellName + "DrawSpell"].GetValue <bool>() &&
                    spellDrawingConfig.Active)
                {
                    if (spell.info.spellType == SpellType.Line)
                    {
                        Vector2 spellPos    = spell.currentSpellPosition;
                        Vector2 spellEndPos = spell.GetSpellEndPosition();

                        DrawLineRectangle(spellPos, spellEndPos, (int)spell.radius, spellDrawingWidth, spellDrawingConfig.Color);

                        /*foreach (var hero in ObjectManager.Get<Obj_AI_Hero>())
                         * {
                         *  Render.Circle.DrawCircle(new Vector3(hero.ServerPosition.X, hero.ServerPosition.Y, myHero.Position.Z), (int)spell.radius, Color.Red, 5);
                         * }*/

                        if (ObjectCache.menuCache.cache["DrawSpellPos"].GetValue <bool>())// && spell.spellObject != null)
                        {
                            //spellPos = SpellDetector.GetCurrentSpellPosition(spell, true, ObjectCache.gamePing);

                            /*if (true)
                             * {
                             *  var spellPos2 = spell.startPos + spell.direction * spell.info.projectileSpeed * (Evade.GetTickCount - spell.startTime - spell.info.spellDelay) / 1000 + spell.direction * spell.info.projectileSpeed * ((float)ObjectCache.gamePing / 1000);
                             *  Render.Circle.DrawCircle(new Vector3(spellPos2.X, spellPos2.Y, myHero.Position.Z), (int)spell.radius, Color.Red, 8);
                             * }*/

                            /*if (spell.spellObject != null && spell.spellObject.IsValid && spell.spellObject.IsVisible &&
                             *    spell.spellObject.Position.To2D().Distance(ObjectCache.myHeroCache.serverPos2D) < spell.info.range + 1000)*/

                            Render.Circle.DrawCircle(new Vector3(spellPos.X, spellPos.Y, myHero.Position.Z), (int)spell.radius, spellDrawingConfig.Color, spellDrawingWidth);
                        }
                    }
                    else if (spell.info.spellType == SpellType.Circular)
                    {
                        Render.Circle.DrawCircle(new Vector3(spell.endPos.X, spell.endPos.Y, myHero.Position.Z), (int)spell.radius, spellDrawingConfig.Color, spellDrawingWidth);
                    }
                    else if (spell.info.spellType == SpellType.Cone)
                    {
                    }
                }
            }
        }