示例#1
0
 public void _initStatusGetC(StatusGetC nStatusGetC)
 {
     foreach (StatusB i in mStatusBs)
     {
         StatusC statusC_ = i._getStatusC();
         nStatusGetC.m_tStatusCs.Add(statusC_);
     }
 }
        void _getStatus(StatusGetC nStatusGetC, string nAccountName, long nTicks)
        {
            AccountService accountService_ = __singleton <AccountService> ._instance();

            uint accountMgrId_ = default(uint);
            uint accountId_    = default(uint);

            accountService_._getAccountInfo(out accountMgrId_, out accountId_, nAccountName);
            StatusMgr statusMgr_ = new StatusMgr();

            statusMgr_._runAccountLogin(accountMgrId_, accountId_);
            statusMgr_._getStatus(nStatusGetC, nTicks, accountMgrId_, accountId_);
        }
        void _getStatus(StatusGetC nStatusGetC, Account nAccount, long nTicks)
        {
            AccountMgr accountMgr_   = nAccount._getAccountMgr();
            uint       accountMgrId_ = accountMgr_._getId();
            uint       accountId_    = nAccount._getId();
            uint       propertyId_   = PropertyId <StatusMgr> ._classId();

            StatusMgr statusMgr_ = nAccount._getProperty <StatusMgr>(propertyId_);

            if (statusMgr_._getTicks() == nTicks)
            {
                nStatusGetC.m_tErrorCode = StatusError_.mSucessTicks_;
                return;
            }
            statusMgr_._getStatus(nStatusGetC, nTicks, accountMgrId_, accountId_);
        }
示例#4
0
        public void _getStatus(StatusGetC nStatusGetC, long nTicks, uint nAccountMgrId, uint nAccountId)
        {
            SqlCommand sqlCommand_ = new SqlCommand();

            this._getStatusCommand(sqlCommand_, nTicks, nAccountMgrId, nAccountId);
            StatusSelectB statusSelectB_ = new StatusSelectB();
            SqlService    sqlService_    = __singleton <SqlService> ._instance();

            if (sqlService_._runSqlCommand(sqlCommand_, statusSelectB_))
            {
                statusSelectB_._initStatusGetC(nStatusGetC);
                nStatusGetC.m_tErrorCode = StatusError_.mSucess_;
            }
            else
            {
                nStatusGetC.m_tErrorCode = StatusError_.mSql_;
            }
            nStatusGetC.m_tTicks = mTicks;
        }
        void _getStatus(StatusGetC nStatusGetC, string nAccountName, long nTicks, uint nServer)
        {
            SettingService settingService_ = __singleton <SettingService> ._instance();

            if (!settingService_._checkServerId(nServer))
            {
                nStatusGetC.m_tErrorCode = StatusError_.mServerId_;
                return;
            }
            AccountService accountService_ = __singleton <AccountService> ._instance();

            Account account_ = accountService_._getAccount(nAccountName);

            if (null != account_)
            {
                this._getStatus(nStatusGetC, account_, nTicks);
            }
            else
            {
                this._getStatus(nStatusGetC, nAccountName, nTicks);
            }
        }
        public StatusGetC _getStatus(StatusGetS nStatusGetS)
        {
            StatusGetC     result_         = new StatusGetC();
            AccountService accountService_ = __singleton <AccountService> ._instance();

            Account account_ = accountService_._getAccount(nStatusGetS.m_tAccountGet);

            if (null == account_)
            {
                result_.m_tErrorCode = StatusError_.mAccount_;
                return(result_);
            }
            if ((nStatusGetS.m_tPlayer == nStatusGetS.m_tAccountGet.m_tName) || (null == nStatusGetS.m_tPlayer))
            {
                this._getStatus(result_, account_, nStatusGetS.m_tTicks);
            }
            else
            {
                this._getStatus(result_, nStatusGetS.m_tPlayer, nStatusGetS.m_tTicks, (uint)nStatusGetS.m_tServer);
            }
            return(result_);
        }