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

◆ FindBuffIndex()

int Terraria.NPC.FindBuffIndex ( int type)
inline

Definition at line 86730 of file NPC.cs.

86731 {
86732 if (buffImmune[type])
86733 {
86734 return -1;
86735 }
86736 for (int i = 0; i < maxBuffs; i++)
86737 {
86738 if (buffTime[i] >= 1 && buffType[i] == type)
86739 {
86740 return i;
86741 }
86742 }
86743 return -1;
86744 }
static readonly int maxBuffs
Definition NPC.cs:211
int[] buffTime
Definition NPC.cs:215
int type
Definition NPC.cs:445
bool[] buffImmune
Definition NPC.cs:217
int[] buffType
Definition NPC.cs:213

References System.type.