From 2f276e6e8194ebd9eaa489f03679d0f36abbe851 Mon Sep 17 00:00:00 2001 From: Jay Malhotra <5047192+SapiensAnatis@users.noreply.github.com> Date: Sat, 6 Jul 2024 19:47:55 +0100 Subject: [PATCH] Boost daily endeavours and remove starting wyrmite (#930) Closes #694. Removes the starting 1.2m wyrmite and updates the daily endeavours as follows: | Description | Original Reward | New Reward | | ----------------------------------- | ------------------- | ------------------------ | | Perform an Item Summon | 300 Eldwater | 3,000 Eldwater | | Collect Rupies from a Facility | 1 Quality Honey | 5 Exquisite Honey | | Clear a Quest | 5000 Mana | 3 Four Leaf Clovers | | Clear Three Quests | 5 Consecrated Water | 1 Champion's Testament | | Clear Five Quests | 1 Exquisite Honey | 1 Sunlight Ore | | Clear All Standard Daily Endeavours | 50 Wyrmite | 1 Tenfold Summon Voucher | One tenfold per day (for active players) works out to between 280 and 310 summons a month, which is above the monthly average of between 135.6 (2022) to 238.7 (pre-2.0) summons that were offered for free while the game was live - [source](https://docs.google.com/spreadsheets/d/1ZEfbgzG1smvZD4qI8GLcJOk4Nh-lyOWGJzdg1aVzDZY/edit?gid=1356443011#gid=1356443011) The boosted endeavour changes, since they are not technically vanilla, can be disabled with a [feature flag](https://github.com/SapiensAnatis/Dawnshard/wiki/Feature-flags). --- .csharpierignore | 2 +- .../TestFixture.cs | 1 + ...aliaAPI.Shared.SourceGenerator.Test.csproj | 2 +- ...ectly#MasterAsset.Extensions.g.verified.cs | 12 +- ...erAssetCorrectly#MasterAsset.g.verified.cs | 50 +++--- .../MasterAssetGeneratorTest.cs | 44 ++--- .../MasterAssetGenerator.cs | 1 + .../Transforms.cs | 35 +++- .../MasterAsset.Extensions.g.cs | 12 ++ .../MasterAsset.g.cs | 2 +- .../MasterAsset/MasterAssetExtensions.cs | 5 + .../Missions/MissionDailyData.rewards.json | 158 ++++++++++++++++++ .../Services/Game/SavefileService.cs | 3 +- DragaliaAPI/DragaliaAPI/appsettings.json | 3 + 14 files changed, 266 insertions(+), 64 deletions(-) create mode 100644 DragaliaAPI/DragaliaAPI.Shared/Resources/Missions/MissionDailyData.rewards.json diff --git a/.csharpierignore b/.csharpierignore index ac7711a65..c872553bb 100644 --- a/.csharpierignore +++ b/.csharpierignore @@ -1 +1 @@ -DragaliaAPI/DragaliaAPI.Database/Migrations/* \ No newline at end of file +DragaliaAPI/DragaliaAPI.Database/Migrations/* diff --git a/DragaliaAPI/DragaliaAPI.Integration.Test/TestFixture.cs b/DragaliaAPI/DragaliaAPI.Integration.Test/TestFixture.cs index 70fb04664..e9c9d43ec 100644 --- a/DragaliaAPI/DragaliaAPI.Integration.Test/TestFixture.cs +++ b/DragaliaAPI/DragaliaAPI.Integration.Test/TestFixture.cs @@ -290,6 +290,7 @@ await apiContext.PlayerUserData.FindAsync(newPlayer.ViewerId) )!; userData.Coin = 100_000_000; + userData.Crystal = 1_200_000; userData.DewPoint = 100_000_000; userData.ManaPoint = 100_000_000; userData.Level = 250; diff --git a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/DragaliaAPI.Shared.SourceGenerator.Test.csproj b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/DragaliaAPI.Shared.SourceGenerator.Test.csproj index c821984d0..6cdffc9db 100644 --- a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/DragaliaAPI.Shared.SourceGenerator.Test.csproj +++ b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/DragaliaAPI.Shared.SourceGenerator.Test.csproj @@ -11,6 +11,7 @@ + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -29,7 +30,6 @@ - diff --git a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.Extensions.g.verified.cs b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.Extensions.g.verified.cs index 2c2f2b87c..a839bf469 100644 --- a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.Extensions.g.verified.cs +++ b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.Extensions.g.verified.cs @@ -23,22 +23,22 @@ private static async Task> LoadFile(string msgpackPath) ) ?? throw new global::MessagePack.MessagePackSerializationException($"Deserialized MasterAsset extension for {path} was null"); } - public static async global::System.Threading.Tasks.Task> LoadEventDataExtension(global::Microsoft.FeatureManagement.IFeatureManager featureManager) + public static async global::System.Threading.Tasks.Task> LoadEventDataExtension(global::Microsoft.FeatureManagement.IFeatureManager featureManager) { - global::System.Collections.Generic.List extendedData = []; + global::System.Collections.Generic.List extendedData = []; - extendedData.AddRange(await LoadFile("Event/BuildEventReward.extension.msgpack")); + extendedData.AddRange(await LoadFile("Event/BuildEventReward.extension.msgpack")); return extendedData; } - public static async global::System.Threading.Tasks.Task> LoadDragonDataExtension(global::Microsoft.FeatureManagement.IFeatureManager featureManager) + public static async global::System.Threading.Tasks.Task> LoadDragonDataExtension(global::Microsoft.FeatureManagement.IFeatureManager featureManager) { - global::System.Collections.Generic.List extendedData = []; + global::System.Collections.Generic.List extendedData = []; if (await featureManager.IsEnabledAsync("ModdedDragons")) { - extendedData.AddRange(await LoadFile("DragonData.modded.msgpack")); + extendedData.AddRange(await LoadFile("DragonData.modded.msgpack")); } return extendedData; diff --git a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.g.verified.cs b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.g.verified.cs index 56dbb8141..eab10384b 100644 --- a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.g.verified.cs +++ b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.GeneratesMasterAssetCorrectly#MasterAsset.g.verified.cs @@ -11,20 +11,20 @@ public static partial class MasterAsset private static bool loaded; - private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? charaData; - public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData CharaData => charaData ?? throw new InvalidOperationException(ErrorUninitialized); + private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? charaData; + public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData CharaData => charaData ?? throw new InvalidOperationException(ErrorUninitialized); - private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? rankingData; - public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData RankingData => rankingData ?? throw new InvalidOperationException(ErrorUninitialized); + private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? rankingData; + public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData RankingData => rankingData ?? throw new InvalidOperationException(ErrorUninitialized); - private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetGroup? buildEventReward; - public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetGroup BuildEventReward => buildEventReward ?? throw new InvalidOperationException(ErrorUninitialized); + private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetGroup? buildEventReward; + public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetGroup BuildEventReward => buildEventReward ?? throw new InvalidOperationException(ErrorUninitialized); - private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? eventData; - public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData EventData => eventData ?? throw new InvalidOperationException(ErrorUninitialized); + private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? eventData; + public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData EventData => eventData ?? throw new InvalidOperationException(ErrorUninitialized); - private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? dragonData; - public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData DragonData => dragonData ?? throw new InvalidOperationException(ErrorUninitialized); + private static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData? dragonData; + public static global::DragaliaAPI.Shared.MasterAsset.MasterAssetData DragonData => dragonData ?? throw new InvalidOperationException(ErrorUninitialized); public static async Task LoadAsync(global::Microsoft.FeatureManagement.IFeatureManager featureManager) { if (loaded) @@ -32,37 +32,37 @@ public static async Task LoadAsync(global::Microsoft.FeatureManagement.IFeatureM return; } - global::System.Threading.Tasks.ValueTask> charaDataTask = - global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( + global::System.Threading.Tasks.ValueTask> charaDataTask = + global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( "CharaData.msgpack", - (global::DragaliaAPI.Shared.MasterAsset.Models.CharaData x) => x.Id, + (global::DragaliaAPI.Shared.MasterAsset.CharaData x) => x.Id, null ); - global::System.Threading.Tasks.ValueTask> rankingDataTask = - global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( + global::System.Threading.Tasks.ValueTask> rankingDataTask = + global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( "TimeAttack/RankingData.msgpack", - (global::DragaliaAPI.Shared.MasterAsset.Models.TimeAttack.RankingData x) => x.QuestId, + (global::DragaliaAPI.Shared.MasterAsset.RankingData x) => x.QuestId, null ); - global::System.Threading.Tasks.ValueTask> buildEventRewardTask = - global::DragaliaAPI.Shared.MasterAsset.MasterAssetGroup.LoadAsync( + global::System.Threading.Tasks.ValueTask> buildEventRewardTask = + global::DragaliaAPI.Shared.MasterAsset.MasterAssetGroup.LoadAsync( "Event/BuildEventReward.msgpack", - (global::DragaliaAPI.Shared.MasterAsset.Models.Event.BuildEventReward x) => x.Id + (global::DragaliaAPI.Shared.MasterAsset.BuildEventReward x) => x.Id ); - global::System.Threading.Tasks.ValueTask> eventDataTask = - global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( + global::System.Threading.Tasks.ValueTask> eventDataTask = + global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( "Event/EventData.msgpack", - (global::DragaliaAPI.Shared.MasterAsset.Models.Event.EventData x) => x.Id, + (global::DragaliaAPI.Shared.MasterAsset.EventData x) => x.Id, await LoadEventDataExtension(featureManager) ); - global::System.Threading.Tasks.ValueTask> dragonDataTask = - global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( + global::System.Threading.Tasks.ValueTask> dragonDataTask = + global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( "DragonData.msgpack", - (global::DragaliaAPI.Shared.MasterAsset.Models.DragonData x) => x.Id, + (global::DragaliaAPI.Shared.MasterAsset.DragonData x) => x.Id, await LoadDragonDataExtension(featureManager) ); diff --git a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.cs b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.cs index 44ebbd7ba..db95ae270 100644 --- a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.cs +++ b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator.Test/MasterAssetGeneratorTest.cs @@ -1,5 +1,5 @@ using Basic.Reference.Assemblies; -using DragaliaAPI.Shared.MasterAsset.Models; +using FluentAssertions; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; @@ -11,12 +11,27 @@ public class MasterAssetGeneratorTest public async Task GeneratesMasterAssetCorrectly() { string source = """ + using DragaliaAPI.Shared.MasterAsset; using DragaliaAPI.Shared.MasterAsset.Models; using DragaliaAPI.Shared.MasterAsset.Models.TimeAttack; using DragaliaAPI.Shared.MasterAsset.Models.Event; + [assembly: ExtendMasterAsset(nameof(MasterAsset.EventData), "Event/BuildEventReward.extension.json")] + [assembly: ExtendMasterAsset(nameof(MasterAsset.DragonData), "DragonData.modded.json", FeatureFlag = "ModdedDragons")] + namespace DragaliaAPI.Shared.MasterAsset; + public enum Charas + { + Illia, + } + + public record CharaData(Charas Id); + public record RankingData(int QuestId); + public record BuildEventReward(int Id); + public record EventData(int Id); + public record DragonData(int Id); + [GenerateMasterAsset("CharaData.json")] [GenerateMasterAsset("TimeAttack/RankingData.json", Key = nameof(Models.TimeAttack.RankingData.QuestId))] [GenerateMasterAsset("Event/BuildEventReward.json", Group = true)] @@ -25,30 +40,18 @@ namespace DragaliaAPI.Shared.MasterAsset; public static partial class MasterAsset { } - - [ExtendMasterAsset(nameof(MasterAsset.EventData), "Event/BuildEventReward.extension.json")] - public static class EventDataExtensions - { - } - - [ExtendMasterAsset(nameof(MasterAsset.DragonData), "DragonData.modded.json", FeatureFlag = "ModdedDragons")] - public static class DragonDataExtensions - { - } """; - await Verify(source); + GeneratorDriver driver = GetDriver(source); + + await Verify(driver); } - private static Task Verify(string source) + private static GeneratorDriver GetDriver(string source) { SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(source); - List references = - [ - .. ReferenceAssemblies.Net80, - MetadataReference.CreateFromFile(typeof(CharaData).Assembly.Location) - ]; + List references = [.. ReferenceAssemblies.Net80,]; CSharpCompilation compilation = CSharpCompilation.Create( assemblyName: "Tests", @@ -61,6 +64,9 @@ private static Task Verify(string source) driver = driver.RunGenerators(compilation); - return Verifier.Verify(driver); + GeneratorDriverRunResult result = driver.GetRunResult(); + result.Diagnostics.Should().BeEmpty(); + + return driver; } } diff --git a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/MasterAssetGenerator.cs b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/MasterAssetGenerator.cs index 044bb2bca..4d2fd098e 100644 --- a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/MasterAssetGenerator.cs +++ b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/MasterAssetGenerator.cs @@ -92,6 +92,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) static (_, _) => true, Transforms.TransformExtensionDeclarations ) + .SelectMany(static (list, _) => list.AsEnumerable()) .Collect(); IncrementalValuesProvider declarationProvider = context diff --git a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/Transforms.cs b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/Transforms.cs index c5ff99756..f8e679c79 100644 --- a/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/Transforms.cs +++ b/DragaliaAPI/DragaliaAPI.Shared.SourceGenerator/Transforms.cs @@ -66,24 +66,41 @@ is not IPropertySymbol keyPropertySymbol } } - public static MasterAssetExtensionDeclaration TransformExtensionDeclarations( + public static EquatableReadOnlyList TransformExtensionDeclarations( GeneratorAttributeSyntaxContext context, CancellationToken cancellationToken ) { - AttributeData attribute = context.Attributes[0]; + cancellationToken.ThrowIfCancellationRequested(); + + return ProcessDeclarations(context, cancellationToken).ToEquatableReadOnlyList(); - if ( - attribute.ConstructorArguments - is not [{ Value: string masterAssetName }, { Value: string jsonPath }] + static IEnumerable ProcessDeclarations( + GeneratorAttributeSyntaxContext context, + CancellationToken cancellationToken ) { - return MasterAssetExtensionDeclaration.Default; - } + foreach (AttributeData? attribute in context.Attributes) + { + cancellationToken.ThrowIfCancellationRequested(); - attribute.TryGetNamedArgument("FeatureFlag", out string? featureFlag); + if ( + attribute.ConstructorArguments + is not [{ Value: string masterAssetName }, { Value: string jsonPath }] + ) + { + continue; + } + + attribute.TryGetNamedArgument("FeatureFlag", out string? featureFlag); - return new MasterAssetExtensionDeclaration(masterAssetName, jsonPath, featureFlag); + yield return new MasterAssetExtensionDeclaration( + masterAssetName, + jsonPath, + featureFlag + ); + } + } } } diff --git a/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.Extensions.g.cs b/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.Extensions.g.cs index 2b1a46b94..c56fa34bc 100644 --- a/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.Extensions.g.cs +++ b/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.Extensions.g.cs @@ -22,6 +22,18 @@ private static async Task> LoadFile(string msgpackPath) ) ?? throw new global::MessagePack.MessagePackSerializationException($"Deserialized MasterAsset extension for {path} was null"); } + public static async global::System.Threading.Tasks.Task> LoadMissionDailyDataExtension(global::Microsoft.FeatureManagement.IFeatureManager featureManager) + { + global::System.Collections.Generic.List extendedData = []; + + if (await featureManager.IsEnabledAsync("BoostedDailyEndeavourRewards")) + { + extendedData.AddRange(await LoadFile("Missions/MissionDailyData.rewards.msgpack")); + } + + return extendedData; + } + public static async global::System.Threading.Tasks.Task> LoadEventDataExtension(global::Microsoft.FeatureManagement.IFeatureManager featureManager) { global::System.Collections.Generic.List extendedData = []; diff --git a/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.g.cs b/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.g.cs index 63147d4f1..0b661e664 100644 --- a/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.g.cs +++ b/DragaliaAPI/DragaliaAPI.Shared/Generated/DragaliaAPI.Shared.SourceGenerator/DragaliaAPI.Shared.SourceGenerator.MasterAssetGenerator/MasterAsset.g.cs @@ -553,7 +553,7 @@ public static async Task LoadAsync(global::Microsoft.FeatureManagement.IFeatureM global::DragaliaAPI.Shared.MasterAsset.MasterAssetData.LoadAsync( "Missions/MissionDailyData.msgpack", (global::DragaliaAPI.Shared.MasterAsset.Models.Missions.DailyMission x) => x.Id, - null + await LoadMissionDailyDataExtension(featureManager) ); global::System.Threading.Tasks.ValueTask> missionDrillDataTask = diff --git a/DragaliaAPI/DragaliaAPI.Shared/MasterAsset/MasterAssetExtensions.cs b/DragaliaAPI/DragaliaAPI.Shared/MasterAsset/MasterAssetExtensions.cs index 71f6885c8..fca78f948 100644 --- a/DragaliaAPI/DragaliaAPI.Shared/MasterAsset/MasterAssetExtensions.cs +++ b/DragaliaAPI/DragaliaAPI.Shared/MasterAsset/MasterAssetExtensions.cs @@ -1,3 +1,8 @@ using DragaliaAPI.Shared.MasterAsset; [assembly: ExtendMasterAsset(nameof(MasterAsset.EventData), "Event/EventData.fixes.json")] +[assembly: ExtendMasterAsset( + nameof(MasterAsset.MissionDailyData), + "Missions/MissionDailyData.rewards.json", + FeatureFlag = "BoostedDailyEndeavourRewards" +)] diff --git a/DragaliaAPI/DragaliaAPI.Shared/Resources/Missions/MissionDailyData.rewards.json b/DragaliaAPI/DragaliaAPI.Shared/Resources/Missions/MissionDailyData.rewards.json new file mode 100644 index 000000000..d80f37633 --- /dev/null +++ b/DragaliaAPI/DragaliaAPI.Shared/Resources/Missions/MissionDailyData.rewards.json @@ -0,0 +1,158 @@ +[ + { + "$comment": "Perform an Item Summon - reward changed from 300 Eldwater to 3,000 Eldwater", + "_Id": 15070101, + "_Text": "MISSION_DAILY_DETAIL_15040201", + "_SortId": 10000401, + "_CompleteValue": 1, + "_ProgressFlag": 0, + "_MissionTransportType": 10501, + "_TransportValue": 0, + "_EntityType": 14, + "_EntityId": 0, + "_EntityQuantity": 3000, + "_EntityBuildupCount": 0, + "_EntityLimitBreakCount": 0, + "_EntityEquipableCount": 0, + "_QuestGroupId": 0, + "_CampaignId": 0, + "_NeedCompleteMissionId": 0, + "_NeedClearQuestId": 0, + "_LockReceiveRewardEndDate": "", + "_LockReceiveRewardType": 0, + "_LockReceiveRewardParam": 0, + "_IsPickup": 0, + "_BlankViewQuestStoryId": 0, + "_BlankViewQuestId": 0 + }, + { + "$comment": "Collect Rupies from a Facility - reward changed from 1 Quality Honey to 5 Exquisite Honey", + "_Id": 15070201, + "_Text": "MISSION_DAILY_DETAIL_15040301", + "_SortId": 10000501, + "_CompleteValue": 1, + "_ProgressFlag": 0, + "_MissionTransportType": 10401, + "_TransportValue": 0, + "_EntityType": 2, + "_EntityId": 100603, + "_EntityQuantity": 5, + "_EntityBuildupCount": 0, + "_EntityLimitBreakCount": 0, + "_EntityEquipableCount": 0, + "_QuestGroupId": 0, + "_CampaignId": 0, + "_NeedCompleteMissionId": 0, + "_NeedClearQuestId": 0, + "_LockReceiveRewardEndDate": "", + "_LockReceiveRewardType": 0, + "_LockReceiveRewardParam": 0, + "_IsPickup": 0, + "_BlankViewQuestStoryId": 0, + "_BlankViewQuestId": 0 + }, + { + "$comment": "Clear a Quest - reward changed from 5000 Mana to 3 Four Leaf Clover", + "_Id": 15070301, + "_Text": "MISSION_DAILY_DETAIL_15070301", + "_SortId": 10000601, + "_CompleteValue": 1, + "_ProgressFlag": 0, + "_MissionTransportType": 10102, + "_TransportValue": 0, + "_EntityType": 15, + "_EntityId": 30001, + "_EntityQuantity": 3, + "_EntityBuildupCount": 0, + "_EntityLimitBreakCount": 0, + "_EntityEquipableCount": 0, + "_QuestGroupId": 0, + "_CampaignId": 0, + "_NeedCompleteMissionId": 0, + "_NeedClearQuestId": 0, + "_LockReceiveRewardEndDate": "", + "_LockReceiveRewardType": 0, + "_LockReceiveRewardParam": 0, + "_IsPickup": 0, + "_BlankViewQuestStoryId": 0, + "_BlankViewQuestId": 0 + }, + { + "$comment": "Clear Three Quests - reward changed from 5 Consecrated Water to 1 Champion's Testament", + "_Id": 15070401, + "_Text": "MISSION_DAILY_DETAIL_15070401", + "_SortId": 10000701, + "_CompleteValue": 3, + "_ProgressFlag": 0, + "_MissionTransportType": 10102, + "_TransportValue": 0, + "_EntityType": 8, + "_EntityId": 104003002, + "_EntityQuantity": 1, + "_EntityBuildupCount": 0, + "_EntityLimitBreakCount": 0, + "_EntityEquipableCount": 0, + "_QuestGroupId": 0, + "_CampaignId": 0, + "_NeedCompleteMissionId": 0, + "_NeedClearQuestId": 0, + "_LockReceiveRewardEndDate": "", + "_LockReceiveRewardType": 0, + "_LockReceiveRewardParam": 0, + "_IsPickup": 0, + "_BlankViewQuestStoryId": 0, + "_BlankViewQuestId": 0 + }, + { + "$comment": "Clear Five Quests - reward changed from 1 Exquisite Honey to 1 Sunlight Ore", + "_Id": 15070501, + "_Text": "MISSION_DAILY_DETAIL_15040501", + "_SortId": 10000801, + "_CompleteValue": 5, + "_ProgressFlag": 0, + "_MissionTransportType": 10102, + "_TransportValue": 0, + "_EntityType": 8, + "_EntityId": 201011001, + "_EntityQuantity": 1, + "_EntityBuildupCount": 0, + "_EntityLimitBreakCount": 0, + "_EntityEquipableCount": 0, + "_QuestGroupId": 0, + "_CampaignId": 0, + "_NeedCompleteMissionId": 0, + "_NeedClearQuestId": 0, + "_LockReceiveRewardEndDate": "", + "_LockReceiveRewardType": 0, + "_LockReceiveRewardParam": 0, + "_IsPickup": 0, + "_BlankViewQuestStoryId": 0, + "_BlankViewQuestId": 0 + }, + { + "$comment": "Clear All Standard Daily Endeavours - reward changed from 50 Wyrmite to 1 Tenfold Summon Voucher", + "_Id": 15070601, + "_Text": "MISSION_DAILY_DETAIL_15040701", + "_SortId": 10000901, + "_CompleteValue": 5, + "_ProgressFlag": 0, + "_MissionTransportType": 0, + "_TransportValue": 0, + "_EntityType": 17, + "_EntityId": 10102, + "_EntityQuantity": 1, + "_EntityBuildupCount": 0, + "_EntityLimitBreakCount": 0, + "_EntityEquipableCount": 0, + "_QuestGroupId": 0, + "_CampaignId": 0, + "_NeedCompleteMissionId": 0, + "_NeedClearQuestId": 0, + "_LockReceiveRewardEndDate": "", + "_LockReceiveRewardType": 0, + "_LockReceiveRewardParam": 0, + "_IsPickup": 0, + "_BlankViewQuestStoryId": 0, + "_BlankViewQuestId": 0 + } +] \ No newline at end of file diff --git a/DragaliaAPI/DragaliaAPI/Services/Game/SavefileService.cs b/DragaliaAPI/DragaliaAPI/Services/Game/SavefileService.cs index 27aa77226..2022d3106 100644 --- a/DragaliaAPI/DragaliaAPI/Services/Game/SavefileService.cs +++ b/DragaliaAPI/DragaliaAPI/Services/Game/SavefileService.cs @@ -146,7 +146,6 @@ await this.cache.SetStringAsync( ArgumentNullException.ThrowIfNull(savefile.UserData); player.UserData = mapper.Map(savefile.UserData); - player.UserData.Crystal += 1_200_000; // TODO: What was the actual maximum dragon storage you could get? int cappedDragonStorage = Math.Min(savefile.UserData.MaxDragonQuantity, 500); @@ -576,7 +575,7 @@ public async Task Create(string deviceAccountId) { AccountId = deviceAccountId, SavefileVersion = this.maxSavefileVersion, - UserData = new() { Crystal = 1_200_000 } + UserData = new() }; this.apiContext.Players.Add(player); diff --git a/DragaliaAPI/DragaliaAPI/appsettings.json b/DragaliaAPI/DragaliaAPI/appsettings.json index a94b797d4..e5a69dd3f 100644 --- a/DragaliaAPI/DragaliaAPI/appsettings.json +++ b/DragaliaAPI/DragaliaAPI/appsettings.json @@ -123,5 +123,8 @@ "AllowedOrigins": [ "http://localhost:3001" ] + }, + "FeatureManagement": { + "BoostedDailyEndeavourRewards": true } }