Table of Contents

Struct CharacterData

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

Character data transfer object.

public struct CharacterData : IVersioned<CharacterData>
Implements
Inherited Members
Extension Methods

Constructors

CharacterData(long, string, string, string, bool, long, string, long, string, float, float, float, long, float, float, float, float, float, float, float, int, int, float, float, float, float, float, float, float, byte, bool, int, long, DateTime, DateTime)

Initializes a new instance of the CharacterData struct.

public CharacterData(long id, string name, string nameLowercase, string account, bool selected, long worldServerID, string sceneName, long sceneHandle, string bindScene, float bindX, float bindY, float bindZ, long instanceID, float instanceX, float instanceY, float instanceZ, float instanceRotX, float instanceRotY, float instanceRotZ, float instanceRotW, int raceID, int modelIndex, float x, float y, float z, float rotX, float rotY, float rotZ, float rotW, byte accessLevel, bool online, int flags, long version, DateTime timeCreated, DateTime lastSaved)

Parameters

id long
name string
nameLowercase string
account string
selected bool
worldServerID long
sceneName string
sceneHandle long
bindScene string
bindX float
bindY float
bindZ float
instanceID long
instanceX float
instanceY float
instanceZ float
instanceRotX float
instanceRotY float
instanceRotZ float
instanceRotW float
raceID int
modelIndex int
x float
y float
z float
rotX float
rotY float
rotZ float
rotW float
accessLevel byte
online bool
flags int
version long
timeCreated DateTime
lastSaved DateTime

Fields

AccessLevel

Access level for permissions.

public readonly byte AccessLevel

Field Value

byte

Account

Account name that owns this character.

public readonly string Account

Field Value

string

BindScene

Bind point scene name.

public readonly string BindScene

Field Value

string

BindX

Bind point position X.

public readonly float BindX

Field Value

float

BindY

Bind point position Y.

public readonly float BindY

Field Value

float

BindZ

Bind point position Z.

public readonly float BindZ

Field Value

float

Flags

Character state flags.

public readonly int Flags

Field Value

int

ID

Primary key.

public readonly long ID

Field Value

long

InstanceID

Instance ID (0 if over-world).

public readonly long InstanceID

Field Value

long

InstanceRotW

Instance spawn rotation W.

public readonly float InstanceRotW

Field Value

float

InstanceRotX

Instance spawn rotation X.

public readonly float InstanceRotX

Field Value

float

InstanceRotY

Instance spawn rotation Y.

public readonly float InstanceRotY

Field Value

float

InstanceRotZ

Instance spawn rotation Z.

public readonly float InstanceRotZ

Field Value

float

InstanceX

Instance spawn position X.

public readonly float InstanceX

Field Value

float

InstanceY

Instance spawn position Y.

public readonly float InstanceY

Field Value

float

InstanceZ

Instance spawn position Z.

public readonly float InstanceZ

Field Value

float

LastSaved

Timestamp of last save.

public readonly DateTime LastSaved

Field Value

DateTime

ModelIndex

Character model index.

public readonly int ModelIndex

Field Value

int

Name

Character display name.

public readonly string Name

Field Value

string

NameLowercase

Lowercase copy of name for lookups.

public readonly string NameLowercase

Field Value

string

Online

Whether the character is currently online.

public readonly bool Online

Field Value

bool

RaceID

Character race template ID.

public readonly int RaceID

Field Value

int

RotW

World rotation W.

public readonly float RotW

Field Value

float

RotX

World rotation X.

public readonly float RotX

Field Value

float

RotY

World rotation Y.

public readonly float RotY

Field Value

float

RotZ

World rotation Z.

public readonly float RotZ

Field Value

float

SceneHandle

Current scene handle.

public readonly long SceneHandle

Field Value

long

SceneName

Current scene name.

public readonly string SceneName

Field Value

string

Selected

Whether this is the active character.

public readonly bool Selected

Field Value

bool

TimeCreated

Timestamp when character was created.

public readonly DateTime TimeCreated

Field Value

DateTime

Version

Optimistic concurrency version.

public readonly long Version

Field Value

long

WorldServerID

World server ID this character belongs to.

public readonly long WorldServerID

Field Value

long

X

World position X.

public readonly float X

Field Value

float

Y

World position Y.

public readonly float Y

Field Value

float

Z

World position Z.

public readonly float Z

Field Value

float

Methods

WithFlagsVersionAndTimestamp(int, long, DateTime)

public CharacterData WithFlagsVersionAndTimestamp(int flags, long version, DateTime lastSaved)

Parameters

flags int
version long
lastSaved DateTime

Returns

CharacterData

WithVersion(long)

Returns a new instance of this DTO with the specified version. Used by extension methods to create incremented copies.

public CharacterData WithVersion(long newVersion)

Parameters

newVersion long

The new version value.

Returns

CharacterData

A new instance with the updated version.