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

◆ HasUnityPotion()

bool Terraria.Player.HasUnityPotion ( )
inline

Definition at line 41448 of file Player.cs.

41449 {
41450 for (int i = 0; i < 58; i++)
41451 {
41452 if (inventory[i].type == 2997 && inventory[i].stack > 0)
41453 {
41454 return true;
41455 }
41456 }
41457 if (useVoidBag())
41458 {
41459 for (int j = 0; j < 40; j++)
41460 {
41461 if (bank4.item[j].type == 2997 && bank4.item[j].stack > 0)
41462 {
41463 return true;
41464 }
41465 }
41466 }
41467 return false;
41468 }
Item[] item
The items this chest contains. F:Terraria.Chest.maxItems elements long.
Definition Chest.cs:93
int stack
The current stack of the item. F:Terraria.Item.maxStack indicates the max possible stack.
Definition Item.cs:396
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
Definition Item.cs:345
bool useVoidBag()
Definition Player.cs:21132
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.bank4, Terraria.Player.inventory, Terraria.Chest.item, Terraria.Item.stack, Terraria.Item.type, and Terraria.Player.useVoidBag().

+ Here is the call graph for this function: