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

◆ DrawInterface_Resources_Buffs()

void Terraria.Main.DrawInterface_Resources_Buffs ( )
inline

Definition at line 55791 of file Main.cs.

55792 {
55793 recBigList = false;
55794 int num = -1;
55795 int num2 = 11;
55796 for (int i = 0; i < Player.maxBuffs; i++)
55797 {
55798 if (player[myPlayer].buffType[i] > 0)
55799 {
55800 _ = player[myPlayer].buffType[i];
55801 int x = 32 + i * 38;
55802 int num3 = 76;
55803 int num4 = i;
55804 while (num4 >= num2)
55805 {
55806 num4 -= num2;
55807 x = 32 + num4 * 38;
55808 num3 += 50;
55809 }
55810 num = DrawBuffIcon(num, i, x, num3);
55811 }
55812 else
55813 {
55814 buffAlpha[i] = 0.4f;
55815 }
55816 }
55817 if (num < 0)
55818 {
55819 return;
55820 }
55821 int num5 = player[myPlayer].buffType[num];
55822 if (num5 > 0)
55823 {
55824 string buffName = Lang.GetBuffName(num5);
55825 string buffTooltip = GetBuffTooltip(player[myPlayer], num5);
55826 if (num5 == 147)
55827 {
55828 bannerMouseOver = true;
55829 }
55830 int rare = 0;
55831 if (meleeBuff[num5])
55832 {
55833 rare = -10;
55834 }
55836 MouseTextHackZoom(buffName, rare, 0, buffTooltip);
55837 }
55838 }
void MouseTextHackZoom(string text, string buffTooltip=null)
Definition Main.cs:19451
static float[] buffAlpha
Definition Main.cs:1087
static bool[] meleeBuff
Categorizes status effects for which this is set to true as being from flasks, preventing them from o...
Definition Main.cs:834
static bool bannerMouseOver
Definition Main.cs:1319
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 int rare
Definition Main.cs:2540
static string GetBuffTooltip(Player player, int buffType)
Definition Main.cs:55840
static int DrawBuffIcon(int drawBuffText, int buffSlotOnPlayer, int x, int y)
Draws the buff icon corresponding to the buff in Main.LocalPlayer.buffType[buffSlotOnPlayer ].
Definition Main.cs:55899
static bool recBigList
Definition Main.cs:1940
static Player[] player
Definition Main.cs:1960
static void ModifyBuffText(int buff, ref string buffName, ref string tip, ref int rare)
This serves as the central class from which buff-related functions are supported and carried out.
Definition BuffLoader.cs:18

References Terraria.Main.bannerMouseOver, Terraria.Main.buffAlpha, Terraria.Main.DrawBuffIcon(), Terraria.Lang.GetBuffName(), Terraria.Main.GetBuffTooltip(), Terraria.Player.maxBuffs, Terraria.Main.meleeBuff, Terraria.ModLoader.BuffLoader.ModifyBuffText(), Terraria.Main.MouseTextHackZoom(), Terraria.Main.myPlayer, Terraria.Main.player, Terraria.Main.rare, and Terraria.Main.recBigList.

Referenced by Terraria.Main.GUIBarsDrawInner().

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