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

◆ GetContainerUsageInfo()

static void Terraria.UI.ChestUI.GetContainerUsageInfo ( out bool sync,
out Item[] chestinv )
inlinestatic

Definition at line 1352 of file ChestUI.cs.

1353 {
1354 sync = false;
1355 Player player = Main.player[Main.myPlayer];
1356 chestinv = player.bank.item;
1357 if (player.chest > -1)
1358 {
1359 chestinv = Main.chest[player.chest].item;
1360 sync = Main.netMode == 1;
1361 }
1362 else if (player.chest == -2)
1363 {
1364 chestinv = player.bank.item;
1365 }
1366 else if (player.chest == -3)
1367 {
1368 chestinv = player.bank2.item;
1369 }
1370 else if (player.chest == -4)
1371 {
1372 chestinv = player.bank3.item;
1373 }
1374 else if (player.chest == -5)
1375 {
1376 chestinv = player.bank4.item;
1377 }
1378 }

References Terraria.Player.bank, Terraria.Player.bank2, Terraria.Player.bank3, Terraria.Player.bank4, Terraria.Main.chest, Terraria.Player.chest, Terraria.Chest.item, Terraria.Main.myPlayer, and Terraria.Main.player.

Referenced by Terraria.Main.MouseText_DrawItemTooltip_GetLinesInfo(), Terraria.UI.ItemSlot.PickItemMovementAction(), and Terraria.UI.ChestUI.TryPlacingInChest().