Table of Contents

Class HasEquippedItemCondition

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Condition that checks if the character (initiator or event target) has a specific item equipped in a given slot. Requires an ItemEventData in the EventData, or checks by EquippableItemTemplate and slot.

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

Fields

ItemTemplate

The item template to check for. Can be set in the inspector for a hardcoded condition.

public EquippableItemTemplate ItemTemplate

Field Value

EquippableItemTemplate

Methods

Evaluate(ICharacter, EventData)

Evaluates whether the character (or event target) has a specific item equipped in a given slot.

public override bool Evaluate(ICharacter initiator, EventData eventData = null)

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 item or slot to check.

Returns

bool

True if the item is equipped in the specified slot; otherwise, false.

Remarks

This method determines the character and slot/item to check, using event data if available. It then checks if the equipment controller has the item equipped in the slot.