Ejemplo n.º 1
0
        public static void startup()
        {
            ZhanMengShiJianManager.getInstance().startup();
            JingJiChangManager.getInstance().startup();
            LiXianBaiTanManager.getInstance().startup();
            LiXianGuaJiManager.getInstance().startup();
            CmdRegisterTriggerManager.getInstance().startup();
            SendCmdManager.getInstance().startup();
            BossAIManager.getInstance().startup();
            SaleManager.getInstance().startup();
            LianZhiManager.GetInstance().startup();
            ChengJiuManager.GetInstance().startup();
            UserReturnManager.getInstance().startup();
            OlympicsManager.getInstance().startup();
            TalentManager.getInstance().startup();
            TodayManager.getInstance().startup();
            FundManager.getInstance().startup();
            WarnManager.getInstance().startup();
            PrestigeMedalManager.getInstance().startup();
            UnionPalaceManager.getInstance().startup();
            UserActivateManager.getInstance().startup();
            PetSkillManager.getInstance().startup();
            BuildingManager.getInstance().startup();
            OnePieceManager.getInstance().startup();
            TenManager.getInstance().startup();
            SingletonTemplate <SevenDayActivityMgr> .Instance().startup();

            SingletonTemplate <SoulStoneManager> .Instance().startup();

            lock (GlobalServiceManager.Scene2ManagerDict)
            {
                foreach (List <IManager> list in GlobalServiceManager.Scene2ManagerDict.Values)
                {
                    foreach (IManager i in list)
                    {
                        try
                        {
                            bool success = i.startup();
                            if (GameManager.ServerStarting && !success)
                            {
                                LogManager.WriteLog(LogTypes.Fatal, string.Format("初始化{0}.startup()失败,按任意键忽略此错误并继续启动服务器!", i.GetType()), null, true);
                                Console.ReadKey();
                            }
                        }
                        catch (Exception ex)
                        {
                            LogManager.WriteException(ex.ToString());
                        }
                    }
                }
            }
            FaceBookManager.getInstance().startup();
        }
Ejemplo n.º 2
0
        public static void destroy()
        {
            ZhanMengShiJianManager.getInstance().destroy();
            JingJiChangManager.getInstance().destroy();
            LiXianBaiTanManager.getInstance().destroy();
            LiXianGuaJiManager.getInstance().destroy();
            CmdRegisterTriggerManager.getInstance().destroy();
            SendCmdManager.getInstance().destroy();
            BossAIManager.getInstance().destroy();
            SaleManager.getInstance().destroy();
            LianZhiManager.GetInstance().destroy();
            ChengJiuManager.GetInstance().destroy();
            PrestigeMedalManager.getInstance().destroy();
            UnionPalaceManager.getInstance().destroy();
            UserActivateManager.getInstance().destroy();
            PetSkillManager.getInstance().destroy();
            UserReturnManager.getInstance().destroy();
            OlympicsManager.getInstance().destroy();
            TalentManager.getInstance().destroy();
            TodayManager.getInstance().destroy();
            FundManager.getInstance().destroy();
            WarnManager.getInstance().destroy();
            MarryFuBenMgr.getInstance().destroy();
            BuildingManager.getInstance().destroy();
            OnePieceManager.getInstance().destroy();
            TenManager.getInstance().destroy();
            SingletonTemplate <SevenDayActivityMgr> .Instance().destroy();

            SingletonTemplate <SoulStoneManager> .Instance().destroy();

            lock (GlobalServiceManager.Scene2ManagerDict)
            {
                foreach (List <IManager> list in GlobalServiceManager.Scene2ManagerDict.Values)
                {
                    foreach (IManager i in list)
                    {
                        try
                        {
                            i.destroy();
                        }
                        catch (Exception ex)
                        {
                            LogManager.WriteException(ex.ToString());
                        }
                    }
                }
            }
            FaceBookManager.getInstance().destroy();
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        public static bool initFacebook()
        {
            string   fileName = "Config/FacebookAward.xml";
            XElement xml      = ConfigHelper.Load(Global.GameResPath(fileName));
            bool     result;

            if (null == xml)
            {
                LogManager.WriteLog(LogTypes.Error, "加载Config/FacebookAward.xml时出错!!!文件不存在", null, true);
                result = false;
            }
            else
            {
                try
                {
                    FaceBookManager._FacebookAwards.Clear();
                    IEnumerable <XElement> xmlItems = xml.Elements();
                    foreach (XElement xmlItem in xmlItems)
                    {
                        if (xmlItem != null)
                        {
                            FacebookAwardData config = new FacebookAwardData();
                            config.AwardID     = Convert.ToInt32(Global.GetSafeAttributeLong(xmlItem, "ID"));
                            config.AwardName   = Global.GetSafeAttributeStr(xmlItem, "Name");
                            config.DbKey       = Global.GetSafeAttributeStr(xmlItem, "DbKey");
                            config.DayMaxNum   = Convert.ToInt32(Global.GetSafeAttributeLong(xmlItem, "DayMaxNum"));
                            config.OnlyNum     = Convert.ToInt32(Global.GetSafeAttributeLong(xmlItem, "OnlyNum"));
                            config.MailUser    = GLang.GetLang(112, new object[0]);
                            config.MailTitle   = Global.GetSafeAttributeStr(xmlItem, "MailTitle");
                            config.MailContent = Global.GetSafeAttributeStr(xmlItem, "MailContent");
                            string awards = Global.GetSafeAttributeStr(xmlItem, "AwardGoods");
                            if (awards.Length > 0)
                            {
                                config.AwardGoods = new List <GoodsData>();
                                string[] awardsArr = awards.Split(new char[]
                                {
                                    '|'
                                });
                                foreach (string award in awardsArr)
                                {
                                    string[] oneArr = award.Split(new char[]
                                    {
                                        ','
                                    });
                                    GoodsData d = new GoodsData();
                                    d.Id      = Convert.ToInt32(oneArr[0]);
                                    d.GCount  = Convert.ToInt32(oneArr[1]);
                                    d.Binding = Convert.ToInt32(oneArr[2]);
                                    config.AwardGoods.Add(d);
                                }
                            }
                            FaceBookManager._FacebookAwards.Add(config.AwardID, config);
                        }
                    }
                    FaceBookManager.initFacebookDb();
                }
                catch (Exception)
                {
                    LogManager.WriteLog(LogTypes.Error, "加载Config/FacebookAward.xml时文件出现异常!!!", null, true);
                    Process.GetCurrentProcess().Kill();
                    return(false);
                }
                result = true;
            }
            return(result);
        }
Ejemplo n.º 5
0
 public bool initialize()
 {
     return(FaceBookManager.initFacebook());
 }