/// <summary> /// Completes the initialization by updating the prequisites and checking trainability on trial account. /// </summary> internal void CompleteInitialization(IEnumerable <SerializableSkillPrerequisite> prereqs) { if (prereqs == null) { return; } // Create the prerequisites list Prerequisites.AddRange(prereqs.Select(x => new StaticSkillLevel(x.GetSkill(), x.Level))); if (!IsTrainableOnTrialAccount) { return; } // Check trainableOnTrialAccount on its childrens to be sure it's really trainable if (Prerequisites.All(prereq => prereq.Skill.IsTrainableOnTrialAccount)) { return; } IsTrainableOnTrialAccount = false; }
public bool CanAddClass(Character @char) { return(Prerequisites.All(c => c.CanUse(@char))); }