/// <summary> /// Adds an unlocked ally to the roster. /// </summary> /// <param name="name">The name of the ally to unlock.</param> /// <param name="level">The level of the unlocked ally.</param> /// <param name="raiseChangeEvent">Whether or not to raise an event for the roster change.</param> public void AddUnlocked(string name, int level, bool raiseChangeEvent = true) { if (!Unlocked.Contains(name)) { this.AddUnlocked(name, raiseChangeEvent); allyLevels.Add(name, level); var entity = GetEntityObject(name) as Ally; var manager = GameManager.GetManagerByType(ListableEntityType.Ability); if (manager != null) { manager.AddUnlocked(entity.Lesson.name, false); } } }