Skip to content

Commit

Permalink
Default-initialize reward record and grow record (#684)
Browse files Browse the repository at this point in the history
This was being done before #676, and with it removed and placed in a
service, we started seeing NullReferenceExceptions in
/dungeon_record/record.

Let's try reverting it back to exactly how it was before...
  • Loading branch information
SapiensAnatis authored Feb 26, 2024
1 parent 3231667 commit bd6e660
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ DungeonSession session
TotalPlayDamage = playRecord.TotalPlayDamage,
ClearTime = playRecord.Time,
IsClear = true,
RewardRecord = new(),
GrowRecord = new(),
};

await this.ProcessStaminaConsumption(session);
Expand Down
6 changes: 0 additions & 6 deletions DragaliaAPI/DragaliaAPI/Models/Generated/Components.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8977,12 +8977,6 @@ public partial class IngameResultData
[Key("quest_id")]
public int QuestId { get; set; }

[Key("reward_record")]
public RewardRecord RewardRecord { get; set; }

[Key("grow_record")]
public GrowRecord GrowRecord { get; set; }

[Key("start_time")]
public DateTimeOffset StartTime { get; set; }

Expand Down
12 changes: 12 additions & 0 deletions DragaliaAPI/DragaliaAPI/Models/Generated/IngameResultData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using MessagePack;

namespace DragaliaAPI.Models.Generated;

public partial class IngameResultData
{
[Key("reward_record")]
public RewardRecord RewardRecord { get; set; } = new();

[Key("grow_record")]
public GrowRecord GrowRecord { get; set; } = new();
}

0 comments on commit bd6e660

Please sign in to comment.