private void DrawRectangle(RectangleF rectangle, Color color, float width, bool inflate = true)
 {
     if (inflate)
     {
         rectangle.Inflate(1, 0);
     }
     Line.DrawLine(color, width, rectangle.TopLeft, rectangle.TopRight, rectangle.BottomRight, rectangle.BottomLeft, rectangle.TopLeft);
 }
Example #2
0
 private void DrawRectangle(RectangleF rectangle, Color color, float width, bool inflate = true)
 {
     if (inflate)
     {
         rectangle.Inflate(1, 0);
     }
     if (new Rectangle((int)rectangle.X, (int)rectangle.Y, (int)rectangle.Width, (int)rectangle.Height).IsInside(Position))
     {
         Line.DrawLine(color, width, rectangle.TopLeft, rectangle.TopRight, rectangle.BottomRight, rectangle.BottomLeft, rectangle.TopLeft);
     }
 }
 private void DrawColorBar(RectangleF box, Func <int, Color> colorModifier)
 {
     if (colorModifier == null)
     {
         throw new ArgumentException("Color Modifier Argument Invalid!");
     }
     for (int color = 0; color < 255; color++)
     {
         var linePos = GetLineStartPos(box, color);
         Line.DrawLine(colorModifier.Invoke(color), LineWidth + 1, linePos, SetVector(linePos, float.MaxValue, box.Bottom));
     }
 }
        private void DrawColorPointer(RectangleF box, int color)
        {
            var linePos     = GetLineStartPos(box, color);
            var arrowTop    = RectangleFromCenter(linePos, 8, 10);
            var arrowBottom = RectangleFromCenter(SetVector(linePos, float.MaxValue, box.Bottom), 8, 10);

            Line.DrawLine(DefaultColorGold, 2, arrowTop.TopLeft, arrowTop.Center, arrowTop.TopRight, arrowTop.TopLeft);
            Line.DrawLine(DefaultColorGold, 2, arrowBottom.BottomLeft, arrowBottom.Center, arrowBottom.BottomRight, arrowBottom.BottomLeft);
            if (DrawPointerLine)
            {
                Line.DrawLine(Color.Black, arrowTop.Center, arrowBottom.Center);
            }
        }
Example #5
0
        public void DrawLinks()
        {
            var onscreen = position.IsOnScreen();

            foreach (var i in Neighbors)
            {
                var n = navGraph.Nodes[i];
                if (onscreen || n.position.IsOnScreen())
                {
                    Line.DrawLine(navGraph.LineColor, 1f, position, n.position);
                }
            }
        }
Example #6
0
        public void DrawLinks()
        {
            bool onscreen = Position.IsOnScreen();

            foreach (int i in Neighbors)
            {
                Node n = _navGraph.Nodes[i];
                if (onscreen || n.Position.IsOnScreen())
                {
                    Line.DrawLine(_navGraph.LineColor, 1f, Position, n.Position);
                }
            }
        }
        public override bool Draw()
        {
            base.Draw();



            DisplayNameText.Position = OffsetVector(ColorBarNative.TopLeft, 0, -22);
            DisplayNameText.Draw();

            //Color Display Bar
            DrawRectangle(ColorBarNative, DefaultColorGold, 2, false);
            Line.DrawLine(CurrentValue, ColorBarNative.Height - 2,
                          SetVector(ColorBarNative.TopLeft, ColorBarNative.TopLeft.X + 1, ColorBarNative.Center.Y),
                          SetVector(ColorBarNative.TopRight, ColorBarNative.Right, ColorBarNative.Center.Y));

            //Red
            DrawColorBar(RedBarNative, color => Color.FromArgb(color, Green, Blue));
            DrawRectangle(RedBarNative, DefaultColorGold, 2f);
            DrawColorPointer(RedBarNative, Red);
            RedText.TextValue = "Red: " + Red;
            RedText.Position  = OffsetVector(RedBarNative.BottomRight, -50, _barPadding[3]);
            RedText.Draw();

            //Green
            DrawColorBar(GreenBarNative, color => Color.FromArgb(Red, color, Blue));
            DrawRectangle(GreenBarNative, DefaultColorGold, 2);
            DrawColorPointer(GreenBarNative, Green);
            GreenText.TextValue = "Green: " + Green;
            GreenText.Position  = OffsetVector(GreenBarNative.BottomRight, -60, _barPadding[3]);
            GreenText.Draw();

            //Blue
            DrawColorBar(BlueBarNative, color => Color.FromArgb(Red, Green, color));
            DrawRectangle(BlueBarNative, DefaultColorGold, 2);
            DrawColorPointer(BlueBarNative, Blue);
            BlueText.TextValue = "Blue: " + Blue;
            BlueText.Position  = OffsetVector(BlueBarNative.BottomRight, -50, _barPadding[3]);
            BlueText.Draw();

            //Alpha
            DrawColorBar(AlphaBarNative, color => Color.FromArgb(color, color, color));
            DrawRectangle(AlphaBarNative, DefaultColorGold, 2);
            DrawColorPointer(AlphaBarNative, Alpha);
            AlphaText.TextValue = "Alpha: " + Alpha;
            AlphaText.Position  = OffsetVector(AlphaBarNative.BottomRight, -60, _barPadding[3]);
            AlphaText.Draw();

            return(true);
        }
        public override bool Draw()
        {
            base.Draw();

            this.DisplayNameText.Position = this.OffsetVector(this.ColorBarNative.TopLeft, 0, -22);
            this.DisplayNameText.Draw();

            //Color Display Bar
            this.DrawRectangle(this.ColorBarNative, DefaultColorGold, 2, false);
            Line.DrawLine(
                this.CurrentValue,
                this.ColorBarNative.Height - 2,
                this.SetVector(this.ColorBarNative.TopLeft, this.ColorBarNative.TopLeft.X + 1, this.ColorBarNative.Center.Y),
                this.SetVector(this.ColorBarNative.TopRight, this.ColorBarNative.Right, this.ColorBarNative.Center.Y));

            //Red
            this.DrawColorBar(this.RedBarNative, color => Color.FromArgb(color, this.Green, this.Blue));
            this.DrawRectangle(this.RedBarNative, DefaultColorGold, 2f);
            this.DrawColorPointer(this.RedBarNative, this.Red);
            this.RedText.TextValue = "Red: " + this.Red;
            this.RedText.Position  = this.OffsetVector(this.RedBarNative.BottomRight, -50, this._barPadding[3]);
            this.RedText.Draw();

            //Green
            this.DrawColorBar(this.GreenBarNative, color => Color.FromArgb(this.Red, color, this.Blue));
            this.DrawRectangle(this.GreenBarNative, DefaultColorGold, 2);
            this.DrawColorPointer(this.GreenBarNative, this.Green);
            this.GreenText.TextValue = "Green: " + this.Green;
            this.GreenText.Position  = this.OffsetVector(this.GreenBarNative.BottomRight, -60, this._barPadding[3]);
            this.GreenText.Draw();

            //Blue
            this.DrawColorBar(this.BlueBarNative, color => Color.FromArgb(this.Red, this.Green, color));
            this.DrawRectangle(this.BlueBarNative, DefaultColorGold, 2);
            this.DrawColorPointer(this.BlueBarNative, this.Blue);
            this.BlueText.TextValue = "Blue: " + this.Blue;
            this.BlueText.Position  = this.OffsetVector(this.BlueBarNative.BottomRight, -50, this._barPadding[3]);
            this.BlueText.Draw();

            //Alpha
            this.DrawColorBar(this.AlphaBarNative, color => Color.FromArgb(color, color, color));
            this.DrawRectangle(this.AlphaBarNative, DefaultColorGold, 2);
            this.DrawColorPointer(this.AlphaBarNative, this.Alpha);
            this.AlphaText.TextValue = "Alpha: " + this.Alpha;
            this.AlphaText.Position  = this.OffsetVector(this.AlphaBarNative.BottomRight, -60, this._barPadding[3]);
            this.AlphaText.Draw();

            return(true);
        }
Example #9
0
        private void DrawColorPointer(RectangleF box, int color)
        {
            var linePos     = this.GetLineStartPos(box, color);
            var arrowTop    = this.RectangleFromCenter(linePos, 8, 10);
            var arrowBottom = this.RectangleFromCenter(this.SetVector(linePos, float.MaxValue, box.Bottom), 8, 10);

            if (new Rectangle((int)box.X, (int)box.Y, (int)box.Width, (int)box.Height).IsInside(Position))
            {
                Line.DrawLine(DefaultColorGold, 2, arrowTop.TopLeft, arrowTop.Center, arrowTop.TopRight, arrowTop.TopLeft);
                Line.DrawLine(DefaultColorGold, 2, arrowBottom.BottomLeft, arrowBottom.Center, arrowBottom.BottomRight, arrowBottom.BottomLeft);
                if (this.DrawPointerLine)
                {
                    Line.DrawLine(Color.White, arrowTop.Center, arrowBottom.Center);
                }
            }
        }
Example #10
0
        private void DrawPendingSpell()
        {
            if (SelectedPoint != null)
            {
                var spellData = GetSpellData(SelectedPoint.ChampionName, SelectedPoint.SpellSlot);

                if (spellData != null)
                {
                    Circle.Draw(new ColorBGRA(255, 255, 255, 255), spellData.Range, 1, SelectedPoint.StartPosition);
                    var angle = SelectedPoint.Angle / (180 / (Math.PI));
                    var newX  = SelectedPoint.StartPosition.X + spellData.Range * Math.Cos(angle);
                    var newY  = SelectedPoint.StartPosition.Y + spellData.Range * Math.Sin(angle);
                    SelectedPoint.EndPosition = new Vector3((float)newX, (float)newY, SelectedPoint.StartPosition.Z);
                    Line.DrawLine(Color.White, SelectedPoint.StartPosition, SelectedPoint.EndPosition);
                }
            }
        }
Example #11
0
 protected override void Drawing_OnEndScene(EventArgs args)
 {
     //PLEASE IGNORE HOW SHIT THIS CODE IS I AM TIRED AND WANT TO GO TO SLEEP! I WILL FIX IT WHEN I GET TO IT
     if (!Value.Use("tracker.enable"))
     {
         return;
     }
     if (MainMenu.IsOpen)
     {
         return;
     }
     if (Shop.IsOpen)
     {
         return;
     }
     foreach (var avaliblity in HeroSpellAvaliblitys)
     {
         if (!avaliblity.Key.IsHPBarRendered)
         {
             return;
         }
         if ((!avaliblity.Key.IsEnemy || !Value.Use("tracker.show.player.enemies")) && (!avaliblity.Key.IsAlly || !Value.Use("tracker.show.player.allies")))
         {
             continue;                                                                                                                                                 // || avaliblity.Key.IsMe) continue;
         }
         var drawPos   = new Vector2(avaliblity.Key.HPBarPosition.X + avaliblity.Key.HPBarXOffset + Value.Get("tracker.visual.offset.x"), avaliblity.Key.HPBarPosition.Y + avaliblity.Key.HPBarYOffset + Value.Get("tracker.visual.offset.y"));
         var spells    = avaliblity.Value;
         var lineWidth = 112 / 4;
         var startPos  = new Vector2(drawPos.X + 3, drawPos.Y + 10);
         for (int slotIndex = 0; slotIndex < SpellAvaliblity.TrackedSpellSlots.Length; slotIndex++)
         {
             var slot = SpellAvaliblity.TrackedSpellSlots[slotIndex];
             if (slot == SpellSlot.Summoner1 || slot == SpellSlot.Summoner2)
             {
                 continue;
             }
             Line.DrawLine(spells.IsAvailable(slot) ? Color.Green : Color.Red, 4, new Vector2(startPos.X + lineWidth * slotIndex, startPos.Y),
                           new Vector2(startPos.X + lineWidth * slotIndex + lineWidth * spells.CoolDownPercent(slot), startPos.Y));
         }
         TrackerHud.Draw(drawPos);
     }
 }
Example #12
0
            public void DrawHealth()
            {
                // Get the screen position
                var pos = ScreenPosition;

                // Calculate the outline rectangle
                var rect = new RectangleF((int)(pos.X + HealthBar.X), (int)(pos.Y + HealthBar.Y), (int)HealthBar.Width, (int)HealthBar.Height);

                // Draw the background
                Drawing.DrawLine(new Vector2(rect.Left, rect.Top + rect.Height / 2), new Vector2(rect.Right, rect.Top + rect.Height / 2), rect.Height, HealthBarBackgroundColor);

                // Get the health percent
                var percent = (Handle == null ? MaxHealth : Handle.Health) / MaxHealth;

                // Draw the percent lines
                var colors = HealthBarColors[MasterMind.IsSpectatorMode ? Team : (Team.IsAlly() ? GameObjectTeam.Order : GameObjectTeam.Chaos)];
                var max    = rect.Height - HealthBarBorderWidth * 2;

                for (var i = 0; i < max; i++)
                {
                    var start = new Vector2(rect.Left + HealthBarBorderWidth, rect.Top + HealthBarBorderWidth + i);
                    Line.DrawLine(Color.FromArgb((byte)(colors.Item1.R + (colors.Item2.R - colors.Item1.R) * (i / max)),
                                                 (byte)(colors.Item1.G + (colors.Item2.G - colors.Item1.G) * (i / max)),
                                                 (byte)(colors.Item1.B + (colors.Item2.B - colors.Item1.B) * (i / max))), 1, start, start + new Vector2((int)((rect.Width - HealthBarBorderWidth * 2) * percent), 0));
                }

                // Draw the separating lines
                var step        = 1 / MaxHealth;
                var currentStep = step;

                for (var i = 0; i < MaxHealth - 1; i++)
                {
                    // Draw the separator
                    var start = new Vector2((float)(rect.Left + HealthBarBorderWidth + Math.Round(currentStep * (rect.Width - HealthBarBorderWidth * 2))), rect.Top);
                    Drawing.DrawLine(start, start + new Vector2(0, rect.Height), HealthBarPadding, Color.FromArgb(200, HealthBarBackgroundColor));

                    // Increase step
                    currentStep += step;
                }
            }
Example #13
0
        // ReSharper disable once FunctionComplexityOverflow
        private void OnDraw(EventArgs args)
        {
            foreach (var hero in EntityManager.Heroes.AllHeroes.Where(o => (MasterMind.IsSpectatorMode || !o.IsMe) && o.IsHPBarRendered && o.IsVisible))
            {
                // Validate team
                if (hero.Team == AlliedTeam)
                {
                    if (!TrackAllies.CurrentValue)
                    {
                        continue;
                    }
                }
                else
                {
                    if (!TrackEnemies.CurrentValue)
                    {
                        continue;
                    }
                }

                // Get the HP bar position
                var pos = hero.HPBarPosition.Round();

                try
                {
                    // Draw the spell lines and numbers
                    for (var i = 0; i < 4; i++)
                    {
                        // Get the spell
                        var spell = hero.Spellbook.GetSpell((SpellSlot)i);

                        // Start position of the line
                        var start = pos + SpellOffset + new Vector2(i * (SpellSize.X + SpellLinePadding), 0);

                        // Get the current cooldown
                        var cooldown = Math.Max(0, spell.CooldownExpires - Game.Time);

                        // Check if the spell is ready
                        if (spell.IsLearned && cooldown <= 0)
                        {
                            Line.DrawLine(SpellReady, SpellSize.Y, start, start + new Vector2(SpellSize.X, 0));
                        }
                        else
                        {
                            // Calculate percent cooldown
                            var percent = 1 - Math.Min(1, cooldown / spell.Cooldown);

                            // Calculate end position
                            var end = start + new Vector2(SpellSize.X * percent, 0);

                            // Draw the lines
                            Line.DrawLine(spell.IsLearned ? SpellBackground : SpellNotLearned, SpellSize.Y, start, start + new Vector2(SpellSize.X, 0));
                            if (spell.IsLearned)
                            {
                                Line.DrawLine(spell.GetSpellColor(percent), SpellSize.Y, start, end);

                                // Draw the remaining time as text
                                if (DrawText.CurrentValue)
                                {
                                    CooldownText.TextValue = ((int)Math.Ceiling(cooldown)).ToString();
                                    CooldownText.Position  = new Vector2(start.X + SpellSize.X / 2 - CooldownText.Bounding.Width / 2f, start.Y + SpellCooldownTextOffset);
                                    CooldownText.Draw();
                                }
                            }
                        }
                    }

                    // Draw the overlay
                    SpellOverlaySprite.Draw(pos + OverlayOffset);
                }
                catch (Exception e)
                {
                    Logger.Warn("[MasterMind] Failed to draw spell cooldowns");
                    Logger.Warn(e.ToString());
                }

                if (DrawSummoners.CurrentValue)
                {
                    try
                    {
                        if (SummonerAtlas.SpriteAtlas == null)
                        {
                            throw new NullReferenceException("SummonerAtlas.SpriteAtlas is null");
                        }

                        for (var i = 0; i < 2; i++)
                        {
                            // Get the spell
                            var spell = hero.Spellbook.GetSpell(i + SpellSlot.Summoner1);

                            // Start position of the line
                            var start = pos + SummonerOffset + new Vector2(i * (SummonerSize.X + SummonerPadding), 0);

                            // Get the current cooldown
                            var cooldown = Math.Max(0, spell.CooldownExpires - Game.Time);

                            // Draw the summoner spell image
                            var summoner = SummonerAtlas[spell.Name];
                            if (summoner != null)
                            {
                                if (cooldown <= 0)
                                {
                                    // Draw the regular summoner image
                                    SummonersSprite.Draw(start, summoner.Rectangle);
                                }
                                else
                                {
                                    // Calculate percent cooldown
                                    var percent = 1 - Math.Min(1, cooldown / spell.Cooldown);

                                    // Calculate radian
                                    var radian = (float)(2 * Math.PI * percent);

                                    if (percent < 0.5f)
                                    {
                                        // Draw right side of the summoner image
                                        SummonersSprite.Draw(start + new Vector2((int)(SummonerAtlas.SpriteAtlas.Width / 2f), 0), summoner.RightHalf);

                                        // Draw rotated cooldown circle
                                        SummonersSprite.Draw(start, SummonerAtlas.GetCooldownRectangle(SummonerAtlas.CooldownType.Circle), CooldownCenter, radian);

                                        // Draw left side of the summoner image
                                        SummonersSprite.Draw(start, summoner.LeftHalf);

                                        // Draw cooldown overlay
                                        SummonersSprite.Draw(start, SummonerAtlas.GetCooldownRectangle(SummonerAtlas.CooldownType.Overlay));
                                    }
                                    else
                                    {
                                        // Draw left side of the summoner image
                                        SummonersSprite.Draw(start, summoner.LeftHalf);

                                        // Draw rotated cooldown circle
                                        SummonersSprite.Draw(start, SummonerAtlas.GetCooldownRectangle(SummonerAtlas.CooldownType.Circle), CooldownCenter, radian);

                                        // Draw right side of the summoner image
                                        SummonersSprite.Draw(start + new Vector2((int)(SummonerAtlas.SpriteAtlas.Width / 2f), 0), summoner.RightHalf);
                                    }

                                    // Draw the cooldown border
                                    SummonersSprite.Draw(start, SummonerAtlas.GetCooldownRectangle(SummonerAtlas.CooldownType.Border));
                                }
                            }

                            // Draw the remaining time as text
                            if (DrawText.CurrentValue && cooldown > 0)
                            {
                                try
                                {
                                    var text = TimeSpan.FromSeconds((int)Math.Ceiling(cooldown)).ToString("ss");
                                    if (cooldown > 59)
                                    {
                                        text = TimeSpan.FromSeconds((int)Math.Ceiling(cooldown)).Minutes.ToString();
                                    }
                                    CooldownText.TextValue = text;
                                    CooldownText.Position  = new Vector2(start.X + SummonerSize.X / 2 - CooldownText.Bounding.Width / 2f + ((SummonerCooldownTextPadding / 2) * (i % 2 == 0 ? -1 : 1)),
                                                                         start.Y + SummonerCooldownTextOffset);
                                    CooldownText.Draw();
                                }
                                catch (Exception e)
                                {
                                    Logger.Warn("[MasterMind] Failed to draw summoner cooldown texts");
                                    Logger.Warn(e.ToString());
                                }
                            }
                        }

                        // Draw the overlay
                        SummonerOverlaySprite.Draw(pos + OverlaySummonerOffset);
                    }
                    catch (Exception e)
                    {
                        Logger.Warn("[MasterMind] Failed to draw summoner cooldowns");
                        Logger.Warn(e.ToString());
                    }
                }
            }
        }
Example #14
0
        protected override void Drawing_OnEndScene(EventArgs args)
        {
            //PLEASE IGNORE HOW SHIT THIS CODE IS I AM TIRED AND WANT TO GO TO SLEEP! I WILL FIX IT WHEN I GET TO IT
            if (!Value.Use("tracker.enable"))
            {
                return;
            }
            if (MainMenu.IsOpen)
            {
                return;
            }
            if (Shop.IsOpen)
            {
                return;
            }
            foreach (var avaliblity in HeroSpellAvaliblitys)
            {
                var hero = avaliblity.Key;
                if (hero.IsDead || hero.IsNoRender)
                {
                    return;
                }
                if (Value.Use("tracker.show.onlyhpbarrendered") && !hero.IsHPBarRendered)
                {
                    return;
                }
                if (hero.IsMe && !Value.Use("tracker.show.player.me"))
                {
                    return;
                }
                if ((!hero.IsEnemy || !Value.Use("tracker.show.player.enemies")) && (!hero.IsAlly || !Value.Use("tracker.show.player.allies")))
                {
                    continue;                                                                                                                             // || hero.IsMe) continue;
                }
                var drawPos = hero.IsMe ? OffsetVector(GetDrawPos(avaliblity.Key), 0, -8) : GetDrawPos(avaliblity.Key);
                drawPos = GetChampionOffset(drawPos, hero.Hero);
                var spells   = avaliblity.Value;
                var startPos = OffsetVector(drawPos, _lineTrackerOffset);
                var endPos   = OffsetVector(drawPos, _lineTrackerOffset.X + _spellTrackerWidth * 4, _lineTrackerOffset.Y);
                Line.DrawLine(Color.Black, 4, startPos, endPos);
                for (int slotIndex = 0; slotIndex < SpellAvaliblity.TrackedSpellSlots.Length; slotIndex++)
                {
                    var slot = SpellAvaliblity.TrackedSpellSlots[slotIndex];
                    if (slot == SpellSlot.Summoner1 || slot == SpellSlot.Summoner2)
                    {
                        HeroSpellSprites[avaliblity.Key][slot].Draw(slot == SpellSlot.Summoner1 ? endPos : OffsetVector(endPos, 8, 0));

                        if (!spells.IsAvailable(slot))
                        {
                            Line.DrawLine(Color.FromArgb(180, Color.Black), 8, OffsetVector(endPos, slot == SpellSlot.Summoner1 ? 0 : 8, 2), OffsetVector(endPos, slot == SpellSlot.Summoner1 ? 8 : 16, 2));
                        }
                    }
                    else
                    {
                        var color = _availableLineColor;
                        if (!spells.IsLearned(slot))
                        {
                            color = _notLearnedeLineColor;
                        }
                        if (!spells.IsAvailable(slot))
                        {
                            color = _notAvailableLineColor;
                        }

                        Line.DrawLine(color, 4, OffsetVector(startPos, _spellTrackerWidth * slotIndex, 0),
                                      OffsetVector(startPos, _spellTrackerWidth * slotIndex + _spellTrackerWidth * spells.CoolDownPercent(slot), 0));
                    }
                }

                TrackerHud.Draw(drawPos);
                if (hero.IsMe && (hero.Hero != Champion.Jhin))
                {
                    Line.DrawLine(Color.FromArgb(74, 73, 74), 6, OffsetVector(startPos, 21, -6), OffsetVector(endPos, 15, -6));
                }
            }
        }
Example #15
0
        public void onDraw(EventArgs args)
        {
            var hudSpace = 0;

            foreach (var hero in InfoLoader.ChampionInfoList.Where(x => !x.Hero.IsDead))
            {
                if (Show2DHud.CurrentValue && hero.Hero.IsEnemy)
                {
                    Sprite sprite8 = hero.HudSprite;
                    if (!hero.Hero.IsHPBarRendered)
                    {
                        sprite8.Color = Color.DimGray;
                    }
                    else
                    {
                        sprite8.Color = Color.White;
                    }
                    Vector2 vector45 = new Vector2(HudX.CurrentValue + hudSpace, HudY.CurrentValue);
                    sprite8.Scale = new Vector2(0.33f, 0.33f);
                    sprite8.Draw(vector45 + new Vector2(-10, 14.5f));
                    Vector2 vector46 = new Vector2(vector45.X - 9f, vector45.Y + 64f);
                    Vector2 vector47 = new Vector2(vector45.X - 8f + 33f + 3f, vector45.Y + 64f);
                    EloBuddy.SDK.Rendering.Line.DrawLine(Color.DarkGoldenrod, 18f, vector46, vector47);

                    Vector2 vector48 = new Vector2(vector45.X - 8f, vector45.Y + 64f);
                    Vector2 vector49 = new Vector2(vector45.X - 8f + 33f + 2f, vector45.Y + 64f);
                    EloBuddy.SDK.Rendering.Line.DrawLine(Color.Black, 16f, vector48, vector49);

                    Color color2 = Color.LimeGreen;
                    if (hero.Hero.HealthPercent < 30f)
                    {
                        color2 = Color.OrangeRed;
                    }
                    else if (hero.Hero.HealthPercent < 50f)
                    {
                        color2 = Color.DarkOrange;
                    }
                    Vector2 vector50 = new Vector2(vector45.X - 7f, vector45.Y + 60f);
                    Vector2 vector51 = new Vector2(vector45.X - 7f + 33f * hero.Hero.HealthPercent * 0.01f, vector45.Y + 60f);
                    EloBuddy.SDK.Rendering.Line.DrawLine(color2, 7f, vector50, vector51);

                    Vector2 vector52 = new Vector2(vector45.X - 7f, vector45.Y + 68f);
                    Vector2 vector53 = new Vector2(vector45.X - 7f + 33f * hero.Hero.ManaPercent * 0.01f, vector45.Y + 68f);
                    EloBuddy.SDK.Rendering.Line.DrawLine(Color.DodgerBlue, 5f, vector52, vector53);

                    var spell4         = hero.Hero.Spellbook.Spells[3];
                    var spellDataInst  = hero.Hero.Spellbook.Spells[4];
                    var spellDataInst2 = hero.Hero.Spellbook.Spells[5];

                    if (spell4 != null)
                    {
                        float   num49    = spell4.CooldownExpires - Game.Time;
                        Vector2 vector54 = new Vector2(vector45.X - 2f, vector45.Y - 30f);
                        Vector2 vector55 = new Vector2(vector45.X + 9f, vector45.Y - 20f);
                        Sprite  sprite9  = GetSummonerIcon("r");
                        sprite9.Scale = new Vector2(0.35f, 0.35f);
                        if (hero.Hero.Level < 6)
                        {
                            sprite9.Color = Color.DimGray;
                            sprite9.Draw(vector54);
                        }
                        else if (num49 < 0f)
                        {
                            sprite9.Color = Color.White;
                            sprite9.Draw(vector54);
                        }
                        else
                        {
                            sprite9.Color = Color.DimGray;
                            sprite9.Draw(vector54);
                            DrawFontTextScreen(HudCd, MakeNiceNumber(num49), Color.White, vector55);
                        }
                    }

                    if (spellDataInst != null)
                    {
                        float   num50    = spellDataInst.CooldownExpires - Game.Time;
                        Vector2 vector56 = new Vector2(vector45.X - 13f, vector45.Y - 10f);
                        Vector2 vector57 = new Vector2(vector45.X - 1f, vector45.Y + 2f);
                        Sprite  sprite10 = GetSummonerIcon(spellDataInst.Name);
                        sprite10.Scale = new Vector2(0.35f, 0.35f);
                        if (num50 < 0f)
                        {
                            sprite10.Color = Color.White;
                            sprite10.Draw(vector56);
                        }
                        else
                        {
                            sprite10.Color = Color.DimGray;
                            sprite10.Draw(vector56);
                            DrawFontTextScreen(HudCd, MakeNiceNumber(num50), Color.White, vector57);
                        }
                    }

                    if (spellDataInst2 != null)
                    {
                        float   num51    = spellDataInst2.CooldownExpires - Game.Time;
                        Vector2 vector58 = new Vector2(vector45.X + 9f, vector45.Y - 10f);
                        Vector2 vector59 = new Vector2(vector45.X + 22f, vector45.Y + 2f);
                        Sprite  sprite11 = GetSummonerIcon(spellDataInst2.Name);
                        sprite11.Scale = new Vector2(0.35f, 0.35f);
                        if (num51 < 0f)
                        {
                            sprite11.Color = Color.White;
                            sprite11.Draw(vector58);
                        }
                        else
                        {
                            sprite11.Color = Color.DimGray;
                            sprite11.Draw(vector58);
                            DrawFontTextScreen(HudCd, MakeNiceNumber(num51), Color.White, vector59);
                        }
                    }
                    hudSpace += 45;
                }
                if (Show3DHud.CurrentValue)
                {
                    var vector6        = hero.Hero.HPBarPosition + new Vector2(-8f, -11f);
                    var spell          = hero.Hero.Spellbook.GetSpell(SpellSlot.Q);
                    var spell2         = hero.Hero.Spellbook.GetSpell(SpellSlot.W);
                    var spell3         = hero.Hero.Spellbook.GetSpell(SpellSlot.E);
                    var spell4         = hero.Hero.Spellbook.GetSpell(SpellSlot.R);
                    var spellDataInst  = hero.Hero.Spellbook.Spells[4];
                    var spellDataInst2 = hero.Hero.Spellbook.Spells[5];

                    if (hero.Hero.IsHPBarRendered && hero.Hero.Position.IsOnScreen() && ((ShowTeam3D.CurrentValue && (hero.Hero.IsAlly && !hero.Hero.IsMe)) ||
                                                                                         (ShowEnemies3D.CurrentValue && hero.Hero.IsEnemy) ||
                                                                                         (ShowSelf3D.CurrentValue && hero.Hero.IsMe)))
                    {
                        if (hero.Hero.IsAlly)
                        {
                            vector6 += new Vector2(1f, -2f);
                        }
                        if (hero.Hero.IsMe)
                        {
                            vector6 += new Vector2(25f, 0f);
                        }
                        Line.DrawLine(Color.DimGray, 9f, vector6 + new Vector2(7f, 34f), vector6 + new Vector2(115f, 34f));
                        Line.DrawLine(Color.Black, 7f, vector6 + new Vector2(8f, 34f), vector6 + new Vector2(113f, 34f));
                        float num11 = spell.CooldownExpires - Game.Time;
                        float num12 = spell2.CooldownExpires - Game.Time;
                        float num13 = spell3.CooldownExpires - Game.Time;
                        float num14 = spell4.CooldownExpires - Game.Time;
                        float num15 = (spell4.SData.CooldownTime > 15f) ? spell4.SData.CooldownTime : 90f;
                        float num16 = Math.Max(Math.Min(num11 / spell.SData.CooldownTime, 1f), 0f);
                        float num17 = Math.Max(Math.Min(num12 / spell2.SData.CooldownTime, 1f), 0f);
                        float num18 = Math.Max(Math.Min(num13 / spell3.SData.CooldownTime, 1f), 0f);
                        float num19 = Math.Max(Math.Min(num14 / num15, 1f), 0f);
                        if (spell.Level > 0)
                        {
                            Vector2 vector7 = vector6 + new Vector2(9f, 34f);
                            Line.DrawLine(num16 > 0f ? Color.Orange : Color.YellowGreen, 5f, vector7, vector6 + new Vector2(33f - 24f * num16, 34f));
                            if (num16 > 0f)
                            {
                                DrawFontTextScreen(HudCd, MakeNiceNumber(num11 + 1f), Color.White, vector7 + new Vector2(14f, 11f));
                            }
                        }
                        if (spell2.Level > 0)
                        {
                            Vector2 vector8 = vector6 + new Vector2(35f, 34f);
                            Line.DrawLine(num17 > 0f ? Color.Orange : Color.YellowGreen, 5f, vector8, vector6 + new Vector2(59f - 24f * num17, 34f));
                            if (num17 > 0f)
                            {
                                DrawFontTextScreen(HudCd, MakeNiceNumber(num12 + 1f), Color.White, vector8 + new Vector2(14f, 11f));
                            }
                        }
                        if (spell3.Level > 0)
                        {
                            Vector2 vector9 = vector6 + new Vector2(61f, 34f);
                            Line.DrawLine((num18 > 0f) ? Color.Orange : Color.YellowGreen, 5f, vector9, vector6 + new Vector2(85f - 24f * num18, 34f));
                            if (num18 > 0f)
                            {
                                DrawFontTextScreen(HudCd, MakeNiceNumber(num13 + 1f), Color.White, vector9 + new Vector2(14f, 11f));
                            }
                        }
                        if (spell4.Level > 0)
                        {
                            Vector2 vector10 = vector6 + new Vector2(87f, 34f);
                            Line.DrawLine((num19 > 0f) ? Color.Orange : Color.YellowGreen, 5f, vector10, vector6 + new Vector2(112f - 24f * num19, 34f));
                            if (num19 > 0f)
                            {
                                DrawFontTextScreen(HudCd, MakeNiceNumber(num14 + 1f), Color.White, vector10 + new Vector2(14f, 11f));
                            }
                        }
                        if (spellDataInst != null)
                        {
                            Sprite  sprite   = GetSummonerIconSquare(spellDataInst.Name);
                            Vector2 vector11 = new Vector2(-50f, 14f);
                            if (hero.Hero.IsMe)
                            {
                                vector11 = new Vector2(117f, 14f);
                            }
                            Vector2 vector12 = vector6 + vector11;
                            float   num20    = spellDataInst.CooldownExpires - Game.Time;
                            if (num20 < 0f)
                            {
                                sprite.Color = Color.White;
                                sprite.Draw(vector12);
                            }
                            else
                            {
                                sprite.Color = Color.DimGray;
                                sprite.Draw(vector12);
                                DrawFontTextScreen(HudCd, MakeNiceNumber(num20), Color.White, vector12 + new Vector2(13f, 13f));
                            }
                        }
                        if (spellDataInst2 != null)
                        {
                            Sprite  sprite2  = GetSummonerIconSquare(spellDataInst2.Name);
                            Vector2 vector13 = new Vector2(-22f, 14f);
                            if (hero.Hero.IsMe)
                            {
                                vector13 = new Vector2(145f, 14f);
                            }
                            Vector2 vector14 = vector6 + vector13;
                            float   num21    = spellDataInst2.CooldownExpires - Game.Time;
                            if (num21 < 0f)
                            {
                                sprite2.Color = Color.White;
                                sprite2.Draw(vector14);
                            }
                            else
                            {
                                sprite2.Color = Color.DimGray;
                                sprite2.Draw(vector14);
                                DrawFontTextScreen(HudCd, MakeNiceNumber(num21), Color.White, vector14 + new Vector2(13f, 13f));
                            }
                        }
                    }
                }
            }
        }