diff --git a/DragaliaAPI.Test/Features/Dungeon/Record/DungeonRecordServiceTest.cs b/DragaliaAPI.Test/Features/Dungeon/Record/DungeonRecordServiceTest.cs index 6c159f8cf..eb6bdf094 100644 --- a/DragaliaAPI.Test/Features/Dungeon/Record/DungeonRecordServiceTest.cs +++ b/DragaliaAPI.Test/Features/Dungeon/Record/DungeonRecordServiceTest.cs @@ -230,8 +230,6 @@ await this.dungeonRecordService.GenerateIngameResultData( } ); - mockQuest.State.Should().Be(0); // set to 3 in QuestService - this.mockDungeonRewardService.VerifyAll(); this.mockQuestService.VerifyAll(); this.mockUserService.VerifyAll(); diff --git a/DragaliaAPI/Features/Quest/QuestCacheService.cs b/DragaliaAPI/Features/Quest/QuestCacheService.cs index abab63898..6de311efe 100644 --- a/DragaliaAPI/Features/Quest/QuestCacheService.cs +++ b/DragaliaAPI/Features/Quest/QuestCacheService.cs @@ -5,7 +5,8 @@ namespace DragaliaAPI.Features.Quest; public class QuestCacheService( IDistributedCache distributedCache, - IPlayerIdentityService playerIdentityService + IPlayerIdentityService playerIdentityService, + ILogger logger ) : IQuestCacheService { private static readonly DistributedCacheEntryOptions QuestEntryCacheOptions = @@ -31,6 +32,11 @@ await distributedCache.SetStringAsync( return questId; } + logger.LogError( + "Tried to parse cached quest id string {questIdString} but it was not an int", + questIdString + ); + return null; } diff --git a/DragaliaAPI/Features/Quest/QuestService.cs b/DragaliaAPI/Features/Quest/QuestService.cs index 1d1613903..e01da1f6d 100644 --- a/DragaliaAPI/Features/Quest/QuestService.cs +++ b/DragaliaAPI/Features/Quest/QuestService.cs @@ -97,7 +97,7 @@ int questId { if (questEventData.QuestBonusType == QuestResetIntervalType.Daily) { - ResetQuestEventBonus(ref questEvent, ref questEventData); + ResetQuestEventBonus(questEvent, questEventData); } questEvent.DailyPlayCount = 0; @@ -110,7 +110,7 @@ int questId { if (questEventData.QuestBonusType == QuestResetIntervalType.Weekly) { - ResetQuestEventBonus(ref questEvent, ref questEventData); + ResetQuestEventBonus(questEvent, questEventData); } questEvent.WeeklyPlayCount = 0; @@ -216,7 +216,7 @@ await GenerateBonusDrops(questId, count) return new AtgenReceiveQuestBonus(questId, count, 1, bonusRewards); } - private void ResetQuestEventBonus(ref DbQuestEvent questEvent, ref QuestEvent questEventData) + private void ResetQuestEventBonus(DbQuestEvent questEvent, QuestEvent questEventData) { questEvent.QuestBonusReceiveCount = 0;