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

◆ QuickMana_GetItemToUse()

Item Terraria.Player.QuickMana_GetItemToUse ( )
inline

Definition at line 6038 of file Player.cs.

6039 {
6040 for (int i = 0; i < 58; i++)
6041 {
6042 if (inventory[i].stack > 0 && inventory[i].type > 0 && inventory[i].healMana > 0 && (potionDelay == 0 || !inventory[i].potion))
6043 {
6044 return inventory[i];
6045 }
6046 }
6047 if (useVoidBag())
6048 {
6049 for (int j = 0; j < 40; j++)
6050 {
6051 if (bank4.item[j].stack > 0 && bank4.item[j].type > 0 && bank4.item[j].healMana > 0 && (potionDelay == 0 || !bank4.item[j].potion))
6052 {
6053 return bank4.item[j];
6054 }
6055 }
6056 }
6057 return null;
6058 }
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 healMana
The amount of mana this item restores on use. Use M:Terraria.ModLoader.ModItem.GetHealMana(Terraria...
Definition Item.cs:476
bool potion
If true, this item will inflict potion sickness on use. Also determines whether the item cannot be us...
Definition Item.cs:482
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.Item.healMana, Terraria.Player.inventory, Terraria.Chest.item, Terraria.Item.potion, Terraria.Player.potionDelay, Terraria.Item.stack, Terraria.Item.type, and Terraria.Player.useVoidBag().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function: