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

◆ HasItem() [2/2]

bool Terraria.Player.HasItem ( int type,
Item[] collection )
inline

Similar to M:Terraria.Player.HasItem(System.Int32), but checks the provided Item[] collection for items instead. Useful for checking other Item arrays, such as F:Terraria.Player.armor or F:Terraria.Player.bank.

Definition at line 56583 of file Player.cs.

56584 {
56585 for (int i = 0; i < collection.Length; i++)
56586 {
56587 if (type == collection[i].type && collection[i].stack > 0)
56588 {
56589 return true;
56590 }
56591 }
56592 return false;
56593 }