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

◆ TryGetBuffTime()

static bool Terraria.Main.TryGetBuffTime ( int buffSlotOnPlayer,
out int buffTimeValue )
inlinestatic

Checks if the buff at index buffSlotOnPlayer is allowed to draw a "remaining time" text, and sets buffTimeValue to it.

Check buffTimeValue > 2 afterwards if you want to mirror text draw logic.

Parameters
buffSlotOnPlayerThe index for buffType and buffTime
buffTimeValueThe "remaining time" in ticks
Returns
true if buffTimeValue is set, otherwise false

Definition at line 55877 of file Main.cs.

55878 {
55879 int num = player[myPlayer].buffType[buffSlotOnPlayer];
55880 buffTimeValue = 0;
55881 if (!vanityPet[num] && !lightPet[num] && !buffNoTimeDisplay[num] && (!player[myPlayer].honeyWet || num != 48) && (!player[myPlayer].wet || !expertMode || num != 46))
55882 {
55884 return true;
55885 }
55886 return false;
55887 }
static bool[] vanityPet
Categorizes status effects for which this is set to true as being from vanity pets,...
Definition Main.cs:822
static bool[] buffNoTimeDisplay
Prevents status effects which have their entries set to true from displaying the amount of time they ...
Definition Main.cs:857
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 bool expertMode
Definition Main.cs:2898
static bool[] lightPet
Categorizes status effects for which this is set to true as being tied to a light pet,...
Definition Main.cs:828
static Player[] player
Definition Main.cs:1960

References Terraria.Main.buffNoTimeDisplay, Terraria.Main.expertMode, Terraria.Main.lightPet, Terraria.Main.myPlayer, Terraria.Main.player, and Terraria.Main.vanityPet.

Referenced by Terraria.Main.DrawBuffIcon().

+ Here is the caller graph for this function: