Table of Contents

Class HasInventoryItemCondition

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Condition that checks if a character has a required amount of each specified item in their inventory.

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

Fields

RequiredAmount

The minimum amount required for each item.

public int RequiredAmount

Field Value

int

RequiredItems

The list of item templates that must be present in the inventory. All items listed must be present in the required amount.

[Tooltip("All items listed must be present in the required amount.")]
public BaseItemTemplate[] RequiredItems

Field Value

BaseItemTemplate[]

Methods

Evaluate(ICharacter, EventData)

Evaluates whether the character (or event target) has the required amount of each specified item in their inventory.

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 amount of each item; otherwise, false.