Beispiel #1
0
        private Dictionary <int, SystemXmlItem> _LoadFromXMlFile(string fileName, string rootName, string keyName, int resType)
        {
            XElement xml = null;

            try
            {
                string fullPathFileName = "";
                if (0 == resType)
                {
                    fullPathFileName = Global.GameResPath(fileName);
                }
                else if (1 == resType)
                {
                    fullPathFileName = Global.IsolateResPath(fileName);
                }
                fullPathFileName = WorldLevelManager.getInstance().GetJieRiConfigFileName(fullPathFileName);
                xml = XElement.Load(fullPathFileName);
                if (null == xml)
                {
                    throw new Exception(string.Format("加载系统xml配置文件:{0}, 失败。没有找到相关XML配置文件!", fullPathFileName));
                }
                this.FileName = fileName;
                this.RootName = rootName;
                this.KeyName  = keyName;
                this.ResType  = resType;
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("加载系统xml配置文件:{0}, 失败。\r\n{1}", fileName, ex.ToString()));
            }
            IEnumerable <XElement> nodes;

            if ("" == rootName)
            {
                nodes = xml.Elements();
            }
            else
            {
                nodes = xml.Elements(rootName).Elements <XElement>();
            }
            Dictionary <int, SystemXmlItem> systemXmlItemDict = new Dictionary <int, SystemXmlItem>();

            foreach (XElement node in nodes)
            {
                SystemXmlItem systemXmlItem = new SystemXmlItem
                {
                    XMLNode = node
                };
                int key = (int)Global.GetSafeAttributeLong(node, keyName);
                systemXmlItemDict[key] = systemXmlItem;
                if (key > this.MaxKey)
                {
                    this.MaxKey = key;
                }
            }
            this.FirstLoadOK = true;
            return(systemXmlItemDict);
        }
        private static XElement CachingXml(string xmlFileName)
        {
            XElement xml = null;

            try
            {
                string jieRiFileName = WorldLevelManager.getInstance().GetJieRiConfigFileName(xmlFileName);
                xml = XElement.Load(jieRiFileName);
                lock (GeneralCachingXmlMgr.CachingXmlDict)
                {
                    GeneralCachingXmlMgr.CachingXmlDict[xmlFileName] = xml;
                }
            }
            catch (Exception ex)
            {
                LogManager.WriteException(ex.ToString() + "xmlFileName=" + xmlFileName);
                return(null);
            }
            return(xml);
        }
Beispiel #3
0
        public static void ReloadAllXmlFile()
        {
            WorldLevelManager.getInstance().InitConfig();
            WorldLevelManager.getInstance().ResetWorldLevel();
            ReloadXmlManager.ReloadXmlFile_config_platconfig();
            ReloadXmlManager.ReloadXmlFile_config_gifts_activities();
            ReloadXmlManager.ReloadXmlFile_config_gifts_biggift();
            ReloadXmlManager.ReloadXmlFile_config_gifts_loginnumgift();
            ReloadXmlManager.ReloadXmlFile_config_gifts_huodongloginnumgift();
            ReloadXmlManager.ReloadXmlFile_config_gifts_newrolegift();
            ReloadXmlManager.ReloadXmlFile_config_combat_effectiveness_gift();
            ReloadXmlManager.ReloadXmlFile_config_gifts_uplevelgift();
            ReloadXmlManager.ReloadXmlFile_config_gifts_onlietimegift();
            ReloadXmlManager.ReloadXmlFile_config_mall();
            ReloadXmlManager.ReloadXmlFile_config_monstergoodslist();
            ReloadXmlManager.ReloadXmlFile_config_broadcastinfos();
            ReloadXmlManager.ReloadXmlFile_config_specialtimes();
            ReloadXmlManager.ReloadXmlFile_config_battle();
            ReloadXmlManager.ReloadXmlFile_config_ArenaBattle();
            ReloadXmlManager.ReloadXmlFile_config_popupwin();
            ReloadXmlManager.ReloadXmlFile_config_npcscripts();
            ReloadXmlManager.ReloadXmlFile_config_systemoperations();
            ReloadXmlManager.ReloadXmlFile_config_systemparams();
            ReloadXmlManager.ReloadXmlFile_config_goodsmergeitems();
            ReloadXmlManager.ReloadXmlFile_config_qizhengegoods();
            ReloadXmlManager.ReloadXmlFile_config_npcsalelist();
            ReloadXmlManager.ReloadXmlFile_config_goods();
            ReloadXmlManager.ReloadXmlFile_config_goodspack();
            ReloadXmlManager.ReloadXmlFile_config_systemtasks();
            ReloadXmlManager.ReloadXmlFile_config_equipupgrade();
            ReloadXmlManager.ReloadXmlFile_config_dig();
            ReloadXmlManager.ReloadXmlFile_config_battleexp();
            ReloadXmlManager.ReloadXmlFile_config_bangzhanawards();
            ReloadXmlManager.ReloadXmlFile_config_rebirth();
            ReloadXmlManager.ReloadXmlFile_config_Award();
            ReloadXmlManager.ReloadXmlFile_config_EquipBorn();
            ReloadXmlManager.ReloadXmlFile_config_BornName();
            ReloadXmlManager.ReloadXmlFile_config_gifts_FanLi();
            ReloadXmlManager.ReloadXmlFile_config_gifts_ChongZhiSong();
            ReloadXmlManager.ReloadXmlFile_config_gifts_ChongZhiKing();
            ReloadXmlManager.ReloadXmlFile_config_gifts_LevelKing();
            ReloadXmlManager.ReloadXmlFile_config_gifts_EquipKing();
            ReloadXmlManager.ReloadXmlFile_config_gifts_HorseKing();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JingMaiKing();
            ReloadXmlManager.ReloadXmlFile_config_gifts_VipDailyAwards();
            ReloadXmlManager.ReloadXmlFile_config_ActivityTip();
            ReloadXmlManager.ReloadXmlFile_config_LuckyAward();
            ReloadXmlManager.ReloadXmlFile_config_Lucky();
            ReloadXmlManager.ReloadXmlFile_config_ChengJiu();
            ReloadXmlManager.ReloadXmlFile_config_ChengJiuBuff();
            ReloadXmlManager.ReloadXmlFile_config_JingMai();
            ReloadXmlManager.ReloadXmlFile_config_WuXue();
            ReloadXmlManager.ReloadXmlFile_config_ZuanHuang();
            ReloadXmlManager.ReloadXmlFile_config_Vip();
            ReloadXmlManager.ReloadXmlFile_config_QiangGou();
            ReloadXmlManager.ReloadXmlFile_config_HeFuQiangGou();
            ReloadXmlManager.ReloadXmlFile_config_JieRiQiangGou();
            ReloadXmlManager.ReloadXmlFile_config_SystemOpen();
            ReloadXmlManager.ReloadXmlFile_config_DailyActive();
            ReloadXmlManager.ReloadXmlFile_config_DailyActiveAward();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiType();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiLiBao();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiDengLu();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiVip();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiChongZhiSong();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiLeiJi();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiBaoXiang();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiXiaoFeiKing();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiChongZhiKing();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiTotalConsume();
            ReloadXmlManager.ReloadXmlFile_config_gifts_JieRiMultAward();
            ReloadXmlManager.ReloadXmlFile_config_bossAI();
            ReloadXmlManager.ReloadXmlFile_config_TuoZhan();
            ReloadXmlManager.ReloadXmlFile_config_MoJingAndQiFu();
            ReloadXmlManager.ReloadXmlFile_config_TotalLoginDataInfo();
            GameManager.SystemMagicsMgr.ReloadLoadFromXMlFile();
            GameManager.SystemMagicQuickMgr.LoadMagicItemsDict(GameManager.SystemMagicsMgr);
            HuodongCachingMgr.ResetXinXiaoFeiKingActivity();
            HuodongCachingMgr.ResetHeFuActivityConfig();
            HuodongCachingMgr.ResetHeFuLoginActivity();
            HuodongCachingMgr.ResetHeFuTotalLoginActivity();
            HuodongCachingMgr.ResetHeFuRechargeActivity();
            HuodongCachingMgr.ResetHeFuPKKingActivity();
            HuodongCachingMgr.ResetHeFuAwardTimeActivity();
            HuodongCachingMgr.ResetHeFuLuoLanActivity();
            HuodongCachingMgr.ResetThemeActivityConfig();
            HuodongCachingMgr.ResetThemeDaLiBaoActivity();
            HuodongCachingMgr.ResetThemeDuiHuanActivity();
            HuodongCachingMgr.ResetThemeZhiGouActivity();
            HuodongCachingMgr.ResetJieriActivityConfig();
            HuodongCachingMgr.ResetJieriDaLiBaoActivity();
            HuodongCachingMgr.ResetJieRiDengLuActivity();
            HuodongCachingMgr.ResetJieriCZSongActivity();
            HuodongCachingMgr.ResetJieRiLeiJiCZActivity();
            HuodongCachingMgr.ResetJieRiTotalConsumeActivity();
            HuodongCachingMgr.ResetJieRiMultAwardActivity();
            HuodongCachingMgr.ResetJieRiZiKaLiaBaoActivity();
            HuodongCachingMgr.ResetJieRiXiaoFeiKingActivity();
            HuodongCachingMgr.ResetJieRiCZKingActivity();
            HuodongCachingMgr.ResetJieriGiveActivity();
            HuodongCachingMgr.ResetJieRiGiveKingActivity();
            HuodongCachingMgr.ResetJieriRecvKingActivity();
            HuodongCachingMgr.ResetJieRiFanLiAwardActivity();
            HuodongCachingMgr.ResetJieriLianXuChargeActivity();
            HuodongCachingMgr.ResetJieriRecvActivity();
            HuodongCachingMgr.ResetJieriPlatChargeKingActivity();
            HuodongCachingMgr.ResetFirstChongZhiGift();
            HuodongCachingMgr.ResetDanBiChongZhiActivity();
            HuodongCachingMgr.ResetTotalChargeActivity();
            HuodongCachingMgr.ResetTotalConsumeActivity();
            HuodongCachingMgr.ResetSeriesLoginItem();
            HuodongCachingMgr.ResetEveryDayOnLineAwardItem();
            HuodongCachingMgr.ResetJieriIPointsExchangeActivity();
            HuodongCachingMgr.ResetJieriFuLiActivity();
            HuodongCachingMgr.ResetJieriVIPYouHuiAct();
            HuodongCachingMgr.ResetJieRiMeiRiLeiJiActivity();
            HuodongCachingMgr.ResetJieriPCKingActivityEveryDay();
            OlympicsManager.getInstance().InitOlympics();
            UserReturnManager.getInstance().initConfigInfo();
            HuodongCachingMgr.ResetSpecPriorityActivity();
            HuodongCachingMgr.ResetXinFanLiActivity();
            HuodongCachingMgr.ResetWeedEndInputActivity();
            HuodongCachingMgr.ResetSpecialActivity();
            HuodongCachingMgr.ResetJieRiCZQGActivity();
            HuodongCachingMgr.ResetOneDollarBuyActivity();
            HuodongCachingMgr.ResetJieRiSuperInputFanLiActivity();
            HuodongCachingMgr.ResetOneDollarChongZhiActivity();
            HuodongCachingMgr.ResetEverydayActivity();
            HuodongCachingMgr.ResetInputFanLiNewActivity();
            HuodongCachingMgr.ResetRegressActiveOpen();
            HuodongCachingMgr.ResetRegressActiveTotalRecharge();
            HuodongCachingMgr.ResetRegressActiveStore();
            HuodongCachingMgr.ResetRegressActiveDayBuy();
            HuodongCachingMgr.ResetRegressActiveSignGift();
            WebOldPlayerManager.ReloadXml();
            TenManager.initConfig();
            Global.CachingJieriXmlData           = null;
            Global.CachingSpecActXmlData         = null;
            Global.CachingEverydayActXmlData     = null;
            Global.CachingThemeActXmlData        = null;
            Global.CachingSpecPriorityActXmlData = null;
            TodayManager.InitConfig();
            BuChangManager.ResetBuChangItemDict();
            HuodongCachingMgr.ResetMeiRiChongZhiActivity();
            HuodongCachingMgr.ResetChongJiHaoLiActivity();
            HuodongCachingMgr.ResetShenZhuangJiQiHuiKuiHaoLiActivity();
            HuodongCachingMgr.ResetYueDuZhuanPanActivity();
            GongGaoDataManager.LoadGongGaoData();
            SaleManager.InitConfig();
            GameManager.systemImpetrateByLevelMgr.ReloadLoadFromXMlFile();
            QianKunManager.LoadImpetrateItemsInfo();
            QianKunManager.LoadImpetrateItemsInfoFree();
            QianKunManager.LoadImpetrateItemsInfoHuodong();
            QianKunManager.LoadImpetrateItemsInfoFreeHuoDong();
            QianKunManager.LoadImpetrateItemsInfoTeQuan();
            QianKunManager.LoadImpetrateItemsInfoFreeTeQuan();
            GameManager.systemXingYunChouJiangMgr.ReloadLoadFromXMlFile();
            GameManager.systemYueDuZhuanPanChouJiangMgr.ReloadLoadFromXMlFile();
            Global.LoadSpecialMachineConfig();
            ElementhrtsManager.LoadRefineType();
            ElementhrtsManager.LoadElementHrtsBase();
            ElementhrtsManager.LoadElementHrtsLevelInfo();
            ElementhrtsManager.LoadSpecialElementHrtsExp();
            GameManager.QingGongYanMgr.LoadQingGongYanConfig();
            CopyTargetManager.LoadConfig();
            CallPetManager.LoadCallPetType();
            CallPetManager.LoadCallPetConfig();
            CallPetManager.LoadCallPetSystem();
            ShenShiManager.getInstance().ReloadConfig();
            Global.LoadGuWuMaps();
            Global.LoadAutoReviveMaps();
            GameManager.MonsterZoneMgr.LoadAllMonsterXml();
            GameManager.VersionSystemOpenMgr.LoadVersionSystemOpenData();
            UserMoneyMgr.getInstance().InitConfig();
            RobotTaskValidator.getInstance().LoadRobotTaskData();
            GameManager.MerlinMagicBookMgr.LoadMerlinConfigData();
            GameManager.FluorescentGemMgr.LoadFluorescentGemConfigData();
            SingletonTemplate <GetInterestingDataMgr> .Instance().LoadConfig();

            SingletonTemplate <CreateRoleLimitManager> .Instance().LoadConfig();

            TianTiManager.getInstance().InitConfig(true);
            TianTi5v5Manager.getInstance().InitConfig(true);
            YongZheZhanChangManager.getInstance().InitConfig();
            KingOfBattleManager.getInstance().InitConfig();
            BangHuiMatchManager.getInstance().InitConfig();
            ZorkBattleManager.getInstance().InitConfig();
            KarenBattleManager.getInstance().InitConfig();
            KarenBattleManager_MapWest.getInstance().InitConfig();
            KarenBattleManager_MapEast.getInstance().InitConfig();
            KuaFuBossManager.getInstance().InitConfig();
            KuaFuMapManager.getInstance().InitConfig();
            FashionManager.getInstance().InitConfig();
            OrnamentManager.getInstance().InitConfig();
            ShenJiFuWenManager.getInstance().InitConfig();
            YaoSaiJianYuManager.getInstance().InitConfig();
            AlchemyManager.getInstance().InitConfig();
            ZuoQiManager.getInstance().ReLoadConfig(false);
            RebornManager.getInstance().InitConfig(true);
            RebornBoss.getInstance().InitConfig();
            SpecPlatFuLiManager.getInstance().InitConfig();
            EraManager.getInstance().InitConfig();
            JingLingQiYuanManager.getInstance().InitConfig();
            AllThingsCalcItem.InitAllForgeLevelInfo();
            SingletonTemplate <TradeBlackManager> .Instance().LoadConfig();

            Global.LoadLangDict();
            LogFilterConfig.InitConfig();
            TenRetutnManager.getInstance().InitConfig();
            VideoLogic.getInstance().LoadVideoXml();
            Data.LoadConfig();
            GiftCodeNewManager.getInstance().initGiftCode();
            AoYunDaTiManager.getInstance().LoadConfig();
            ZhuanPanManager.getInstance().LoadConfig();
            JueXingManager.getInstance().LoadConfig();
            TalentManager.LoadTalentSpecialData();
            AssemblyPatchManager.getInstance().initialize();
            IPStatisticsManager.getInstance().LoadConfig();
            JunTuanManager.getInstance().InitConfig();
            HongBaoManager.getInstance().InitConfig();
            HuiJiManager.getInstance().InitConfig();
            DeControl.getInstance().InitConfig();
            GVoiceManager.getInstance().InitConfig();
            KuaFuLueDuoManager.getInstance().InitConfig();
            WanMoXiaGuManager.getInstance().InitConfig();
            ThemeBoss.getInstance().InitConfig();
            ArmorManager.getInstance().InitConfig();
            CompBattleManager.getInstance().InitConfig();
            CompMineManager.getInstance().InitConfig();
            JingLingYuanSuJueXingManager.getInstance().LoadConfig();
            BianShenManager.getInstance().InitConfig();
            ZhanDuiZhengBaManager.getInstance().InitConfig();
            EscapeBattleManager.getInstance().InitConfig();
            MazingerStoreManager.getInstance().InitConfig();
            BuffManager.InitConfig();
            GoldAuctionConfigModel.LoadConfig();
            BoCaiConfigMgr.LoadConfig(true);
        }