Own Continue current entity by typed state key

This commit is contained in:
Meta Vens 2026-06-16 17:19:58 +01:00
commit 4ee0628a5a
12 changed files with 114 additions and 22 deletions

View file

@ -282,9 +282,22 @@ 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;
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)
{