Skip to main content

Interface ICondition

Provides access to conditions (generally player state). You can check whether a player is in combat, mounted, etc.

Assembly: Dalamud.dll
View Source
Declaration
public interface ICondition

Properties

MaxEntries

Gets the current max number of conditions.

View Source
Declaration
int MaxEntries { get; }

Address

Gets the condition array base pointer.

View Source
Declaration
nint Address { get; }

this[int]

Check the value of a specific condition/state flag.

View Source
Declaration
bool this[int flag] { get; }

this[ConditionFlag]

Check the value of a specific condition/state flag.

View Source
Declaration
bool this[ConditionFlag flag] { get; }

Methods

AsReadOnlySet()

Convert the conditions array to a set of all set condition flags.

View Source
Declaration
IReadOnlySet<ConditionFlag> AsReadOnlySet()
Returns

System.Collections.Generic.IReadOnlySet<Dalamud.Game.ClientState.Conditions.ConditionFlag>: Returns a set.### Any() Check if any condition flags are set.

View Source
Declaration
bool Any()
Returns

System.Boolean: Whether any single flag is set.### Any(params ConditionFlag[]) Check if any provided condition flags are set.

View Source
Declaration
bool Any(params ConditionFlag[] flags)
Returns

System.Boolean: Whether any single provided flag is set.

Parameters
TypeNameDescription
Dalamud.Game.ClientState.Conditions.ConditionFlag[]flagsThe condition flags to check.

AnyExcept(params ConditionFlag[])

Check that the specified condition flags are not present in the current conditions.

View Source
Declaration
bool AnyExcept(params ConditionFlag[] except)
Returns

System.Boolean: Returns false if any of the listed conditions are present, true otherwise.

Parameters
TypeNameDescription
Dalamud.Game.ClientState.Conditions.ConditionFlag[]exceptThe array of flags to check.

OnlyAny(params ConditionFlag[])

Check that only any of the condition flags specified are set.

View Source
Declaration
bool OnlyAny(params ConditionFlag[] other)
Returns

System.Boolean: Returns a bool.

Parameters
TypeNameDescription
Dalamud.Game.ClientState.Conditions.ConditionFlag[]otherThe array of flags to check.

EqualTo(params ConditionFlag[])

Check that only the specified flags are set. Unlike Dalamud.Plugin.Services.ICondition.OnlyAny(Dalamud.Game.ClientState.Conditions.ConditionFlag%5b%5d), this method requires that all the specified flags are set and no others are present.

View Source
Declaration
bool EqualTo(params ConditionFlag[] other)
Returns

System.Boolean: Returns a bool.

Parameters
TypeNameDescription
Dalamud.Game.ClientState.Conditions.ConditionFlag[]otherThe array of flags to check.

Events

ConditionChange

Event that gets fired when a condition is set. Should only get fired for actual changes, so the previous value will always be !value.

View Source
Declaration
event ICondition.ConditionChangeDelegate? ConditionChange
Event Type

Dalamud.Plugin.Services.ICondition.ConditionChangeDelegate