From ad46e8f74d6747817910eca81f9cdbc42b99f387 Mon Sep 17 00:00:00 2001 From: lutardy Date: Mon, 7 Mar 2022 21:48:14 +0100 Subject: [PATCH 1/2] fix characterdto --- backend/DTO/CharacterDTO.cs | 2 -- backend/GameCore/Extensions.cs | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/DTO/CharacterDTO.cs b/backend/DTO/CharacterDTO.cs index 7da6f10..e0c78a8 100644 --- a/backend/DTO/CharacterDTO.cs +++ b/backend/DTO/CharacterDTO.cs @@ -5,8 +5,6 @@ public string Name { get; set; } = null!; public int Lp { get; set; } public int Attack { get; set; } - public int CurrentLp { get; set; } - public int CurrentAttack { get; set; } public string? Sprite { get; set; } public string? Icon { get; set; } public string? Description { get; set; } diff --git a/backend/GameCore/Extensions.cs b/backend/GameCore/Extensions.cs index 2340975..307726e 100644 --- a/backend/GameCore/Extensions.cs +++ b/backend/GameCore/Extensions.cs @@ -82,13 +82,11 @@ namespace GameCore return new CharacterDTO { Name = entity.Name, - Attack = entity.StartAttack, - Lp = entity.StartLp, + Attack = entity.CurrentAttack, + Lp = entity.CurrentLp, Sprite = entity.Sprite, Icon = entity.Icon, Description = entity.Description, - CurrentLp = entity.CurrentLp, - CurrentAttack = entity.CurrentAttack, }; } #endregion -- GitLab From 26c098f8f50cb9181c75cf71546be9d8554d3347 Mon Sep 17 00:00:00 2001 From: lutardy Date: Mon, 7 Mar 2022 21:52:06 +0100 Subject: [PATCH 2/2] add asHealed dto --- backend/DTO/CharacterDTO.cs | 1 + backend/GameCore/Extensions.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/DTO/CharacterDTO.cs b/backend/DTO/CharacterDTO.cs index e0c78a8..53246e8 100644 --- a/backend/DTO/CharacterDTO.cs +++ b/backend/DTO/CharacterDTO.cs @@ -11,5 +11,6 @@ public int BonusAttack { get; set; } public int BonusLp { get; set; } public int? BonusArena { get; set; } + public Boolean asHealed { get; set; } } } \ No newline at end of file diff --git a/backend/GameCore/Extensions.cs b/backend/GameCore/Extensions.cs index 307726e..c56da8b 100644 --- a/backend/GameCore/Extensions.cs +++ b/backend/GameCore/Extensions.cs @@ -87,6 +87,7 @@ namespace GameCore Sprite = entity.Sprite, Icon = entity.Icon, Description = entity.Description, + asHealed = entity.hasHealed, }; } #endregion -- GitLab