Skip to main content

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

ParameterDescription
BaseObjectThe Source character whose aggro is being cleared
NonBaseObjectUsed only when S1 == "Target" (resolved automatically as the opposite of BaseObject)
S1NAME_None: clear all. "Target": clear only NonBaseObject entry. Else: AggroReason.
F1When S1 is an AggroReason and F1 > 0, subtract F1 from the matching bucket

Examples

DescriptionBaseObjectCommandS1F1
Clear all of Self's aggro entriesSelfClearAggro
Clear Self's aggro entry toward NonBaseObject onlySelfClearAggroTarget
Subtract 20 AttackedByOther aggro from all of Self's entriesSelfClearAggroAttackedByOther20
Fully clear AttackedByOther reason bucket on all entriesSelfClearAggroAttackedByOther