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

◆ ClearBuff()

void Terraria.Player.ClearBuff ( int type)
inline

Removes the provided buff type from the player and shuffles the remaining buff indexes down to fill the gap. Use M:Terraria.Player.DelBuff(System.Int32) if you only know the buff index.

Parameters
typeThe buff type

Definition at line 5893 of file Player.cs.

5894 {
5895 if (type == 0)
5896 {
5897 return;
5898 }
5899 for (int i = 0; i < maxBuffs; i++)
5900 {
5901 if (buffType[i] == type)
5902 {
5903 DelBuff(i);
5904 }
5905 }
5906 }
int[] buffType
The T:Terraria.ID.BuffIDs of all buffs this player has active. A value of 0 means that buff slot is...
Definition Player.cs:1684
static int maxBuffs
Definition Player.cs:3380
void DelBuff(int b)
Removes the buff at the provided index in F:Terraria.Player.buffType and F:Terraria....
Definition Player.cs:5868

References Terraria.Player.buffType, Terraria.Player.DelBuff(), and Terraria.Player.maxBuffs.

Referenced by Terraria.Player.ProcessHitAgainstNPC(), Terraria.Player.ShimmerUnstuck(), Terraria.Player.Teleport(), Terraria.Player.ToggleLight(), Terraria.Player.TogglePet(), and Terraria.Player.Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: