public override void Initialize() { if (!Value.Use("tracker.enable")) { Logger.Warn("Tracker Disabled!"); return; } HeroSpellAvaliblitys = new Dictionary <AIHeroClient, SpellAvaliblity>(EntityManager.Heroes.AllHeroes.Count); HeroSpellSprites = new Dictionary <AIHeroClient, Dictionary <SpellSlot, Sprite> >(); TrackerHud = new Sprite(TextureLoader.BitmapToTexture(Resources.SpellLayout2)); IconManager.IconGenerator.Padding = 0; using (new TimeMeasure("Tracker Sprite Generation")) { foreach (var hero in EntityManager.Heroes.AllHeroes) { var spellAvaliblity = new SpellAvaliblity(hero); HeroSpellAvaliblitys[hero] = spellAvaliblity; var spriteDictonary = new Dictionary <SpellSlot, Sprite>(); foreach (SpellSlot slot in SpellAvaliblity.TrackedSpellSlots) { if (slot != SpellSlot.Summoner1 && slot != SpellSlot.Summoner2) { continue; } var spell = spellAvaliblity.GetSpell(slot); spriteDictonary[slot] = IconManager.GetSpellSprite(spell, IconGenerator.IconType.Square, 8, Color.Empty, 1); } HeroSpellSprites[hero] = spriteDictonary; } } }