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

◆ DoCoins()

void Terraria.Player.DoCoins ( int i)
inline

Definition at line 38062 of file Player.cs.

38063 {
38064 if (inventory[i].stack != 100 || (inventory[i].type != 71 && inventory[i].type != 72 && inventory[i].type != 73))
38065 {
38066 return;
38067 }
38068 inventory[i].SetDefaults(inventory[i].type + 1);
38069 for (int j = 0; j < 54; j++)
38070 {
38071 if (inventory[j].IsTheSameAs(inventory[i]) && j != i && inventory[j].type == inventory[i].type && inventory[j].stack < inventory[j].maxStack)
38072 {
38073 inventory[j].stack++;
38075 inventory[i].active = false;
38076 inventory[i].TurnToAir();
38077 DoCoins(j);
38078 }
38079 }
38080 }
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
int stack
The current stack of the item. F:Terraria.Item.maxStack indicates the max possible stack.
Definition Item.cs:396
void TurnToAir(bool fullReset=false)
Definition Item.cs:51791
void SetDefaults(int Type=0)
Definition Item.cs:48800
void DoCoins(int i)
Definition Player.cs:38062
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.Entity.active, Terraria.Player.DoCoins(), Terraria.Player.inventory, Terraria.Item.SetDefaults(), Terraria.Item.stack, and Terraria.Item.TurnToAir().

Referenced by Terraria.Player.DoCoins(), Terraria.Player.FillAmmo(), Terraria.Player.GetItem_FillEmptyInventorySlot(), Terraria.Player.GetItem_FillEmptyInventorySlot_VoidBag(), Terraria.Player.GetItem_FillIntoOccupiedSlot(), and Terraria.Player.SellItem().

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