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

◆ GetZenithTarget()

bool Terraria.Player.GetZenithTarget ( Vector2 searchCenter,
float maxDistance,
out int npcTargetIndex )
inlineprivate

Definition at line 46557 of file Player.cs.

46558 {
46559 //IL_0023: Unknown result type (might be due to invalid IL or missing references)
46560 //IL_0025: Unknown result type (might be due to invalid IL or missing references)
46561 npcTargetIndex = 0;
46562 int? num = null;
46563 float num2 = maxDistance;
46564 for (int i = 0; i < 200; i++)
46565 {
46566 NPC nPC = Main.npc[i];
46567 if (nPC.CanBeChasedBy(this))
46568 {
46569 float num3 = searchCenter.Distance(nPC.Center);
46570 if (!(num2 <= num3))
46571 {
46572 num = i;
46573 num2 = num3;
46574 }
46575 }
46576 }
46577 if (!num.HasValue)
46578 {
46579 return false;
46580 }
46581 npcTargetIndex = num.Value;
46582 return true;
46583 }

References Terraria.Main.npc.

Referenced by Terraria.Player.ItemCheck_Shoot().

+ Here is the caller graph for this function: