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

◆ GetPreferredGolfBallToUse()

void Terraria.Player.GetPreferredGolfBallToUse ( out int projType)
inline

Definition at line 46878 of file Player.cs.

46879 {
46880 projType = 721;
46882 if (!item.IsAir && item.shoot > 0 && ProjectileID.Sets.IsAGolfBall[item.shoot])
46883 {
46884 projType = item.shoot;
46885 return;
46886 }
46887 for (int num = 19; num >= 0; num--)
46888 {
46890 {
46891 _ = num % 10;
46892 Item item2 = armor[num];
46893 if (!item2.IsAir && item2.shoot > 0 && ProjectileID.Sets.IsAGolfBall[item2.shoot])
46894 {
46895 projType = item2.shoot;
46896 return;
46897 }
46898 }
46899 }
46900 for (int i = 0; i < 50; i++)
46901 {
46902 Item item3 = inventory[i];
46903 if (!item3.IsAir && item3.shoot > 0 && ProjectileID.Sets.IsAGolfBall[item3.shoot])
46904 {
46905 projType = item3.shoot;
46906 break;
46907 }
46908 }
46909 }
bool IsItemSlotUnlockedAndUsable(int slot)
Definition Player.cs:11968
Item[] inventory
Definition Player.cs:1257

References Terraria.ID.ProjectileID.Sets.IsAGolfBall, and System.item.