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

◆ KillOldestJavelin()

static void Terraria.Projectile.KillOldestJavelin ( int protectedProjectileIndex,
int projectileType,
int targetNPCIndex,
Point[] bufferForScan )
inlinestatic

Definition at line 13870 of file Projectile.cs.

13871 {
13872 //IL_0077: Unknown result type (might be due to invalid IL or missing references)
13873 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
13874 int num = 0;
13875 for (int i = 0; i < 1000; i++)
13876 {
13877 if (i != protectedProjectileIndex && Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == projectileType && Main.projectile[i].ai[0] == 1f && Main.projectile[i].ai[1] == (float)targetNPCIndex)
13878 {
13879 bufferForScan[num++] = new Point(i, Main.projectile[i].timeLeft);
13880 if (num >= bufferForScan.Length)
13881 {
13882 break;
13883 }
13884 }
13885 }
13886 if (num < bufferForScan.Length)
13887 {
13888 return;
13889 }
13890 int num2 = 0;
13891 for (int j = 1; j < bufferForScan.Length; j++)
13892 {
13893 if (bufferForScan[j].Y < bufferForScan[num2].Y)
13894 {
13895 num2 = j;
13896 }
13897 }
13898 Main.projectile[bufferForScan[num2].X].Kill();
13899 }

References Terraria.Main.myPlayer, and Terraria.Main.projectile.

Referenced by Terraria.Player.BloodButcherer_TryButchering(), Terraria.Projectile.Damage(), and Terraria.Player.TentacleSpike_TrySpiking().

+ Here is the caller graph for this function: