One rule of a ContextualSituation: a list of conditions
and up to one action of each kind. A rule triggers audio, animation or situation events.
It runs unconditionally when the situation occurs, or only when its mConditions pass.
The conditions are listed on the IContextualCondition
page.
Each action kind picks its own rule from the situation
(ContextualSituation describes the choice). For one kind,
a rule is valid when all of these hold:
- The rule has an action of that kind.
- The action has not reached its play limit (
ContextualActionPlayAudio.mMaxOccurences).
Only audio actions have a limit.
- The conditions pass, combined by
mConditionRelationship.
Voice line gates
After the client picks a rule for the audio action, it checks these gates in order. A
rule whose ActiveVoiceOver is false skips all of them.
- While the unit is paired with another unit for a voice exchange (from
MarkerTriggeredNearby), the rule fails.
- If
CanStompSelf is false and the line of this rule is playing, the rule fails.
- Priority: see below.
- Shared cooldown: unless the rule sets
mOverrideCacCooldown or
CooldownModifications.IgnoreTimer, the rule fails while the unit's timer shows
ContextualActionData.mCooldown seconds or less.
If the chosen rule fails a gate, the situation plays no voice line.
Priority and stomping
mPriority does not choose between rules, and it does not choose between situations. It
decides whether a new voice line may stomp (interrupt) the line that plays on the
unit:
When the audio action of the chosen rule sets mWaitForAnnouncerQueue, the client first
removes every queued line whose rule priority is not higher than this rule's priority.
A stomped line counts as ended for the situation cooldown.
Cooldown overrides
mOverrideCacCooldown and ContextualActionCooldownModifications
change how the rule interacts with the shared cooldown of
ContextualActionData. A per-rule cooldown is a
condition: ContextualConditionRuleCooldown.
Examples: - mRuleName: string = "Q - Cast"