Example #1
0
        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);
            }
        }
Example #2
0
 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);
     }
 }
Example #3
0
 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);
     }
 }
Example #4
0
 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);
     }
 }
Example #5
0
 static SpellManager()
 {
     CurrentSpells    = SpellLibrary.GetSpells(Player.Instance.Hero);
     SpellsDictionary = new Dictionary <AIHeroClient, SpellBase>();
 }