public void OnStartPlayGame(GameClient client) { int gameType = Global.GetClientKuaFuServerLoginData(client).GameType; int num = gameType; if (num != 7) { switch (num) { case 27: case 28: case 29: CompManager.getInstance().OnStartPlayGame(client); return; case 30: case 31: return; case 32: break; default: return; } } KuaFuMapManager.getInstance().OnStartPlayGame(client); }
public void OnStartPlayGame(GameClient client) { int gameType = Global.GetClientKuaFuServerLoginData(client).GameType; switch (gameType) { case (int)GameTypes.KuaFuMap: KuaFuMapManager.getInstance().OnStartPlayGame(client); break; } }
public bool OnInitGame(GameClient client) { int gameType = Global.GetClientKuaFuServerLoginData(client).GameType; switch (gameType) { case (int)GameTypes.HuanYingSiYuan: return(HuanYingSiYuanManager.getInstance().OnInitGame(client)); case (int)GameTypes.TianTi: return(TianTiManager.getInstance().OnInitGame(client)); case (int)GameTypes.YongZheZhanChang: return(YongZheZhanChangManager.getInstance().OnInitGame(client)); case (int)GameTypes.KingOfBattle: return(KingOfBattleManager.getInstance().OnInitGame(client)); case (int)GameTypes.MoRiJudge: return(MoRiJudgeManager.Instance().OnInitGame(client)); case (int)GameTypes.ElementWar: return(ElementWarManager.getInstance().OnInitGame(client)); case (int)GameTypes.KuaFuBoss: return(KuaFuBossManager.getInstance().OnInitGame(client)); case (int)GameTypes.KuaFuMap: return(KuaFuMapManager.getInstance().OnInitGame(client)); case (int)GameTypes.KuaFuCopy: return(CopyTeamManager.Instance().HandleKuaFuInitGame(client)); case (int)GameTypes.LangHunLingYu: return(LangHunLingYuManager.getInstance().OnInitGameKuaFu(client)); case (int)GameTypes.ZhengBa: return(ZhengBaManager.Instance().KuaFuInitGame(client)); case (int)GameTypes.CoupleArena: return(CoupleArenaManager.Instance().KuaFuInitGame(client)); } return(false); }
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); }
public bool OnInitGame(GameClient client) { int gameType = Global.GetClientKuaFuServerLoginData(client).GameType; bool result; if (KuaFuManager.KuaFuWorldKuaFuGameServer && !KuaFuManager.KuaFuWorldGameTypes.Contains(gameType)) { result = true; } else { switch (gameType) { case 1: return(HuanYingSiYuanManager.getInstance().OnInitGame(client)); case 2: return(TianTiManager.getInstance().OnInitGame(client)); case 3: return(SingletonTemplate <MoRiJudgeManager> .Instance().OnInitGame(client)); case 4: return(ElementWarManager.getInstance().OnInitGame(client)); case 5: return(YongZheZhanChangManager.getInstance().OnInitGame(client)); case 6: return(KuaFuBossManager.getInstance().OnInitGame(client)); case 7: case 32: return(KuaFuMapManager.getInstance().OnInitGame(client)); case 8: return(SingletonTemplate <CopyTeamManager> .Instance().HandleKuaFuInitGame(client)); case 10: return(LangHunLingYuManager.getInstance().OnInitGameKuaFu(client)); case 12: return(SingletonTemplate <ZhengBaManager> .Instance().KuaFuInitGame(client)); case 13: return(SingletonTemplate <CoupleArenaManager> .Instance().KuaFuInitGame(client)); case 15: return(KingOfBattleManager.getInstance().OnInitGame(client)); case 17: return(ZhengDuoManager.getInstance().OnInitGame(client)); case 19: return(KarenBattleManager_MapWest.getInstance().OnInitGame(client)); case 20: return(KarenBattleManager_MapEast.getInstance().OnInitGame(client)); case 22: return(LingDiCaiJiManager.getInstance().KuaFuInitGame(client)); case 24: return(BangHuiMatchManager.getInstance().OnInitGameKuaFu(client)); case 25: return(KuaFuLueDuoManager.getInstance().OnInitGameKuaFu(client)); case 26: return(WanMoXiaGuManager.getInstance().OnInitGame(client)); case 27: case 28: case 29: return(CompManager.getInstance().OnInitGameKuaFu(client)); case 30: return(CompBattleManager.getInstance().OnInitGameKuaFu(client)); case 31: return(CompMineManager.getInstance().OnInitGameKuaFu(client)); case 34: return(TianTi5v5Manager.getInstance().OnInitGame(client)); case 36: return(ZorkBattleManager.getInstance().OnInitGameKuaFu(client)); } EventObjectEx_I1 eventObject = new EventObjectEx_I1(client, 62, gameType); result = (GlobalEventSource4Scene.getInstance().fireEvent(eventObject, 10007) && eventObject.Result); } return(result); }
public static void initialize() { ZhanMengShiJianManager.getInstance().initialize(); JingJiChangManager.getInstance().initialize(); LiXianBaiTanManager.getInstance().initialize(); LiXianGuaJiManager.getInstance().initialize(); CmdRegisterTriggerManager.getInstance().initialize(); SendCmdManager.getInstance().initialize(); BossAIManager.getInstance().initialize(); WashPropsManager.initialize(); SaleManager.getInstance().initialize(); LianZhiManager.GetInstance().initialize(); ChengJiuManager.GetInstance().initialize(); PrestigeMedalManager.getInstance().initialize(); UnionPalaceManager.getInstance().initialize(); UserActivateManager.getInstance().initialize(); PetSkillManager.getInstance().initialize(); UserReturnManager.getInstance().initialize(); OlympicsManager.getInstance().initialize(); TalentManager.getInstance().initialize(); TodayManager.getInstance().initialize(); FundManager.getInstance().initialize(); WarnManager.getInstance().initialize(); EMoLaiXiCopySceneManager.LoadEMoLaiXiCopySceneInfo(); LuoLanFaZhenCopySceneManager.initialize(); MarryFuBenMgr.getInstance().initialize(); MarryLogic.LoadMarryBaseConfig(); MarryPartyLogic.getInstance().LoadMarryPartyConfig(); BuildingManager.getInstance().initialize(); OnePieceManager.getInstance().initialize(); GlobalServiceManager.RegisterManager4Scene(0, SingletonTemplate <CopyTeamManager> .Instance()); GlobalServiceManager.RegisterManager4Scene(0, KuaFuManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(35, LangHunLingYuManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, RebornManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, RebornBoss.getInstance()); GlobalServiceManager.RegisterManager4Scene(24, LuoLanChengZhanManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, FashionManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, OrnamentManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, ShenJiFuWenManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, YaoSaiJianYuManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, AlchemyManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, EraManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, VideoLogic.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, SpecPlatFuLiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(25, HuanYingSiYuanManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(10000, JingLingQiYuanManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(26, TianTiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(27, YongZheZhanChangManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(39, KingOfBattleManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(45, BangHuiMatchManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(48, CompManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(52, CompBattleManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(53, CompMineManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(57, ZorkBattleManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(47, KuaFuLueDuoManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, KarenBattleManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(41, KarenBattleManager_MapWest.getInstance()); GlobalServiceManager.RegisterManager4Scene(42, KarenBattleManager_MapEast.getInstance()); GlobalServiceManager.RegisterManager4Scene(29, SingletonTemplate <MoRiJudgeManager> .Instance()); GlobalServiceManager.RegisterManager4Scene(28, ElementWarManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(49, WanMoXiaGuManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(34, CopyWolfManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(31, KuaFuBossManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(10003, KuaFuMapManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(10002, SpreadManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(36, SingletonTemplate <ZhengBaManager> .Instance()); GlobalServiceManager.RegisterManager4Scene(38, SingletonTemplate <CoupleArenaManager> .Instance()); GlobalServiceManager.RegisterManager4Scene(10004, AllyManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(10005, SingletonTemplate <CoupleWishManager> .Instance()); GlobalServiceManager.RegisterManager4Scene(40, ZhengDuoManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, AoYunDaTiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, RoleManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, ZhuanPanManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, ShenQiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, JunTuanManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, LingDiCaiJiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, HongBaoManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, YaoSaiBossManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, YaoSaiMissionManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, HuiJiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, DeControl.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, GVoiceManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, ShenShiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, JueXingManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, ZuoQiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, ThemeBoss.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, ArmorManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, JingLingYuanSuJueXingManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, BianShenManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(55, TianTi5v5Manager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, UserRegressActiveManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, MountHolyStampManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, MazingerStoreManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, GlodAuctionProcessCmdEx.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, BoCaiManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, FunctionSendManager.GetInstance()); GlobalServiceManager.RegisterManager4Scene(0, HuanLeDaiBiManager.GetInstance()); GlobalServiceManager.RegisterManager4Scene(0, NewTimerProc.GetInstance()); GlobalServiceManager.RegisterManager4Scene(56, ZhanDuiZhengBaManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(59, EscapeBattleManager.getInstance()); GlobalServiceManager.RegisterManager4Scene(0, TestReceiveModel.getInstance()); RobotTaskValidator.getInstance().Initialize(false, 0, 0, ""); HolyItemManager.getInstance().Initialize(); TarotManager.getInstance().Initialize(); SingletonTemplate <SevenDayActivityMgr> .Instance().initialize(); SingletonTemplate <SoulStoneManager> .Instance().initialize(); SingletonTemplate <TradeBlackManager> .Instance().LoadConfig(); lock (GlobalServiceManager.Scene2ManagerDict) { foreach (List <IManager> list in GlobalServiceManager.Scene2ManagerDict.Values) { foreach (IManager i in list) { bool success = true; try { success = (success && i.initialize()); IManager2 m2 = i as IManager2; if (null != m2) { success = (success && m2.initialize(GameCoreInterface.getinstance())); } } catch (Exception ex) { success = false; LogManager.WriteException(ex.ToString()); } if (GameManager.ServerStarting && !success) { LogManager.WriteLog(LogTypes.Fatal, string.Format("执行{0}.initialize()失败,按任意键继续启动!", i.GetType()), null, true); Console.ReadKey(); } } } } TenManager.getInstance().initialize(); TenRetutnManager.getInstance().initialize(); GiftCodeNewManager.getInstance().initialize(); FaceBookManager.getInstance().initialize(); AssemblyPatchManager.getInstance().initialize(); IPStatisticsManager.getInstance().initialize(); FuMoManager.getInstance().Initialize(); }
public static void initialize() { #if BetaConfig int round = 9; Console.WriteLine("连接调试器或按任意键继续"); do { Console.Write("\b\b" + round); if (Console.KeyAvailable) { break; } Thread.Sleep(1000); } while (--round > 0); Console.Write("\b\b"); #endif //战盟事件管理器 ZhanMengShiJianManager.getInstance().initialize(); //竞技场管理器 JingJiChangManager.getInstance().initialize(); //离线摆摊 LiXianBaiTanManager.getInstance().initialize(); //离线挂机 LiXianGuaJiManager.getInstance().initialize(); //副本活动组队管理器 CopyTeamManager.Instance().initialize(); //指令注册管理器 CmdRegisterTriggerManager.getInstance().initialize(); //发送指令管理 SendCmdManager.getInstance().initialize(); //Boss AI管理器 BossAIManager.getInstance().initialize(); //洗炼管理器 WashPropsManager.initialize(); //MU交易所 SaleManager.getInstance().initialize(); //炼制系统 LianZhiManager.GetInstance().initialize(); // 成就升级 ChengJiuManager.GetInstance().initialize(); //声望勋章 PrestigeMedalManager.getInstance().initialize(); UnionPalaceManager.getInstance().initialize(); UserActivateManager.getInstance().initialize(); PetSkillManager.getInstance().initialize(); //玩家召回 UserReturnManager.getInstance().initialize(); //天赋 TalentManager.getInstance().initialize(); //每日专享 TodayManager.getInstance().initialize(); FundManager.getInstance().initialize(); //警告 WarnManager.getInstance().initialize(); //恶魔来袭 EMoLaiXiCopySceneManager.LoadEMoLaiXiCopySceneInfo(); //罗兰法阵副本 LuoLanFaZhenCopySceneManager.initialize(); //情侣副本管理器 MarryFuBenMgr.getInstance().initialize(); MarryLogic.LoadMarryBaseConfig(); MarryPartyLogic.getInstance().LoadMarryPartyConfig(); //领地 BuildingManager.getInstance().initialize(); // 藏宝秘境 OnePieceManager.getInstance().initialize(); //初始化跨服相关管理器 RegisterManager4Scene((int)SceneUIClasses.Normal, KuaFuManager.getInstance()); // RegisterManager4Scene((int)SceneUIClasses.LangHunLingYu, LangHunLingYuManager.getInstance()); //注册罗兰城战管理器 RegisterManager4Scene((int)SceneUIClasses.LuoLanChengZhan, LuoLanChengZhanManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.Normal, FashionManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.HuanYingSiYuan, HuanYingSiYuanManager.getInstance()); RegisterManager4Scene((int)ManagerTypes.ClientGoodsList, JingLingQiYuanManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.TianTi, TianTiManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.YongZheZhanChang, YongZheZhanChangManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.KingOfBattle, KingOfBattleManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.MoRiJudge, MoRiJudgeManager.Instance()); RegisterManager4Scene((int)SceneUIClasses.ElementWar, ElementWarManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.CopyWolf, CopyWolfManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.KuaFuBoss, KuaFuBossManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.KuaFuMap, KuaFuMapManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.Spread, SpreadManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.KFZhengBa, ZhengBaManager.Instance()); RegisterManager4Scene((int)SceneUIClasses.CoupleArena, CoupleArenaManager.Instance()); RegisterManager4Scene((int)SceneUIClasses.Ally, AllyManager.getInstance()); RegisterManager4Scene((int)SceneUIClasses.CoupleWish, CoupleWishManager.Instance()); // 读取外挂列表和相关配置 RobotTaskValidator.getInstance().Initialize(false, 0, 0, ""); //初始化圣物系统相关配置 HolyItemManager.getInstance().Initialize(); //初始化塔罗牌相关配置 TarotManager.getInstance().Initialize(); // 七日活动 SevenDayActivityMgr.Instance().initialize(); // 魂石 SoulStoneManager.Instance().initialize(); TradeBlackManager.Instance().LoadConfig(); //调用所有注册的管理模块的初始化函数 lock (Scene2ManagerDict) { foreach (var list in Scene2ManagerDict.Values) { foreach (var m in list) { bool success = m.initialize(); IManager2 m2 = m as IManager2; if (null != m2) { success = success && m2.initialize(GameCoreInterface.getinstance()); } if (GameManager.ServerStarting && !success) { LogManager.WriteLog(LogTypes.Fatal, string.Format("执行{0}.initialize()失败,按任意键继续启动!", m.GetType())); //Console.ReadKey(); HX_SERVER close the copy scenes; } } } } //应用宝 TenManager.getInstance().initialize(); TenRetutnManager.getInstance().initialize(); //礼包码 GiftCodeNewManager.getInstance().initialize(); }
/// <summary> /// 重新加载所有程序配置参数文件 /// </summary> /// <param name="xmlFileName"></param> /// <returns></returns> public static void ReloadAllXmlFile() { ReloadXmlFile_config_platconfig(); ReloadXmlFile_config_gifts_activities(); ReloadXmlFile_config_gifts_biggift(); ReloadXmlFile_config_gifts_loginnumgift(); ReloadXmlFile_config_gifts_huodongloginnumgift(); ReloadXmlFile_config_gifts_newrolegift(); ReloadXmlFile_config_gifts_uplevelgift(); ReloadXmlFile_config_gifts_onlietimegift(); ReloadXmlFile_config_mall(); ReloadXmlFile_config_monstergoodslist(); ReloadXmlFile_config_broadcastinfos(); ReloadXmlFile_config_specialtimes(); ReloadXmlFile_config_battle(); ReloadXmlFile_config_ArenaBattle(); ReloadXmlFile_config_popupwin(); ReloadXmlFile_config_npcscripts(); ReloadXmlFile_config_systemoperations(); ReloadXmlFile_config_systemparams(); ReloadXmlFile_config_goodsmergeitems(); ReloadXmlFile_config_qizhengegoods(); ReloadXmlFile_config_npcsalelist(); ReloadXmlFile_config_goods(); ReloadXmlFile_config_goodspack(); ReloadXmlFile_config_systemtasks(); ReloadXmlFile_config_equipupgrade(); ReloadXmlFile_config_dig(); ReloadXmlFile_config_battleexp(); ReloadXmlFile_config_bangzhanawards(); ReloadXmlFile_config_rebirth(); ReloadXmlFile_config_Award(); ReloadXmlFile_config_EquipBorn(); ReloadXmlFile_config_BornName(); ReloadXmlFile_config_gifts_FanLi(); ReloadXmlFile_config_gifts_ChongZhiSong(); ReloadXmlFile_config_gifts_ChongZhiKing(); ReloadXmlFile_config_gifts_LevelKing(); ReloadXmlFile_config_gifts_EquipKing(); ReloadXmlFile_config_gifts_HorseKing(); ReloadXmlFile_config_gifts_JingMaiKing(); ReloadXmlFile_config_gifts_VipDailyAwards(); ReloadXmlFile_config_ActivityTip(); ReloadXmlFile_config_LuckyAward(); ReloadXmlFile_config_Lucky(); ReloadXmlFile_config_ChengJiu(); ReloadXmlFile_config_ChengJiuBuff(); ReloadXmlFile_config_JingMai(); ReloadXmlFile_config_WuXue(); ReloadXmlFile_config_ZuanHuang(); ReloadXmlFile_config_Vip(); ReloadXmlFile_config_QiangGou(); ReloadXmlFile_config_HeFuQiangGou(); ReloadXmlFile_config_JieRiQiangGou(); ReloadXmlFile_config_SystemOpen(); ReloadXmlFile_config_DailyActive(); ReloadXmlFile_config_DailyActiveAward(); ReloadXmlFile_config_gifts_JieRiType(); ReloadXmlFile_config_gifts_JieRiLiBao(); ReloadXmlFile_config_gifts_JieRiDengLu(); ReloadXmlFile_config_gifts_JieRiVip(); ReloadXmlFile_config_gifts_JieRiChongZhiSong(); ReloadXmlFile_config_gifts_JieRiLeiJi(); ReloadXmlFile_config_gifts_JieRiBaoXiang(); ReloadXmlFile_config_gifts_JieRiXiaoFeiKing(); ReloadXmlFile_config_gifts_JieRiChongZhiKing(); ReloadXmlFile_config_gifts_JieRiTotalConsume(); ReloadXmlFile_config_gifts_JieRiMultAward(); ReloadXmlFile_config_bossAI(); ReloadXmlFile_config_TuoZhan(); ReloadXmlFile_config_MoJingAndQiFu(); ReloadXmlFile_config_TotalLoginDataInfo(); // 新服活动 HuodongCachingMgr.ResetXinXiaoFeiKingActivity(); // 重载合服活动配置 HuodongCachingMgr.ResetHeFuActivityConfig(); HuodongCachingMgr.ResetHeFuLoginActivity(); HuodongCachingMgr.ResetHeFuTotalLoginActivity(); HuodongCachingMgr.ResetHeFuRechargeActivity(); HuodongCachingMgr.ResetHeFuPKKingActivity(); HuodongCachingMgr.ResetHeFuAwardTimeActivity(); HuodongCachingMgr.ResetHeFuLuoLanActivity(); // 节日活动配置 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.ResetTotalChargeActivity(); HuodongCachingMgr.ResetTotalConsumeActivity(); HuodongCachingMgr.ResetSeriesLoginItem(); HuodongCachingMgr.ResetEveryDayOnLineAwardItem(); HuodongCachingMgr.ResetJieriIPointsExchangeActivity(); HuodongCachingMgr.ResetJieriFuLiActivity(); if (!UserReturnManager.getInstance().IsUserReturnOpen()) { UserReturnManager.getInstance().initConfigInfo(); } //HuodongCachingMgr.ResetHeFuVIPActivity(); //HuodongCachingMgr.ResetHeFuWCKingActivity(); HuodongCachingMgr.ResetXinFanLiActivity(); HuodongCachingMgr.ResetWeedEndInputActivity(); HuodongCachingMgr.ResetSpecialActivity(); Global.CachingJieriXmlData = null; Global.CachingSpecActXmlData = null; /// 重置补偿的字典 BuChangManager.ResetBuChangItemDict(); // begin [7/24/2013 LiaoWei] //重置获取每日充值 HuodongCachingMgr.ResetMeiRiChongZhiActivity(); // 重置获取冲级豪礼活动的配置项 HuodongCachingMgr.ResetChongJiHaoLiActivity(); // 重置神装激情回馈 HuodongCachingMgr.ResetShenZhuangJiQiHuiKuiHaoLiActivity(); // 重置月度抽奖活动 HuodongCachingMgr.ResetYueDuZhuanPanActivity(); //进入游戏时公告信息 GongGaoDataManager.LoadGongGaoData(); // end [7/24/2013 LiaoWei] //GameManager.systemQianKunMgr.ReloadLoadFromXMlFile(); // 以前的祈福不能用了 [8/28/2014 LiaoWei] GameManager.systemImpetrateByLevelMgr.ReloadLoadFromXMlFile(); QianKunManager.LoadImpetrateItemsInfo(); QianKunManager.LoadImpetrateItemsInfoFree(); QianKunManager.LoadImpetrateItemsInfoHuodong(); GameManager.systemXingYunChouJiangMgr.ReloadLoadFromXMlFile(); GameManager.systemYueDuZhuanPanChouJiangMgr.ReloadLoadFromXMlFile(); Global.LoadSpecialMachineConfig(); ElementhrtsManager.LoadRefineType(); ElementhrtsManager.LoadElementHrtsBase(); ElementhrtsManager.LoadElementHrtsLevelInfo(); ElementhrtsManager.LoadSpecialElementHrtsExp(); // 加载庆功宴配置 GameManager.QingGongYanMgr.LoadQingGongYanConfig(); // 加载精灵召唤配置 CallPetManager.LoadCallPetType(); CallPetManager.LoadCallPetConfig(); CallPetManager.LoadCallPetSystem(); Global.LoadGuWuMaps(); // 加载自动重生地图 [XSea 2015/6/19] Global.LoadAutoReviveMaps(); GameManager.MonsterZoneMgr.LoadAllMonsterXml(); // 加载版本系统开放数据 [XSea 2015/5/4] GameManager.VersionSystemOpenMgr.LoadVersionSystemOpenData(); // 充值配置文件 Global.InitFirstChargeConfigData(); RobotTaskValidator.getInstance().LoadRobotTaskData(); // 梅林魔法书 GameManager.MerlinMagicBookMgr.LoadMerlinConfigData(); // 荧光宝石 [XSea 2015/8/13] GameManager.FluorescentGemMgr.LoadFluorescentGemConfigData(); GetInterestingDataMgr.Instance().LoadConfig(); // 玩家创建角色限制管理 CreateRoleLimitManager.Instance().LoadConfig(); //加载勇者战场配置文件 YongZheZhanChangManager.getInstance().InitConfig(); //加载王者战场配置文件 KingOfBattleManager.getInstance().InitConfig(); //跨服boss配置文件 KuaFuBossManager.getInstance().InitConfig(); //跨服主线地图配置文件 KuaFuMapManager.getInstance().InitConfig(); //初始化配置 FashionManager.getInstance().InitConfig(); // 精灵奇缘 JingLingQiYuanManager.getInstance().InitConfig(); //所有装备强化附加属性 AllThingsCalcItem.InitAllForgeLevelInfo(); TradeBlackManager.Instance().LoadConfig(); Global.LoadLangDict(); LogFilterConfig.InitConfig(); TenRetutnManager.getInstance().InitConfig(); //加载视频聊天室房间数据 VideoLogic.LoadVideoXml(); Data.LoadConfig(); GiftCodeNewManager.getInstance().initGiftCode();//礼包码 }
public bool startup() { TCPCmdDispatcher.getInstance().registerProcessorEx(1141, 2, 4, KuaFuMapManager.getInstance(), TCPCmdFlags.IsStringArrayParams); TCPCmdDispatcher.getInstance().registerProcessorEx(1140, 1, 1, KuaFuMapManager.getInstance(), TCPCmdFlags.IsStringArrayParams); return(true); }
public bool ProcessKuaFuMapEnterCmd(GameClient client, int nID, byte[] bytes, string[] cmdParams) { try { int result = 0; int toMapCode = Global.SafeConvertToInt32(cmdParams[0]); int line = Global.SafeConvertToInt32(cmdParams[1]); int toBoss = 0; int teleportId = 0; if (cmdParams.Length >= 3) { toBoss = Global.SafeConvertToInt32(cmdParams[2]); } if (cmdParams.Length >= 4) { teleportId = Global.SafeConvertToInt32(cmdParams[3]); } KuaFuLineData kuaFuLineData; if (!KuaFuMapManager.getInstance().IsKuaFuMap(toMapCode)) { result = -12; } else if (!this.RuntimeData.LineMap2KuaFuLineDataDict.TryGetValue(new IntPairKey(line, toMapCode), out kuaFuLineData)) { result = -12; } else if (!Global.CanEnterMap(client, toMapCode) || (toMapCode == client.ClientData.MapCode && kuaFuLineData.MapType != 1)) { result = -12; } else { if (toMapCode == client.ClientData.MapCode && kuaFuLineData.MapType == 1) { List <KuaFuLineData> list = KuaFuWorldClient.getInstance().GetKuaFuLineDataList(toMapCode) as List <KuaFuLineData>; if (null == list) { result = -12; goto IL_67F; } KuaFuLineData currentLineData = list.Find((KuaFuLineData x) => x.ServerId == GameManager.KuaFuServerId); if (currentLineData != null && currentLineData.Line == kuaFuLineData.Line) { result = -4011; goto IL_67F; } } if (!KuaFuMapManager.getInstance().IsKuaFuMap(client.ClientData.MapCode) && !this.CheckMap(client)) { result = -21; } else if (!this.IsGongNengOpened(client, false)) { result = -12; } else if (kuaFuLineData.OnlineCount >= kuaFuLineData.MaxOnlineCount) { result = -100; } else { int fromMapCode = client.ClientData.MapCode; if (teleportId > 0) { GameMap fromGameMap = null; if (!GameManager.MapMgr.DictMaps.TryGetValue(fromMapCode, out fromGameMap)) { result = -3; goto IL_67F; } MapTeleport mapTeleport = null; if (!fromGameMap.MapTeleportDict.TryGetValue(teleportId, out mapTeleport) || mapTeleport.ToMapID != toMapCode) { result = -12; goto IL_67F; } if (Global.GetTwoPointDistance(client.CurrentPos, new Point((double)mapTeleport.X, (double)mapTeleport.Y)) > 800.0) { result = -301; goto IL_67F; } } KuaFuServerLoginData kuaFuServerLoginData = Global.GetClientKuaFuServerLoginData(client); int kuaFuServerId; if (kuaFuLineData.MapType == 1) { if (!GlobalNew.IsGongNengOpened(client, GongNengIDs.Reborn, true)) { result = -400; goto IL_67F; } string signToken; string signKey; int rt = KuaFuWorldClient.getInstance().EnterPTKuaFuMap(client.ServerId, client.ClientData.LocalRoleID, client.ClientData.ServerPTID, kuaFuLineData.MapCode, kuaFuLineData.Line, kuaFuServerLoginData, out signToken, out signKey); if (rt == -4010) { KuaFuWorldRoleData kuaFuWorldRoleData = new KuaFuWorldRoleData { LocalRoleID = client.ClientData.LocalRoleID, UserID = client.strUserID, WorldRoleID = client.ClientData.WorldRoleID, Channel = client.ClientData.Channel, PTID = client.ClientData.ServerPTID, ServerID = client.ServerId, ZoneID = client.ClientData.ZoneID }; rt = KuaFuWorldClient.getInstance().RegPTKuaFuRoleData(ref kuaFuWorldRoleData); rt = KuaFuWorldClient.getInstance().EnterPTKuaFuMap(client.ServerId, client.ClientData.LocalRoleID, client.ClientData.ServerPTID, kuaFuLineData.MapCode, kuaFuLineData.Line, kuaFuServerLoginData, out signToken, out signKey); } if (rt < 0) { result = rt; goto IL_67F; } KFRebornRoleData rebornRoleData = KuaFuWorldClient.getInstance().Reborn_GetRebornRoleData(client.ClientData.ServerPTID, client.ClientData.LocalRoleID); if (null == rebornRoleData) { result = KuaFuWorldClient.getInstance().Reborn_RoleReborn(client.ClientData.ServerPTID, client.ClientData.LocalRoleID, client.ClientData.RoleName, client.ClientData.RebornLevel); if (result < 0) { goto IL_67F; } LogManager.WriteLog(LogTypes.Analysis, string.Format("Reborn_RoleReborn ptId={0} roleId={1} roleName={2} rebornLevel={3}", new object[] { client.ClientData.ServerPTID, client.ClientData.LocalRoleID, client.ClientData.RoleName, client.ClientData.RebornLevel }), null, true); } kuaFuServerLoginData.PTID = client.ClientData.ServerPTID; kuaFuServerLoginData.RoleId = client.ClientData.LocalRoleID; kuaFuServerLoginData.SignToken = signToken; kuaFuServerLoginData.TempRoleID = rt; kuaFuServerLoginData.SignCode = MD5Helper.get_md5_string(kuaFuServerLoginData.SignDataString() + signKey).ToLower(); kuaFuServerId = kuaFuServerLoginData.TargetServerID; } else { kuaFuServerLoginData.SignCode = null; kuaFuServerId = YongZheZhanChangClient.getInstance().EnterKuaFuMap(client.ClientData.LocalRoleID, kuaFuLineData.MapCode, kuaFuLineData.Line, client.ServerId, Global.GetClientKuaFuServerLoginData(client)); } kuaFuServerLoginData.Line = line; if (kuaFuServerId > 0) { bool flag = 0 == 0; int needMoney = (teleportId > 0) ? 0 : Global.GetMapTransNeedMoney(toMapCode); if (Global.GetTotalBindTongQianAndTongQianVal(client) < needMoney) { GameManager.ClientMgr.NotifyImportantMsg(client, StringUtil.substitute(GLang.GetLang(171, new object[0]), new object[] { needMoney, Global.GetMapName(toMapCode) }), GameInfoTypeIndexes.Error, ShowGameInfoTypes.ErrAndBox, 27); result = -9; Global.GetClientKuaFuServerLoginData(client).RoleId = 0; } else { int[] enterFlags = new int[5]; enterFlags[0] = fromMapCode; enterFlags[1] = teleportId; enterFlags[2] = toBoss; Global.SaveRoleParamsIntListToDB(client, new List <int>(enterFlags), "EnterKuaFuMapFlag", true); GlobalNew.RecordSwitchKuaFuServerLog(client); client.sendCmd <KuaFuServerLoginData>(14000, Global.GetClientKuaFuServerLoginData(client), false); } } else { Global.GetClientKuaFuServerLoginData(client).RoleId = 0; result = kuaFuServerId; } } } IL_67F: client.sendCmd <int>(nID, result, false); return(true); } catch (Exception ex) { DataHelper.WriteFormatExceptionLog(ex, Global.GetDebugHelperInfo(client.ClientSocket), false, false); } return(false); }
public bool ProcessKuaFuMapEnterCmd(GameClient client, int nID, byte[] bytes, string[] cmdParams) { try { int result = StdErrorCode.Error_Success_No_Info; int toMapCode = Global.SafeConvertToInt32(cmdParams[0]); int line = Global.SafeConvertToInt32(cmdParams[1]); int toBoss = 0; int teleportId = 0; if (cmdParams.Length >= 3) { toBoss = Global.SafeConvertToInt32(cmdParams[2]); } if (cmdParams.Length >= 4) { teleportId = Global.SafeConvertToInt32(cmdParams[3]); } do { if (!KuaFuMapManager.getInstance().IsKuaFuMap(toMapCode)) { result = StdErrorCode.Error_Operation_Denied; break; } if (!Global.CanEnterMap(client, toMapCode) || toMapCode == client.ClientData.MapCode) { result = StdErrorCode.Error_Operation_Denied; break; } // 新增需求,跨服主线地图能够直接进入另一个跨服主线地图 if (!KuaFuMapManager.getInstance().IsKuaFuMap(client.ClientData.MapCode) && !CheckMap(client)) { result = StdErrorCode.Error_Denied_In_Current_Map; break; } if (!IsGongNengOpened(client)) { result = StdErrorCode.Error_Operation_Denied; break; } KuaFuLineData kuaFuLineData; if (!RuntimeData.LineMap2KuaFuLineDataDict.TryGetValue(new IntPairKey(line, toMapCode), out kuaFuLineData)) { result = StdErrorCode.Error_Operation_Denied; break; } if (kuaFuLineData.OnlineCount >= kuaFuLineData.MaxOnlineCount) { result = StdErrorCode.Error_Server_Connections_Limit; break; } int fromMapCode = client.ClientData.MapCode; if (teleportId > 0) { // 要通过传送点进入跨服主线,必须检测是否能真正使用这个传送点 GameMap fromGameMap = null; if (!GameManager.MapMgr.DictMaps.TryGetValue(fromMapCode, out fromGameMap)) { result = StdErrorCode.Error_Config_Fault; break; } MapTeleport mapTeleport = null; if (!fromGameMap.MapTeleportDict.TryGetValue(teleportId, out mapTeleport) || mapTeleport.ToMapID != toMapCode) { result = StdErrorCode.Error_Operation_Denied; break; } // 这里要增加一个位置判断,玩家是否在传送点附近, CMD_SPR_MAPCHANGE 里面没有判断,这里先放宽松一点 if (Global.GetTwoPointDistance(client.CurrentPos, new Point(mapTeleport.X, mapTeleport.Y)) > 800) { result = StdErrorCode.Error_Too_Far; break; } } int kuaFuServerId = YongZheZhanChangClient.getInstance().EnterKuaFuMap(client.ClientData.RoleID, kuaFuLineData.MapCode, kuaFuLineData.Line, client.ServerId, Global.GetClientKuaFuServerLoginData(client)); if (kuaFuServerId > 0) { // 废弃这个判断,两个跨服主线地图配在同一台服务器上,仍然统一短线重连<客户端并不需要知道没有跨到另一个服务器> if (false && kuaFuServerId == GameManager.ServerId) { Global.GotoMap(client, toMapCode); } else { // 使用传送点,不扣金币 int needMoney = teleportId > 0 ? 0 : Global.GetMapTransNeedMoney(toMapCode); if (Global.GetTotalBindTongQianAndTongQianVal(client) < needMoney) { GameManager.ClientMgr.NotifyImportantMsg(client, StringUtil.substitute(Global.GetLang("金币不足【{0}】,无法传送到【{1}】!"), needMoney, Global.GetMapName(toMapCode)), GameInfoTypeIndexes.Error, ShowGameInfoTypes.ErrAndBox, (int)HintErrCodeTypes.NoTongQian); result = StdErrorCode.Error_JinBi_Not_Enough; } else { int[] enterFlags = new int[(int)EKuaFuMapEnterFlag.Max]; enterFlags[(int)EKuaFuMapEnterFlag.FromMapCode] = fromMapCode; enterFlags[(int)EKuaFuMapEnterFlag.FromTeleport] = teleportId; enterFlags[(int)EKuaFuMapEnterFlag.TargetBossId] = toBoss; Global.SaveRoleParamsIntListToDB(client, new List <int>(enterFlags), RoleParamName.EnterKuaFuMapFlag, true); GlobalNew.RecordSwitchKuaFuServerLog(client); client.sendCmd((int)TCPGameServerCmds.CMD_SPR_KF_SWITCH_SERVER, Global.GetClientKuaFuServerLoginData(client)); } } } else { Global.GetClientKuaFuServerLoginData(client).RoleId = 0; result = kuaFuServerId; } } while (false); client.sendCmd(nID, result); return(true); } catch (Exception ex) { DataHelper.WriteFormatExceptionLog(ex, Global.GetDebugHelperInfo(client.ClientSocket), false); } return(false); }