Table of Contents

Class CanUseItemCondition

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Condition that checks if a character can use a specific item (i.e., possesses it in their inventory).

[Serializable]
public class CanUseItemCondition : BaseCondition, ICondition
Inheritance
CanUseItemCondition
Implements
Inherited Members

Fields

RequiredItem

The item template required for this condition to pass.

public BaseItemTemplate RequiredItem

Field Value

BaseItemTemplate

Methods

Evaluate(ICharacter, EventData)

Evaluates whether the character (or event target) can use the specified item.

public override bool Evaluate(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character to check, or the fallback if no event target is present.

eventData EventData

Optional event data that may provide a different character to check.

Returns

bool

True if the character has the required item in their inventory; otherwise, false.

Remarks

This method currently only checks for item presence in the inventory. Additional checks (e.g., cooldowns, requirements) can be added.