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

◆ QuickMana_GetItemToUse()

Item Terraria.Player.QuickMana_GetItemToUse ( )
inline

Definition at line 4756 of file Player.cs.

4757 {
4758 for (int i = 0; i < 58; i++)
4759 {
4760 if (inventory[i].stack > 0 && inventory[i].type > 0 && inventory[i].healMana > 0 && (potionDelay == 0 || !inventory[i].potion))
4761 {
4762 return inventory[i];
4763 }
4764 }
4765 if (useVoidBag())
4766 {
4767 for (int j = 0; j < 40; j++)
4768 {
4769 if (bank4.item[j].stack > 0 && bank4.item[j].type > 0 && bank4.item[j].healMana > 0 && (potionDelay == 0 || !bank4.item[j].potion))
4770 {
4771 return bank4.item[j];
4772 }
4773 }
4774 }
4775 return null;
4776 }
Item[] item
Definition Chest.cs:41
int stack
Definition Item.cs:149
int healMana
Definition Item.cs:173
bool potion
Definition Item.cs:175
bool useVoidBag()
Definition Player.cs:22085
Item[] inventory
Definition Player.cs:1257

References Terraria.Player.bank4, Terraria.Item.healMana, Terraria.Player.inventory, Terraria.Chest.item, Terraria.Item.potion, Terraria.Player.potionDelay, Terraria.Item.stack, System.type, Terraria.Item.type, and Terraria.Player.useVoidBag().

Referenced by Terraria.UI.ItemSlot.DrawRadialQuicks(), Terraria.Player.QuickMana(), and Terraria.GameContent.ChromaHotkeyPainter.Step_QuickMana().