Drop current entity slot from pending run checkpoint transport

This commit is contained in:
Meta Vens 2026-06-16 17:44:48 +01:00
commit 69c5811cf5
7 changed files with 294 additions and 26 deletions

View file

@ -281,22 +281,10 @@ public static class AetheriaRuntimeCommitLogApplier
if (zoneKeys.Count > 0)
run.ZoneKeys = zoneKeys.ToArray();
run.CurrentEntityKey = string.IsNullOrWhiteSpace(checkpoint.CurrentEntityKey)
? LegacyCurrentEntityKey(run.RunId, checkpoint.CurrentZoneIndex, checkpoint.CurrentZoneEntityIndex)
: checkpoint.CurrentEntityKey;
run.CurrentEntityKey = checkpoint.CurrentEntityKey ?? "";
await node.PutRunStateAsync(RunKey(run.RunId), run).ConfigureAwait(false);
}
private static string LegacyCurrentEntityKey(string runId, int zoneIndex, int entityIndex)
{
if (string.IsNullOrWhiteSpace(runId) || zoneIndex < 0 || entityIndex < 0)
{
return "";
}
return EntityKey(runId, zoneIndex, entityIndex).ToString();
}
private static AetheriaDroppedPickupSnapshot[] ToDroppedPickups(
IReadOnlyList<AetheriaRuntimeDroppedPickupCommit>? pickups)
{