Ejemplo n.º 1
0
        private void Drawing_OnEndScene(EventArgs args)
        {
            if (!menu.CheckBoxValue("enable"))
            {
                return;
            }

            var i = 0f;

            foreach (var detectedSpellInfo in DetectedSpells.Where(s => menu.CheckBoxValue(s.ChampionName + s.SpellName) && s.Position.IsOnScreen()))
            {
                text.TextValue = detectedSpellInfo.SpellName + " : " + (detectedSpellInfo.EndTime - Game.Time).ToString("F1");

                var pos = new Vector3(Game.CursorPos.X, Game.CursorPos.Y + i, Game.CursorPos.Z);

                if (detectedSpellInfo.SpellType == SpellType.Minion)
                {
                    if (detectedSpellInfo.Sender != null && detectedSpellInfo.Sender.IsHPBarRendered)
                    {
                        pos = detectedSpellInfo.Sender.ServerPosition;
                    }
                }

                if (detectedSpellInfo.SpellType == SpellType.GameObject)
                {
                    pos = detectedSpellInfo.Object != null && detectedSpellInfo.Object.IsValid ? detectedSpellInfo.Object.Position : detectedSpellInfo.Position;
                }

                if (detectedSpellInfo.SpellType == SpellType.Buff)
                {
                    if (detectedSpellInfo.Sender != null && detectedSpellInfo.Sender.IsHPBarRendered)
                    {
                        pos = new Vector3(detectedSpellInfo.Sender.ServerPosition.X, detectedSpellInfo.Sender.ServerPosition.Y, detectedSpellInfo.Sender.ServerPosition.Z);
                    }
                }

                if (pos == new Vector3(Game.CursorPos.X, Game.CursorPos.Y + i, Game.CursorPos.Z))
                {
                    text.TextValue = detectedSpellInfo.Sender.Name() + ": " + detectedSpellInfo.SpellName + " : " + (detectedSpellInfo.EndTime - Game.Time).ToString("F1");
                }

                if (LastDrawPos == pos.WorldToScreen() && DetectedSpells.Count(s => menu.CheckBoxValue(s.ChampionName + s.SpellName) && s.Position.IsOnScreen()) > 1)
                {
                    i  += 45f;
                    pos = new Vector3(pos.X, pos.Y + i, pos.Z);
                }

                text.Position = pos.WorldToScreen();
                LastDrawPos   = text.Position;
                text.Color    = System.Drawing.Color.AliceBlue;
                if (text.Position.IsOnScreen() && menu.CheckBoxValue("screen") || !menu.CheckBoxValue("screen"))
                {
                    text.Draw();
                }
            }
        }
Ejemplo n.º 2
0
        private void Drawing_OnEndScene(EventArgs args)
        {
            if (!menu.CheckBoxValue("enable"))
            {
                return;
            }

            var i = 0f;

            foreach (var detectedSpellInfo in DetectedSpells.Where(s => (s.ChampionName == "All") ? menu.CheckBoxValue(s.Sender.BaseSkinName + s.SpellName) : menu.CheckBoxValue(s.ChampionName + s.SpellName) && s.Position.IsOnScreen()))
            {
                var msg = detectedSpellInfo.SpellName + " : " + (detectedSpellInfo.EndTime - Game.Time).ToString("F1");

                Vector3 pos = Game.CursorPos;

                if (detectedSpellInfo.SpellType == SpellType.Minion)
                {
                    if (detectedSpellInfo.Sender != null && detectedSpellInfo.Sender.IsHPBarRendered)
                    {
                        pos = detectedSpellInfo.Sender.ServerPosition;
                    }
                }

                if (detectedSpellInfo.SpellType == SpellType.GameObject)
                {
                    pos = detectedSpellInfo.Object != null && detectedSpellInfo.Object.IsValid ? detectedSpellInfo.Object.Position : detectedSpellInfo.Position;
                }

                if (detectedSpellInfo.SpellType == SpellType.Buff)
                {
                    if (detectedSpellInfo.Sender != null && detectedSpellInfo.Sender.IsHPBarRendered)
                    {
                        pos = new Vector3(detectedSpellInfo.Sender.ServerPosition.X, detectedSpellInfo.Sender.ServerPosition.Y, detectedSpellInfo.Sender.ServerPosition.Z);
                    }
                }

                /*if(pos == new Vector3(Game.CursorPos.X, Game.CursorPos.Y + i, Game.CursorPos.Z))
                 *  text.TextValue = detectedSpellInfo.Sender.Name() + ": " + detectedSpellInfo.SpellName + " : " + (detectedSpellInfo.EndTime - Game.Time).ToString("F1");*/

                if (pos == Game.CursorPos)
                {
                    return;
                }

                if (LastDrawPos == pos.WorldToScreen() && DetectedSpells.Count(s => menu.CheckBoxValue(s.ChampionName + s.SpellName) && s.Position.IsOnScreen()) > 1)
                {
                    i  += 45f;
                    pos = new Vector3(pos.X, pos.Y + i, pos.Z);
                }

                var c = System.Drawing.Color.AliceBlue;

                LastDrawPos = pos.WorldToScreen();
                if (detectedSpellInfo.Sender != null)
                {
                    c = detectedSpellInfo.Sender.IsEnemy ? System.Drawing.Color.Red : System.Drawing.Color.GreenYellow;
                }
                else if (detectedSpellInfo.Object != null)
                {
                    c = detectedSpellInfo.Object.IsEnemy ? System.Drawing.Color.Red : System.Drawing.Color.GreenYellow;
                }

                if (pos.IsOnScreen() && menu.CheckBoxValue("screen") || !menu.CheckBoxValue("screen"))
                {
                    trackettext.Draw(msg, c, pos.WorldToScreen());
                }
            }
        }