Fixing Clear Dungeon

This commit is contained in:
dingo
2025-12-17 07:52:44 -05:00
parent db080fa165
commit d47ede3ed9
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -673,6 +673,17 @@ public sealed class DungeonHandler : IClientMessageHandler
.Where(s => s.CurrentDungeonId == dungeonId && s.State == PlayerState.InDungeon)
.ToList();
// Check if dungeon was just cleared
if (result.Phase == DungeonPhase.Cleared && !instance.ClearedHandled)
{
instance.ClearedHandled = true;
foreach (var session in playersInDungeon)
{
_ = HandleDungeonClearedAsync(session);
}
continue; // Skip normal state updates since we're returning everyone to hub
}
foreach (var session in playersInDungeon)
{
// Check escape completion (5 seconds = 100 ticks)
+1
View File
@@ -10,4 +10,5 @@ public class DungeonInstance
public int Seed { get; set; }
public DungeonSimulation Simulation { get; set; } = null!;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public bool ClearedHandled { get; set; } = false;
}