/// <summary> /// Loads the sprites. /// </summary> private static void LoadSprites() { foreach (var player in ObjectManager.Get <Obj_AI_Hero>().Where(h => !h.IsMe)) { try { var player_Ex = player; var Summoner1Bitmap = TrackerVariables.summonerSpells[player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower()]; var Summoner2Bitmap = TrackerVariables.summonerSpells[player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower()]; Render.Sprite SummonerSpell1 = new Render.Sprite(Resources.empty, new Vector2()); Render.Sprite SummonerSpell2 = new Render.Sprite(Resources.empty, new Vector2()); var member = new TrackerWrapper(); var scale = 0.94f; var offset = 8 * scale; var offsetX = 0; var Hudsprite = new Render.Sprite(TrackerVariables.TrackerHud, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 14 * scale, player_Ex.HPBarPosition.Y + offset + 6 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; try { Hudsprite.Add(0); } catch (Exception e) { Console.WriteLine(e); } #region Summoner Spells if (Summoner1Bitmap != null) { SummonerSpell1 = new Render.Sprite(Summoner1Bitmap, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 8 * scale, player_Ex.HPBarPosition.Y + offset + 8 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; SummonerSpell1.Add(0); member.Summoner1 = SummonerSpell1; var Summoner1Rectangle = new Render.Rectangle((int)player_Ex.HPBarPosition.X - 7, (int)player_Ex.HPBarPosition.Y + 8, 13, 13, new ColorBGRA(0, 0, 0, 175)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 7 * scale, (int)player_Ex.HPBarPosition.Y + offset + 8 * scale), }; Summoner1Rectangle.Add(0); member.SummonerSpell1Rectangle = Summoner1Rectangle; var spellCooldown = player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time; var Summoner1Text = new Render.Text((int)player_Ex.HPBarPosition.X - 31, (int)player_Ex.HPBarPosition.Y + 6, ((int)spellCooldown).ToString(), 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time) > 0 ? ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time)).ToString() : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 31 * scale, (int)player_Ex.HPBarPosition.Y + offset + 6 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue <bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; Summoner1Text.Add(0); member.SummonerSpell1Text = Summoner1Text; } if (Summoner2Bitmap != null) { SummonerSpell2 = new Render.Sprite(Summoner2Bitmap, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 8 * scale, player_Ex.HPBarPosition.Y + offset + 25 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; SummonerSpell2.Add(0); member.Summoner2 = SummonerSpell2; var Summoner2Rectangle = new Render.Rectangle((int)player_Ex.HPBarPosition.X - 7, (int)player_Ex.HPBarPosition.Y + 26, 13, 13, new ColorBGRA(0, 0, 0, 175)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 7 * scale, (int)player_Ex.HPBarPosition.Y + offset + 26 * scale), }; Summoner2Rectangle.Add(0); var spellCooldown = player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time; var Summoner2Text = new Render.Text((int)player_Ex.HPBarPosition.X - 31, (int)player_Ex.HPBarPosition.Y + 24, ((int)spellCooldown).ToString(), 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time) > 0 ? ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time)).ToString() : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 31 * scale, (int)player_Ex.HPBarPosition.Y + offset + 24 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue <bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; Summoner2Text.Add(0); member.SummonerSpell2Text = Summoner2Text; member.SummonerSpell2Rectangle = Summoner2Rectangle; } #endregion #region Normal Spells #region Spell1 var slot1 = SpellSlot.Q; var Spell1Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 13, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 13.2f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell1Rectangle = Spell1Rectangle; Spell1Rectangle.Add(0); var Spell1Text = new Render.Text((int)player_Ex.HPBarPosition.X + 16, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 16 * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue <bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell1Text = Spell1Text; Spell1Text.Add(0); #endregion #region Spell2 var slot2 = SpellSlot.W; var Spell2Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 41f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell2Rectangle = Spell2Rectangle; Spell2Rectangle.Add(0); var Spell2Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 43.8f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue <bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell2Text = Spell2Text; Spell2Text.Add(0); #endregion #region Spell3 var slot3 = SpellSlot.E; var Spell3Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 69f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell3Rectangle = Spell3Rectangle; Spell3Rectangle.Add(0); var Spell3Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 73.8f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue <bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell3Text = Spell3Text; Spell3Text.Add(0); #endregion #region Spell4 var slot4 = SpellSlot.R; var Spell4Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 96f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell4Rectangle = Spell4Rectangle; Spell4Rectangle.Add(0); var Spell4Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 101f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue <bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell4Text = Spell4Text; Spell4Text.Add(0); #endregion #endregion member.Hero = player_Ex; member.Hud = Hudsprite; member.Summoner1 = SummonerSpell1; member.Summoner2 = SummonerSpell2; TrackerWrappers.Add(member); } catch (Exception e) { LogHelper.AddToLog(new LogItem("Tracker_Drawings", e, LogSeverity.Severe)); } } }
/// <summary> /// Loads the sprites. /// </summary> private static void LoadSprites() { foreach (var player in ObjectManager.Get<Obj_AI_Hero>().Where(h => !h.IsMe)) { try { var player_Ex = player; var Summoner1Bitmap = TrackerVariables.summonerSpells[player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).Name.ToLower()]; var Summoner2Bitmap = TrackerVariables.summonerSpells[player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).Name.ToLower()]; Render.Sprite SummonerSpell1 = new Render.Sprite(Resources.empty, new Vector2()); Render.Sprite SummonerSpell2 = new Render.Sprite(Resources.empty, new Vector2()); var member = new TrackerWrapper(); var scale = 0.94f; var offset = 8 * scale; var offsetX = 0; var Hudsprite = new Render.Sprite(TrackerVariables.TrackerHud, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 14 * scale, player_Ex.HPBarPosition.Y + offset + 6 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; try { Hudsprite.Add(0); } catch (Exception e) { Console.WriteLine(e); } #region Summoner Spells if (Summoner1Bitmap != null) { SummonerSpell1 = new Render.Sprite(Summoner1Bitmap, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 8 * scale, player_Ex.HPBarPosition.Y + offset + 8 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; SummonerSpell1.Add(0); member.Summoner1 = SummonerSpell1; var Summoner1Rectangle = new Render.Rectangle((int)player_Ex.HPBarPosition.X - 7, (int)player_Ex.HPBarPosition.Y + 8, 13, 13, new ColorBGRA(0, 0, 0, 175)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 7 * scale, (int)player_Ex.HPBarPosition.Y + offset + 8 * scale), }; Summoner1Rectangle.Add(0); member.SummonerSpell1Rectangle = Summoner1Rectangle; var spellCooldown = player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time; var Summoner1Text = new Render.Text((int)player_Ex.HPBarPosition.X - 31, (int)player_Ex.HPBarPosition.Y + 6, ((int)spellCooldown).ToString(), 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time) > 0 ? ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time)).ToString() : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 31 * scale, (int)player_Ex.HPBarPosition.Y + offset + 6 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(SpellSlot.Summoner1).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; Summoner1Text.Add(0); member.SummonerSpell1Text = Summoner1Text; } if (Summoner2Bitmap != null) { SummonerSpell2 = new Render.Sprite(Summoner2Bitmap, new Vector2(0, 0)) { PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X - 8 * scale, player_Ex.HPBarPosition.Y + offset + 25 * scale), VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), Scale = new Vector2(1.0f, 1.0f) }; SummonerSpell2.Add(0); member.Summoner2 = SummonerSpell2; var Summoner2Rectangle = new Render.Rectangle((int)player_Ex.HPBarPosition.X - 7, (int)player_Ex.HPBarPosition.Y + 26, 13, 13, new ColorBGRA(0, 0, 0, 175)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 7 * scale, (int)player_Ex.HPBarPosition.Y + offset + 26 * scale), }; Summoner2Rectangle.Add(0); var spellCooldown = player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time; var Summoner2Text = new Render.Text((int)player_Ex.HPBarPosition.X - 31, (int)player_Ex.HPBarPosition.Y + 24, ((int)spellCooldown).ToString(), 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time) > 0 ? ((int)(player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time)).ToString() : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X - 31 * scale, (int)player_Ex.HPBarPosition.Y + offset + 24 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(SpellSlot.Summoner2).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; Summoner2Text.Add(0); member.SummonerSpell2Text = Summoner2Text; member.SummonerSpell2Rectangle = Summoner2Rectangle; } #endregion #region Normal Spells #region Spell1 var slot1 = SpellSlot.Q; var Spell1Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 13, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 13.2f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell1Rectangle = Spell1Rectangle; Spell1Rectangle.Add(0); var Spell1Text = new Render.Text((int)player_Ex.HPBarPosition.X + 16, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 16 * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot1).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell1Text = Spell1Text; Spell1Text.Add(0); #endregion #region Spell2 var slot2 = SpellSlot.W; var Spell2Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 41f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell2Rectangle = Spell2Rectangle; Spell2Rectangle.Add(0); var Spell2Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 43.8f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot2).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell2Text = Spell2Text; Spell2Text.Add(0); #endregion #region Spell3 var slot3 = SpellSlot.E; var Spell3Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 69f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell3Rectangle = Spell3Rectangle; Spell3Rectangle.Add(0); var Spell3Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 73.8f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot3).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell3Text = Spell3Text; Spell3Text.Add(0); #endregion #region Spell4 var slot4 = SpellSlot.R; var Spell4Rectangle = new Render.Sprite(Resources.CooldownSprite, new Vector2((int)player_Ex.HPBarPosition.X + 41, (int)player_Ex.HPBarPosition.Y + 30)) { VisibleCondition = sender => player_Ex.IsHPBarRendered && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)), PositionUpdate = () => new Vector2(player_Ex.HPBarPosition.X + offsetX + 96f * scale, (int)player_Ex.HPBarPosition.Y + offset + 28 * scale), }; member.Spell4Rectangle = Spell4Rectangle; Spell4Rectangle.Add(0); var Spell4Text = new Render.Text((int)player_Ex.HPBarPosition.X + 44, (int)player_Ex.HPBarPosition.Y + 33, string.Empty, 14, new ColorBGRA(255, 255, 255, 255)) { TextUpdate = () => ((player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time) > 0 ? (Truncate((player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time))) : string.Empty), PositionUpdate = () => new Vector2((int)player_Ex.HPBarPosition.X + offsetX + 101f * scale, (int)player_Ex.HPBarPosition.Y + offset + 33 * scale), VisibleCondition = sender => MenuExtensions.GetItemValue<bool>("dz191.dza.tracker.track.cd") && player_Ex.IsHPBarRendered && (player_Ex.Spellbook.GetSpell(slot4).CooldownExpires - Game.Time) > 0 && (((player_Ex.IsAlly || player_Ex.IsMe) && TrackerVariables.TrackAllies) || (player_Ex.IsEnemy && TrackerVariables.TrackEnemies)) }; member.Spell4Text = Spell4Text; Spell4Text.Add(0); #endregion #endregion member.Hero = player_Ex; member.Hud = Hudsprite; member.Summoner1 = SummonerSpell1; member.Summoner2 = SummonerSpell2; TrackerWrappers.Add(member); } catch (Exception e) { LogHelper.AddToLog(new LogItem("Tracker_Drawings", e, LogSeverity.Severe)); } } }