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

◆ TryRemovingBuff()

static void Terraria.Main.TryRemovingBuff ( int i,
int b )
inlinestatic

Calls Player.DelBuff with index i after checking Main.debuff of buff type b. Will toggle Player.hideMisc for pet and light pet.

Parameters
iThe index for buffType and buffTime
bThe buff type

Definition at line 56012 of file Main.cs.

56013 {
56014 bool flag = false;
56015 if (!debuff[b] && b != 60 && b != 151)
56016 {
56017 if (player[myPlayer].mount.Active && player[myPlayer].mount.CheckBuff(b))
56018 {
56019 player[myPlayer].mount.Dismount(player[myPlayer]);
56020 flag = true;
56021 }
56025 if (!flag)
56026 {
56027 player[myPlayer].DelBuff(i);
56028 }
56029 }
56030 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static void TryRemovingBuff_CheckBuffHideMisc(int slot, int buffID)
Definition Main.cs:56032
static Player[] player
Definition Main.cs:1960
static bool[] debuff
Categorizes status effects for which this is set to true as being debuffs instead of buffs....
Definition Main.cs:844

References Terraria.Main.debuff, Terraria.Main.myPlayer, Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), and Terraria.Main.TryRemovingBuff_CheckBuffHideMisc().

Referenced by Terraria.Main.DrawBuffIcon().

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