Beispiel #1
0
        public void Load(string file)
        {
            m_Skills.Clear();

            XDocument document = XDocument.Load(file);
            var       dump     = document.Element("skills").Elements("skill").Select(element => {
                PetSkillInfo skill = new PetSkillInfo(element);
                m_Skills.TryAdd(skill.id, skill);
                return(skill.id);
            }).ToList();
        }
Beispiel #2
0
 public PetSkillInfo GetSkill(int id)
 {
     if (m_Skills.ContainsKey(id))
     {
         PetSkillInfo result = null;
         if (m_Skills.TryGetValue(id, out result))
         {
             return(result);
         }
     }
     return(null);
 }