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

◆ FindItem() [4/4]

int Terraria.Player.FindItem ( List< int > netids)
inline

Definition at line 56664 of file Player.cs.

56665 {
56666 for (int i = 0; i < 58; i++)
56667 {
56668 if (inventory[i].stack > 0 && netids.Contains(inventory[i].netID))
56669 {
56670 return i;
56671 }
56672 }
56673 return -1;
56674 }
int netID
Definition Item.cs:739
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, and Terraria.Item.netID.