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

◆ SpawnTileOrAboveHasAnyWallInSet()

static bool Terraria.NPC.SpawnTileOrAboveHasAnyWallInSet ( int x,
int y,
bool[] wallTypes )
inlinestatic

Definition at line 72568 of file NPC.cs.

72569 {
72570 if (!WorldGen.InWorld(x, y, 2))
72571 {
72572 return false;
72573 }
72574 Tile tile = Main.tile[x, y];
72575 Tile tile2 = Main.tile[x, y - 1];
72576 if (tile == null || tile2 == null)
72577 {
72578 return false;
72579 }
72580 if (tile.wall < 0 || tile.wall >= WallID.Count || !wallTypes[tile.wall])
72581 {
72582 if (tile2.wall >= 0 && tile2.wall < WallID.Count)
72583 {
72584 return wallTypes[tile2.wall];
72585 }
72586 return false;
72587 }
72588 return true;
72589 }
static readonly ushort Count
Definition WallID.cs:753

References Terraria.ID.WallID.Count, Terraria.WorldGen.InWorld(), Terraria.Main.tile, and Terraria.Tile.wall.