Table of Contents

Struct CharacterPetBuffData

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

Character pet buff data transfer object.

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

Remarks

Field-for-field the same shape as CharacterBuffData, and deliberately so: a pet's buffs are ordinary buffs on an ordinary IBuffController, snapshotted and restored by the same conversion the owner's buffs go through. The previous shape carried only Level and BuffTimeEnd, which the service then wrote into the stacks and remaining_time columns under different names while hard-coding tick_time and tick_count to zero — so a restored damage-over-time effect lost both its tick schedule and its accumulated tick count.

Constructors

CharacterPetBuffData(long, long, int, double, double, int, int)

public CharacterPetBuffData(long id, long characterID, int templateID, double remainingTime, double tickTime, int stacks, int tickCount)

Parameters

id long
characterID long
templateID int
remainingTime double
tickTime double
stacks int
tickCount int

CharacterPetBuffData(long, long, long, int, double, double, int, int)

public CharacterPetBuffData(long id, long version, long characterID, int templateID, double remainingTime, double tickTime, int stacks, int tickCount)

Parameters

id long
version long
characterID long
templateID int
remainingTime double
tickTime double
stacks int
tickCount int

Fields

CharacterID

Character that owns the pet carrying this buff.

public readonly long CharacterID

Field Value

long

ID

Primary key.

public readonly long ID

Field Value

long

RemainingTime

Remaining buff duration, in seconds.

public readonly double RemainingTime

Field Value

double

Stacks

Number of buff stacks.

public readonly int Stacks

Field Value

int

TemplateID

Buff template ID.

public readonly int TemplateID

Field Value

int

TickCount

Number of ticks that have fired for this buff instance (cumulative tick modifiers). Persisted so cumulative effects (DoT stacking) survive a despawn.

public readonly int TickCount

Field Value

int

TickTime

Seconds until this buff's next periodic tick.

public readonly double TickTime

Field Value

double

Version

Optimistic concurrency version.

public readonly long Version

Field Value

long

Methods

WithVersion(long)

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

public CharacterPetBuffData WithVersion(long newVersion)

Parameters

newVersion long

The new version value.

Returns

CharacterPetBuffData

A new instance with the updated version.