From 3339f44b803d4c652da59a5cdc11789386c46ef9 Mon Sep 17 00:00:00 2001 From: StopWuyu Date: Sat, 23 Aug 2025 14:24:29 +0800 Subject: [PATCH] fix: the game will crash when finish a challenge and exit --- Common/Database/Challenge/ChallengeData.cs | 2 +- .../Server/Packet/Send/Challenge/PacketGetCurChallengeScRsp.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/Database/Challenge/ChallengeData.cs b/Common/Database/Challenge/ChallengeData.cs index 7b754716..80fe2209 100644 --- a/Common/Database/Challenge/ChallengeData.cs +++ b/Common/Database/Challenge/ChallengeData.cs @@ -10,7 +10,7 @@ public class ChallengeData : BaseDatabaseDataHelper [SugarColumn(IsJson = true)] public Dictionary 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 TakenRewards { get; set; } = new(); [SugarColumn(IsJson = true)] public Dictionary PeakLevelDatas { get; set; } = new(); diff --git a/GameServer/Server/Packet/Send/Challenge/PacketGetCurChallengeScRsp.cs b/GameServer/Server/Packet/Send/Challenge/PacketGetCurChallengeScRsp.cs index 2fad8614..e2f5f540 100644 --- a/GameServer/Server/Packet/Send/Challenge/PacketGetCurChallengeScRsp.cs +++ b/GameServer/Server/Packet/Send/Challenge/PacketGetCurChallengeScRsp.cs @@ -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)