Skip to content

Commit

Permalink
FIx mana circles not respecting the grow material period (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeFZ authored Jul 23, 2023
1 parent 9694a1f commit 5f99cc2
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 121 deletions.
4 changes: 4 additions & 0 deletions DragaliaAPI.Shared.Test/Unit/MasterAssetTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ public void CharaData_Get_ReturnsExpectedProperties()
AwakeNeedEntityType5: EntityTypes.Dew,
AwakeNeedEntityId5: 0,
AwakeNeedEntityQuantity5: 25000,
GrowMaterialOnlyStartDate: DateTimeOffset.UnixEpoch,
GrowMaterialOnlyEndDate: DateTimeOffset.UnixEpoch,
UniqueGrowMaterialId1: Materials.GalaLaxisConviction,
UniqueGrowMaterialId2: Materials.GalaLaxisDevotion,
GrowMaterialId: Materials.Empty,
Expand Down Expand Up @@ -105,6 +107,7 @@ public void CharaData_GetManaNode_ReturnsNode()
UniqueGrowMaterialCount2: 0,
GrowMaterialCount: 1,
MC_0: 4032,
Step: 1,
ManaCircleName: "MC_0403"
)
);
Expand Down Expand Up @@ -212,6 +215,7 @@ public void ManaNode_Get_ReturnsExpectedProperties()
UniqueGrowMaterialCount2: 0,
GrowMaterialCount: 1,
MC_0: 5045,
Step: 3,
ManaCircleName: "MC_0504"
)
);
Expand Down
4 changes: 4 additions & 0 deletions DragaliaAPI.Shared/MasterAsset/Models/CharaData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public record CharaData(
Materials UniqueGrowMaterialId1,
Materials UniqueGrowMaterialId2,
Materials GrowMaterialId,
[property: JsonConverter(typeof(MasterAssetDateTimeOffsetConverter))]
DateTimeOffset GrowMaterialOnlyStartDate,
[property: JsonConverter(typeof(MasterAssetDateTimeOffsetConverter))]
DateTimeOffset GrowMaterialOnlyEndDate,
int DefaultAbility1Level,
int DefaultAbility2Level,
int DefaultAbility3Level,
Expand Down
3 changes: 2 additions & 1 deletion DragaliaAPI.Shared/MasterAsset/Models/ManaCircle/ManaNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public record ManaNode(
int UniqueGrowMaterialCount2,
int GrowMaterialCount,
[property: JsonPropertyName("MC_0")] int MC_0,
string ManaCircleName
string ManaCircleName,
int Step
);
Loading

0 comments on commit 5f99cc2

Please sign in to comment.