Persist faction relationships in run checkpoints
This commit is contained in:
parent
0115d8048a
commit
e0a39b2fce
8 changed files with 73 additions and 6 deletions
|
|
@ -226,6 +226,7 @@ public static class AetheriaRuntimeCommitLogApplier
|
|||
CurrentZoneEntityIndex = checkpoint.CurrentZoneEntityIndex,
|
||||
DiscoveredZoneIndices = ToIntArray(checkpoint.DiscoveredZoneIndices),
|
||||
ActionBarBindings = ToActionBarBindings(checkpoint.ActionBarBindings),
|
||||
FactionRelationships = ToFactionRelationships(checkpoint.FactionRelationships),
|
||||
UpdatedAtUtc = updatedAtUtc
|
||||
};
|
||||
|
||||
|
|
@ -328,6 +329,19 @@ public static class AetheriaRuntimeCommitLogApplier
|
|||
.ToArray();
|
||||
}
|
||||
|
||||
private static AetheriaFactionRelationshipState[] ToFactionRelationships(
|
||||
IReadOnlyList<AetheriaRuntimeFactionRelationshipCommit>? relationships)
|
||||
{
|
||||
return (relationships ?? Array.Empty<AetheriaRuntimeFactionRelationshipCommit>())
|
||||
.Select(relationship => new AetheriaFactionRelationshipState
|
||||
{
|
||||
FactionKey = ReferenceKey("aetheria.corporation", relationship.CorporationLegacyId ?? ""),
|
||||
Relationship = relationship.Relationship ?? "",
|
||||
Standing = relationship.Standing
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
private static CultRecordKey LoadoutKey(string name)
|
||||
{
|
||||
return new CultRecordKey($"global:aetheria.loadout_template.{StableToken(name)}.v1");
|
||||
|
|
|
|||
Loading…
Reference in a new issue