SES-116 Create icons provider and show them on gm screen #45
@ -23,7 +23,8 @@ namespace SessionCompanion.Services.Profiles
|
||||
CreateMap<Character, CharacterBasicStatsViewModel>()
|
||||
.ForMember(vm => vm.Name, conf => conf.MapFrom(charact => charact.Biography.Name))
|
||||
.ForMember(vm => vm.Level, conf => conf.MapFrom(charact => charact.Statistics.Level))
|
||||
.ForMember(vm => vm.CurrentHealthPoints, conf => conf.MapFrom(charact => charact.Statistics.CurrentHealthPoints)).ReverseMap();
|
||||
.ForMember(vm => vm.CurrentHealthPoints, conf => conf.MapFrom(charact => charact.Statistics.CurrentHealthPoints))
|
||||
.ForMember(vm => vm.Class, conf => conf.MapFrom(charact => charact.Biography.Class.Name)).ReverseMap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ namespace SessionCompanion.Services.Services
|
||||
{
|
||||
var characters = await Repository.Get(c => charactersId.Contains(c.Id))
|
||||
.Include(x => x.Biography)
|
||||
.ThenInclude(x => x.Class)
|
||||
.Include(x => x.Statistics).ToListAsync();
|
||||
var result = Mapper.Map<IEnumerable<CharacterBasicStatsViewModel>>(characters);
|
||||
return result;
|
||||
|
@ -21,5 +21,10 @@
|
||||
/// Aktualna ilość życia postaci
|
||||
/// </summary>
|
||||
public int CurrentHealthPoints { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Klasa postaci
|
||||
/// </summary>
|
||||
public string Class { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,11 @@
|
||||
Aktualna ilość życia postaci
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:SessionCompanion.ViewModels.CharacterViewModels.CharacterBasicStatsViewModel.Class">
|
||||
<summary>
|
||||
Klasa postaci
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:SessionCompanion.ViewModels.CharacterViewModels.CharacterForLoginViewModel.Id">
|
||||
<summary>
|
||||
Identyfikator postaci
|
||||
|
@ -72,6 +72,9 @@ namespace SessionCompanion.Controllers
|
||||
public async Task<Either<List<CharacterBasicStatsViewModel>, ErrorResponse>> GetLoggedUsersCharacters()
|
||||
{
|
||||
var connectedCharacters = _sessionHubData.ConnectedCharacters_Prop;
|
||||
connectedCharacters.Add("a", 1);
|
||||
connectedCharacters.Add("s", 2);
|
||||
connectedCharacters.Add("d", 3);
|
||||
var characters = await _service.GetBasicCharactersData(connectedCharacters.Values.ToList());
|
||||
|
||||
return characters.ToList();
|
||||
|
Loading…
Reference in New Issue
Block a user