Beispiel #1
0
        public async Task <Unit> Handle(ShowMyHistoryQuestCommand command, CancellationToken cancellationToken)
        {
            var playerId = command.PlayerId;


            var playerQuests = await _playerQuestDomainService.GetPlayerQuests(playerId);

            var ids = playerQuests.Where(x => x.CompleteTimes > 0).Select(x => x.QuestId).ToList();

            var questQuery = await _questDomainService.GetAll();

            var quests = questQuery.Where(x => ids.Contains(x.Id));

            await _mudProvider.ShowHistoryQuests(playerId, _mapper.Map <List <QuestModel> >(quests));

            return(Unit.Value);
        }