Vixen
02b45cc4
csharp
public readonly record struct PlayerKey

Who, durably — an account and the character it is playing.

Read the guide page for this →

Remarks

⚠ Not Vixen.Net.Sessions.PlayerId, and the two are not convertible. That one numbers a player within a session: it survives a dropped connection and it does not survive the session, because it is an index into one server's table. This one is who the database thinks they are, and it is the same value on every realm they ever visit. Doc 27 § Grains keys IPlayerGrain by exactly this pair.

Both halves, not just the account: a lease is per character, because two characters on one account are two sets of inventory and an MMO lets you play the second while the first is parked in a city. Keying the lease by account would make that a duplication bug (ADR-021) rather than a Tuesday.

Fields and properties (4)

  • public Guid Account

    The account. Empty means nobody.

  • public Guid Character

    The character on it.

  • public static PlayerKey None

    Nobody.

  • public bool IsValid

    Whether this names a player at all.

Methods (3)

  • public PlayerKey(Guid Account, Guid Character)

    Who, durably — an account and the character it is playing.

  • public static bool TryParse(string? text, out PlayerKey player)

    Reads one back.

  • public override string ToString()

    Returns the fully qualified type name of this instance.

Used by (46, showing 40)

  • ArrivalVixen.Live.Transfer
  • ArrivalTestsVixen.Live.Transfer.Tests
  • ClusterFleetDirectoryVixen.Live.Gate
  • ClusterGrainsVixen.Live.Realm.Cluster
  • ClusterSerializationTestsVixen.Live.Cluster.Tests
  • ConservationTestsVixen.Live.Persistence.Tests
  • FakeClusterVixen.Live.Realm.Cluster.Tests
  • FakeFleetVixen.Live.Gate.Tests
  • FakeMapVixen.Live.Realm.Cluster.Tests
  • GateLogVixen.Live.Gate
  • GateServiceVixen.Live.Gate
  • GateServiceTestsVixen.Live.Gate.Tests
  • HandoffCodecVixen.Live.Realm
  • HandoffCodecTestsVixen.Live.Realm.Tests
  • IFleetDirectoryVixen.Live.Gate
  • IMapGrainVixen.Live.Cluster
  • IPlayerRepositoryVixen.Live.Persistence
  • IRealmGrainsVixen.Live.Realm.Cluster
  • IdempotencyKeyVixen.Live.Persistence
  • KeysVixen.Live.Cluster
  • LedgerAccountVixen.Live.Persistence
  • LedgerAccountTestsVixen.Live.Persistence.Tests
  • LedgerTestsVixen.Live.Persistence.Tests
  • LiveVocabularyTestsVixen.Live.Abstractions.Tests
  • MapCoordinatorVixen.Live.Orchestrator
  • MapGrainVixen.Live.Orchestrator
  • MemoryPersistenceVixen.Live.Persistence
  • PlaceRequestVixen.Live.Cluster
  • PlacementRequestVixen.Live.Orchestrator
  • PlayerAdmissionVixen.Live.Realm
  • PlayerKeyConverterVixen.Live.Cluster
  • PlayerRecordVixen.Live.Persistence
  • RealmVixen.Live.Realm.Tests
  • RealmClusterVixen.Live.Realm.Cluster
  • RealmFixtureVixen.Live.Realm.Tests
  • RealmHandoffVixen.Live.Transfer
  • RealmHostTestsVixen.Live.Realm.Tests
  • RealmPlayerVixen.Live.Realm
  • RealmTransfersVixen.Live.Realm
  • SourceTransferVixen.Live.Transfer