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

◆ AddBuff_TryUpdatingExistingBuffTime()

bool Terraria.Player.AddBuff_TryUpdatingExistingBuffTime ( int type,
int time )
inlineprivate

Definition at line 4553 of file Player.cs.

4554 {
4555 bool result = false;
4556 for (int i = 0; i < maxBuffs; i++)
4557 {
4558 if (buffType[i] != type)
4559 {
4560 continue;
4561 }
4562 if (type == 94)
4563 {
4564 buffTime[i] += time;
4565 if (buffTime[i] > manaSickTimeMax)
4566 {
4568 }
4569 }
4570 else if (buffTime[i] < time)
4571 {
4572 buffTime[i] = time;
4573 }
4574 result = true;
4575 break;
4576 }
4577 return result;
4578 }
static readonly int maxBuffs
Definition Player.cs:1191
static int manaSickTimeMax
Definition Player.cs:751

References Terraria.Player.buffTime, Terraria.Player.buffType, Terraria.Player.manaSickTimeMax, Terraria.Player.maxBuffs, and System.type.

Referenced by Terraria.Player.AddBuff().