Own Continue current entity by typed state key
This commit is contained in:
parent
c0aec84af4
commit
4ee0628a5a
12 changed files with 114 additions and 22 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue