Exemple #1
0
        /// <summary>
        /// Completes the initialization by updating the prequisites and checking trainability on trial account
        /// </summary>
        internal void CompleteInitialization(SerializableSkillPrerequisite[] prereqs)
        {
            if (prereqs == null)
            {
                return;
            }

            // Create the prerequisites list
            m_prereqs.AddRange(prereqs.Select(x => new StaticSkillLevel(StaticSkills.GetSkillByName(x.Name), x.Level)));

            // Check trainableOnTrialAccount on its childrens to be sure it's really trainable
            if (m_trainableOnTrialAccount)
            {
                foreach (var prereq in m_prereqs)
                {
                    if (!prereq.Skill.m_trainableOnTrialAccount)
                    {
                        m_trainableOnTrialAccount = false;
                        return;
                    }
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// Constructor from the skill name.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="level"></param>
 public StaticSkillLevel(string name, long level)
 {
     Skill = StaticSkills.GetSkillByName(name) ?? StaticSkill.UnknownStaticSkill;
     Level = level;
 }
Exemple #3
0
 /// <summary>
 /// Constructor from the skill name
 /// </summary>
 /// <param name="skillName"></param>
 /// <param name="level"></param>
 public StaticSkillLevel(string name, int level)
     : this()
 {
     this.Skill = StaticSkills.GetSkillByName(name);
     this.Level = level;
 }