Drop current entity slot from pending run checkpoint transport
This commit is contained in:
parent
9bc8ec125d
commit
69c5811cf5
7 changed files with 294 additions and 26 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue