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

◆ ScanWorldForFinds()

void Terraria.GameContent.Bestiary.NPCWasNearPlayerTracker.ScanWorldForFinds ( )
inline

Definition at line 105 of file NPCWasNearPlayerTracker.cs.

106 {
107 //IL_0026: Unknown result type (might be due to invalid IL or missing references)
108 //IL_006f: Unknown result type (might be due to invalid IL or missing references)
109 //IL_0074: Unknown result type (might be due to invalid IL or missing references)
110 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
111 //IL_0088: Unknown result type (might be due to invalid IL or missing references)
112 //IL_008c: Unknown result type (might be due to invalid IL or missing references)
114 for (int i = 0; i < 255; i++)
115 {
116 Player player = Main.player[i];
117 if (player.active)
118 {
119 _playerHitboxesForBestiary.Add(player.HitboxForBestiaryNearbyCheck);
120 }
121 }
122 for (int j = 0; j < 200; j++)
123 {
124 NPC nPC = Main.npc[j];
125 if (!nPC.active || !nPC.CountsAsACritter || _wasSeenNearPlayerByNetId.Contains(nPC.netID))
126 {
127 continue;
128 }
129 Rectangle hitbox = nPC.Hitbox;
130 for (int k = 0; k < _playerHitboxesForBestiary.Count; k++)
131 {
132 Rectangle value = _playerHitboxesForBestiary[k];
133 if (((Rectangle)(ref hitbox)).Intersects(value))
134 {
137 }
138 }
139 }
140 }

References Terraria.GameContent.Bestiary.NPCWasNearPlayerTracker._playerHitboxesForBestiary, Terraria.GameContent.Bestiary.NPCWasNearPlayerTracker._wasSeenNearPlayerByNetId, Terraria.Entity.active, Terraria.Player.HitboxForBestiaryNearbyCheck, Terraria.Main.npc, Terraria.Main.player, and Terraria.GameContent.Bestiary.NPCWasNearPlayerTracker.RegisterWasNearby().

+ Here is the call graph for this function: