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

◆ IsNPCActiveAndOneOfTypes()

static bool Terraria.Main.IsNPCActiveAndOneOfTypes ( int npcIndex,
params int[] types )
inlinestatic

Definition at line 16885 of file Main.cs.

16886 {
16887 if (npcIndex < 0)
16888 {
16889 return false;
16890 }
16891 NPC nPC = npc[npcIndex];
16892 if (!nPC.active)
16893 {
16894 return false;
16895 }
16896 for (int i = 0; i < types.Length; i++)
16897 {
16898 if (nPC.type == types[i])
16899 {
16900 return true;
16901 }
16902 }
16903 return false;
16904 }
static NPC[] npc
Definition Main.cs:1685

References System.Text.RegularExpressions.i, and Terraria.Main.npc.

Referenced by Terraria.Main.CheckBossIndexes().