Exemple #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);
        }
Exemple #2
0
        public bool CollectDataFromDBC(DBC_Row node)
        {
            m_Id                   = DBCUtil.ExtractNumeric <int>(node, "Id", 0, true);
            m_SceneName            = DBCUtil.ExtractString(node, "Name", "", false);
            m_ChapterName          = DBCUtil.ExtractString(node, "ChapterName", "", false);
            m_SceneDescription     = DBCUtil.ExtractString(node, "Description", "", false);
            m_Type                 = DBCUtil.ExtractNumeric <int>(node, "Type", 0, true);
            m_SubType              = DBCUtil.ExtractNumeric <int>(node, "SubType", 0, true);
            m_Chapter              = DBCUtil.ExtractNumeric <int>(node, "Chapter", 0, true);
            m_Order                = DBCUtil.ExtractNumeric <int>(node, "Order", 0, true);
            m_UnitFile             = DBCUtil.ExtractString(node, "UnitFile", "", false);
            m_SceneLogicFile       = DBCUtil.ExtractString(node, "SceneLogicFile", "", false);
            m_StoryDslFile         = DBCUtil.ExtractStringList(node, "StoryDslFile", "", false);
            m_ClientSceneFile      = DBCUtil.ExtractString(node, "ClientSceneFile", "", true);
            m_ObstacleFile         = DBCUtil.ExtractString(node, "ObstacleFile", "", false);
            m_BlockInfoFile        = DBCUtil.ExtractString(node, "BlockInfoFile", "", false);
            m_TiledDataScale       = DBCUtil.ExtractNumeric <float>(node, "TiledDataScale", 0, false);
            m_DropId               = DBCUtil.ExtractNumeric <int>(node, "DropId", 0, false);
            m_BkMusic              = DBCUtil.ExtractString(node, "BkMusic", "", false);
            m_BkMusicVolume        = DBCUtil.ExtractNumeric <float>(node, "BkMusicVolume", 1f, false);
            m_StoryMusic           = DBCUtil.ExtractString(node, "StoryMusic", "", false);
            m_StoryMusicVolume     = DBCUtil.ExtractNumeric <float>(node, "StoryMusicVolume", 1f, false);
            m_CompletedRewards     = DBCUtil.ExtractNumericList <int>(node, "CompletedReward", 0, false);
            m_CompletedTime        = DBCUtil.ExtractNumeric <int>(node, "CompletedTime", 0, false);
            m_CompletedHitCount    = DBCUtil.ExtractNumeric <int>(node, "CompletedHitCount", 0, false);
            m_CostStamina          = DBCUtil.ExtractNumeric <int>(node, "CostStamina", 0, false);
            m_RecommendFighting    = DBCUtil.ExtractNumeric <int>(node, "RecommendFighting", 0, false);
            m_AtlasPath            = DBCUtil.ExtractString(node, "AtlasPath", "", false);
            m_SceneIconName        = DBCUtil.ExtractString(node, "SceneIconName", "", false);
            m_RecoverHpCoefficient = DBCUtil.ExtractNumeric <float>(node, "RecoverHpCoefficient", 1, false);
            m_RecoverMpCoefficient = DBCUtil.ExtractNumeric <float>(node, "RecoverMpCoefficient", 1, false);
            m_BossLinkId           = DBCUtil.ExtractNumeric <int>(node, "BossLinkId", -1, false);
            List <float> coords = DBCUtil.ExtractNumericList <float>(node, "ReachableSet", 0, false);

            m_RelatedMainCity = DBCUtil.ExtractNumeric <int>(node, "RelatedMainCity", 0, false);
            if (coords.Count > 0)
            {
                m_ReachableSet = new Vector3[coords.Count / 2];
                for (int i = 0; i < coords.Count - 1; i += 2)
                {
                    m_ReachableSet[i / 2] = new Vector3(coords[i], 0, coords[i + 1]);
                }
            }
            else
            {
                m_ReachableSet = null;
            }
            return(true);
        }
        public bool CollectDataFromDBC(DBC_Row node)
        {
            m_ItemId            = DBCUtil.ExtractNumeric <int>(node, "ItemId", 0, true);
            m_ItemName          = DBCUtil.ExtractString(node, "ItemName", "", true);
            m_ItemTrueName      = DBCUtil.ExtractString(node, "ItemTrueName", "", true);
            m_ItemCategory      = DBCUtil.ExtractNumeric <int>(node, "ItemCategory", -1, false);
            m_ItemType          = DBCUtil.ExtractString(node, "ItemType", "", true);
            m_Description       = DBCUtil.ExtractString(node, "Description", "", false);
            m_Grade             = DBCUtil.ExtractNumeric <int>(node, "Grade", 0, false);
            m_ExperienceProvide = DBCUtil.ExtractNumeric <int>(node, "ExperienceProvide", 0, false);
            m_UseLogicId        = DBCUtil.ExtractNumeric <int>(node, "UseLogicId", 0, false);
            List <string> strList = DBCUtil.ExtractStringList(node, "UseResultData", "", false);

            if (strList.Count > 0)
            {
                m_UseResultData = strList.ToArray();
            }
            List <int> list = DBCUtil.ExtractNumericList <int>(node, "ActiveBuffOnLevel", 0, false);

            if (list.Count > 0)
            {
                m_ActiveBuffOnLevel = list.ToArray();
            }
            m_UseIconOnLevel  = DBCUtil.ExtractString(node, "UseIconOnLevel", "", false).Split('|');
            m_UseModelOnLevel = DBCUtil.ExtractString(node, "UseModelOnLevel", "", false).Split('|');
            list = DBCUtil.ExtractNumericList <int>(node, "AddBuffOnEquiping", 0, false);
            if (list.Count > 0)
            {
                m_AddBuffOnEquiping = list.ToArray();
            }
            list = DBCUtil.ExtractNumericList <int>(node, "AddSkillOnEquiping", 0, false);
            if (list.Count > 0)
            {
                m_AddSkillOnEquiping = list.ToArray();
            }
            m_ShowInShop = (0 != DBCUtil.ExtractNumeric <int>(node, "ShowInShop", 0, false));
            m_Model      = DBCUtil.ExtractString(node, "Model", "", false);
            m_UiModel    = DBCUtil.ExtractString(node, "UiModel", "", false);
            m_MaxStack   = DBCUtil.ExtractNumeric <int>(node, "MaxStackNum", 1, false);
            list         = DBCUtil.ExtractNumericList <int>(node, "ConsumeItems", 0, false);
            if (list.Count > 0)
            {
                m_ConsumeItems = list.ToArray();
            }
            else
            {
                m_ConsumeItems = new int[] { 0, 0, 0 };
            }
            m_ConsumeMoney    = DBCUtil.ExtractNumeric <int>(node, "ConsumeMoney", 0, false);
            m_PropertyRank    = DBCUtil.ExtractNumeric <int>(node, "PropertyRank", 0, true);
            m_AddExp          = DBCUtil.ExtractNumeric <int>(node, "AddExp", 0, false);
            m_AddMoney        = DBCUtil.ExtractNumeric <int>(node, "AddMoney", 0, false);
            m_AddBuff         = DBCUtil.ExtractNumeric <int>(node, "AddBuffer", 0, false);
            m_Introduce       = DBCUtil.ExtractString(node, "Introduce", "", false);
            m_ItemSkillFirst  = DBCUtil.ExtractNumeric <int>(node, "ItemSkillFirst", 0, false);
            m_ItemSkillSecond = DBCUtil.ExtractNumeric <int>(node, "ItemSkillSecond", 0, false);
            m_ItemSkillThird  = DBCUtil.ExtractNumeric <int>(node, "ItemSkillThird", 0, false);
            m_NormalIcon      = DBCUtil.ExtractString(node, "NormalIcon", "", false);
            m_BigIcon         = DBCUtil.ExtractString(node, "BigIcon", "", false);
            m_AttrData.CollectDataFromDBC(node);
            m_CanWear          = DBCUtil.ExtractNumeric <bool>(node, "CanWear", false, false);
            m_WearParts        = DBCUtil.ExtractNumeric <int>(node, "WearParts", -1, false);
            m_WearLevel        = DBCUtil.ExtractNumeric <int>(node, "WearLevel", 1, false);
            m_WearNodeAndName  = DBCUtil.ExtractString(node, "WearNodeAndName", "", false);
            m_CanUpgrade       = DBCUtil.ExtractNumeric <bool>(node, "CanUpgrade", false, false);
            m_CanDeve          = DBCUtil.ExtractNumeric <bool>(node, "CanDeve", false, false);
            m_AttachedProperty = DBCUtil.ExtractNumericList(node, "AttachedProperty", 0, false);
            m_TalentType       = DBCUtil.ExtractNumeric <int>(node, "TalentType", 1, false);
            m_TalentAttributes = DBCUtil.ExtractNumericList(node, "TalentAttributes", 0, false);
            m_ActiveAttributes = DBCUtil.ExtractNumericList(node, "ActiveAttributes", 0, false);
            m_CompoundItemId   = DBCUtil.ExtractNumericList(node, "CompoundItemId", 0, false);
            m_Inlay            = DBCUtil.ExtractString(node, "Inlay", "", false);
            m_Weight           = DBCUtil.ExtractNumeric <int>(node, "Weight", -1, false);
            m_SellingPrice     = DBCUtil.ExtractNumeric <int>(node, "SellingPrice", 0, false);
            m_SellGainGoldProb = DBCUtil.ExtractNumeric <float>(node, "SellGainGoldProb", 0f, false);
            m_SellGainGoldNum  = DBCUtil.ExtractNumeric <int>(node, "SellGainGoldNum", 0, false);
            m_DamageType       = (ElementDamageType)DBCUtil.ExtractNumeric <int>(node, "ElementType", 0, false);
            m_ItemSourceScene  = DBCUtil.ExtractNumericList <int>(node, "ItemSourceScene", int.MinValue, false);
            m_ItemSourceDesc   = DBCUtil.ExtractString(node, "ItemSourceDesc", "", false);
            m_ShowType         = DBCUtil.ExtractNumeric <int>(node, "ShowType", 0, false);
            m_SkeletonSource   = DBCUtil.ExtractString(node, "SkeletonSource", "", false);
            return(true);
        }