예제 #1
0
        public bool CollectDataFromDBC(DBC_Row node)
        {
            Rank       = DBCUtil.ExtractNumeric(node, "Rank", 0, true);
            NickName   = DBCUtil.ExtractString(node, "NickName", "", true);
            HeroId     = DBCUtil.ExtractNumeric(node, "HeroId", 0, true);
            Level      = DBCUtil.ExtractNumeric(node, "Level", 0, true);
            FightScore = DBCUtil.ExtractNumeric(node, "FightScore", 0, true);
            List <string> equips_list = DBCUtil.ExtractStringList(node, "EquipInfo", "", false);

            foreach (string e in equips_list)
            {
                List <int>    array = ConvertToNumberList(e, '*');
                ArenaItemInfo item  = CreateArenaItem(array);
                if (item != null)
                {
                    EquipInfo.Add(item);
                }
            }
            List <string> xsoul_list = DBCUtil.ExtractStringList(node, "XSoulInfo", "", false);

            foreach (string e in xsoul_list)
            {
                List <int>     array = ConvertToNumberList(e, '*');
                ArenaXSoulInfo item  = CreateArenaXSoulInfo(array);
                if (item != null)
                {
                    XSoulInfo.Add(item);
                }
            }
            List <string> partner_list = DBCUtil.ExtractStringList(node, "PartnerInfo", "", false);

            foreach (string e in partner_list)
            {
                List <int>       array   = ConvertToNumberList(e, '*');
                ArenaPartnerInfo partner = CreateArenaPartnerInfo(array);
                if (partner != null)
                {
                    PartnerInfo.Add(partner);
                }
            }
            List <string> skill_list = DBCUtil.ExtractStringList(node, "SkillInfo", "", false);

            foreach (string e in skill_list)
            {
                List <int>     array = ConvertToNumberList(e, '*');
                ArenaSkillInfo skill = CreateArenaSkillInfo(array);
                if (skill != null)
                {
                    SkillInfo.Add(skill);
                }
            }
            return(true);
        }
예제 #2
0
        private ArenaSkillInfo CreateArenaSkillInfo(List <int> array)
        {
            ArenaSkillInfo item = null;

            if (array.Count > 0)
            {
                item    = new ArenaSkillInfo();
                item.Id = array[0];
                if (array.Count >= 2)
                {
                    item.Level = array[1];
                }
                if (array.Count >= 3)
                {
                    item.EquipPos = array[2];
                }
            }
            return(item);
        }