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

◆ UpdateStarvingState()

void Terraria.Player.UpdateStarvingState ( bool withEmote)
inline

Definition at line 11593 of file Player.cs.

11594 {
11595 if (whoAmI != Main.myPlayer)
11596 {
11597 return;
11598 }
11599 bool flag = false;
11600 for (int i = 0; i < maxBuffs; i++)
11601 {
11602 if (buffTime[i] > 0 && BuffID.Sets.IsFedState[buffType[i]])
11603 {
11604 flag = true;
11605 break;
11606 }
11607 }
11608 if (!flag)
11609 {
11610 if (Main.remixWorld && Main.dontStarveWorld)
11611 {
11612 AddBuff(332, 28800);
11613 }
11614 else
11615 {
11616 AddBuff(332, 18000);
11617 }
11618 if (withEmote)
11619 {
11621 }
11622 }
11623 }
static void MakeLocalPlayerEmote(int emoteId)
static bool[] IsFedState
Definition BuffID.cs:20
static readonly int maxBuffs
Definition Player.cs:1191
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Definition Player.cs:4441

References Terraria.Main.dontStarveWorld, Terraria.ID.BuffID.Sets.IsFedState, Terraria.GameContent.UI.EmoteBubble.MakeLocalPlayerEmote(), Terraria.Main.myPlayer, and Terraria.Main.remixWorld.

Referenced by Terraria.GameContent.DontStarveSeed.Hook_OnEnterWorld().