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

◆ SearchAvoidedByNPCs()

static bool Terraria.DelegateMethods.SearchAvoidedByNPCs ( int x,
int y )
inlinestatic

Definition at line 764 of file DelegateMethods.cs.

765 {
766 if (!WorldGen.InWorld(x, y, 1))
767 {
768 return false;
769 }
770 if (Main.tile[x, y] == null)
771 {
772 return false;
773 }
774 if (!Main.tile[x, y].active() || !TileID.Sets.AvoidedByNPCs[Main.tile[x, y].type])
775 {
776 return true;
777 }
778 return false;
779 }
static bool[] AvoidedByNPCs
Definition TileID.cs:271

References Terraria.ID.TileID.Sets.AvoidedByNPCs, Terraria.WorldGen.InWorld(), and Terraria.Main.tile.

Referenced by Terraria.NPC.AI_007_TownEntities(), and Terraria.NPC.AI_007_TownEntities_GetWalkPrediction().