public static void OnDraw(EventArgs args)
{
var smiteactive = AkaCore.Manager.MenuManager.SmiteActive;
var pos = ObjectManager.Player.Position.WorldToScreen();
if (smiteactive && AkaLib.Item.Smite != null)
{
var smiterdy = AkaLib.Item.Smite.IsReady();
var text = $"Smite: {(smiteactive ? (smiterdy ? "Ready" : "Not Ready") : "Off")}";
if (AkaCore.Manager.MenuManager.SStatus)
{
Drawing.DrawText(pos.X - (float)Drawing.GetTextEntent(text, 2).Width / 2, pos.Y + 20, smiteactive ? System.Drawing.Color.White : System.Drawing.Color.Gray, text);
}
if (AkaCore.Manager.MenuManager.SDamage && smiterdy)
{
var minions =
ObjectManager.Get<Obj_AI_Minion>()
.Where(
m =>
m.Team == GameObjectTeam.Neutral && m.IsValidTarget());
foreach (var minion in minions.Where(m => m.IsHPBarRendered))
{
var hpBarPosition = minion.HPBarPosition;
var maxHealth = minion.MaxHealth;
var sDamage = ObjectManager.Player.GetSummonerSpellDamage(minion, DamageLibrary.SummonerSpells.Smite);
var x = sDamage / maxHealth;
var barWidth = 0;
switch (minion.CharData.BaseSkinName)
{
case "SRU_RiftHerald":
barWidth = 145;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 17),
new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 30),
2f,
System.Drawing.Color.Chartreuse);
Drawing.DrawText(
hpBarPosition.X - 22 + barWidth * x,
hpBarPosition.Y - 5,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "SRU_Dragon_Air":
case "SRU_Dragon_Water":
case "SRU_Dragon_Fire":
case "SRU_Dragon_Elder":
case "SRU_Dragon_Earth":
barWidth = 145;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 22),
new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 30),
2f,
System.Drawing.Color.Orange);
Drawing.DrawText(
hpBarPosition.X - 22 + barWidth * x,
hpBarPosition.Y - 5,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "SRU_Red":
case "SRU_Blue":
barWidth = 145;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 20),
new Vector2(hpBarPosition.X + 3 + barWidth * x, hpBarPosition.Y + 30),
2f,
System.Drawing.Color.Orange);
Drawing.DrawText(
hpBarPosition.X - 22 + barWidth * x,
hpBarPosition.Y - 5,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "SRU_Baron":
barWidth = 194;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + 18 + barWidth * x, hpBarPosition.Y + 20),
new Vector2(hpBarPosition.X + 18 + barWidth * x, hpBarPosition.Y + 35),
2f,
System.Drawing.Color.Chartreuse);
Drawing.DrawText(
hpBarPosition.X - 22 + barWidth * x,
hpBarPosition.Y - 3,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "SRU_Gromp":
barWidth = 87;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
2f,
System.Drawing.Color.Chartreuse);
Drawing.DrawText(
hpBarPosition.X + barWidth * x,
hpBarPosition.Y - 15,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "SRU_Murkwolf":
barWidth = 75;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
2f,
System.Drawing.Color.Chartreuse);
Drawing.DrawText(
hpBarPosition.X + barWidth * x,
hpBarPosition.Y - 15,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "Sru_Crab":
barWidth = 61;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 8),
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
2f,
System.Drawing.Color.Chartreuse);
Drawing.DrawText(
hpBarPosition.X + barWidth * x,
hpBarPosition.Y - 15,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "SRU_Razorbeak":
barWidth = 75;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
2f,
System.Drawing.Color.Chartreuse);
Drawing.DrawText(
hpBarPosition.X + barWidth * x,
hpBarPosition.Y - 15,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
case "SRU_Krug":
barWidth = 81;
Drawing.DrawLine(
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 11),
new Vector2(hpBarPosition.X + barWidth * x, hpBarPosition.Y + 4),
2f,
System.Drawing.Color.Chartreuse);
Drawing.DrawText(
hpBarPosition.X + barWidth * x,
hpBarPosition.Y - 15,
System.Drawing.Color.Chartreuse,
sDamage.ToString(CultureInfo.InvariantCulture));
break;
}
}
}
}
}