Beispiel #1
0
        private bool CheckSceneCenterState(KarenBattleScene karenBattleScene, KarenCenterConfig center, long nowTicks)
        {
            List <object> enemiesObjList = new List <object>();

            GameManager.ClientMgr.LookupEnemiesInCircle(karenBattleScene.m_nMapCode, karenBattleScene.CopyMapId, center.PosX, center.PosY, center.Radius, enemiesObjList);
            Dictionary <int, GameClient> OwnerSideDict = new Dictionary <int, GameClient>();
            int newBattleSide = 0;

            foreach (object item in enemiesObjList)
            {
                GameClient client = item as GameClient;
                if (client.ClientData.CurrentLifeV > 0)
                {
                    OwnerSideDict[client.ClientData.BattleWhichSide] = client;
                }
            }
            if (OwnerSideDict.Count == 1)
            {
                newBattleSide = OwnerSideDict.Keys.FirstOrDefault <int>();
            }
            bool result;

            if (newBattleSide == 0 || newBattleSide == center.BattleWhichSide)
            {
                center.OwnCalculateSide  = 0L;
                center.OwnCalculateTicks = 0L;
                result = false;
            }
            else if (center.OwnCalculateSide != (long)newBattleSide)
            {
                center.OwnCalculateSide  = (long)newBattleSide;
                center.OwnCalculateTicks = nowTicks;
                result = false;
            }
            else if (nowTicks - center.OwnCalculateTicks >= (long)(center.OccupyTime * 1000))
            {
                if (center.BattleWhichSide != 0)
                {
                    karenBattleScene.ScoreData[center.BattleWhichSide - 1].ResourceList.Remove(center.ID);
                }
                center.OwnTicksDelta   = 0L;
                center.OwnTicks        = nowTicks;
                center.BattleWhichSide = newBattleSide;
                karenBattleScene.ScoreData[center.BattleWhichSide - 1].ResourceList.Add(center.ID);
                GameClient    client    = OwnerSideDict.Values.FirstOrDefault <GameClient>();
                SystemXmlItem systemNPC = null;
                if (GameManager.SystemNPCsMgr.SystemXmlItemDict.TryGetValue(center.NPCID, out systemNPC))
                {
                    string param  = systemNPC.GetStringValue("SName");
                    string param2 = client.ClientData.JunTuanName;
                    KarenBattleManager.getInstance().NtfKarenNotifyMsg(karenBattleScene, KarenNotifyMsgType.Own, client.ClientData.JunTuanId, param, param2);
                }
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Beispiel #2
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(1210, 2, 2, KarenBattleManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1212, 1, 1, KarenBattleManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     GlobalEventSource4Scene.getInstance().registerListener(24, 10000, KarenBattleManager.getInstance());
     GlobalEventSource4Scene.getInstance().registerListener(25, 10000, KarenBattleManager.getInstance());
     return(true);
 }
Beispiel #3
0
 private void InitScene(KarenBattleScene scene, GameClient client)
 {
     foreach (KarenBattleQiZhiConfig_West item in this.RuntimeData.NPCID2QiZhiConfigDict.Values)
     {
         scene.NPCID2QiZhiConfigDict.Add(item.QiZuoID, item.Clone() as KarenBattleQiZhiConfig_West);
     }
     scene.ScoreData.Clear();
     for (int sideloop = 1; sideloop <= scene.SceneInfo.MaxLegions; sideloop++)
     {
         JunTuanRankData      RankData  = KarenBattleManager.getInstance().GetJunTuanRankDataBySide(sideloop);
         KarenBattleScoreData scoreData = new KarenBattleScoreData();
         if (null != RankData)
         {
             scoreData.LegionID = RankData.JunTuanId;
             scoreData.Name     = RankData.JunTuanName;
         }
         scene.ScoreData.Add(scoreData);
     }
 }
Beispiel #4
0
        public void SubmitCrystalBuff(GameClient client, int areaLuaID)
        {
            KarenBattleQiZhiConfig_East crystalItem = client.SceneContextData as KarenBattleQiZhiConfig_East;

            if (null != crystalItem)
            {
                lock (this.RuntimeData.Mutex)
                {
                    KarenBattleScene scene;
                    if (this.SceneDict.TryGetValue(client.ClientData.FuBenSeqID, out scene))
                    {
                        KarenCenterConfig center = null;
                        if (scene.KarenCenterConfigDict.TryGetValue(areaLuaID, out center))
                        {
                            if (center.BattleWhichSide == client.ClientData.BattleWhichSide)
                            {
                                KarenBattleClientContextData contextData = client.SceneContextData2 as KarenBattleClientContextData;
                                if (contextData != null && scene.m_eStatus == GameSceneStatuses.STATUS_BEGIN)
                                {
                                    int addScore = crystalItem.HandInNum;
                                    scene.ScoreData[client.ClientData.BattleWhichSide - 1].Score += addScore;
                                    scene.ScoreData[client.ClientData.BattleWhichSide - 1].ticks  = TimeUtil.NOW();
                                    if (addScore > 0)
                                    {
                                        this.NotifyTimeStateInfoAndScoreInfo(client, false, true);
                                    }
                                }
                                SystemXmlItem systemNPC = null;
                                if (GameManager.SystemNPCsMgr.SystemXmlItemDict.TryGetValue(center.NPCID, out systemNPC))
                                {
                                    string param  = client.ClientData.JunTuanName;
                                    string param2 = systemNPC.GetStringValue("SName");
                                    KarenBattleManager.getInstance().NtfKarenNotifyMsg(scene, KarenNotifyMsgType.Submit, client.ClientData.JunTuanId, param, param2);
                                }
                                this.UpdateBuff4GameClient(client, crystalItem.BuffGoodsID, crystalItem, false);
                                this.AddDelayCreateMonster(scene, TimeUtil.NOW() + (long)(crystalItem.RefreshCD * 1000), crystalItem);
                            }
                        }
                    }
                }
            }
        }
Beispiel #5
0
        public void InstallJunQi(KarenBattleScene scene, GameClient client, KarenBattleQiZhiConfig_West item)
        {
            CopyMap copyMap = scene.CopyMap;
            GameMap gameMap = GameManager.MapMgr.GetGameMap(scene.m_nMapCode);

            if (copyMap != null && null != gameMap)
            {
                item.Alive           = true;
                item.BattleWhichSide = client.ClientData.BattleWhichSide;
                item.OwnTicks        = TimeUtil.NOW();
                scene.ScoreData[item.BattleWhichSide - 1].ResourceList.Add(item.ID);
                GameManager.MonsterZoneMgr.AddDynamicMonsters(copyMap.MapCode, item.QiZhiID, copyMap.CopyMapID, 1, item.PosX / gameMap.MapGridWidth, item.PosY / gameMap.MapGridHeight, 0, 0, SceneUIClasses.KarenWest, item, null);
                SystemXmlItem systemNPC = null;
                if (GameManager.SystemNPCsMgr.SystemXmlItemDict.TryGetValue(item.QiZuoID, out systemNPC))
                {
                    string param  = systemNPC.GetStringValue("SName");
                    string param2 = client.ClientData.JunTuanName;
                    KarenBattleManager.getInstance().NtfKarenNotifyMsg(scene, KarenNotifyMsgType.Own, client.ClientData.JunTuanId, param, param2);
                }
                this.BroadcastSceneScoreInfo(scene);
            }
        }
Beispiel #6
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);
        }
Beispiel #7
0
        public bool OnUserLogin(TMSKSocket socket, int verSign, string userID, string userName, string lastTime, string userToken, string isadult, string signCode, int serverId = 0, string ip = null, int port = 0, int roleId = 0, int gameType = 0, long gameId = 0L)
        {
            KuaFuServerLoginData kuaFuServerLoginData = socket.ClientKuaFuServerLoginData;

            if (serverId > 0 && ip != null)
            {
                kuaFuServerLoginData.ServerId   = serverId;
                kuaFuServerLoginData.ServerIp   = ip;
                kuaFuServerLoginData.ServerPort = port;
                kuaFuServerLoginData.RoleId     = roleId;
                kuaFuServerLoginData.GameType   = gameType;
                kuaFuServerLoginData.GameId     = gameId;
            }
            if (kuaFuServerLoginData.WebLoginToken == null)
            {
                kuaFuServerLoginData.WebLoginToken = new WebLoginToken
                {
                    VerSign  = verSign,
                    UserID   = userID,
                    UserName = userName,
                    LastTime = lastTime,
                    Isadult  = isadult,
                    SignCode = signCode
                };
            }
            if (roleId > 0 && serverId > 0 && gameType > 0)
            {
                if (GameManager.ServerLineID != GameManager.ServerId)
                {
                    LogManager.WriteLog(LogTypes.Error, "GameManager.ServerLineID未配置,禁止跨服登录", null, true);
                    return(false);
                }
                if (string.IsNullOrEmpty(ip) || port <= 0 || gameType <= 0 || gameId <= 0L)
                {
                    LogManager.WriteLog(LogTypes.Error, string.Format("角色{0}未能在服务器列表中找本服务器,作为跨服服务器", kuaFuServerLoginData.RoleId), null, true);
                    return(false);
                }
                if (!KuaFuManager.getInstance().CanKuaFuLogin())
                {
                    return(false);
                }
                socket.ServerId = serverId;
                switch (gameType)
                {
                case 1:
                    socket.IsKuaFuLogin = HuanYingSiYuanClient.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 2:
                    socket.IsKuaFuLogin = TianTiClient.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 5:
                case 6:
                case 15:
                    socket.IsKuaFuLogin = YongZheZhanChangClient.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 7:
                    socket.IsKuaFuLogin = YongZheZhanChangClient.getInstance().CanEnterKuaFuMap(kuaFuServerLoginData);
                    goto IL_399;

                case 8:
                    socket.IsKuaFuLogin = SingletonTemplate <CopyTeamManager> .Instance().HandleKuaFuLogin(kuaFuServerLoginData);

                    goto IL_399;

                case 10:
                    socket.IsKuaFuLogin = LangHunLingYuManager.getInstance().CanEnterKuaFuMap(kuaFuServerLoginData);
                    goto IL_399;

                case 12:
                    socket.IsKuaFuLogin = SingletonTemplate <ZhengBaManager> .Instance().CanKuaFuLogin(kuaFuServerLoginData);

                    goto IL_399;

                case 13:
                    socket.IsKuaFuLogin = SingletonTemplate <CoupleArenaManager> .Instance().CanKuaFuLogin(kuaFuServerLoginData);

                    goto IL_399;

                case 17:
                    socket.IsKuaFuLogin = true;
                    goto IL_399;

                case 19:
                case 20:
                    socket.IsKuaFuLogin = KarenBattleManager.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 22:
                    socket.IsKuaFuLogin = true;
                    goto IL_399;

                case 24:
                    socket.IsKuaFuLogin = BangHuiMatchManager.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 25:
                    socket.IsKuaFuLogin = KuaFuLueDuoManager.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 27:
                case 28:
                case 29:
                    socket.IsKuaFuLogin = true;
                    goto IL_399;

                case 30:
                    socket.IsKuaFuLogin = CompBattleManager.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 31:
                    socket.IsKuaFuLogin = CompMineManager.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 32:
                    socket.IsKuaFuLogin = true;
                    goto IL_399;

                case 34:
                    socket.IsKuaFuLogin = TianTi5v5Manager.getInstance().CanKuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;

                case 36:
                    socket.IsKuaFuLogin = ZorkBattleManager.getInstance().KuaFuLogin(kuaFuServerLoginData);
                    goto IL_399;
                }
                EventObjectEx_I1 eventObject = new EventObjectEx_I1(kuaFuServerLoginData, 61, gameType);
                if (GlobalEventSource4Scene.getInstance().fireEvent(eventObject, 10007))
                {
                    socket.IsKuaFuLogin = eventObject.Result;
                }
IL_399:
                string dbIp = "";
                int    dbPort    = 0;
                string logDbIp   = "";
                int    logDbPort = 0;
                if (kuaFuServerLoginData.ips != null && kuaFuServerLoginData.ports != null)
                {
                    dbIp      = kuaFuServerLoginData.ips[0];
                    logDbIp   = kuaFuServerLoginData.ips[1];
                    dbPort    = kuaFuServerLoginData.ports[0];
                    logDbPort = kuaFuServerLoginData.ports[1];
                }
                else if (!KuaFuManager.getInstance().GetKuaFuDbServerInfo(serverId, out dbIp, out dbPort, out logDbIp, out logDbPort))
                {
                    LogManager.WriteLog(LogTypes.Error, string.Format("GameType{0}未能找到角色{1}的原服务器的服务器IP和端口", gameType, kuaFuServerLoginData.RoleId), null, true);
                    return(false);
                }
                if (socket.IsKuaFuLogin && serverId != 0)
                {
                    if (serverId != 0)
                    {
                        if (!this.InitGameDbConnection(serverId, dbIp, dbPort, logDbIp, logDbPort))
                        {
                            LogManager.WriteLog(LogTypes.Error, string.Format("连接角色{0}的原服务器的GameDBServer和LogDBServer失败", kuaFuServerLoginData.RoleId), null, true);
                            return(false);
                        }
                    }
                    return(socket.IsKuaFuLogin);
                }
            }
            else
            {
                if (GameManager.IsKuaFuServer)
                {
                    LogManager.WriteLog(LogTypes.Error, "跨服服务器禁止非跨服登录,请检查是否将LineID配置,原服应当为1", null, true);
                    return(false);
                }
                if (KuaFuManager.getInstance().LocalLogin(userID))
                {
                    kuaFuServerLoginData.RoleId   = 0;
                    kuaFuServerLoginData.GameId   = 0L;
                    kuaFuServerLoginData.GameType = 0;
                    kuaFuServerLoginData.ServerId = 0;
                    socket.ServerId     = 0;
                    socket.IsKuaFuLogin = false;
                    return(true);
                }
            }
            LogManager.WriteLog(LogTypes.Error, string.Format("未能找到角色{0}的跨服活动或副本信息", kuaFuServerLoginData.RoleId), null, true);
            return(false);
        }
Beispiel #8
0
        public bool OnInitGame(GameClient client)
        {
            KuaFuServerLoginData kuaFuServerLoginData = Global.GetClientKuaFuServerLoginData(client);
            KarenFuBenData       fuBenData;

            lock (this.RuntimeData.Mutex)
            {
                if (!this.RuntimeData.FuBenItemData.TryGetValue((int)kuaFuServerLoginData.GameId, out fuBenData))
                {
                    fuBenData = null;
                }
                else if (fuBenData.State >= GameFuBenState.End)
                {
                    return(false);
                }
            }
            if (null == fuBenData)
            {
                if (KarenBattleManager.getInstance().GMTest)
                {
                    lock (this.RuntimeData.Mutex)
                    {
                        if (!this.RuntimeData.FuBenItemData.TryGetValue((int)kuaFuServerLoginData.GameId, out fuBenData))
                        {
                            fuBenData            = new KarenFuBenData();
                            fuBenData.GameId     = (int)kuaFuServerLoginData.GameId;
                            fuBenData.SequenceId = GameCoreInterface.getinstance().GetNewFuBenSeqId();
                            this.RuntimeData.FuBenItemData[fuBenData.GameId] = fuBenData;
                        }
                    }
                }
                else
                {
                    KarenFuBenData newFuBenData = JunTuanClient.getInstance().GetKarenKuaFuFuBenData((int)kuaFuServerLoginData.GameId);
                    if (newFuBenData == null || newFuBenData.State == GameFuBenState.End)
                    {
                        LogManager.WriteLog(LogTypes.Error, ("获取不到有效的副本数据," + newFuBenData == null) ? "fuBenData == null" : "fuBenData.State == GameFuBenState.End", null, true);
                        return(false);
                    }
                    lock (this.RuntimeData.Mutex)
                    {
                        if (!this.RuntimeData.FuBenItemData.TryGetValue((int)kuaFuServerLoginData.GameId, out fuBenData))
                        {
                            fuBenData            = newFuBenData;
                            fuBenData.SequenceId = GameCoreInterface.getinstance().GetNewFuBenSeqId();
                            this.RuntimeData.FuBenItemData[fuBenData.GameId] = fuBenData;
                        }
                    }
                }
            }
            if (KarenBattleManager.getInstance().GMTest)
            {
                client.ClientData.BattleWhichSide = Global.GetRandomNumber(1, 5);
            }
            else
            {
                KarenFuBenRoleData kroleData = JunTuanClient.getInstance().GetKarenFuBenRoleData((int)kuaFuServerLoginData.GameId, client.ClientData.RoleID);
                if (null == kroleData)
                {
                    return(false);
                }
                client.ClientData.BattleWhichSide = kroleData.Side;
            }
            int  posX;
            int  posY;
            int  side = this.GetBirthPoint(client, out posX, out posY, true);
            bool result;

            if (side <= 0)
            {
                LogManager.WriteLog(LogTypes.Error, "无法获取有效的阵营和出生点,进入跨服失败,side=" + side, null, true);
                result = false;
            }
            else
            {
                lock (this.RuntimeData.Mutex)
                {
                    kuaFuServerLoginData.FuBenSeqId = fuBenData.SequenceId;
                    KarenBattleSceneInfo sceneInfo;
                    if (null == (sceneInfo = KarenBattleManager.getInstance().TryGetKarenBattleSceneInfo((int)kuaFuServerLoginData.GameId)))
                    {
                        return(false);
                    }
                    client.ClientData.MapCode = sceneInfo.MapCode;
                }
                client.ClientData.PosX       = posX;
                client.ClientData.PosY       = posY;
                client.ClientData.FuBenSeqID = kuaFuServerLoginData.FuBenSeqId;
                KarenBattleManager.getInstance().OnInitGame(SceneUIClasses.KarenWest, client);
                result = true;
            }
            return(result);
        }
Beispiel #9
0
        public void TimerProc()
        {
            long nowTicks = TimeUtil.NOW();

            if (nowTicks >= KarenBattleManager_MapWest.NextHeartBeatTicks)
            {
                KarenBattleManager_MapWest.NextHeartBeatTicks = nowTicks + 510L;
                foreach (KarenBattleScene scene in this.SceneDict.Values)
                {
                    lock (this.RuntimeData.Mutex)
                    {
                        int nID        = scene.FuBenSeqId;
                        int nCopyID    = scene.CopyMapId;
                        int nMapCodeID = scene.m_nMapCode;
                        if (nID >= 0 && nCopyID >= 0 && nMapCodeID >= 0)
                        {
                            CopyMap  copyMap = scene.CopyMap;
                            DateTime now     = TimeUtil.NowDateTime();
                            long     ticks   = TimeUtil.NOW();
                            if (scene.m_eStatus == GameSceneStatuses.STATUS_PREPARE || scene.m_eStatus == GameSceneStatuses.STATUS_BEGIN)
                            {
                            }
                            if (scene.m_eStatus == GameSceneStatuses.STATUS_NULL)
                            {
                                if (ticks >= scene.StartTimeTicks)
                                {
                                    scene.m_lPrepareTime         = scene.StartTimeTicks;
                                    scene.m_lBeginTime           = scene.m_lPrepareTime + (long)(scene.SceneInfo.PrepareSecs * 1000);
                                    scene.m_eStatus              = GameSceneStatuses.STATUS_PREPARE;
                                    scene.StateTimeData.GameType = 19;
                                    scene.StateTimeData.State    = (int)scene.m_eStatus;
                                    scene.StateTimeData.EndTicks = scene.m_lBeginTime;
                                    GameManager.ClientMgr.BroadSpecialCopyMapMessage <GameSceneStateTimeData>(827, scene.StateTimeData, scene.CopyMap);
                                }
                            }
                            else if (scene.m_eStatus == GameSceneStatuses.STATUS_PREPARE)
                            {
                                if (ticks >= scene.m_lBeginTime)
                                {
                                    scene.m_eStatus              = GameSceneStatuses.STATUS_BEGIN;
                                    scene.m_lEndTime             = scene.m_lBeginTime + (long)(scene.SceneInfo.FightingSecs * 1000);
                                    scene.StateTimeData.GameType = 19;
                                    scene.StateTimeData.State    = (int)scene.m_eStatus;
                                    scene.StateTimeData.EndTicks = scene.m_lEndTime;
                                    GameManager.ClientMgr.BroadSpecialCopyMapMessage <GameSceneStateTimeData>(827, scene.StateTimeData, scene.CopyMap);
                                    for (int guangMuId = 1; guangMuId <= 4; guangMuId++)
                                    {
                                        GameManager.CopyMapMgr.AddGuangMuEvent(copyMap, guangMuId, 0);
                                    }
                                }
                            }
                            else if (scene.m_eStatus == GameSceneStatuses.STATUS_BEGIN)
                            {
                                if (ticks >= scene.m_lEndTime)
                                {
                                    long successTicks = long.MaxValue;
                                    int  successScore = 0;
                                    int  successSide  = 0;
                                    for (int sideloop = 0; sideloop < scene.ScoreData.Count; sideloop++)
                                    {
                                        KarenBattleScoreData scoreData = scene.ScoreData[sideloop];
                                        if (scoreData.Score > successScore)
                                        {
                                            successSide  = sideloop + 1;
                                            successTicks = scoreData.ticks;
                                            successScore = scoreData.Score;
                                        }
                                        else if (scoreData.Score == successScore && scoreData.ticks < successTicks)
                                        {
                                            successSide  = sideloop + 1;
                                            successTicks = scoreData.ticks;
                                        }
                                    }
                                    this.ProcessEnd(scene, successSide, ticks);
                                }
                                else
                                {
                                    this.CheckSceneScoreTime(scene, ticks);
                                }
                            }
                            else if (scene.m_eStatus == GameSceneStatuses.STATUS_END)
                            {
                                GameManager.CopyMapMgr.KillAllMonster(scene.CopyMap);
                                scene.m_eStatus = GameSceneStatuses.STATUS_AWARD;
                                JunTuanClient.getInstance().GameFuBenRoleChangeState(-1, -1, scene.GameId, -1, 6);
                                KarenBattleManager.getInstance().GiveAwards(scene);
                                KarenFuBenData fuBenData;
                                if (this.RuntimeData.FuBenItemData.TryGetValue(scene.GameId, out fuBenData))
                                {
                                    fuBenData.State = GameFuBenState.End;
                                    LogManager.WriteLog(LogTypes.Error, string.Format("阿卡伦西战场跨服GameID={0},战斗结束", fuBenData.GameId), null, true);
                                }
                            }
                            else if (scene.m_eStatus == GameSceneStatuses.STATUS_AWARD)
                            {
                                if (ticks >= scene.m_lLeaveTime)
                                {
                                    scene.m_eStatus = GameSceneStatuses.STATUS_CLEAR;
                                    try
                                    {
                                        List <GameClient> objsList = copyMap.GetClientsList();
                                        if (objsList != null && objsList.Count > 0)
                                        {
                                            for (int i = 0; i < objsList.Count; i++)
                                            {
                                                GameClient c = objsList[i];
                                                if (c != null)
                                                {
                                                    KuaFuManager.getInstance().GotoLastMap(c);
                                                }
                                            }
                                        }
                                    }
                                    catch (Exception ex)
                                    {
                                        DataHelper.WriteExceptionLogEx(ex, "阿卡伦西战场系统清场调度异常");
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Beispiel #10
0
        public bool AddCopyScenes(GameClient client, CopyMap copyMap, SceneUIClasses sceneType)
        {
            bool result;

            if (sceneType == SceneUIClasses.KarenWest)
            {
                GameMap gameMap = null;
                if (!GameManager.MapMgr.DictMaps.TryGetValue(client.ClientData.MapCode, out gameMap))
                {
                    result = false;
                }
                else
                {
                    int      fuBenSeqId = copyMap.FuBenSeqID;
                    int      mapCode    = copyMap.MapCode;
                    int      roleId     = client.ClientData.RoleID;
                    int      gameId     = (int)Global.GetClientKuaFuServerLoginData(client).GameId;
                    DateTime now        = TimeUtil.NowDateTime();
                    lock (this.RuntimeData.Mutex)
                    {
                        KarenBattleScene scene = null;
                        if (!this.SceneDict.TryGetValue(fuBenSeqId, out scene))
                        {
                            KarenFuBenData fuBenData;
                            if (!this.RuntimeData.FuBenItemData.TryGetValue(gameId, out fuBenData))
                            {
                                LogManager.WriteLog(LogTypes.Error, "阿卡伦战场没有为副本找到对应的跨服副本数据,GameID:" + gameId, null, true);
                            }
                            KarenBattleSceneInfo sceneInfo;
                            if (null == (sceneInfo = KarenBattleManager.getInstance().TryGetKarenBattleSceneInfo(mapCode)))
                            {
                                LogManager.WriteLog(LogTypes.Error, "阿卡伦战场没有为副本找到对应的档位数据,ID:" + mapCode, null, true);
                            }
                            scene         = new KarenBattleScene();
                            scene.CopyMap = copyMap;
                            scene.CleanAllInfo();
                            scene.GameId         = gameId;
                            scene.m_nMapCode     = mapCode;
                            scene.CopyMapId      = copyMap.CopyMapID;
                            scene.FuBenSeqId     = fuBenSeqId;
                            scene.m_nPlarerCount = 1;
                            scene.SceneInfo      = sceneInfo;
                            scene.MapGridWidth   = gameMap.MapGridWidth;
                            scene.MapGridHeight  = gameMap.MapGridHeight;
                            DateTime startTime = now.Date.Add(KarenBattleManager.getInstance().GetStartTime(sceneInfo.MapCode));
                            scene.StartTimeTicks = startTime.Ticks / 10000L;
                            this.InitScene(scene, client);
                            this.SceneDict[fuBenSeqId] = scene;
                        }
                        else
                        {
                            scene.m_nPlarerCount++;
                        }
                        KarenBattleClientContextData clientContextData;
                        if (!scene.ClientContextDataDict.TryGetValue(roleId, out clientContextData))
                        {
                            clientContextData = new KarenBattleClientContextData
                            {
                                RoleId          = roleId,
                                ServerId        = client.ServerId,
                                BattleWhichSide = client.ClientData.BattleWhichSide
                            };
                            scene.ClientContextDataDict[roleId] = clientContextData;
                        }
                        client.SceneObject       = scene;
                        client.SceneGameId       = (long)scene.GameId;
                        client.SceneContextData2 = clientContextData;
                        copyMap.IsKuaFuCopy      = true;
                        copyMap.SetRemoveTicks(TimeUtil.NOW() + (long)(scene.SceneInfo.TotalSecs * 1000));
                    }
                    JunTuanClient.getInstance().GameFuBenRoleChangeState(client.ServerId, roleId, gameId, client.ClientData.BattleWhichSide, 5);
                    result = true;
                }
            }
            else
            {
                result = false;
            }
            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();
        }
Beispiel #12
0
 public bool showdown()
 {
     GlobalEventSource4Scene.getInstance().removeListener(24, 10000, KarenBattleManager.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(25, 10000, KarenBattleManager.getInstance());
     return(true);
 }