Table of Contents

Struct WorldPortalStateData

Namespace
FishMMO.Database.Data
Assembly
FishMMO-DB.dll

A portal opened for everyone in the world: either for good, or until a moment.

public struct WorldPortalStateData
Inherited Members

Remarks

Keyed by (scene, portal index) and shared by every scene server on the database, so a portal opened on one server is open on the next that loads the scene. The index is the portal's authored, per-scene stable index (PortalActivation.PortalIndex).

Merge, not replace. Permanent ORs and ActiveUntilUtc takes the later of the stored and written moments, so the write is idempotent and two servers opening the same portal at once end with the longer opening. Nothing can close a portal through this row; an expired timed opening simply stops counting.

Constructors

WorldPortalStateData(string, int, bool, DateTime)

public WorldPortalStateData(string sceneName, int portalIndex, bool permanent, DateTime activeUntilUtc)

Parameters

sceneName string
portalIndex int
permanent bool
activeUntilUtc DateTime

Fields

ActiveUntilUtc

UTC moment a timed opening ends. The Unix epoch when the portal was never opened on a timer (a permanent opening carries the epoch unless it was also timed once).

public readonly DateTime ActiveUntilUtc

Field Value

DateTime

Permanent

Open for good.

public readonly bool Permanent

Field Value

bool

PortalIndex

The portal's authored index within that scene.

public readonly int PortalIndex

Field Value

int

SceneName

The scene the portal stands in.

public readonly string SceneName

Field Value

string