Class HasInventoryItemCondition
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
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
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
initiatorICharacterThe character to check, or the fallback if no event target is present.
eventDataEventDataOptional 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.