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

◆ FindChestByGuessing()

static int Terraria.Chest.FindChestByGuessing ( int X,
int Y )
inlinestatic

Definition at line 558 of file Chest.cs.

559 {
560 for (int i = 0; i < 8000; i++)
561 {
562 if (Main.chest[i] != null && Main.chest[i].x >= X && Main.chest[i].x < X + 2 && Main.chest[i].y >= Y && Main.chest[i].y < Y + 2)
563 {
564 return i;
565 }
566 }
567 return -1;
568 }

References Terraria.Main.chest.

Referenced by Terraria.Main.DrawMap_FindChestName().