Beispiel #1
0
        public async Task ShowMyStatus()
        {
            var result = await DoCommand(async() => {
                var playerId = _account.PlayerId;

                var command = new ShowMyStatusCommand(playerId);
                await _bus.SendCommand(command);
            });
        }
Beispiel #2
0
        public async Task <Unit> Handle(ShowMyStatusCommand command, CancellationToken cancellationToken)
        {
            var playerId = command.PlayerId;
            var player   = await _playerDomainService.Get(playerId);

            if (player == null)
            {
                return(Unit.Value);
            }
            var myInfo = _mapper.Map <MyInfo>(player);

            await _mudProvider.ShowMyStatus(playerId, myInfo);

            return(Unit.Value);
        }