static SpellManager() { try { CurrentSpells = SpellLibrary.GetSpells(Player.Instance.Hero); SpellsDictionary = new List <SpellBase>(); } catch (Exception ex) { // Exception has been cought; Notify the user of the error and print the exception to the console Logger.Send("Exception occurred on initialization of Genesis SpellManager.", ex, Logger.LogLevel.Error); } }
public static void PrepareSpells(AIHeroClient hero) { try { var spells = SpellLibrary.GetSpells(hero.Hero); //This only needs to be called once per champion, anymore is a memory leak. if (spells != null) { SpellsDictionary.Add(spells); } } catch (Exception ex) { // Exception has been cought; Notify the user of the error and print the exception to the console Logger.Send($"{Player.Instance.ChampionName} Is not Added to the Database yet.", ex, Logger.LogLevel.Error); } }