From bcb941c381f6d855dc34d2f4949b2100e4503b5d Mon Sep 17 00:00:00 2001 From: ilitirit Date: Wed, 12 Apr 2023 00:34:52 +0200 Subject: [PATCH] Add IsMinILevel --- Expedience.Api/Consumers/DutyCompletionResultConsumer.cs | 1 + Expedience.Infrastructure/Models/DutyCompletionResult.cs | 2 ++ Expedience.Models/CurrentDutyInfo.cs | 6 ++++-- Expedience.Models/DutyCompletionResult.cs | 1 + Expedience.Models/DutyInfo.cs | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs b/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs index f7848a6..6d288d0 100644 --- a/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs +++ b/Expedience.Api/Consumers/DutyCompletionResultConsumer.cs @@ -60,6 +60,7 @@ namespace Expedience.Api.Consumers UserId = user.UserId, HasEcho = message.DutyInfo.HasEcho, IsUnrestricted = message.DutyInfo.IsUnrestricted, + IsMinILevel = message.DutyInfo.IsMinILevel, HasNpcMembers = message.DutyInfo.IsNpcSupported, StartTime = message.DutyStartDateUtc, EndTime = message.DutyCompletionDateUtc, diff --git a/Expedience.Infrastructure/Models/DutyCompletionResult.cs b/Expedience.Infrastructure/Models/DutyCompletionResult.cs index 044ee3d..35280b3 100644 --- a/Expedience.Infrastructure/Models/DutyCompletionResult.cs +++ b/Expedience.Infrastructure/Models/DutyCompletionResult.cs @@ -7,6 +7,7 @@ public int DutyId { get; set; } public bool HasEcho { get; set; } public bool IsUnrestricted { get; set; } + public bool IsMinILevel { get; set; } public bool HasNpcMembers { get; set; } public DateTime StartTime { get; set; } public DateTime EndTime { get; set; } @@ -19,5 +20,6 @@ public string Lang { get; set; } public List DutyMembers { get; set; } public string DataCenter { get; set; } + } } diff --git a/Expedience.Models/CurrentDutyInfo.cs b/Expedience.Models/CurrentDutyInfo.cs index e61a331..e6e6ff8 100644 --- a/Expedience.Models/CurrentDutyInfo.cs +++ b/Expedience.Models/CurrentDutyInfo.cs @@ -16,14 +16,16 @@ namespace Expedience.Models public PlayerInfo Player { get; set; } public int DutyId { get; set; } public string DutyName { get; set; } - public List PartyMembers { get; set; } = new (); + public List PartyMembers { get; set; } = new(); public DateTime StartTime { get; } public DateTime EndTime { get; private set; } public bool IsUnrestricted { get; set; } public bool HasNpcMembers { get; set; } public bool HasEcho { get; set; } + public string DataCenter { get; set; } - + public bool IsMinILevel { get; set; } + public void EndDuty() { _stopwatch.Stop(); diff --git a/Expedience.Models/DutyCompletionResult.cs b/Expedience.Models/DutyCompletionResult.cs index 912255c..5e7f088 100644 --- a/Expedience.Models/DutyCompletionResult.cs +++ b/Expedience.Models/DutyCompletionResult.cs @@ -18,6 +18,7 @@ namespace Expedience.Models DutyId = currentDuty.DutyId, DutyName = currentDuty.DutyName, IsUnrestricted = currentDuty.IsUnrestricted, + IsMinILevel = currentDuty.IsMinILevel, IsNpcSupported = currentDuty.PartyMembers.Any(p => p.IsNpc), HasEcho = currentDuty.HasEcho, }; diff --git a/Expedience.Models/DutyInfo.cs b/Expedience.Models/DutyInfo.cs index 8a3f39f..d7a805f 100644 --- a/Expedience.Models/DutyInfo.cs +++ b/Expedience.Models/DutyInfo.cs @@ -13,5 +13,6 @@ namespace Expedience.Models public bool IsUnrestricted { get; set; } public bool HasEcho { get; set; } public bool IsNpcSupported { get; set; } + public bool IsMinILevel { get; internal set; } } }