-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathProgram.cs
More file actions
96 lines (72 loc) · 2.59 KB
/
Program.cs
File metadata and controls
96 lines (72 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using LeagueSharp;
using LeagueSharp.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevCommom;
namespace DevDebug
{
class Program
{
public static Menu Config;
public static Obj_AI_Hero Player;
static void Main(string[] args)
{
LeagueSharp.Common.CustomEvents.Game.OnGameLoad += Game_OnGameLoad;
}
static void Game_OnGameLoad(EventArgs args)
{
Player = ObjectManager.Player;
InitializeMainMenu();
InitializeAttachEvents();
Game.PrintChat("DevDebug Loaded");
}
private static void InitializeAttachEvents()
{
Game.OnUpdate += Game_OnUpdate;
Drawing.OnDraw += Drawing_OnDraw;
}
static void Drawing_OnDraw(EventArgs args)
{
if (Config.Item("DrawBuffs").GetValue<bool>())
DrawBuffs();
}
static void Game_OnUpdate(EventArgs args)
{
}
private static void DrawBuffs()
{
float xAlly = 60;
float xEnemy = 320;
float yAlly = 0;
float yEnemy = 0;
foreach (var hero in ObjectManager.Get<Obj_AI_Hero>())
{
System.Drawing.Color color = hero.IsEnemy ? System.Drawing.Color.Red : System.Drawing.Color.Blue;
LeagueSharp.Drawing.DrawText(hero.IsEnemy ? xEnemy : xAlly, hero.IsEnemy ? yEnemy : yAlly, color, string.Format("{0} range{1}", hero.ChampionName, Orbwalking.GetRealAutoAttackRange(hero)));
if (hero.IsEnemy)
yEnemy += 16;
else
yAlly += 16;
foreach (var buff in hero.Buffs)
{
if (buff.IsActive)
LeagueSharp.Drawing.DrawText(hero.IsEnemy ? xEnemy + 10 : xAlly + 10, hero.IsEnemy ? yEnemy : yAlly, color, string.Format("{0} {1}", buff.DisplayName, buff.Count));
if (hero.IsEnemy)
yEnemy += 16;
else
yAlly += 16;
}
}
}
private static void InitializeMainMenu()
{
Config = new Menu("DevDebug", "DevDebug", true);
Config.AddSubMenu(new Menu("Draw", "Draw"));
Config.SubMenu("Draw").AddItem(new MenuItem("DrawBuffs", "Draw Buffs").SetValue(true));
Config.AddToMainMenu();
}
}
}