Ejemplo n.º 1
0
        /// <summary>
        /// 从csv加载配置
        /// </summary>
        /// <param name="patch"></param>
        /// <returns></returns>
        private bool LoadConfigFromCSV(string patch)
        {
            bool   bResult   = true;
            string FullPatch = patch;

            FullPatch += SpellFileName;
            FullPatch += ".csv";
            //技能配置
            if (!LoadSpellTableFromCsv(FullPatch))
            {
                Trace.Error("加载csv格式skill配置文件失败:" + FullPatch);
                bResult = false;
            }

            FullPatch  = patch;
            FullPatch += conditionFileName;
            FullPatch += ".csv";
            //条件配置
            if (!mConditionEditor.LoadCoditionTableFromCsv(FullPatch))
            {
                Trace.Error("加载csv格式condition配置文件失败:" + FullPatch);
                bResult = false;
            }

            //效果配置
            FullPatch  = patch;
            FullPatch += effectFileName;
            FullPatch += ".csv";
            if (!mEffectEditor.LoadEffectTableFromCsv(FullPatch))
            {
                Trace.Error("加载csv格式effect配置文件失败:" + FullPatch);
                bResult = false;
            }


            FullPatch  = patch;
            FullPatch += SpellLogincFileName;
            FullPatch += ".csv";
            //逻辑
            if (!mLogicEditor.LoadSpellLogicFromCsv(FullPatch))
            {
                Trace.Error("加载csv格式spelllogic配置文件失败:" + FullPatch);
                bResult = false;
            }
            return(bResult);
        }