Esempio n. 1
0
        /// <summary>
        /// Processes a boss and stores info in a Character object.
        /// </summary>
        /// <param name="boss">The Boss object containg the amount of kills.</param>
        /// <param name="character">The Character object to save kill progress to.</param>
        private void ProcessKill(Json.Boss boss, Character character)
        {
            var bossStats = new Boss(boss.name, boss.id)
            {
                NormalKills = boss.normalKills,
                HeroicKills = boss.heroicKills ?? 0
            };

            character.Bosses.Add(bossStats);
        }
Esempio n. 2
0
 /// <summary>
 /// Adds a unique new boss to both the boss list and to user settings.
 /// </summary>
 /// <param name="name">The boss name.</param>
 /// <param name="id">The boss id.</param>
 public void AddNewBoss(string name, int id)
 {
     var boss = new Boss(name, id);
     if (!BossIds.Contains(boss))
     {
         BossIds.Add(boss);
         var bossString = Helpers.GetBossString(boss);
         if (!Settings.Default.Bosses.Contains(bossString))
         {
             Settings.Default.Bosses.Add(bossString);
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Removes given boss from both the boss list and user settings.
 /// </summary>
 /// <param name="boss"></param>
 public void RemoveBoss(Boss boss)
 {
     BossIds.Remove(boss);
     Settings.Default.Bosses.Remove(Helpers.GetBossString(boss));
 }
Esempio n. 4
0
 /// <summary>
 /// Processes a boss and stores info in a Character object.
 /// </summary>
 /// <param name="boss">The Boss object containg the amount of kills.</param>
 /// <param name="character">The Character object to save kill progress to.</param>
 private void ProcessKill(Json.Boss boss, Character character)
 {
     var bossStats = new Boss(boss.name, boss.id)
     {
         NormalKills = boss.normalKills,
         HeroicKills = boss.heroicKills ?? 0
     };
     character.Bosses.Add(bossStats);
 }