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

◆ AddBuff_RemoveOldPetBuffsOfMatchingType()

void Terraria.Player.AddBuff_RemoveOldPetBuffsOfMatchingType ( int type)
inlineprivate

Definition at line 5787 of file Player.cs.

5788 {
5789 if (Main.lightPet[type])
5790 {
5791 for (int i = 0; i < maxBuffs; i++)
5792 {
5793 if (Main.lightPet[buffType[i]])
5794 {
5795 DelBuff(i);
5796 }
5797 }
5798 }
5799 if (!Main.vanityPet[type])
5800 {
5801 return;
5802 }
5803 for (int j = 0; j < maxBuffs; j++)
5804 {
5805 if (Main.vanityPet[buffType[j]])
5806 {
5807 DelBuff(j);
5808 }
5809 }
5810 }
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(), Terraria.Main.lightPet, Terraria.Player.maxBuffs, and Terraria.Main.vanityPet.

Referenced by Terraria.Player.AddBuff().

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