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

◆ Fishing_GetBait()

void Terraria.Player.Fishing_GetBait ( out Item bait)
inlineprivate

Definition at line 41407 of file Player.cs.

41408 {
41409 bait = null;
41410 for (int i = 54; i < 58; i++)
41411 {
41412 if (inventory[i].stack > 0 && inventory[i].bait > 0)
41413 {
41414 bait = inventory[i];
41415 break;
41416 }
41417 }
41418 if (bait != null)
41419 {
41420 return;
41421 }
41422 for (int j = 0; j < 50; j++)
41423 {
41424 if (inventory[j].stack > 0 && inventory[j].bait > 0)
41425 {
41426 bait = inventory[j];
41427 break;
41428 }
41429 }
41430 }
Item[] inventory
The player's normal inventory. Indexes 0-9 hold the hotbar items, 10-49 the rest of the main inventor...
Definition Player.cs:1767

References Terraria.Player.inventory.

Referenced by Terraria.Player.GetFishingConditions(), and Terraria.Player.ItemCheck_Inner().

+ Here is the caller graph for this function: