Table of Contents

Class CharacterItemEntity

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

One item owned by a character, in whichever container currently holds it.

public class CharacterItemEntity : IVersionedEntity
Inheritance
CharacterItemEntity
Implements
Inherited Members

Remarks

Replaces CharacterInventoryEntity, CharacterEquipmentEntity and CharacterBankEntity. See CharacterItemData for why the three were merged: three tables meant three identity sequences, so a row id could not identify an item.

Properties

Amount

Quantity of the item in this slot.

public uint Amount { get; set; }

Property Value

uint

Character

public CharacterEntity Character { get; set; }

Property Value

CharacterEntity

CharacterID

Foreign key to the owning character.

public long CharacterID { get; set; }

Property Value

long

Container

Which of the character's containers holds this item.

public ItemContainerType Container { get; set; }

Property Value

ItemContainerType

Deleted

public bool Deleted { get; set; }

Property Value

bool

ID

Primary key, and the item's durable identity.

public long ID { get; set; }

Property Value

long

Remarks

Database-generated on first insert and returned to the caller, which writes it back onto the runtime item. It survives slot moves and container moves, because Container and Slot are ordinary columns rather than part of the key.

Seed

Randomization seed for item properties.

public int Seed { get; set; }

Property Value

int

Slot

Slot index within Container.

public int Slot { get; set; }

Property Value

int

TemplateID

Template identifier for this item.

public int TemplateID { get; set; }

Property Value

int

TimeCreated

public DateTime TimeCreated { get; set; }

Property Value

DateTime

TimeDeleted

public DateTime? TimeDeleted { get; set; }

Property Value

DateTime?

Version

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

public long Version { get; set; }

Property Value

long