Class CanUseItemCondition
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
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
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 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.