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

◆ LoadWorld_Version2()

static int Terraria.IO.WorldFile.LoadWorld_Version2 ( BinaryReader reader)
inlinestatic

Definition at line 1686 of file WorldFile.cs.

1687 {
1688 reader.BaseStream.Position = 0L;
1690 {
1691 return 5;
1692 }
1693 if (reader.BaseStream.Position != positions[0])
1694 {
1695 return 5;
1696 }
1697 LoadHeader(reader);
1698 if (reader.BaseStream.Position != positions[1])
1699 {
1700 return 5;
1701 }
1702 LoadWorldTiles(reader, importance);
1703 if (reader.BaseStream.Position != positions[2])
1704 {
1705 return 5;
1706 }
1707 LoadChests(reader);
1708 if (reader.BaseStream.Position != positions[3])
1709 {
1710 return 5;
1711 }
1712 LoadSigns(reader);
1713 if (reader.BaseStream.Position != positions[4])
1714 {
1715 return 5;
1716 }
1717 LoadNPCs(reader);
1718 if (reader.BaseStream.Position != positions[5])
1719 {
1720 return 5;
1721 }
1722 if (_versionNumber >= 116)
1723 {
1724 if (_versionNumber < 122)
1725 {
1726 LoadDummies(reader);
1727 if (reader.BaseStream.Position != positions[6])
1728 {
1729 return 5;
1730 }
1731 }
1732 else
1733 {
1734 LoadTileEntities(reader);
1735 if (reader.BaseStream.Position != positions[6])
1736 {
1737 return 5;
1738 }
1739 }
1740 }
1741 if (_versionNumber >= 170)
1742 {
1744 if (reader.BaseStream.Position != positions[7])
1745 {
1746 return 5;
1747 }
1748 }
1749 if (_versionNumber >= 189)
1750 {
1751 LoadTownManager(reader);
1752 if (reader.BaseStream.Position != positions[8])
1753 {
1754 return 5;
1755 }
1756 }
1757 if (_versionNumber >= 210)
1758 {
1760 if (reader.BaseStream.Position != positions[9])
1761 {
1762 return 5;
1763 }
1764 }
1765 else
1766 {
1768 }
1769 if (_versionNumber >= 220)
1770 {
1772 if (reader.BaseStream.Position != positions[10])
1773 {
1774 return 5;
1775 }
1776 }
1778 return LoadFooter(reader);
1779 }
virtual Stream BaseStream
static void LoadWorldTiles(BinaryReader reader, bool[] importance)
static void LoadNPCs(BinaryReader reader)
static bool LoadFileFormatHeader(BinaryReader reader, out bool[] importance, out int[] positions)
static void LoadTileEntities(BinaryReader reader)
static void LoadBestiary(BinaryReader reader, int loadVersionNumber)
static void LoadCreativePowers(BinaryReader reader, int loadVersionNumber)
static void LoadTownManager(BinaryReader reader)
static void LoadDummies(BinaryReader reader)
static void LoadBestiaryForVersionsBefore210()
static void LoadSigns(BinaryReader reader)
static int _versionNumber
Definition WorldFile.cs:117
static int LoadFooter(BinaryReader reader)
static void LoadWorld_LastMinuteFixes()
static void LoadChests(BinaryReader reader)
static void LoadHeader(BinaryReader reader)
static void LoadWeightedPressurePlates(BinaryReader reader)

References Terraria.IO.WorldFile._versionNumber, System.IO.BinaryReader.BaseStream, System.L, Terraria.IO.WorldFile.LoadBestiary(), Terraria.IO.WorldFile.LoadBestiaryForVersionsBefore210(), Terraria.IO.WorldFile.LoadChests(), Terraria.IO.WorldFile.LoadCreativePowers(), Terraria.IO.WorldFile.LoadDummies(), Terraria.IO.WorldFile.LoadFileFormatHeader(), Terraria.IO.WorldFile.LoadFooter(), Terraria.IO.WorldFile.LoadHeader(), Terraria.IO.WorldFile.LoadNPCs(), Terraria.IO.WorldFile.LoadSigns(), Terraria.IO.WorldFile.LoadTileEntities(), Terraria.IO.WorldFile.LoadTownManager(), Terraria.IO.WorldFile.LoadWeightedPressurePlates(), Terraria.IO.WorldFile.LoadWorld_LastMinuteFixes(), and Terraria.IO.WorldFile.LoadWorldTiles().

Referenced by Terraria.IO.WorldFile.LoadWorld().