Table of Contents

Interface IArchetypeController

Namespace
FishMMO.Shared.Core
Assembly
FishMMO.Shared.dll

Interface for a character's archetype controller, providing access to the current archetype template and events for archetype changes.

public interface IArchetypeController : ICharacterBehaviour
Inherited Members

Properties

OnArchetypeChangeTriggers

Triggers invoked when the character's archetype changes.

List<Trigger> OnArchetypeChangeTriggers { get; }

Property Value

List<Trigger>

PersistenceDirty

Whether the archetype has changed since the database last confirmed it.

bool PersistenceDirty { get; }

Property Value

bool

Template

The archetype template currently assigned to this character.

ArchetypeTemplate Template { get; }

Property Value

ArchetypeTemplate

Version

Persistence version of the archetype row. See ArchetypeController.Version.

long Version { get; set; }

Property Value

long

Methods

MarkPersisted(long)

Clears the dirty mark if nothing has changed since the confirmed snapshot was taken.

void MarkPersisted(long persistedVersion)

Parameters

persistedVersion long

Restore(int, long)

Installs a persisted archetype without events or dirtying — the load path.

void Restore(int templateID, long version)

Parameters

templateID int
version long

SetArchetype(ArchetypeTemplate)

Sets the character's archetype by template reference.

void SetArchetype(ArchetypeTemplate template)

Parameters

template ArchetypeTemplate

The archetype template to assign.

SetArchetype(int)

Sets the character's archetype by template ID. Looks up the template from the cache and assigns it.

void SetArchetype(int templateID)

Parameters

templateID int

The cached ID of the archetype template to assign.

Events

OnArchetypeChanged

Event triggered when the character's archetype changes. Provides the old and new archetype templates. The old template may be null if no archetype was previously assigned.

event Action<ArchetypeTemplate, ArchetypeTemplate> OnArchetypeChanged

Event Type

Action<ArchetypeTemplate, ArchetypeTemplate>