Exemplo n.º 1
0
 public bool showdown()
 {
     GlobalEventSource4Scene.getInstance().removeListener(10002, 42, KarenBattleManager_MapEast.getInstance());
     GlobalEventSource.getInstance().removeListener(10, KarenBattleManager_MapEast.getInstance());
     GlobalEventSource.getInstance().removeListener(31, KarenBattleManager_MapEast.getInstance());
     return(true);
 }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        public static int ReqStartCaiJi(GameClient client, int monsterId, out int GatherTime)
        {
            GatherTime = 0;
            CaiJiLogic.CancelCaiJiState(client);
            int result;

            if (TimeUtil.NOW() < client.ClientData.CurrentMagicActionEndTicks)
            {
                result = -43;
            }
            else if (client.ClientData.CurrentLifeV <= 0)
            {
                CaiJiLogic.CancelCaiJiState(client);
                result = -3;
            }
            else
            {
                Monster monster = GameManager.MonsterMgr.FindMonster(client.ClientData.MapCode, monsterId);
                if (null == monster)
                {
                    result = -1;
                }
                else if (monster.MonsterType != 1601)
                {
                    result = -4;
                }
                else if (monster.IsCollected)
                {
                    result = -4;
                }
                else
                {
                    SceneUIClasses          sceneType = Global.GetMapSceneType(client.ClientData.MapCode);
                    GetCaiJiTimeEventObject eventObj  = new GetCaiJiTimeEventObject(client, monster);
                    bool handled = GlobalEventSource4Scene.getInstance().fireEvent(eventObj, (int)sceneType);
                    if (handled)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 600.0)
                        {
                            return(-301);
                        }
                        GatherTime = eventObj.GatherTime;
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.HuanYingSiYuan)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 600.0)
                        {
                            return(-301);
                        }
                        GatherTime = HuanYingSiYuanManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.YongZheZhanChang)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 600.0)
                        {
                            return(-301);
                        }
                        GatherTime = YongZheZhanChangManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.KingOfBattle)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 600.0)
                        {
                            return(-301);
                        }
                        GatherTime = KingOfBattleManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.Comp)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 600.0)
                        {
                            return(-301);
                        }
                        GatherTime = CompManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.KarenEast)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 600.0)
                        {
                            return(-301);
                        }
                        GatherTime = KarenBattleManager_MapEast.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.LingDiCaiJi)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 400.0)
                        {
                            return(-301);
                        }
                        GatherTime = LingDiCaiJiManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.EscapeBattle)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 400.0)
                        {
                            return(-301);
                        }
                        GatherTime = EscapeBattleManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 400.0)
                        {
                            return(-301);
                        }
                        SystemXmlItem CaiJiMonsterXmlItem = null;
                        if (!GameManager.systemCaiJiMonsterMgr.SystemXmlItemDict.TryGetValue(monster.MonsterInfo.ExtensionID, out CaiJiMonsterXmlItem) || null == CaiJiMonsterXmlItem)
                        {
                            return(-4);
                        }
                        GatherTime = CaiJiMonsterXmlItem.GetIntValue("GatherTime", -1);
                        if (client.ClientData.DailyCrystalCollectNum >= CaiJiLogic.DailyNum)
                        {
                            return(-5);
                        }
                    }
                    Global.EndMeditate(client);
                    CaiJiLogic.SetCaiJiState(client, monsterId, 0L, monster.UniqueID);
                    result = 0;
                }
            }
            return(result);
        }
Exemplo n.º 4
0
        public static int ReqFinishCaiJi(GameClient client, int monsterId)
        {
            int result;

            if (monsterId != client.ClientData.CaijTargetId || client.ClientData.CaiJiStartTick == 0U || client.ClientData.CaijTargetId == 0)
            {
                CaiJiLogic.CancelCaiJiState(client);
                result = -3;
            }
            else if (client.ClientData.CurrentLifeV <= 0)
            {
                CaiJiLogic.CancelCaiJiState(client);
                result = -3;
            }
            else
            {
                Monster monster = GameManager.MonsterMgr.FindMonster(client.ClientData.MapCode, monsterId);
                if (null == monster)
                {
                    CaiJiLogic.CancelCaiJiState(client);
                    result = -1;
                }
                else if (monster.UniqueID != client.ClientData.CaiJiTargetUniqueID)
                {
                    CaiJiLogic.CancelCaiJiState(client);
                    result = -1;
                }
                else if (monster.MonsterType != 1601)
                {
                    CaiJiLogic.CancelCaiJiState(client);
                    result = -4;
                }
                else
                {
                    SystemXmlItem           CaiJiMonsterXmlItem = null;
                    SceneUIClasses          sceneType           = Global.GetMapSceneType(client.ClientData.MapCode);
                    GetCaiJiTimeEventObject eventObj            = new GetCaiJiTimeEventObject(client, monster);
                    bool handled = GlobalEventSource4Scene.getInstance().fireEvent(eventObj, (int)sceneType);
                    int  GatherTime;
                    if (handled)
                    {
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 600.0)
                        {
                            return(-301);
                        }
                        GatherTime = eventObj.GatherTime;
                        if (GatherTime < 0)
                        {
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.HuanYingSiYuan)
                    {
                        GatherTime = HuanYingSiYuanManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(-4);
                        }
                    }
                    else if (sceneType == SceneUIClasses.YongZheZhanChang)
                    {
                        GatherTime = YongZheZhanChangManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(-4);
                        }
                    }
                    else if (sceneType == SceneUIClasses.KingOfBattle)
                    {
                        GatherTime = KingOfBattleManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(-4);
                        }
                    }
                    else if (sceneType == SceneUIClasses.Comp)
                    {
                        GatherTime = CompManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(-4);
                        }
                    }
                    else if (sceneType == SceneUIClasses.KarenEast)
                    {
                        GatherTime = KarenBattleManager_MapEast.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(-4);
                        }
                    }
                    else if (sceneType == SceneUIClasses.LingDiCaiJi)
                    {
                        GatherTime = LingDiCaiJiManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            CaiJiLogic.CancelCaiJiState(client);
                            return(GatherTime);
                        }
                    }
                    else if (sceneType == SceneUIClasses.EscapeBattle)
                    {
                        GatherTime = EscapeBattleManager.getInstance().GetCaiJiMonsterTime(client, monster);
                        if (GatherTime < 0)
                        {
                            return(-4);
                        }
                    }
                    else
                    {
                        if (sceneType == SceneUIClasses.ShuiJingHuanJing)
                        {
                            if (client.ClientData.DailyCrystalCollectNum >= CaiJiLogic.DailyNum)
                            {
                                CaiJiLogic.CancelCaiJiState(client);
                                return(-6);
                            }
                        }
                        if (!GameManager.systemCaiJiMonsterMgr.SystemXmlItemDict.TryGetValue(monster.MonsterInfo.ExtensionID, out CaiJiMonsterXmlItem) || null == CaiJiMonsterXmlItem)
                        {
                            CaiJiLogic.CancelCaiJiState(client);
                            return(-4);
                        }
                        GatherTime = CaiJiMonsterXmlItem.GetIntValue("GatherTime", -1);
                    }
                    GatherTime = GatherTime * CaiJiLogic.GatherTimePer / 100;
                    uint intervalmsec = TimeUtil.timeGetTime() - client.ClientData.CaiJiStartTick;
                    if ((ulong)intervalmsec < (ulong)((long)(GatherTime * 1000)))
                    {
                        CaiJiLogic.CancelCaiJiState(client);
                        LogManager.WriteLog(LogTypes.Error, string.Format("采集读条时间不足intervalmsec={0}", intervalmsec), null, true);
                        result = -5;
                    }
                    else
                    {
                        CaiJiLogic.CancelCaiJiState(client);
                        if (Global.GetTwoPointDistance(client.CurrentPos, monster.CurrentPos) > 400.0)
                        {
                            result = -2;
                        }
                        else
                        {
                            lock (monster.CaiJiStateLock)
                            {
                                if (monster.IsCollected)
                                {
                                    return(-4);
                                }
                                monster.IsCollected = true;
                            }
                            if (!GlobalEventSource4Scene.getInstance().fireEvent(new CaiJiEventObject(client, monster), (int)sceneType))
                            {
                                if (sceneType == SceneUIClasses.HuanYingSiYuan)
                                {
                                    HuanYingSiYuanManager.getInstance().OnCaiJiFinish(client, monster);
                                }
                                else if (sceneType == SceneUIClasses.LingDiCaiJi)
                                {
                                    LingDiCaiJiManager.getInstance().OnCaiJiFinish(client, monster);
                                }
                                else
                                {
                                    CaiJiLogic.UpdateCaiJiData(client);
                                    CaiJiLogic.NotifyCollectLastNum(client, 0, CaiJiLogic.DailyNum - client.ClientData.DailyCrystalCollectNum);
                                    float AwardRate  = 1f;
                                    int   rangeIndex = CaiJiLogic.JugeDateTimeInTimeRange(TimeUtil.NowDateTime(), CaiJiLogic.dateTimeRangeArray, true);
                                    if (rangeIndex >= 0)
                                    {
                                        AwardRate = CaiJiLogic.dateTimeRangeArray[rangeIndex].DoubleAwardRate;
                                    }
                                    int ExpAward         = (int)(AwardRate * (float)CaiJiMonsterXmlItem.GetIntValue("ExpAward", -1));
                                    int XingHunAward     = (int)(AwardRate * (float)CaiJiMonsterXmlItem.GetIntValue("XingHunAward", -1));
                                    int BindZuanShiAward = (int)(AwardRate * (float)CaiJiMonsterXmlItem.GetIntValue("BindZuanShiAward", -1));
                                    int BindJinBiAward   = (int)(AwardRate * (float)CaiJiMonsterXmlItem.GetIntValue("BindJinBiAward", -1));
                                    int MoJingAward      = (int)(AwardRate * (float)CaiJiMonsterXmlItem.GetIntValue("MoJingAward", -1));
                                    if (ExpAward > 0)
                                    {
                                        GameManager.ClientMgr.ProcessRoleExperience(client, (long)ExpAward, true, true, false, "none");
                                    }
                                    if (XingHunAward > 0)
                                    {
                                        GameManager.ClientMgr.ModifyStarSoulValue(client, XingHunAward, "采集获得星魂", true, true);
                                    }
                                    if (BindZuanShiAward > 0)
                                    {
                                        GameManager.ClientMgr.AddUserGold(client, BindZuanShiAward, "采集获得绑钻");
                                    }
                                    if (BindJinBiAward > 0)
                                    {
                                        GameManager.ClientMgr.AddMoney1(client, BindJinBiAward, "采集获得绑金", true);
                                        GameManager.ClientMgr.NotifyImportantMsg(Global._TCPManager.MySocketListener, Global._TCPManager.TcpOutPacketPool, client, StringUtil.substitute(GLang.GetLang(28, new object[0]), new object[]
                                        {
                                            BindJinBiAward
                                        }), GameInfoTypeIndexes.Hot, ShowGameInfoTypes.OnlyErr, 0);
                                    }
                                    if (MoJingAward > 0)
                                    {
                                        GameManager.ClientMgr.ModifyTianDiJingYuanValue(client, MoJingAward, "采集获得魔晶", true, true, false);
                                    }
                                    ProcessTask.ProcessAddTaskVal(client, TaskTypes.CaiJi_ShuiJingHuanJing, -1, 1, new object[0]);
                                }
                            }
                            GameManager.MonsterMgr.DeadMonsterImmediately(monster);
                            ProcessTask.Process(Global._TCPManager.MySocketListener, Global._TCPManager.TcpOutPacketPool, client, monster.RoleID, monster.MonsterInfo.ExtensionID, -1, TaskTypes.CaiJiGoods, null, 0, -1L, null);
                            result = 0;
                        }
                    }
                }
            }
            return(result);
        }
Exemplo n.º 5
0
        public void OnLeaveScene(GameClient client, SceneUIClasses sceneType, bool logout = false)
        {
            if (client.ClientSocket.IsKuaFuLogin)
            {
                switch (sceneType)
                {
                case SceneUIClasses.HuanYingSiYuan:
                    HuanYingSiYuanManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.TianTi:
                    TianTiManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.YongZheZhanChang:
                    YongZheZhanChangManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.ElementWar:
                    ElementWarManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.MoRiJudge:
                    SingletonTemplate <MoRiJudgeManager> .Instance().OnLogOut(client);

                    goto IL_1E7;

                case SceneUIClasses.CopyWolf:
                    CopyWolfManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.LangHunLingYu:
                    LangHunLingYuManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.KFZhengBa:
                    SingletonTemplate <ZhengBaManager> .Instance().OnLogout(client);

                    goto IL_1E7;

                case SceneUIClasses.CoupleArena:
                    SingletonTemplate <CoupleArenaManager> .Instance().OnLeaveFuBen(client);

                    goto IL_1E7;

                case SceneUIClasses.KingOfBattle:
                    KingOfBattleManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.KarenWest:
                    KarenBattleManager_MapWest.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.KarenEast:
                    KarenBattleManager_MapEast.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.LingDiCaiJi:
                    LingDiCaiJiManager.getInstance().OnLeaveFuBen(client);
                    goto IL_1E7;

                case SceneUIClasses.BangHuiMatch:
                    BangHuiMatchManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.KuaFuLueDuo:
                    KuaFuLueDuoManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.WanMoXiaGu:
                    WanMoXiaGuManager.getInstance().OnLogout(client);
                    goto IL_1E7;

                case SceneUIClasses.ZorkBattle:
                    ZorkBattleManager.getInstance().OnLogout(client);
                    goto IL_1E7;
                }
                if (SingletonTemplate <CopyTeamManager> .Instance().IsKuaFuCopy(client.ClientData.FuBenID))
                {
                    SingletonTemplate <CopyTeamManager> .Instance().OnLeaveFuBen(client, sceneType);
                }
IL_1E7:
                if (!logout)
                {
                    this.GotoLastMap(client);
                }
            }
        }
Exemplo n.º 6
0
        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();
        }
Exemplo n.º 8
0
        private void TimerProc(object sender, EventArgs e)
        {
            bool     notifyPrepareGame = false;
            bool     notifyEnterGame   = false;
            bool     notifyEndGame     = false;
            DateTime now = TimeUtil.NowDateTime();

            lock (this.Mutex)
            {
                KarenBattleSceneInfo sceneItem = this.SceneDataDict.Values.FirstOrDefault <KarenBattleSceneInfo>();
                for (int i = 0; i < sceneItem.TimePoints.Count - 1; i += 2)
                {
                    if (now.DayOfWeek == (DayOfWeek)sceneItem.TimePoints[i].Days && now.TimeOfDay.TotalSeconds >= sceneItem.SecondsOfDay[i] - 120.0 && now.TimeOfDay.TotalSeconds <= sceneItem.SecondsOfDay[i + 1] + 120.0)
                    {
                        double secsPrepare = sceneItem.SecondsOfDay[i] - now.TimeOfDay.TotalSeconds;
                        double secsEnd     = sceneItem.SecondsOfDay[i + 1] + 120.0 - now.TimeOfDay.TotalSeconds;
                        if (!this.PrepareGame)
                        {
                            if (secsPrepare > 0.0 && secsPrepare < 120.0)
                            {
                                this.PrepareGame  = true;
                                notifyPrepareGame = true;
                                break;
                            }
                        }
                        else if (secsPrepare < 0.0)
                        {
                            notifyEnterGame  = true;
                            this.PrepareGame = false;
                            break;
                        }
                        if (!this.EndGame)
                        {
                            if (secsEnd > 0.0 && secsEnd < 120.0)
                            {
                                this.EndGame  = true;
                                notifyEndGame = true;
                                break;
                            }
                        }
                        else if (secsEnd < 0.0)
                        {
                            this.EndGame = false;
                            break;
                        }
                    }
                }
            }
            if (notifyPrepareGame)
            {
                LogManager.WriteLog(LogTypes.Error, "阿卡伦战场活动即将开始,准备通知军团角色进入!", null, true);
                lock (this.Mutex)
                {
                    this.FactionIDVsServerIDDict.Clear();
                }
            }
            if (notifyEnterGame)
            {
                int westcount = 0;
                int eastcount = 0;
                lock (this.Mutex)
                {
                    LogManager.WriteLog(LogTypes.Error, "阿卡伦战场开启,可以通知已分配到场次的玩家进入游戏了", null, true);
                    KarenBattleSceneInfo sceneItem = this.SceneDataDict.Values.FirstOrDefault <KarenBattleSceneInfo>();
                    foreach (GameClient client in GameManager.ClientMgr.GetAllClients(true))
                    {
                        if (this.CheckCanEnterKarenBattle(client) && this.CheckMap(client) && this.IsGongNengOpened(client, false))
                        {
                            if (null != client)
                            {
                                client.sendCmd(1210, string.Format("{0}:{1}:{2}:{3}", new object[]
                                {
                                    1,
                                    1,
                                    westcount,
                                    eastcount
                                }), false);
                            }
                        }
                    }
                }
            }
            if (notifyEndGame)
            {
                lock (this.Mutex)
                {
                    foreach (KarenBattleSceneInfo item in this.SceneDataDict.Values)
                    {
                        KarenFuBenData fubenData = JunTuanClient.getInstance().GetKarenKuaFuFuBenData(item.MapCode);
                        if (fubenData != null && fubenData.ServerId == GameManager.ServerId)
                        {
                            SceneUIClasses mapType = Global.GetMapSceneType(item.MapCode);
                            if (mapType != SceneUIClasses.KarenEast || KarenBattleManager_MapEast.getInstance().SceneDict.Count == 0)
                            {
                                if (mapType != SceneUIClasses.KarenWest || KarenBattleManager_MapWest.getInstance().SceneDict.Count == 0)
                                {
                                    int               lingDiType    = this.ConvertMapSceneTypeToCaiJiLingDiType(mapType);
                                    LingDiData        oldLingDiData = null;
                                    List <LingDiData> LingDiList    = JunTuanClient.getInstance().GetLingDiData();
                                    if (null != LingDiList)
                                    {
                                        oldLingDiData = LingDiList.Find((LingDiData x) => x.LingDiType == lingDiType);
                                    }
                                    RoleData4Selector oldLeader = (oldLingDiData != null && oldLingDiData.RoleData != null) ? DataHelper.BytesToObject <RoleData4Selector>(oldLingDiData.RoleData, 0, oldLingDiData.RoleData.Length) : null;
                                    LingDiCaiJiManager.getInstance().SetLingZhu(lingDiType, 0, 0, "", null);
                                    EventLogManager.AddKarenBattleEvent(lingDiType, oldLeader, 0, 0, 0);
                                }
                            }
                        }
                    }
                }
            }
            this.UpdateKuaFuMapClientCount(KarenBattleManager_MapWest.getInstance().SceneDict.Values.FirstOrDefault <KarenBattleScene>());
            this.UpdateKuaFuMapClientCount(KarenBattleManager_MapEast.getInstance().SceneDict.Values.FirstOrDefault <KarenBattleScene>());
        }