Exemple #1
0
 private Skills.Skill GetSkill(Skills.SkillType skillType)
 {
     Skills.Skill skill1;
     if (this.SkillData.TryGetValue(skillType, out skill1))
     {
         return(skill1);
     }
     Skills.Skill skill2 = new Skills.Skill(this.GetSkillDef(skillType));
     this.SkillData.Add(skillType, skill2);
     return(skill2);
 }
Exemple #2
0
        public void Load(ZPackage pkg)
        {
            int num1 = pkg.ReadInt();

            this.SkillData.Clear();
            int num2 = pkg.ReadInt();

            for (int index = 0; index < num2; ++index)
            {
                Skills.SkillType skillType = (Skills.SkillType)pkg.ReadInt();
                float            num3      = pkg.ReadSingle();
                float            num4      = num1 >= 2 ? pkg.ReadSingle() : 0.0f;
                if (this.IsSkillValid(skillType))
                {
                    Skills.Skill skill = this.GetSkill(skillType);
                    skill.m_level       = num3;
                    skill.m_accumulator = num4;
                }
            }
        }