Ejemplo n.º 1
0
 /// <summary>
 /// Constructor from the skill id with activity.
 /// </summary>
 /// <param name="id"></param>
 /// <param name="level"></param>
 /// <param name="activityId"></param>
 public StaticSkillLevel(int id, int level, int activityId)
     : this()
 {
     this.Skill    = StaticSkills.GetSkillById(id);
     this.Level    = level;
     this.Activity = (BlueprintActivity)Enum.ToObject(typeof(BlueprintActivity), activityId);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="station">The station.</param>
 /// <param name="src">The source.</param>
 internal Agent(Station station, SerializableAgent src)
 {
     Station   = station;
     ID        = src.ID;
     Name      = src.Name;
     Level     = src.Level;
     Quality   = src.Quality;
     Division  = src.DivisionName;
     AgentType = Enum.IsDefined(typeof(AgentType), src.AgentType)
                     ? (AgentType)Enum.Parse(typeof(AgentType), src.AgentType)
                     : AgentType.NonAgent;
     ResearchSkill  = StaticSkills.GetSkillName(src.ResearchSkillID);
     LocatorService = src.LocatorService;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="station">The station.</param>
        /// <param name="src">The source.</param>
        internal Agent(Station station, SerializableAgent src)
        {
            Station  = station;
            ID       = src.ID;
            Name     = src.Name;
            Level    = src.Level;
            Quality  = src.Quality;
            Division = src.DivisionName;
            AgentType type;

            if (!Enum.TryParse(src.AgentType, out type))
            {
                type = AgentType.NonAgent;
            }
            AgentType      = type;
            ResearchSkill  = StaticSkills.GetSkillName(src.ResearchSkillID);
            LocatorService = src.LocatorService;
        }
Ejemplo n.º 4
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;
                    }
                }
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructor from the skill id with activity.
 /// </summary>
 /// <param name="id"></param>
 /// <param name="level"></param>
 /// <param name="activityId"></param>
 public StaticSkillLevel(long id, long level, int activityId)
 {
     Skill    = StaticSkills.GetSkillByID(id) ?? StaticSkill.UnknownStaticSkill;
     Level    = level;
     Activity = (BlueprintActivity)Enum.ToObject(typeof(BlueprintActivity), activityId);
 }
Ejemplo n.º 6
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;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructor from the skill id.
 /// </summary>
 /// <param name="id"></param>
 /// <param name="level"></param>
 public StaticSkillLevel(long id, long level)
 {
     Skill = StaticSkills.GetSkillByID(id) ?? StaticSkill.UnknownStaticSkill;
     Level = level;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Constructor from the skill id.
 /// </summary>
 /// <param name="id"></param>
 /// <param name="level"></param>
 public StaticSkillLevel(Int64 id, Int64 level)
 {
     Skill = StaticSkills.GetSkillByID(id) ?? StaticSkill.UnknownStaticSkill;
     Level = level;
 }
Ejemplo n.º 9
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;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Constructor from the skill name
 /// </summary>
 /// <param name="skillName"></param>
 /// <param name="level"></param>
 public StaticSkillLevel(int id, int level)
     : this()
 {
     this.Skill = StaticSkills.GetSkillById(id);
     this.Level = level;
 }