public static LoadLegacyInventory ( Item inv, BinaryReader reader, bool readStack = false, bool readFavorite = false ) : void | ||
inv | Item | |
reader | BinaryReader | |
readStack | bool | |
readFavorite | bool | |
return | void |
private static void LoadLegacyChest(BinaryReader reader) { int x = reader.ReadInt32(); int y = reader.ReadInt32(); int chest = Chest.FindChest(x, y); if (chest < 0) { chest = Chest.CreateChest(x, y); } if (chest >= 0) { ItemIO.LoadLegacyInventory(Main.chest[chest].item, reader, true); } else { ItemIO.LoadLegacyInventory(new Item[40], reader, true); } }
private static void LoadLegacyModPlayer(Player player, byte[] flags, BinaryReader reader) { if ((flags[0] & 1) == 1) { ItemIO.LoadLegacyInventory(player.armor, reader); } if ((flags[0] & 2) == 2) { ItemIO.LoadLegacyInventory(player.dye, reader); } if ((flags[0] & 4) == 4) { ItemIO.LoadLegacyInventory(player.inventory, reader, true, true); } if ((flags[0] & 8) == 8) { ItemIO.LoadLegacyInventory(player.miscEquips, reader); } if ((flags[0] & 16) == 16) { ItemIO.LoadLegacyInventory(player.miscDyes, reader); } if ((flags[0] & 32) == 32) { ItemIO.LoadLegacyInventory(player.bank.item, reader, true); } if ((flags[0] & 64) == 64) { ItemIO.LoadLegacyInventory(player.bank2.item, reader, true); } if ((flags[0] & 128) == 128) { LoadLegacyModData(player, reader); } if ((flags[1] & 1) == 1) { LoadLegacyModBuffs(player, reader); } }