Preserve entity identity across zone travel
This commit is contained in:
parent
a88fa37c63
commit
bc7596855c
4 changed files with 25 additions and 1 deletions
|
|
@ -2493,7 +2493,7 @@ static async Task<AetheriaRuntimeZoneSnapshotCommit> ToRuntimeZoneAsync(
|
|||
{
|
||||
var entity = await node.MutableDocument<AetheriaEntitySnapshot>(new CultRecordKey(entityKeys[entityIndex])).ReadAsync().ConfigureAwait(false);
|
||||
if (entity != null)
|
||||
entities.Add(ToRuntimeEntity(entity, entityIndex, entityIndices, catalog));
|
||||
entities.Add(ToRuntimeEntity(entityKeys[entityIndex], entity, entityIndex, entityIndices, catalog));
|
||||
}
|
||||
|
||||
return new AetheriaRuntimeZoneSnapshotCommit
|
||||
|
|
@ -2519,6 +2519,7 @@ static async Task<AetheriaRuntimeZoneSnapshotCommit> ToRuntimeZoneAsync(
|
|||
}
|
||||
|
||||
static AetheriaRuntimeEntitySnapshotCommit ToRuntimeEntity(
|
||||
string entityKey,
|
||||
AetheriaEntitySnapshot entity,
|
||||
int entityIndex,
|
||||
IReadOnlyDictionary<string, int> entityIndices,
|
||||
|
|
@ -2527,6 +2528,7 @@ static AetheriaRuntimeEntitySnapshotCommit ToRuntimeEntity(
|
|||
var equipment = ToEntitySlotCommits(entity.Equipment);
|
||||
var runtimeEntity = new AetheriaRuntimeEntitySnapshotCommit
|
||||
{
|
||||
EntityId = entityKey ?? "",
|
||||
EntityIndex = entityIndex,
|
||||
Name = entity.Name ?? "",
|
||||
Kind = entity.Kind ?? "",
|
||||
|
|
|
|||
Loading…
Reference in a new issue