Interface IArchetypeController
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
PersistenceDirty
Whether the archetype has changed since the database last confirmed it.
bool PersistenceDirty { get; }
Property Value
Template
The archetype template currently assigned to this character.
ArchetypeTemplate Template { get; }
Property Value
Version
Persistence version of the archetype row. See ArchetypeController.Version.
long Version { get; set; }
Property Value
Methods
MarkPersisted(long)
Clears the dirty mark if nothing has changed since the confirmed snapshot was taken.
void MarkPersisted(long persistedVersion)
Parameters
persistedVersionlong
Restore(int, long)
Installs a persisted archetype without events or dirtying — the load path.
void Restore(int templateID, long version)
Parameters
SetArchetype(ArchetypeTemplate)
Sets the character's archetype by template reference.
void SetArchetype(ArchetypeTemplate template)
Parameters
templateArchetypeTemplateThe 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
templateIDintThe 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