Execute_ClearAggro
Description
Clears aggro held by BaseObject (Source). Behavior branches on S1:
- S1 == NAME_None → RemoveAggro: clears all aggro entries on Source.
- S1 == "Target" → RemoveAggroForTarget: clears only the entry against NonBaseObject.
- S1 == AggroReason → DecreaseAggroByReason: subtracts the matching Reason bucket across all of Source's entries. F1 > 0 subtracts that amount; F1 <= 0 subtracts INT32_MAX, effectively zeroing the bucket.
"Target" is a literal sentinel string (case-sensitive). It is not an Aggro.json row Id, so there is no collision risk with Reason values.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The Source character whose aggro is being cleared |
| NonBaseObject | Used only when S1 == "Target" (resolved automatically as the opposite of BaseObject) |
| S1 | NAME_None: clear all. "Target": clear only NonBaseObject entry. Else: AggroReason. |
| F1 | When S1 is an AggroReason and F1 > 0, subtract F1 from the matching bucket |
Examples
| Description | BaseObject | Command | S1 | F1 |
|---|---|---|---|---|
| Clear all of Self's aggro entries | Self | ClearAggro | ||
| Clear Self's aggro entry toward NonBaseObject only | Self | ClearAggro | Target | |
| Subtract 20 AttackedByOther aggro from all of Self's entries | Self | ClearAggro | AttackedByOther | 20 |
| Fully clear AttackedByOther reason bucket on all entries | Self | ClearAggro | AttackedByOther |