new builder

This commit is contained in:
dingo
2026-02-08 22:01:19 -05:00
parent 6e3be67f64
commit 7b03b4139a
6 changed files with 495 additions and 13 deletions
+7 -2
View File
@@ -1,5 +1,6 @@
using System.Collections.Concurrent;
using DataServer.Data.Entities;
using DataServer.Data.Enums;
namespace GameServer.Dungeon;
@@ -68,7 +69,7 @@ public partial class DungeonHandler
if (dungeon.IsPersisted)
return (false, "Dungeon already archived.");
if (dungeon.BossKilled)
if (dungeon.AllBossesDefeated)
return (false, "Boss was killed; dungeon is marked for cleanup, not archive.");
await PersistDungeonAsync(dungeon, ct);
@@ -93,7 +94,7 @@ public partial class DungeonHandler
TotalPlayers = dungeons.Sum(d => d.Simulation.Players.Count),
TotalMobsAlive = dungeons.Sum(d => d.Simulation.Mobs.Values.Count(m => m.IsAlive)),
CompletedCount = dungeons.Count(d => d.Simulation.Phase == DungeonPhase.Cleared),
BossesKilled = dungeons.Count(d => d.BossKilled)
BossesKilled = dungeons.Count(d => d.AllBossesDefeated)
};
}
@@ -168,6 +169,10 @@ public partial class DungeonHandler
dungeon.Simulation.InitializeMobAbilities(mob, mobDef, stats);
dungeon.Simulation.Mobs[newMobId] = mob;
if (mob.Type == MobType.Boss)
{
dungeon.RegisterBossSpawn(newMobId);
}
return mob;
}