Anvil
Anvil.API.ObjectExtensions Class Reference

Static Public Member Functions

static bool IsLoginPlayerCharacter (this NwObject? gameObject, [NotNullWhen(true)] out NwPlayer? player)
 Gets if this object is a player character/DM avatar.
If this object is not a NwCreature, this returns false.
If this creature is a NPC or familiar, regardless of possession, this will return false. More...
 
static bool IsPlayerControlled (this NwObject? gameObject, [NotNullWhen(true)] out NwPlayer? player)
 Gets if this object is a NwCreature currently being controlled by a player/DM.
If this creature is a possessed familiar or is DM possessed, this returns true.
If this object is not a NwCreature, this returns false.
If this creature is a player creature (the creature a played logged in with), but the player is possessing another creature, this returns false.
If no player is controlling this creature, this returns false. More...
 

Member Function Documentation

◆ IsLoginPlayerCharacter()

static bool Anvil.API.ObjectExtensions.IsLoginPlayerCharacter ( this NwObject gameObject,
[NotNullWhen(true)] out NwPlayer player 
)
inlinestatic

Gets if this object is a player character/DM avatar.
If this object is not a NwCreature, this returns false.
If this creature is a NPC or familiar, regardless of possession, this will return false.

◆ IsPlayerControlled()

static bool Anvil.API.ObjectExtensions.IsPlayerControlled ( this NwObject gameObject,
[NotNullWhen(true)] out NwPlayer player 
)
inlinestatic

Gets if this object is a NwCreature currently being controlled by a player/DM.
If this creature is a possessed familiar or is DM possessed, this returns true.
If this object is not a NwCreature, this returns false.
If this creature is a player creature (the creature a played logged in with), but the player is possessing another creature, this returns false.
If no player is controlling this creature, this returns false.


The documentation for this class was generated from the following file: