Table of Contents

Class PlotVaultEntity

Namespace
FishMMO.Database.Npgsql.Entities
Assembly
FishMMO-DB.dll

One thing held in a character's house vault after their land was taken back.

public class PlotVaultEntity : IVersionedEntity
Inheritance
PlotVaultEntity
Implements
Inherited Members

Remarks

Reclaiming a plot destroys a house somebody built and paid for, and doing that with no way back would make a missed tax payment the most punishing event in the game. The vault is the answer: what stood on the plot is moved here rather than deleted, and the owner may buy it back or let it go.

Keyed by character, not by plot. The plot is about to belong to somebody else — that is the whole reason these rows exist — so anything hanging off it would be cleared out from under them by the next owner's first change. OriginalPlotID is kept as a label, deliberately without a foreign key, so the row survives the plot being reused.

Properties

Amount

How many of it are held.

public int Amount { get; set; }

Property Value

int

Remarks

Stacked, so a house with forty identical fence panels is one row rather than forty. The retrieval fee is charged per row, which makes the stack the unit a player buys back.

BaseFee

The fee charged the moment it was stored, before any time had passed.

public long BaseFee { get; set; }

Property Value

long

Remarks

Frozen onto the row rather than recomputed from the template's price. A server that rebalances what a structure costs must not thereby change what a player owes on something already sitting in their vault — they were quoted a figure when it went in.

CharacterID

The character whose vault this is.

public long CharacterID { get; set; }

Property Value

long

FeeRatePerDay

How much of BaseFee is added per day stored.

public float FeeRatePerDay { get; set; }

Property Value

float

Remarks

Frozen for the same reason as the base fee. Together they make the row self-describing: what it costs to get back is answerable from the row and the clock, with nothing else loaded.

ID

Primary key.

public long ID { get; set; }

Property Value

long

OriginalPlotID

The plot it came off, kept as a label rather than a relation.

public long OriginalPlotID { get; set; }

Property Value

long

Remarks

No foreign key on purpose. The plot is being handed to somebody else and may be claimed, built on and reclaimed again many times over; a cascading key would delete the previous owner's belongings the moment the new one's house was cleared.

StoredAtUtc

When it went into the vault (UTC). The instant the retrieval fee is measured from.

public DateTime StoredAtUtc { get; set; }

Property Value

DateTime

TemplateID

The structure template that was stored.

public int TemplateID { get; set; }

Property Value

int

Remarks

A template rather than a structure row. The structure itself is deleted with the plot it stood on, and its position was relative to a foundation that is no longer the owner's, so there is nothing about the placement worth keeping. What the player is owed back is the thing, not where it used to stand.

Version

Application-level concurrency token. Incremented on every write to detect stale updates.

public long Version { get; set; }

Property Value

long