52 if (
item.Value.lifeTime <= 0)
95 return Tuple.Create(0, 0);
105 _ =>
throw new Exception(
"How did you end up getting this?"),
152 for (
int i = 0; i < 200; i++)
157 int direction = (nPC.position.X < player.
position.
X).ToDirectionInt();
161 nPC.direction = direction;
162 nPC.netUpdate =
true;
192 position = position.Floor();
214 sb.
Draw(
value, position,
value.Frame(8,
EMOTE_SHEET_VERTICAL_FRAMES,
emote * 2 % 8 +
frame, 1 +
emote / 4),
Color.
White, 0f, origin, 1f, effect, 0f);
216 else if (
emote == -1)
220 if ((
float)
value.Width / 22f > 1f)
222 num = 22f / (float)
value.Width;
224 if ((
float)
value.Height / 16f > 1f / num)
226 num = 16f / (float)
value.Height;
228 sb.
Draw(
value, position +
new Vector2(effect.HasFlag(
SpriteEffects.FlipHorizontally) ? 1 : (-1), -
value2.Height + 3),
null,
Color.
White, 0f,
new Vector2(
value.Width / 2, 0f), num, effect, 0f);
285 for (
int i = 0; i < 200; i++)
431 if (
plr.inventory[
plr.selectedItem].type == 215 ||
Main.
rand.Next(3) == 0)
445 if (
plr.statLife <
plr.statLifeMax2 / 2)
457 for (
int j = 0;
j < 200;
j++)
488 else if (
plr.ZoneHallow)
492 else if (
plr.ZoneCorrupt)
496 else if (
plr.ZoneCrimson)
500 else if (
plr.ZoneJungle)
504 else if (
plr.ZoneSnow)
512 else if (
plr.ZoneDesert)
756 else if (
nPC.type == 18)
763 else if (
nPC.type == 19)
789 else if (
nPC.type == 20)
791 if (
list.Contains(121))
799 else if (
nPC.type == 22)
822 else if (
nPC.type == 37)
830 else if (
nPC.type == 38)
850 else if (
nPC.type == 54)
860 if (
list.Contains(111))
867 else if (
nPC.type == 107)
883 if (
list.Contains(111))
895 else if (
nPC.type == 108)
915 if (
list.Contains(109))
921 if (
list.Contains(108))
938 else if (
nPC.type == 142)
946 else if (
nPC.type == 160)
953 else if (
nPC.type == 178)
958 else if (
nPC.type == 207)
964 else if (
nPC.type == 208)
971 else if (
nPC.type == 209)
978 else if (
nPC.type == 227)
983 else if (
nPC.type == 228)
990 else if (
nPC.type == 229)
998 else if (
nPC.type == 353)
1000 if (
list.Contains(104))
1005 if (
list.Contains(111))
1012 else if (
nPC.type == 368)
1018 else if (
nPC.type == 369)
1034 else if (
nPC.type == 453)
1041 else if (
nPC.type == 441)
void Draw(Texture2D texture, Vector2 position, Color color)
void Add(TKey key, TValue value)
static bool CanHitLine(Vector2 Position1, int Width1, int Height1, Vector2 Position2, int Width2, int Height2)
float Distance(Vector2 Other)
virtual Vector2 VisualPosition
static bool DownedInvasionAnyDifficulty
static Asset< Texture2D >[] Extra
static Asset< Texture2D >[] NpcHead
void ProbeEvents(List< int > list)
static int NewBubbleNPC(WorldUIAnchor bubbleAnchor, int time, WorldUIAnchor other=null)
void ProbeExceptions(List< int > list, Player plr, WorldUIAnchor other)
static void MakeLocalPlayerEmote(int emoteId)
static void CheckForNPCsToReactToEmoteBubble(int emoteID, Player player)
void ProbeWeather(List< int > list, Player plr)
static Dictionary< int, EmoteBubble > byID
void PickNPCEmote(WorldUIAnchor other=null)
const int EMOTE_SHEET_EMOTES_PER_ROW
EmoteBubble(int emotion, WorldUIAnchor bubbleAnchor, int time=180)
void ProbeDebuffs(List< int > list, Player plr)
Vector2 GetPosition(out SpriteEffects effect)
static WorldUIAnchor DeserializeNetAnchor(int type, int meta)
void ProbeItems(List< int > list, Player plr)
void ProbeCritters(List< int > list)
const int EMOTE_SHEET_HORIZONTAL_FRAMES
static Tuple< int, int > SerializeNetAnchor(WorldUIAnchor anch)
static List< int > toClean
void ProbeTownNPCs(List< int > list)
void ProbeEmotions(List< int > list)
void Draw(SpriteBatch sb)
static int NewBubble(int emoticon, WorldUIAnchor bubbleAnchor, int time)
static void DrawAll(SpriteBatch sb)
static void OnBubbleChange(int bubbleID)
void ProbeCombat(List< int > list)
void ProbeBiomes(List< int > list, Player plr)
void ProbeBosses(List< int > list)
static readonly int EMOTE_SHEET_VERTICAL_FRAMES
static readonly short Count
static double worldSurface
static Vector2 ReverseGravitySupport(Vector2 pos, float height=0f)
static Vector2 screenPosition
static Projectile[] projectile
static UnifiedRandom rand
static float cloudBGActive
static Player LocalPlayer
static bool downedChristmasSantank
static bool downedMechBoss2
static bool downedMechBossAny
static bool downedEmpressOfLight
static bool downedHalloweenKing
static bool downedMechBoss3
static bool downedPirates
static bool downedMoonlord
static bool downedQueenBee
static bool downedHalloweenTree
static bool downedChristmasTree
static bool downedGoblins
static bool downedGolemBoss
static bool downedMartians
static bool downedChristmasIceQueen
static bool downedAncientCultist
static bool downedPlantBoss
static bool downedMechBoss1
static bool downedDeerclops
static bool downedQueenSlime
static void SendData(int msgType, int remoteClient=-1, int ignoreClient=-1, NetworkText text=null, int number=0, float number2=0f, float number3=0f, float number4=0f, int number5=0, int number6=0, int number7=0)
static byte FindClosest(Vector2 Position, int Width, int Height)