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

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

            FullPatch  = patch;
            FullPatch += effectFileName;
            FullPatch += ".bin";

            //效果配置
            if (!mEffectEditor.LoadEffectTableFromBin(FullPatch))
            {
                Trace.Error("加载bin格式effect配置文件失败:" + FullPatch);
                return(false);
            }

            FullPatch  = patch;
            FullPatch += conditionFileName;
            FullPatch += ".bin";

            //条件配置
            if (!mConditionEditor.LoadCoditionTableFromBin(FullPatch))
            {
                Trace.Error("加载bin格式condition配置文件失败:" + FullPatch);
                return(false);
            }

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