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

◆ UpdateNPC_BuffClearExpiredBuffs()

void Terraria.NPC.UpdateNPC_BuffClearExpiredBuffs ( )
inlineprivate

Definition at line 108973 of file NPC.cs.

108974 {
108975 if (Main.netMode == 1)
108976 {
108977 return;
108978 }
108979 for (int i = 0; i < maxBuffs; i++)
108980 {
108981 if (buffType[i] > 0 && buffTime[i] <= 0)
108982 {
108983 DelBuff(i);
108984 if (Main.netMode == 2)
108985 {
108986 NetMessage.SendData(54, -1, -1, null, whoAmI);
108987 }
108988 }
108989 }
108990 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
static readonly int maxBuffs
Definition NPC.cs:647
int[] buffTime
Definition NPC.cs:651
void DelBuff(int buffIndex)
Removes the buff at the provided index and shuffles the remaining buff indexes down to fill the gap....
Definition NPC.cs:106775
int[] buffType
Definition NPC.cs:649

References Terraria.Main.netMode, and Terraria.NetMessage.SendData().

+ Here is the call graph for this function: