Class CharacterIncapacitation
Single definition of "this character is incapacitated and may not act or move".
public static class CharacterIncapacitation
- Inheritance
-
CharacterIncapacitation
- Inherited Members
Remarks
IsStunned and IsMesmerized were
SET by StateBuffTemplate and CompositeBuffTemplate and READ BY
NOTHING. A repo-wide sweep found exactly one crowd-control flag with a reader —
IsFrozen, tested by KCCPlayer.OnReplicate and
CharacterStateValidation.CanAct. Every stun and every mesmerize in the game was
therefore purely cosmetic: the target kept casting, kept moving and kept using items for
the buff's whole duration.
The three gates that need this test live in three different assemblies (the KCC movement replicate, the ability controller's manipulation check, and the server's broadcast-handler validation), so the definition lives here rather than being written out three times and drifting. Adding a new crowd-control flag now means editing one method.
Determinism: these flags are written by buff apply/remove, which runs inside the
prediction pipeline before ability activation (BuffController.Order == 85), and are
reconciled with the rest of the buff state. Reading them from a replicate path is the same
thing IsFrozen already does.
Methods
IsIncapacitated(ICharacter)
Returns true when crowd control currently prevents the character from acting.
public static bool IsIncapacitated(ICharacter character)
Parameters
characterICharacterThe character to test.
Returns
- bool
True if the character is frozen, stunned or mesmerized.