/// <summary> /// Initializes the Experience Tracker. /// </summary> public static void Initialize() { foreach (var unit in ObjectManager.Get <Obj_AI_Hero>().Where(e => Math.Abs(e.FloatingHealthBarPosition.X) > 0 && !e.IsDead && e.IsVisible && (e.IsMe && MenuClass.ExpTracker["me"].As <MenuBool>().Enabled || e.IsEnemy && MenuClass.ExpTracker["enemies"].As <MenuBool>().Enabled || e.IsAlly && !e.IsMe && MenuClass.ExpTracker["allies"].As <MenuBool>().Enabled)) ) { if (unit.Name.Equals("Target Dummy")) { return; } var xOffset = (int)unit.FloatingHealthBarPosition.X + UtilityClass.ExpXAdjustment(unit); var yOffset = (int)unit.FloatingHealthBarPosition.Y + UtilityClass.ExpYAdjustment(unit); var actualExp = unit.Exp; if (unit.Level > 1) { actualExp -= (280 + 80 + 100 * unit.Level) / 2 * (unit.Level - 1); } var neededExp = 180 + 100 * unit.Level; var expPercent = (int)(actualExp / neededExp * 100); if (unit.Level < 18 || UtilityClass.Player.HasBuff("AwesomeBuff") && unit.Level < 30) { Render.Line(xOffset - 76, yOffset + 20, xOffset + 56, yOffset + 20, 7, true, Colors.GetRealColor(Color.Purple)); if (expPercent > 0) { Render.Line(xOffset - 76, yOffset + 20, xOffset - 76 + (float)(1.32 * expPercent), yOffset + 20, 7, true, Colors.GetRealColor(Color.Red)); } Render.Text(xOffset - 13, yOffset + 17, Colors.GetRealColor(Color.Yellow), expPercent > 0 ? expPercent + "%" : "0%"); } } }
/// <summary> /// Initializes the SpellTracker. /// </summary> public static void Initialize() { foreach (var unit in ObjectManager.Get <Obj_AI_Hero>().Where( e => Math.Abs(e.FloatingHealthBarPosition.X) > 0 && !e.IsDead && e.IsVisible && (e.IsMe && MenuClass.SpellTracker["me"].As <MenuBool>().Value || e.IsEnemy && MenuClass.SpellTracker["enemies"].As <MenuBool>().Value || e.IsAlly && !e.IsMe && MenuClass.SpellTracker["allies"].As <MenuBool>().Value)) ) { if (unit.Name.Equals("Target Dummy")) { return; } for (var spell = 0; spell < UtilityClass.SpellSlots.Length; spell++) { var xSpellOffset = (int)unit.FloatingHealthBarPosition.X + UtilityClass.SpellXAdjustment(unit) + spell * 25; var ySpellOffset = (int)unit.FloatingHealthBarPosition.Y + UtilityClass.SpellYAdjustment(unit); var spellColor = UtilityClass.GetUnitSpellStateColor(unit, spell); var spellCooldown = UtilityClass.GetUnitSpellCooldown(unit, spell); Render.Text(xSpellOffset, ySpellOffset, Colors.GetRealColor(spellColor), spellCooldown); for (var level = 0; level <= unit.SpellBook.GetSpell(UtilityClass.SpellSlots[spell]).Level - 1; level++) { var xLevelOffset = xSpellOffset + level * 3 - 4; var yLevelOffset = ySpellOffset + 4; Render.Text(xLevelOffset, yLevelOffset, Color.White, "."); } } for (var summonerSpell = 0; summonerSpell < UtilityClass.SummonerSpellSlots.Length; summonerSpell++) { var xSummonerSpellOffset = (int)unit.FloatingHealthBarPosition.X + UtilityClass.SummonerSpellXAdjustment(unit) + summonerSpell * 88; var ySummonerSpellOffset = (int)unit.FloatingHealthBarPosition.Y + UtilityClass.SummonerSpellYAdjustment(unit); var summonerSpellColor = UtilityClass.GetUnitSummonerSpellStateColor(unit, summonerSpell); var summonerSpellCooldown = UtilityClass.GetUnitSummonerSpellFixedName(unit, summonerSpell) + ": " + UtilityClass.GetUnitSummonerSpellCooldown(unit, summonerSpell); Render.Text(xSummonerSpellOffset, ySummonerSpellOffset, Colors.GetRealColor(summonerSpellColor), summonerSpellCooldown); } } }
/// <summary> /// Initializes the SpellTracker. /// </summary> public static void Initialize() { foreach (var hero in ObjectManager.Get <Obj_AI_Hero>().Where(h => !h.IsDead && h.IsVisible && Math.Abs(h.FloatingHealthBarPosition.X) > 0)) { if (hero.Name.Equals("Target Dummy")) { continue; } if (hero.IsMe && !MenuClass.SpellTracker["me"].As <MenuBool>().Enabled) { continue; } if (hero.IsEnemy && !MenuClass.SpellTracker["enemies"].As <MenuBool>().Enabled) { continue; } if (!hero.IsMe && hero.IsAlly && !MenuClass.SpellTracker["allies"].As <MenuBool>().Enabled) { continue; } for (var spell = 0; spell < UtilityClass.SpellSlots.Length; spell++) { var xSpellOffset = (int)hero.FloatingHealthBarPosition.X + UtilityClass.SpellXAdjustment(hero) + spell * 25; var ySpellOffset = (int)hero.FloatingHealthBarPosition.Y + UtilityClass.SpellYAdjustment(hero); var spellColor = UtilityClass.GetUnitSpellStateColor(hero, spell); var spellCooldown = UtilityClass.GetUnitSpellCooldown(hero, spell); Render.Text(spellCooldown, new Vector2(xSpellOffset, ySpellOffset), RenderTextFlags.None, Colors.GetRealColor(spellColor)); for (var level = 0; level <= hero.SpellBook.GetSpell(UtilityClass.SpellSlots[spell]).Level - 1; level++) { var xLevelOffset = xSpellOffset + level * 3 - 4; var yLevelOffset = ySpellOffset + 4; Render.Text(".", new Vector2(xLevelOffset, yLevelOffset), RenderTextFlags.None, Color.White); } } for (var summonerSpell = 0; summonerSpell < UtilityClass.SummonerSpellSlots.Length; summonerSpell++) { var xSummonerSpellOffset = (int)hero.FloatingHealthBarPosition.X - 35 + UtilityClass.SummonerSpellXAdjustment(hero) + summonerSpell * 100; var ySummonerSpellOffset = (int)hero.FloatingHealthBarPosition.Y + UtilityClass.SummonerSpellYAdjustment(hero); var summonerSpellColor = UtilityClass.GetUnitSummonerSpellStateColor(hero, summonerSpell); var summonerSpellCooldown = UtilityClass.GetUnitSummonerSpellFixedName(hero, summonerSpell) + ": " + UtilityClass.GetUnitSummonerSpellCooldown(hero, summonerSpell); Render.Text(summonerSpellCooldown, new Vector2(xSummonerSpellOffset, ySummonerSpellOffset), RenderTextFlags.None, Colors.GetRealColor(summonerSpellColor)); } } }