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

◆ FindBuffIndex()

int Terraria.Player.FindBuffIndex ( int type)
inline

Definition at line 4425 of file Player.cs.

4426 {
4427 if (buffImmune[type])
4428 {
4429 return -1;
4430 }
4431 for (int i = 0; i < maxBuffs; i++)
4432 {
4433 if (buffTime[i] >= 1 && buffType[i] == type)
4434 {
4435 return i;
4436 }
4437 }
4438 return -1;
4439 }
bool[] buffImmune
Definition Player.cs:1197
static readonly int maxBuffs
Definition Player.cs:1191

References Terraria.Player.buffImmune, Terraria.Player.buffTime, Terraria.Player.buffType, Terraria.Player.maxBuffs, and System.type.

Referenced by Terraria.Projectile.AI_111_DryadsWard(), Terraria.NPC.AI_123_Deerclops(), and Terraria.Player.UpdateBuffs().