コード例 #1
0
        //Background sorting events
        private void updatePaiHangWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                //Deal with charts
                PaiHangManager.ProcessPaiHang(_DBManger, false);

                //Number of online users
                OnlineUserNumMgr.WriteTotalOnlineNumToDB(_DBManger);

                //Writes the current number of online people to the notification statistics server
                OnlineUserNumMgr.NotifyTotalOnlineNumToServer(_DBManger);

                //Recalculate the number of gangs
                BangHuiNumLevelMgr.RecalcBangHuiNumLevel(_DBManger);

                //Deal with dissolution gang
                BangHuiDestroyMgr.ProcessDestroyBangHui(_DBManger);

                //Every morning morning clear Yangzhou city tax
                GameDBManager.BangHuiLingDiMgr.ProcessClearYangZhouTotalTax(_DBManger);
            }
            catch (Exception ex)
            {
                //System.Windows.Application.Current.Dispatcher.Invoke((MethodInvoker)delegate
                //{
                // Formatting exception error message
                DataHelper.WriteFormatExceptionLog(ex, "updatePaiHangWorker_DoWork", false);
                //throw ex;
                //});
            }
        }
コード例 #2
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();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: songxiaopeng/mu_server
 private void updatePaiHangWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         PaiHangManager.ProcessPaiHang(this._DBManger, false);
         OnlineUserNumMgr.WriteTotalOnlineNumToDB(this._DBManger);
         OnlineUserNumMgr.NotifyTotalOnlineNumToServer(this._DBManger);
         BangHuiNumLevelMgr.RecalcBangHuiNumLevel(this._DBManger);
         BangHuiDestroyMgr.ProcessDestroyBangHui(this._DBManger);
         GameDBManager.BangHuiLingDiMgr.ProcessClearYangZhouTotalTax(this._DBManger);
     }
     catch (Exception ex)
     {
         DataHelper.WriteFormatExceptionLog(ex, "updatePaiHangWorker_DoWork", false, false);
     }
 }
コード例 #4
0
ファイル: DBManager.cs プロジェクト: neyma2379294/MuOrigin
        /// <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();
        }