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

◆ NebulaLevelup()

void Terraria.Player.NebulaLevelup ( int type)
inline

Definition at line 58097 of file Player.cs.

58098 {
58099 if (whoAmI != Main.myPlayer)
58100 {
58101 return;
58102 }
58103 int timeToAdd = 480;
58104 for (int i = 0; i < maxBuffs; i++)
58105 {
58106 if (buffType[i] >= type && buffType[i] < type + 3)
58107 {
58108 DelBuff(i);
58109 }
58110 }
58111 switch (type)
58112 {
58113 case 173:
58114 nebulaLevelLife = (int)MathHelper.Clamp((float)(nebulaLevelLife + 1), 0f, 3f);
58115 AddBuff(type + nebulaLevelLife - 1, timeToAdd);
58116 break;
58117 case 176:
58118 nebulaLevelMana = (int)MathHelper.Clamp((float)(nebulaLevelMana + 1), 0f, 3f);
58119 AddBuff(type + nebulaLevelMana - 1, timeToAdd);
58120 break;
58121 case 179:
58122 nebulaLevelDamage = (int)MathHelper.Clamp((float)(nebulaLevelDamage + 1), 0f, 3f);
58123 AddBuff(type + nebulaLevelDamage - 1, timeToAdd);
58124 break;
58125 }
58126 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
int nebulaLevelLife
Definition Player.cs:1115
int nebulaLevelDamage
Definition Player.cs:1121
int nebulaLevelMana
Definition Player.cs:1117
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.nebulaLevelDamage, Terraria.Player.nebulaLevelLife, Terraria.Player.nebulaLevelMana, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.PickupItem().

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