fix: the game will crash when finish a challenge and exit

This commit is contained in:
StopWuyu
2025-08-23 14:24:29 +08:00
parent 28ca622bce
commit 3339f44b80
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ public class ChallengeData : BaseDatabaseDataHelper
[SugarColumn(IsJson = true)] public Dictionary<int, ChallengeHistoryData> History { get; set; } = new();
[SugarColumn(IsNullable = true)] public string? ChallengeInstance { get; set; }
[SugarColumn(IsNullable = true)] public string? Instance { get; set; } = null; // placeholder
[SugarColumn] public string Instance { get; set; } = ""; // placeholder
[SugarColumn(IsJson = true)] public Dictionary<int, ChallengeGroupReward> TakenRewards { get; set; } = new();
[SugarColumn(IsJson = true)] public Dictionary<int, ChallengePeakLevelData> PeakLevelDatas { get; set; } = new();

View File

@@ -16,7 +16,7 @@ public class PacketGetCurChallengeScRsp : BasePacket
proto.CurChallenge = inst.ToProto();
Task.Run(async () =>
{
await player.LineupManager!.SetCurLineup(inst.GetCurrentExtraLineupType() + 10);
await player.LineupManager!.SetExtraLineup((ExtraLineupType)inst.GetCurrentExtraLineupType());
}).Wait();
var proto1 = player.LineupManager?.GetExtraLineup(ExtraLineupType.LineupChallenge)?.ToProto();
if (proto1 != null)