new builder
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user