Fix MoC Double Stage

This commit is contained in:
Somebody
2024-11-09 19:27:30 +08:00
parent 2993f8ac7f
commit 2b853a2d30

View File

@@ -357,6 +357,9 @@ public class ChallengeInstance
{
// Increment and reset stage
CurrentStage++;
// Unload scene group for stage 1
await Player.SceneInstance!.EntityLoader!.UnloadGroup(Excel.MazeGroupID1);
// Load scene group for stage 2
await Player.SceneInstance!.EntityLoader!.LoadGroup(Excel.MazeGroupID2);
@@ -367,11 +370,12 @@ public class ChallengeInstance
SavedMp = Player.LineupManager.GetCurLineup()!.Mp;
// Move player
if (Excel.MapEntranceID2 != 0)
if (Excel.MapEntranceID2 != 0 && Excel.MapEntranceID2 != Excel.MapEntranceID)
{
await Player.EnterScene(Excel.MapEntranceID2, 0, true);
StartPos = Player.Data.Pos!;
StartRot = Player.Data.Rot!;
await Player.SceneInstance!.EntityLoader!.UnloadGroup(Excel.MazeGroupID1);
await Player.SceneInstance!.EntityLoader!.LoadGroup(Excel.MazeGroupID2);
}
else