Example #1
0
        /// <summary>
        /// Выдать зарплату
        /// </summary>
        protected void PayOut(Client player, WorkInfo activeWork)
        {
            var workInfo = WorkInfoManager.GetWorkInfo(player, activeWork.Type);

            PlayerInfoManager.SetBalance(player, workInfo.Salary);
            workInfo.Salary = 0;
            WorkInfoManager.SetWorkInfo(player, workInfo);
        }
Example #2
0
        /// <summary>
        /// Синхронизировать активную работу игрока
        /// </summary>
        private void SyncWork(Client player)
        {
            var activeWork = _workInfoManager.GetActiveWork(player);

            if (activeWork == null)
            {
                return;
            }
            _playerInfoManager.SetBalance(player, activeWork.Salary);
            activeWork.Salary = 0;
            activeWork.Active = false;
            _workInfoManager.SetWorkInfo(player, activeWork);
        }