/**
         * @brief 私有提取函数
         *
         * @return
         */
        private List <Data_ActionInfo> ExtractAction(DBC_Row node, string prefix)
        {
            List <Data_ActionInfo> data = new List <Data_ActionInfo>();

            List <string> childList = DBCUtil.ExtractNodeByPrefix(node, prefix);

            if (childList.Count == 0)
            {
                return(data);
            }

            foreach (string child in childList)
            {
                if (string.IsNullOrEmpty(child))
                {
                    continue;
                }

                string outModelPath;
                string outSoundId;
                if (!_ParseModelPath(child, out outModelPath, out outSoundId))
                {
                    string info = "[Err]:ActionConfigProvider.ExtractAction anim name error:" + child;
                    throw new Exception(info);
                }

                Data_ActionInfo action = new Data_ActionInfo();
                action.m_AnimName = m_ActionPrefix + outModelPath;
                action.m_SoundId  = outSoundId;
                data.Add(action);
            }

            return(data);
        }
Esempio n. 2
0
 public bool CollectDataFromDBC(DBC_Row node)
 {
     AttributeId    = DBCUtil.ExtractNumeric <int>(node, "AttributeId", 0, true);
     Describe       = DBCUtil.ExtractString(node, "Describe", "", false);
     AttributeType  = DBCUtil.ExtractNumeric <int>(node, "AttributeType", 0, true);
     ParamValues    = DBCUtil.ExtractNodeByPrefix(node, "ParamValue_");
     LevelAddValues = DBCUtil.ExtractNodeByPrefix(node, "LevelAdd_");
     return(true);
 }