Ejemplo n.º 1
0
        //刷新当前的功能开启状态,处理有关逻辑
        public static void RefreshGongNeng(GameClient client)
        {
            CaiJiLogic.InitRoleDailyCaiJiData(client, false, false);
            HuanYingSiYuanManager.getInstance().InitRoleDailyHYSYData(client);
            Global.InitRoleDailyTaskData(client, false);
            // 检测触发开启守护之灵
            GuardStatueManager.Instance().OnTaskComplete(client);

            // 检测开启梅林魔法书 [XSea 2015/6/23]
            GameManager.MerlinMagicBookMgr.InitMerlinMagicBook(client);

            // 魂石系统
            SoulStoneManager.Instance().CheckOpen(client);

            ZhengBaManager.Instance().CheckGongNengCanOpen(client);

            FundManager.initFundData(client);

            CoupleArenaManager.Instance().CheckGongNengOpen(client);
        }
Ejemplo n.º 2
0
        public static void initialize()
        {
#if BetaConfig
            int round = 9;
            Console.WriteLine("连接调试器或按任意键继续");
            do
            {
                Console.Write("\b\b" + round);
                if (Console.KeyAvailable)
                {
                    break;
                }
                Thread.Sleep(1000);
            } while (--round > 0);
            Console.Write("\b\b");
#endif
            //战盟事件管理器
            ZhanMengShiJianManager.getInstance().initialize();

            //竞技场管理器
            JingJiChangManager.getInstance().initialize();

            //离线摆摊
            LiXianBaiTanManager.getInstance().initialize();

            //离线挂机
            LiXianGuaJiManager.getInstance().initialize();

            //副本活动组队管理器
            CopyTeamManager.Instance().initialize();

            //指令注册管理器
            CmdRegisterTriggerManager.getInstance().initialize();

            //发送指令管理
            SendCmdManager.getInstance().initialize();

            //Boss AI管理器
            BossAIManager.getInstance().initialize();

            //洗炼管理器
            WashPropsManager.initialize();

            //MU交易所
            SaleManager.getInstance().initialize();

            //炼制系统
            LianZhiManager.GetInstance().initialize();

            // 成就升级
            ChengJiuManager.GetInstance().initialize();

            //声望勋章
            PrestigeMedalManager.getInstance().initialize();

            UnionPalaceManager.getInstance().initialize();
            UserActivateManager.getInstance().initialize();

            PetSkillManager.getInstance().initialize();

            //玩家召回
            UserReturnManager.getInstance().initialize();

            //天赋
            TalentManager.getInstance().initialize();

            //每日专享
            TodayManager.getInstance().initialize();

            FundManager.getInstance().initialize();

            //警告
            WarnManager.getInstance().initialize();

            //恶魔来袭
            EMoLaiXiCopySceneManager.LoadEMoLaiXiCopySceneInfo();

            //罗兰法阵副本
            LuoLanFaZhenCopySceneManager.initialize();

            //情侣副本管理器
            MarryFuBenMgr.getInstance().initialize();
            MarryLogic.LoadMarryBaseConfig();
            MarryPartyLogic.getInstance().LoadMarryPartyConfig();

            //领地
            BuildingManager.getInstance().initialize();

            // 藏宝秘境
            OnePieceManager.getInstance().initialize();

            //初始化跨服相关管理器
            RegisterManager4Scene((int)SceneUIClasses.Normal, KuaFuManager.getInstance());
            // RegisterManager4Scene((int)SceneUIClasses.LangHunLingYu, LangHunLingYuManager.getInstance());

            //注册罗兰城战管理器
            RegisterManager4Scene((int)SceneUIClasses.LuoLanChengZhan, LuoLanChengZhanManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.Normal, FashionManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.HuanYingSiYuan, HuanYingSiYuanManager.getInstance());
            RegisterManager4Scene((int)ManagerTypes.ClientGoodsList, JingLingQiYuanManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.TianTi, TianTiManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.YongZheZhanChang, YongZheZhanChangManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.KingOfBattle, KingOfBattleManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.MoRiJudge, MoRiJudgeManager.Instance());
            RegisterManager4Scene((int)SceneUIClasses.ElementWar, ElementWarManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.CopyWolf, CopyWolfManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.KuaFuBoss, KuaFuBossManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.KuaFuMap, KuaFuMapManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.Spread, SpreadManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.KFZhengBa, ZhengBaManager.Instance());
            RegisterManager4Scene((int)SceneUIClasses.CoupleArena, CoupleArenaManager.Instance());
            RegisterManager4Scene((int)SceneUIClasses.Ally, AllyManager.getInstance());
            RegisterManager4Scene((int)SceneUIClasses.CoupleWish, CoupleWishManager.Instance());

            // 读取外挂列表和相关配置
            RobotTaskValidator.getInstance().Initialize(false, 0, 0, "");

            //初始化圣物系统相关配置
            HolyItemManager.getInstance().Initialize();

            //初始化塔罗牌相关配置
            TarotManager.getInstance().Initialize();

            // 七日活动
            SevenDayActivityMgr.Instance().initialize();

            // 魂石
            SoulStoneManager.Instance().initialize();

            TradeBlackManager.Instance().LoadConfig();
            //调用所有注册的管理模块的初始化函数
            lock (Scene2ManagerDict)
            {
                foreach (var list in Scene2ManagerDict.Values)
                {
                    foreach (var m in list)
                    {
                        bool      success = m.initialize();
                        IManager2 m2      = m as IManager2;
                        if (null != m2)
                        {
                            success = success && m2.initialize(GameCoreInterface.getinstance());
                        }

                        if (GameManager.ServerStarting && !success)
                        {
                            LogManager.WriteLog(LogTypes.Fatal, string.Format("执行{0}.initialize()失败,按任意键继续启动!", m.GetType()));
                            //Console.ReadKey(); HX_SERVER close the copy scenes;
                        }
                    }
                }
            }

            //应用宝
            TenManager.getInstance().initialize();
            TenRetutnManager.getInstance().initialize();

            //礼包码
            GiftCodeNewManager.getInstance().initialize();
        }
Ejemplo n.º 3
0
        public static void startup()
        {
            //战盟事件管理器
            ZhanMengShiJianManager.getInstance().startup();

            //竞技场管理器
            JingJiChangManager.getInstance().startup();

            //离线摆摊
            LiXianBaiTanManager.getInstance().startup();

            //离线挂机
            LiXianGuaJiManager.getInstance().startup();

            //副本活动组队管理器
            CopyTeamManager.Instance().startup();

            //指令注册管理器
            CmdRegisterTriggerManager.getInstance().startup();

            //发送指令管理
            SendCmdManager.getInstance().startup();

            //Boss AI管理器
            BossAIManager.getInstance().startup();

            //MU交易所
            SaleManager.getInstance().startup();

            //炼制系统
            LianZhiManager.GetInstance().startup();

            // 成就升级
            ChengJiuManager.GetInstance().startup();

            //玩家召回
            UserReturnManager.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();

            // 七日活动
            SevenDayActivityMgr.Instance().startup();

            SoulStoneManager.Instance().startup();

            //调用所有注册的管理模块的启动函数
            lock (Scene2ManagerDict)
            {
                foreach (var list in Scene2ManagerDict.Values)
                {
                    foreach (var m in list)
                    {
                        bool success = m.startup();
                        if (GameManager.ServerStarting && !success)
                        {
                            LogManager.WriteLog(LogTypes.Fatal, string.Format("初始化{0}.startup()失败,按任意键忽略此错误并继续启动服务器!", m.GetType()));
                            Console.ReadKey();
                        }
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public static void destroy()
        {
            //战盟事件管理器
            ZhanMengShiJianManager.getInstance().destroy();

            //竞技场管理器
            JingJiChangManager.getInstance().destroy();

            //离线摆摊
            LiXianBaiTanManager.getInstance().destroy();

            //离线挂机
            LiXianGuaJiManager.getInstance().destroy();

            //副本活动组队管理器
            CopyTeamManager.Instance().destroy();

            //指令注册管理器
            CmdRegisterTriggerManager.getInstance().destroy();

            //发送指令管理
            SendCmdManager.getInstance().destroy();

            //Boss AI管理器
            BossAIManager.getInstance().destroy();

            //MU交易所
            SaleManager.getInstance().destroy();

            //炼制系统
            LianZhiManager.GetInstance().destroy();

            // 成就升级
            ChengJiuManager.GetInstance().destroy();

            //声望勋章
            PrestigeMedalManager.getInstance().destroy();

            UnionPalaceManager.getInstance().destroy();
            UserActivateManager.getInstance().destroy();

            PetSkillManager.getInstance().destroy();

            //玩家召回
            UserReturnManager.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();

            // 七日活动
            SevenDayActivityMgr.Instance().destroy();

            SoulStoneManager.Instance().destroy();

            //调用所有注册的管理模块的销毁函数
            lock (Scene2ManagerDict)
            {
                foreach (var list in Scene2ManagerDict.Values)
                {
                    foreach (var m in list)
                    {
                        m.destroy();
                    }
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 加载参数配置文件
        /// </summary>
        /// <returns></returns>
        private static int ReloadXmlFile_config_systemparams()
        {
            int ret = GameManager.systemParamsList.ReloadLoadParamsList();

            //解析插旗战的日期和时间
            JunQiManager.ParseWeekDaysTimes();

            if (GameManager.OPT_ChengZhanType == 0)
            {
                //解析皇城战的日期和时间
                HuangChengManager.ParseWeekDaysTimes();

                //解析王城战的日期和时间
                WangChengManager.ParseWeekDaysTimes();
            }

            //重新读取罗兰城战配置文件
            LuoLanChengZhanManager.getInstance().InitConfig();

            //重置皇城地图编号
            Global.ResetHuangChengMapCode();

            //重置皇宫的地图编号
            Global.ResetHuangGongMapCode();

            //坐骑的名称
            Global.HorseNamesList = null;

            //坐骑的速度
            Global.HorseSpeedList = null;

            //生肖竞猜配置
            GameManager.ShengXiaoGuessMgr.ReloadConfig();

            //古墓配置
            Global.InitGuMuMapCodes();
            Global.InitVipGumuExpMultiple();

            //充值限制掉落的时间项
            GameManager.GoodsPackMgr.ResetLimitTimeRange();

            //缓存的二锅头物品列表
            Global.ErGuoTouGoodsIDList = null;

            //绑定铜钱符每日使用次数列表缓存
            Global._VipUseBindTongQianGoodsIDNum = null;

            //自动给予的物品的
            GameManager.AutoGiveGoodsIDList = null;

            //加载采集配置
            CaiJiLogic.LoadConfig();

            // 加载魔剑士静态数据 [XSea 2015/4/14]
            GameManager.MagicSwordMgr.LoadMagicSwordData();

            // 加载梅林魔法书静态数据 [XSea 2015/6/19]
            GameManager.MerlinMagicBookMgr.LoadMerlinSystemParamsConfigData();

            // LogGoods
            Global.LoadItemLogMark();

            // logTradeGoods
            Global.LoadLogTradeGoods();

            //强化最大等级相关配置
            Global.LoadForgeSystemParams();

            // 副本惩罚时间
            KuaFuManager.getInstance().InitCopyTime();

            // 魂石精华的经验配置
            SoulStoneManager.Instance().LoadJingHuaExpConfig();

            // 加载需要记录日志的怪物
            MonsterAttackerLogManager.Instance().LoadRecordMonsters();

            // 玩家创建角色限制管理
            CreateRoleLimitManager.Instance().LoadConfig();

            SpeedUpTickCheck.Instance().LoadConfig();

            NameManager.Instance().LoadConfig();

            CoupleArenaManager.Instance().InitSystenParams();

            return(ret);
        }