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

◆ isNearFairy()

bool Terraria.Player.isNearFairy ( )
inline

Definition at line 50317 of file Player.cs.

50318 {
50319 if (NPC.npcsFoundForCheckActive[583] || NPC.npcsFoundForCheckActive[584] || NPC.npcsFoundForCheckActive[585])
50320 {
50321 for (int i = 0; i < 200; i++)
50322 {
50323 if (Main.npc[i].active && (Main.npc[i].type == 583 || Main.npc[i].type == 584 || Main.npc[i].type == 585) && Vector2.Distance(Main.npc[i].Center, base.Center) < (float)NPC.sWidth)
50324 {
50325 return true;
50326 }
50327 }
50328 }
50329 return false;
50330 }
static float Distance(Vector2 value1, Vector2 value2)
Definition Vector2.cs:91

References Microsoft.Xna.Framework.Vector2.Distance(), Terraria.Main.npc, Terraria.NPC.npcsFoundForCheckActive, and Terraria.NPC.sWidth.