TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ TryGetGlobalNPC< T >() [1/2]

bool Terraria.NPC.TryGetGlobalNPC< T > ( out T result)
inline

Gets the instance of the specified GlobalNPC type.

Type Constraints
T :GlobalNPC 

Definition at line 112491 of file NPC.cs.

112491 : GlobalNPC
112492 {
112493 return GlobalType<GlobalNPC>.TryGetGlobal<T>(type, EntityGlobals, out result);
112494 }
This class allows you to modify and use hooks for all NPCs, including vanilla mobs....
Definition GlobalNPC.cs:19
RefReadOnlyArray< GlobalNPC > EntityGlobals
Definition NPC.cs:1575
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990