Esempio n. 1
0
            public void Draw(Vector2 pos)
            {
                var color = this.Ready ? Color.Green : Color.Red;

                if (this.SpellTexture != null)
                {
                    this.SpellTexture.Draw(pos);
                }

                Utility.DrawRectangleOutline(pos, this.Width, this.Height, 3, color);

                var spellRect = new Aimtec.Rectangle((int)pos.X, (int)pos.Y, (int)pos.X + 25, (int)pos.Y + 25);

                var state = this.Spell.State;

                if (state.HasFlag(SpellState.Cooldown) || state.HasFlag(SpellState.Unknown) ||
                    state.HasFlag(SpellState.NotLearned) || state.HasFlag(SpellState.Disabled))
                {
                    Render.Rectangle(pos, 25, 25, Color.FromArgb(150, 0, 0, 0));

                    if (state.HasFlag(SpellState.Cooldown))
                    {
                        string cdString = this.CooldownTime < 1
                            ? this.CooldownTime.ToString("0.0")
                            : Math.Ceiling(this.CooldownTime).ToString();
                        Render.Text(cdString, spellRect,
                                    RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.White);
                    }
                }
            }
Esempio n. 2
0
        private void Render_OnPresent()
        {
            if (!Config["Enabled"].Enabled)
            {
                return;
            }

            foreach (var info in this.Data)
            {
                var value = info.Value;

                if (value.HeroTexture == null || !value.Displaying)
                {
                    continue;
                }

                if (value.Hero == null || value.Hero.IsVisible || !value.Hero.IsValid || value.Hero.IsDead)
                {
                    continue;
                }

                var lastSeenPos = value.Position;

                Vector2 mmPosition;

                if (Render.WorldToMinimap(lastSeenPos, out mmPosition))
                {
                    if (mmPosition.IsZero)
                    {
                        continue;
                    }

                    var adjusted = mmPosition + new Vector2(-16, -16);
                    value.HeroTexture.Draw(adjusted);
                    var seconds = (int)Math.Ceiling(value.TimeMIA / 1000f);

                    var text = seconds.ToString();

                    var center = RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter | RenderTextFlags.NoClip
                                 | RenderTextFlags.SingleLine;

                    var textPosition = new Aimtec.Rectangle((int)adjusted.X, (int)adjusted.Y, (int)(adjusted.X + 32), (int)(adjusted.Y + 32));

                    Render.Text(text, textPosition, center, Color.White);
                }

                if (value.TimeMIA < 25000)
                {
                    var distanceTravelled = (value.TimeMIA / 1000f) * value.Hero.MoveSpeed;
                    DrawCircleOnMinimap(lastSeenPos, distanceTravelled, Color.Red, 3, 100);
                }
            }
        }
Esempio n. 3
0
 private void Render_OnPresent()
 {
     if (!Menu["on"].Enabled)
     {
         return;
     }
     for (var i = 0; i < Recalls.Count; i++)
     {
         var recall = Recalls[i];
         var drawY  = StartY - (BarHeight + 5) * i;
         var rect   = new Aimtec.Rectangle(StartX, drawY, StartX + BarWidth, drawY + BarHeight);
         Render.Rectangle(StartX, drawY, BarWidth, BarHeight, Color.FromArgb(150, 255, 255, 255));
         var fillRect = new Aimtec.Rectangle(StartX, drawY, (int)(BarWidth * (recall.Percent / 100)), BarHeight);
         Render.Rectangle(fillRect.Left, fillRect.Top, fillRect.Right, fillRect.Bottom, Color.FromArgb(150, 255, 255, 255));
         Render.Text($"{recall.Sender.ChampionName} ({recall.SecondsLeft:0.0})", rect, RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.Black);
     }
 }
Esempio n. 4
0
 private void RenderOnOnPresent()
 {
     if (!Menu["on"].Enabled)
     {
         return;
     }
     foreach (var champion in Champions)
     {
         if (!champion.Champion.IsVisible && !champion.Champion.IsDead)
         {
             //Draw on minimap.
             var lastSeen = champion.LastSeenWhere;
             var drawPos  = lastSeen.ToMiniMapPosition() + new Vector2(-12, -12);
             champion.Texture.Draw(drawPos);
             Utility.DrawCircleOnMinimap(lastSeen, 850, Color.Red, 5);
             var rect = new Aimtec.Rectangle((int)drawPos.X, (int)drawPos.Y, (int)drawPos.X + 24, (int)drawPos.Y + 24);
             Render.Text($"{Math.Floor(champion.SecondsSinceSeen)}", rect, RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.White);
         }
     }
 }
Esempio n. 5
0
        private void RenderOnOnPresent()
        {
            //Mini tracker
            var enemies = Champions.Where(x => x.Champion.IsEnemy && !x.Champion.IsDead).ToList();

            if (Menu["miniTracker"]["on"].Enabled)
            {
                for (var i = 0; i < enemies.Count; i++)
                {
                    var champion     = enemies[i];
                    var StartX       = Render.Width - 48 * (i + 1) + (Menu["miniTracker"]["invertX"].Enabled ? -Menu["miniTracker"]["xOffset"].Value : Menu["miniTracker"]["xOffset"].Value);
                    var StartY       = Render.Height - 300 + (Menu["miniTracker"]["invertY"].Enabled ? -Menu["miniTracker"]["yOffset"].Value : Menu["miniTracker"]["yOffset"].Value);
                    var championRect = new Aimtec.Rectangle(StartX, StartY, StartX + 48, StartY + 48);
                    champion.Texture.Draw(new Vector2(championRect.Left, championRect.Top));
                    var summoner1Rect = new Aimtec.Rectangle(championRect.Left, championRect.Top - 24, championRect.Left + 24, championRect.Top - 24);
                    var summoner2Rect = new Aimtec.Rectangle(summoner1Rect.Left + 24, summoner1Rect.Top, summoner1Rect.Left + 24 + 24, summoner1Rect.Top + 24 + 24);
                    foreach (var spell in champion.SummonerSpells)
                    {
                        if (spell.Spell.Slot == SpellSlot.Summoner1)
                        {
                            spell.LargeTexture.Draw(new Vector2(summoner1Rect.Left, summoner1Rect.Top));
                            if (!spell.Ready)
                            {
                                var timer = spell.TimeLeft < 1 ? $"{spell.TimeLeft:0.0}" : $"{Math.Ceiling(spell.TimeLeft)}";
                                Render.Rectangle(summoner1Rect.Left, summoner1Rect.Top, 24, 24, Color.FromArgb(150, 0, 0, 0));
                                Render.Text(timer, new Aimtec.Rectangle(summoner1Rect.Left, summoner1Rect.Top, summoner1Rect.Left + 24, summoner1Rect.Top + 24), RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.White);
                            }
                        }
                        else if (spell.Spell.Slot == SpellSlot.Summoner2)
                        {
                            spell.LargeTexture.Draw(new Vector2(summoner2Rect.Left, summoner2Rect.Top));
                            if (!spell.Ready)
                            {
                                var timer = spell.TimeLeft < 1 ? $"{spell.TimeLeft:0.0}" : $"{Math.Ceiling(spell.TimeLeft)}";
                                Render.Rectangle(summoner2Rect.Left, summoner2Rect.Top, 24, 24, Color.FromArgb(150, 0, 0, 0));
                                Render.Text(timer, new Aimtec.Rectangle(summoner2Rect.Left, summoner2Rect.Top, summoner2Rect.Left + 24, summoner2Rect.Top + 24), RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.White);
                            }
                        }
                    }
                    //Draw level
                    var levelRect = new Aimtec.Rectangle(championRect.Right - 15, championRect.Bottom - 15, championRect.Right, championRect.Bottom);
                    Render.Rectangle(new Vector2(levelRect.Left, levelRect.Top), 15, 15, Color.FromArgb(200, Color.Black));
                    Render.Text(champion.Champion.Level.ToString(), levelRect, RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.White);

                    //Draw health
                    var healthRect = new Aimtec.Rectangle(championRect.Left, championRect.Top + 48, championRect.Left + 48, championRect.Top + 48 + 5);
                    Render.Rectangle(new Vector2(healthRect.Left, healthRect.Top), 48, 5, Color.FromArgb(150, Color.Black));
                    var healthPct = champion.Champion.HealthPercent();
                    Render.Rectangle(new Vector2(healthRect.Left, healthRect.Top), 48 * (healthPct / 100), 5, Color.FromArgb(255, 35, 193, 26));

                    //Draw mana
                    var manaRect = new Aimtec.Rectangle(healthRect.Left, healthRect.Top + 5, healthRect.Left + 48, healthRect.Top + 5 + 5);
                    Render.Rectangle(new Vector2(manaRect.Left, manaRect.Top), 48, 5, Color.FromArgb(150, Color.Black));
                    var manaPct = champion.Champion.ManaPercent();
                    Render.Rectangle(new Vector2(manaRect.Left, manaRect.Top), 48 * (manaPct / 100), 5, Color.FromArgb(255, 75, 155, 238));

                    //Health Separator Lines
                    Render.Line(new Vector2(healthRect.Left, healthRect.Top), new Vector2(healthRect.Left, healthRect.Top + 5), 1, true, Color.Black);
                    Render.Line(new Vector2(healthRect.Left, healthRect.Top + 5), new Vector2(healthRect.Left + 48, healthRect.Top + 5), 1, false, Color.Black);
                    //Mana Separator Lines
                    Render.Line(new Vector2(manaRect.Left, manaRect.Top), new Vector2(manaRect.Left, manaRect.Top + 5), 1, true, Color.Black);
                    Render.Line(new Vector2(manaRect.Left, manaRect.Top + 5), new Vector2(manaRect.Left + 48, manaRect.Top + 5), 1, false, Color.Black);
                }
            }
            foreach (var champion in Champions.Where(x => x.Champion.IsVisible && !x.Champion.IsDead))
            {
                if (champion.Champion.IsMe && !Menu["self"].Enabled)
                {
                    continue;
                }
                if (champion.Champion.IsAlly && !champion.Champion.IsMe && !Menu["ally"].Enabled)
                {
                    continue;
                }
                if (champion.Champion.IsEnemy && !Menu["enemy"].Enabled)
                {
                    continue;
                }
                var healthPos = champion.Champion.FloatingHealthBarPosition;
                //Draw champion spells.
                for (var i = 0; i < champion.ChampionSpells.Count; i++)
                {
                    var xOffset = Utility.GetChampionSpellXOffset(champion.Champion);
                    var yOffset = Utility.GetChampionSpellYOffset(champion.Champion);
                    var spell   = champion.ChampionSpells[i];
                    var drawPos = healthPos + new Vector2((i * 32) + xOffset, yOffset);
                    spell.Texture.Draw(drawPos);
                    if (!spell.Ready)
                    {
                        var timer = spell.TimeLeft < 1 ? $"{spell.TimeLeft:0.0}" : $"{Math.Ceiling(spell.TimeLeft)}";
                        var rect  = new Aimtec.Rectangle((int)drawPos.X, (int)drawPos.Y, (int)drawPos.X + 24, (int)drawPos.Y + 24);
                        Render.Rectangle(drawPos, 24, 24, Color.FromArgb(150, 0, 0, 0));
                        Render.Text(timer, rect, RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.White);
                    }
                }
                //Draw summoner spells.
                for (var i = 0; i < champion.SummonerSpells.Count; i++)
                {
                    var spell   = champion.SummonerSpells[i];
                    var xOffset = Utility.GetSummonerSpellXOffset(champion.Champion);
                    var yOffset = Utility.GetSummonerSpellYOffset(champion.Champion);
                    var drawPos = healthPos + new Vector2(xOffset, yOffset + i * 25);
                    spell.Texture.Draw(drawPos);
                    if (!spell.Ready)
                    {
                        var timer = spell.TimeLeft < 1 ? $"{spell.TimeLeft:0.0}" : $"{Math.Ceiling(spell.TimeLeft)}";
                        var rect  = new Aimtec.Rectangle((int)drawPos.X, (int)drawPos.Y, (int)drawPos.X + 24, (int)drawPos.Y + 24);
                        Render.Rectangle(drawPos, 24, 24, Color.FromArgb(150, 0, 0, 0));
                        Render.Text(timer, rect, RenderTextFlags.VerticalCenter | RenderTextFlags.HorizontalCenter, Color.White);
                    }
                }
            }
        }