Пример #1
0
        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_);
        }
Пример #2
0
        public StatusCreateC _createStatus(StatusCreateS nStatusCreateS)
        {
            StatusCreateC result_ = new StatusCreateC();

            result_.m_tId = nStatusCreateS.m_tId;
            AccountService accountService_ = __singleton <AccountService> ._instance();

            Account account_ = accountService_._getAccount(nStatusCreateS.m_tAccount);

            if (null != account_)
            {
                uint propertyId_ = PropertyId <StatusMgr> ._classId();

                StatusMgr statusMgr_ = account_._getProperty <StatusMgr>(propertyId_);
                statusMgr_._createStatus(account_, nStatusCreateS, result_);
            }
            else
            {
                result_.m_tErrorCode = StatusError_.mAccount_;
            }
            return(result_);
        }