Skip to main content

CAI_CitadelNPC

A Deadlock NPC. Every CAI_BaseNPC the game spawns is one.

public class CAI_CitadelNPC : CAI_BaseNPC

Namespace: DeadworksManaged.Api
Inherits / implements: CAI_BaseNPC
Derived types: CCitadelPlayerBotNPCBrain, CNPC_Trooper
Source: Entities/CAI_CitadelNPC.cs#L8

Properties​

CAI_CitadelNPC.AbilityComponent​

The NPC's abilities.

Signature

public CCitadelAbilityComponent AbilityComponent { get; }

Source: Entities/CAI_CitadelNPC.cs#L17

CAI_CitadelNPC.OwningAbility​

Ability that spawned this summon. Null for map NPCs.

Signature

public CCitadelBaseAbility? OwningAbility { get; }

Source: Entities/CAI_CitadelNPC.cs#L20

CAI_CitadelNPC.IsMinion​

True for a hero's minion. See SetMinion.

Signature

public bool IsMinion { get; }

Source: Entities/CAI_CitadelNPC.cs#L29

CAI_CitadelNPC.Summoner​

Entity the NPC works for: the one set with SetSummoner, else the owner of OwningAbility. Null for map NPCs.

Signature

public CBaseEntity? Summoner { get; }

Source: Entities/CAI_CitadelNPC.cs#L39

Methods​

CAI_CitadelNPC.SetMinion()​

Makes the NPC a hero's minion, like Graves's skeletons, or a normal NPC again.

Signature

public void SetMinion(bool minion)

Notes A minion's damage and kills count for its living Summoner. Minions also attack neutral creeps.

Source: Entities/CAI_CitadelNPC.cs#L33

CAI_CitadelNPC.SetSummoner()​

Sets the entity the NPC works for, usually a hero pawn. Null clears it.

Signature

public void SetSummoner(CBaseEntity? summoner)

Notes Minions are removed with the summoner's pawn, for example on a hero swap. They survive the hero's death.

Source: Entities/CAI_CitadelNPC.cs#L48