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

◆ ConsumeSolarFlare()

bool Terraria.Player.ConsumeSolarFlare ( )
inline

Definition at line 57731 of file Player.cs.

57732 {
57733 if (setSolar && solarShields > 0)
57734 {
57735 solarShields--;
57736 for (int i = 0; i < maxBuffs; i++)
57737 {
57738 if (buffType[i] >= 170 && buffType[i] <= 172)
57739 {
57740 DelBuff(i);
57741 }
57742 }
57743 if (solarShields > 0 && whoAmI == Main.myPlayer)
57744 {
57745 AddBuff(170 + solarShields - 1, 5, quiet: false);
57746 }
57747 solarCounter = 0;
57748 return true;
57749 }
57750 return false;
57751 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
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
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Gives the player the provided buff. This accounts for if the player is immune to the buff....
Definition Player.cs:5700
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.AddBuff(), Terraria.Player.buffType, Terraria.Player.DelBuff(), Terraria.Player.maxBuffs, Terraria.Main.myPlayer, Terraria.Player.setSolar, Terraria.Player.solarCounter, Terraria.Player.solarShields, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.DashMovement(), and Terraria.Player.OnHurt_Part2().

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