Exemplo n.º 1
0
        public void LoadDatabase(MySQLConnectionString connstr, int MaxConns, int codePage)
        {
            TianMaCharSet.ConvertToCodePage = codePage;
            this._DBConns.BuidConnections(connstr, MaxConns);
            MySQLConnection conn = this._DBConns.PopDBConnection();

            try
            {
                GameDBManager.BulletinMsgMgr.LoadBulletinMsgFromDB(this);
                GameDBManager.GameConfigMgr.LoadGameConfigFromDB(this);
                LiPinMaManager.LoadLiPinMaDB(this);
                PreNamesManager.LoadPremNamesFromDB(this);
                FuBenHistManager.LoadFuBenHist(this);
                PaiHangManager.ProcessPaiHang(this, true);
                GameDBManager.BangHuiJunQiMgr.LoadBangHuiJunQiItemFromDB(this);
                GameDBManager.PreDelRoleMgr.LoadPreDeleteRoleFromDB(this);
                GameDBManager.BangHuiLingDiMgr.LoadBangHuiLingDiItemsDictFromDB(this);
                HuangDiTeQuanMgr.LoadHuangDiTeQuan(this);
                GameDBManager.MarryPartyDataC.LoadPartyList(this);
                SingletonTemplate <NameUsedMgr> .Instance().LoadFromDatabase(this);

                GameDBManager.BangHuiListMgr.RefreshBangHuiListData(this);
                BanManager.GmBanCheckClear(this);
                FuMoMailManager.getInstance().LoadFuMoInfoFromDB(this);
                RebornStampManager.InitRebornYinJi(this);
                GlodAuctionMsgProcess.getInstance().LoadDataFromDB(this);
                BoCaiManager.getInstance().LoadDataFromDB(this);
            }
            finally
            {
                this._DBConns.PushDBConnection(conn);
            }
            this.CreateMemTables();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 从数据库中加载数据缓存
        /// </summary>
        /// <param name="connstr">数据库连接串对象</param>
        public void LoadDatabase(MySQLConnectionString connstr, int MaxConns, int codePage)
        {
            TianMaCharSet.ConvertToCodePage = codePage;

            _DBConns.BuidConnections(connstr, MaxConns);
            MySQLConnection conn = _DBConns.PopDBConnection();

            try
            {
                //预先加载角色信息
                //_DBRoleMgr.LoadDBRoleInfos(this, conn);

                //查询系统公告
                GameDBManager.BulletinMsgMgr.LoadBulletinMsgFromDB(this);

                //从数据库中获取配置参数
                GameDBManager.GameConfigMgr.LoadGameConfigFromDB(this);

                //从数据库中加载品码
                LiPinMaManager.LoadLiPinMaDB(this);

                //从数据库中加载预先分配的名字
                PreNamesManager.LoadPremNamesFromDB(this);

                //副本历史记录管理
                FuBenHistManager.LoadFuBenHist(this);

                //处理排行榜
                PaiHangManager.ProcessPaiHang(this, true);

                //从数据库中获取帮旗列表
                GameDBManager.BangHuiJunQiMgr.LoadBangHuiJunQiItemFromDB(this);

                //从数据库中获取领地占领列表
                GameDBManager.BangHuiLingDiMgr.LoadBangHuiLingDiItemsDictFromDB(this);

                //皇帝特权数据项
                HuangDiTeQuanMgr.LoadHuangDiTeQuan(this);
            }
            finally
            {
                _DBConns.PushDBConnection(conn);
            }

            //创建内存表
            CreateMemTables();
        }