77087 {
77088 if (pos.
Y / 16f < (
float)(Main.maxTilesY - 205) || Main.wofNPCIndex >= 0 || Main.netMode == 1 ||
AnyNPCs(113))
77089 {
77090 return;
77091 }
77092 Player.FindClosest(pos, 16, 16);
77093 int num = 1;
77094 if (pos.
X / 16f > (
float)(Main.maxTilesX / 2))
77095 {
77096 num = -1;
77097 }
77098 bool flag = false;
77099 int num2 = (int)pos.
X;
77101 while (!flag)
77102 {
77103 flag = true;
77104 for (
int i = 0;
i < 255;
i++)
77105 {
77106 if (Main.player[i].active && Main.player[i].position.X > (
float)(
num2 - 1200) && Main.player[i].position.X < (
float)(
num2 + 1200))
77107 {
77109 flag = false;
77111 }
77112 }
77113 if (
num2 / 16 < 20 ||
num2 / 16 > Main.maxTilesX - 20)
77114 {
77115 flag = true;
77116 }
77117 }
77118 int num3 = (int)pos.
Y;
77124 {
77125 while (true)
77126 {
77129 {
77130 break;
77131 }
77132 try
77133 {
77135 {
77137 break;
77138 }
77140 {
77142 break;
77143 }
77145 }
77146 catch
77147 {
77148 break;
77149 }
77150 }
77151 }
77152 int num8 = Main.UnderworldLayer + 10;
77155 {
77157 }
77159 {
77161 }
77164 if (Main.netMode == 0)
77165 {
77167 }
77168 else if (Main.netMode == 2)
77169 {
77171 }
77172 }
static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer=-1)
static string GetTextValue(string key)
static NetworkText FromKey(string key, params object[] substitutions)
static bool AnyNPCs(int Type)
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
static IEntitySource GetBossSpawnSource(int targetPlayerIndex)