Table of Contents

Class CharacterEntity

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

Database entity representing a player character.

public class CharacterEntity : IVersionedEntity
Inheritance
CharacterEntity
Implements
Inherited Members

Properties

Abilities

Navigation collection of character ability entries.

public ICollection<CharacterAbilityEntity> Abilities { get; set; }

Property Value

ICollection<CharacterAbilityEntity>

AccessLevel

Access level / permission tier for this character.

public byte AccessLevel { get; set; }

Property Value

byte

Account

Account name that owns this character.

public string Account { get; set; }

Property Value

string

Achievements

Navigation collection of character achievements.

public ICollection<CharacterAchievementEntity> Achievements { get; set; }

Property Value

ICollection<CharacterAchievementEntity>

Archetypes

Navigation collection of character archetype entries.

public ICollection<CharacterArchetypeEntity> Archetypes { get; set; }

Property Value

ICollection<CharacterArchetypeEntity>

Attributes

Navigation collection of character attribute entries.

public ICollection<CharacterAttributeEntity> Attributes { get; set; }

Property Value

ICollection<CharacterAttributeEntity>

BindScene

Bind point scene name.

public string BindScene { get; set; }

Property Value

string

BindX

Bind point world position X. Uses float for Unity Vector3 compatibility.

public float BindX { get; set; }

Property Value

float

BindY

Bind point world position Y.

public float BindY { get; set; }

Property Value

float

BindZ

Bind point world position Z.

public float BindZ { get; set; }

Property Value

float

Buffs

Navigation collection of active character buffs.

public ICollection<CharacterBuffEntity> Buffs { get; set; }

Property Value

ICollection<CharacterBuffEntity>

Deleted

Soft delete flag.

public bool Deleted { get; set; }

Property Value

bool

Faction

Navigation collection of character faction standings.

public ICollection<CharacterFactionEntity> Faction { get; set; }

Property Value

ICollection<CharacterFactionEntity>

Flags

Character flags bitmask (e.g. for status effects or customization flags).

public int Flags { get; set; }

Property Value

int

Friends

Navigation collection of character friend entries.

public ICollection<CharacterFriendEntity> Friends { get; set; }

Property Value

ICollection<CharacterFriendEntity>

Guild

Navigation reference to the guild membership record.

public CharacterGuildEntity Guild { get; set; }

Property Value

CharacterGuildEntity

ID

Primary key.

public long ID { get; set; }

Property Value

long

InstanceID

Instance ID of the current instance the character occupies (0 if over-world).

public long InstanceID { get; set; }

Property Value

long

InstanceRotW

Instance spawn rotation W component (quaternion).

public float InstanceRotW { get; set; }

Property Value

float

InstanceRotX

Instance spawn rotation X component.

public float InstanceRotX { get; set; }

Property Value

float

InstanceRotY

Instance spawn rotation Y component.

public float InstanceRotY { get; set; }

Property Value

float

InstanceRotZ

Instance spawn rotation Z component.

public float InstanceRotZ { get; set; }

Property Value

float

InstanceX

Instance spawn position X. Uses float for Unity Vector3 compatibility.

public float InstanceX { get; set; }

Property Value

float

InstanceY

Instance spawn position Y.

public float InstanceY { get; set; }

Property Value

float

InstanceZ

Instance spawn position Z.

public float InstanceZ { get; set; }

Property Value

float

ItemCooldowns

Navigation collection of character item cooldowns.

public ICollection<CharacterItemCooldownEntity> ItemCooldowns { get; set; }

Property Value

ICollection<CharacterItemCooldownEntity>

Items

Navigation collection of every item this character owns, across all containers.

public ICollection<CharacterItemEntity> Items { get; set; }

Property Value

ICollection<CharacterItemEntity>

Remarks

Replaces the separate Inventory, Equipment and Bank collections; the container an item sits in is now a column on the row rather than a choice of table.

KnownAbilities

Navigation collection of character known ability entries.

public ICollection<CharacterKnownAbilityEntity> KnownAbilities { get; set; }

Property Value

ICollection<CharacterKnownAbilityEntity>

LastChannelSwitchUtc

When this character last switched open-world channel (UTC), or MinValue if it never has.

public DateTime LastChannelSwitchUtc { get; set; }

Property Value

DateTime

Remarks

Persisted rather than held in memory because a channel switch is implemented as a disconnect: the character is released here and re-routed by the world server, quite possibly to a different scene server. Any cooldown kept per connection — or even per process — is therefore reset by the very act it is meant to limit, and only ever throttles switches that failed. This is the only place the limit can live and still mean anything.

LastSaved

Timestamp of the last save operation (UTC).

public DateTime LastSaved { get; set; }

Property Value

DateTime

Level

Character level.

public int Level { get; set; }

Property Value

int

Remarks

This column is the AUTHORITATIVE home of a character's level, and it is new.

Before it, level did not exist anywhere in FishMMO: no column, no attribute template, no experience curve, no UI. The guild roster's level column (AREAS E2) could therefore not be "joined to wherever level is authoritative", because there was nowhere to join to — so a home was made here, on the character row, next to RaceID, which is the other per-character fact the roster reads.

It is deliberately NOT a denormalised copy of anything: there is no other store to drift from. Until a progression system exists to write it, every character reads back the default of 1, and the roster renders 1. That is a truthful "no progression yet", not a stale cache.

ModelIndex

Character model/prefab index.

public int ModelIndex { get; set; }

Property Value

int

Name

Character display name.

public string Name { get; set; }

Property Value

string

Remarks

[COLLATE NOCASE for case insensitive compare. this way we can't both create 'Archer' and 'archer' as characters] note: the collation has been added in the DbContext OnModelCreating function since the Postgres provider doesn't support collations via attributes

NameLowercase

Lowercase copy of Name for case-insensitive lookups.

public string NameLowercase { get; set; }

Property Value

string

Party

Navigation reference to the party membership record.

public CharacterPartyEntity Party { get; set; }

Property Value

CharacterPartyEntity

Pet

Navigation reference to the character's pet.

public CharacterPetEntity Pet { get; set; }

Property Value

CharacterPetEntity

PetBuffs

Navigation collection of pet buff entries.

public ICollection<CharacterPetBuffEntity> PetBuffs { get; set; }

Property Value

ICollection<CharacterPetBuffEntity>

Quests

Navigation collection of character quest progress entries.

public ICollection<CharacterQuestEntity> Quests { get; set; }

Property Value

ICollection<CharacterQuestEntity>

RaceID

Character race template ID.

public int RaceID { get; set; }

Property Value

int

RotW

Current rotation W component (quaternion).

public float RotW { get; set; }

Property Value

float

RotX

Current rotation X component.

public float RotX { get; set; }

Property Value

float

RotY

Current rotation Y component.

public float RotY { get; set; }

Property Value

float

RotZ

Current rotation Z component.

public float RotZ { get; set; }

Property Value

float

SceneHandle

Current scene handle the character is in.

public long SceneHandle { get; set; }

Property Value

long

SceneName

Current scene name the character is in.

public string SceneName { get; set; }

Property Value

string

Selected

Whether this character is the currently selected/active character for the account.

public bool Selected { get; set; }

Property Value

bool

SessionLeaseExpiresUtc

Lease expiry timestamp for dead-server recovery. A server should extend this periodically while it still owns the character.

public DateTime SessionLeaseExpiresUtc { get; set; }

Property Value

DateTime

SessionOwnerServerId

Current owning Scene Server instance ID (0 means unowned).

public long SessionOwnerServerId { get; set; }

Property Value

long

SessionOwnerToken

Ownership token that changes every successful claim (Guid.Empty means unowned). Used to prevent stale releases/transitions.

public Guid SessionOwnerToken { get; set; }

Property Value

Guid

SessionState

Distributed session state used to coordinate ownership/claims across servers.

public CharacterSessionState SessionState { get; set; }

Property Value

CharacterSessionState

Skills

Navigation collection of character skill entries.

public ICollection<CharacterSkillEntity> Skills { get; set; }

Property Value

ICollection<CharacterSkillEntity>

TimeCreated

Row creation timestamp (UTC).

public DateTime TimeCreated { get; set; }

Property Value

DateTime

TimeDeleted

Timestamp when the character was soft-deleted (UTC), or null if not deleted.

public DateTime? TimeDeleted { get; set; }

Property Value

DateTime?

Version

Concurrency version for optimistic locking.

public long Version { get; set; }

Property Value

long

WorldServerID

World server ID this character belongs to.

public long WorldServerID { get; set; }

Property Value

long

X

Current world position X. Uses float for direct compatibility with Unity's Vector3. Precision is approximately 1.5 cm at 10 km from origin; suitable for most game worlds but may exhibit jitter past ~100 km.

public float X { get; set; }

Property Value

float

Y

Current world position Y.

public float Y { get; set; }

Property Value

float

Z

Current world position Z.

public float Z { get; set; }

Property Value

float