static void Drawing_OnDraw(EventArgs args)
{
totalAD = 0;
totalAP = 0;
totalArmor = 0;
totalMR = 0;
MRalert = false;
Armoralert = false;
var xpos = menu.Item("xpos").GetValue<Slider>().Value;
var ypos = menu.Item("ypos").GetValue<Slider>().Value;
foreach (var k in ObjectManager.Get<Obj_AI_Hero>().Where(x => x.IsEnemy && x.IsVisible))
{
if (k.TotalAttackDamage != ADstats[k.ChampionName])
{
ADstats[k.ChampionName] = k.TotalAttackDamage;
}
if (k.TotalMagicalDamage != APstats[k.ChampionName])
{
APstats[k.ChampionName] = k.TotalMagicalDamage;
}
if (k.Armor != ArmorStats[k.ChampionName])
{
ArmorStats[k.ChampionName] = k.Armor;
}
if (k.SpellBlock != MRStats[k.ChampionName])
{
MRStats[k.ChampionName] = k.SpellBlock;
}
}
foreach (var k in ADstats.Values)
{
totalAD += k;
}
foreach (var k in APstats.Values)
{
totalAP += k;
}
foreach (var k in ArmorStats.Values)
{
totalArmor += k;
}
foreach (var k in MRStats.Values)
{
totalMR += k;
}
foreach (var k in ArmorStats.Values)
{
if (k > totalArmor/3)
{
Armoralert = true;
}
}
foreach (var k in MRStats.Values)
{
if (k > totalMR / 3)
{
MRalert = true;
}
}
//var k = Drawing.WorldToScreen(new Vector3(960, 540, 0));
Drawing.DrawText(xpos, ypos, System.Drawing.Color.Red, "Total Enemy AD: " + (int)totalAD);
Drawing.DrawText(xpos, ypos+20, System.Drawing.Color.LightSkyBlue, "Total Enemy AP: " + (int)totalAP);
Drawing.DrawText(xpos, ypos+40, System.Drawing.Color.DarkOrange, "Total Enemy Armor: " + (int)totalArmor);
if (Armoralert)
{
Drawing.DrawText(xpos+180, ypos+40, System.Drawing.Color.Red, "** not accurate");
}
Drawing.DrawText(xpos, ypos+60, System.Drawing.Color.SpringGreen, "Total Enemy MR: " + (int)totalMR);
if (MRalert)
{
Drawing.DrawText(xpos+180, ypos+60, System.Drawing.Color.Red, "** not accurate");
}
}
}