public static void PrepareSpells(AIHeroClient hero) { SpellBase spells = SpellLibrary.GetSpells(hero.Hero); //This only needs to be called once per champion, anymore is a memory leak. if (spells != null) { SpellsDictionary.Add(hero, spells); } }
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); } }
static SpellManager() { try { CurrentSpells = SpellLibrary.GetSpells(Player.Instance.Hero); SpellsDictionary = new Dictionary <AIHeroClient, SpellBase>(); } catch (Exception ex) { // Exception has been cought; Notify the user of the error and print the exception to the console Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine( DateTime.Now.ToString("[H:mm:ss - ") + "AramBuddy Error] Exception occurred on initialization of Genesis SpellManager." + Environment.NewLine); Console.ResetColor(); Console.Write(ex); } }
static SpellManager() { CurrentSpells = SpellLibrary.GetSpells(Player.Instance.Hero); SpellsDictionary = new Dictionary <AIHeroClient, SpellBase>(); }