Table of Contents

Interface IAchievementController

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

Interface for a character's achievement controller, handling achievement progress, queries, and related events.

public interface IAchievementController : ICharacterBehaviour
Inherited Members

Fields

OnCompleteAchievement

Static event triggered when an achievement is completed (all tiers for a template are reached).

Parameters: ICharacter (the character), AchievementTemplate (the template), AchievementTier (the completed tier).

public static Action<ICharacter, AchievementTemplate, AchievementTier> OnCompleteAchievement

Field Value

Action<ICharacter, AchievementTemplate, AchievementTier>

OnUpdateAchievement

Static event triggered when an achievement is updated (progress or tier changes).

Parameters: ICharacter (the character), Achievement (the updated achievement).

public static Action<ICharacter, Achievement> OnUpdateAchievement

Field Value

Action<ICharacter, Achievement>

Properties

Achievements

Dictionary of all achievements for the character, indexed by template ID.

Dictionary<int, Achievement> Achievements { get; }

Property Value

Dictionary<int, Achievement>

Methods

Increment(AchievementTemplate, uint)

Increments the progress of an achievement by a specified amount, handling tier advancement and rewards.

void Increment(AchievementTemplate template, uint amount)

Parameters

template AchievementTemplate

The achievement template to increment.

amount uint

The amount to increment the achievement's value by.

Increment(int, uint)

Increments the progress of an achievement by template ID, handling tier advancement and rewards.

void Increment(int templateID, uint amount)

Parameters

templateID int

The template ID of the achievement.

amount uint

The amount to increment the achievement's value by.

SetAchievement(int, byte, uint, bool)

Sets the achievement progress for a given template ID, tier, and value.

void SetAchievement(int templateID, byte tier, uint value, bool skipEvent = false)

Parameters

templateID int

The template ID of the achievement.

tier byte

The tier to set.

value uint

The value to set.

skipEvent bool

If true, does not trigger the update event.

TryGetAchievement(int, out Achievement)

Attempts to get an achievement by template ID.

bool TryGetAchievement(int templateID, out Achievement achievement)

Parameters

templateID int

The template ID to look up.

achievement Achievement

The resulting achievement if found.

Returns

bool

True if the achievement exists, false otherwise.