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

◆ TrySpawningTownNPC()

static void Terraria.WorldGen.TrySpawningTownNPC ( int x,
int y )
inlinestaticprivate

Definition at line 64812 of file WorldGen.cs.

64813 {
64814 bool flag = Main.tileSolid[379];
64815 Main.tileSolid[379] = true;
64816 if (prioritizedTownNPCType > 0)
64817 {
64818 if (Main.tile[x, y].wall == 34)
64819 {
64820 if (Main.rand.Next(4) == 0)
64821 {
64822 SpawnTownNPC(x, y);
64823 }
64824 }
64825 else
64826 {
64827 SpawnTownNPC(x, y);
64828 }
64829 }
64830 Main.tileSolid[379] = flag;
64831 }
static int prioritizedTownNPCType
Definition WorldGen.cs:1024
static TownNPCSpawnResult SpawnTownNPC(int x, int y)
Definition WorldGen.cs:1926

References Terraria.Main.rand, Terraria.Main.tile, and Terraria.Main.tileSolid.