terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
SaveSynchronisationOperation_SendFileList.cs
Go to the documentation of this file.
1using System;
2using System.IO;
3using Terraria;
4using Terraria.IO;
5
6// Token: 0x020002CE RID: 718
8{
9 // Token: 0x06001096 RID: 4246 RVA: 0x0005123C File Offset: 0x0004F43C
17
18 // Token: 0x06001097 RID: 4247 RVA: 0x00051254 File Offset: 0x0004F454
19 public override void Begin()
20 {
21 this.SendNextFile();
22 }
23
24 // Token: 0x06001098 RID: 4248 RVA: 0x00051268 File Offset: 0x0004F468
26 {
27 FileMetadata metadata = playerFileData.Metadata;
28 string path = playerFileData._path;
29 string savePath = Main.SavePath;
30 string text = path.Replace(savePath, "");
31 TimeSpan playTime = playerFileData.GetPlayTime();
32 Player player = playerFileData._player;
34 IntPtr method_code = sendData.method_code;
35 IntPtr invoke_impl = sendData.invoke_impl;
36 IntPtr method = sendData.method;
37 if (invoke_impl != 0)
38 {
39 }
40 }
41
42 // Token: 0x06001099 RID: 4249 RVA: 0x0005135C File Offset: 0x0004F55C
43 private void WritePlayerData(BinaryWriter writer, Player player)
44 {
45 string name = player.name;
46 byte difficulty = player.difficulty;
47 int hair = player.hair;
48 byte hairDye = player.hairDye;
50 bool[] hideVisibleAccessory = player.hideVisibleAccessory;
53 BitsByte hideMisc = player.hideMisc;
54 int skinVariant = player.skinVariant;
55 int statLife = player.statLife;
56 int statLifeMax = player.statLifeMax;
57 int statMana = player.statMana;
58 int statManaMax = player.statManaMax;
59 bool extraAccessory = player.extraAccessory;
60 bool unlockedBiomeTorches = player.unlockedBiomeTorches;
62 bool downedDD2EventAnyDifficulty = player.downedDD2EventAnyDifficulty;
63 int taxMoney = player.taxMoney;
64 byte r = player.hairColor.R;
65 byte g = player.hairColor.G;
66 byte b = player.hairColor.B;
67 byte r2 = player.skinColor.R;
68 byte g2 = player.skinColor.G;
69 byte b2 = player.skinColor.B;
70 byte r3 = player.eyeColor.R;
71 byte g3 = player.eyeColor.G;
72 byte b3 = player.eyeColor.B;
73 byte r4 = player.shirtColor.R;
74 byte g4 = player.shirtColor.G;
75 byte b4 = player.shirtColor.B;
76 byte r5 = player.underShirtColor.R;
77 byte g5 = player.underShirtColor.G;
78 byte b5 = player.underShirtColor.B;
79 byte r6 = player.pantsColor.R;
80 byte g6 = player.pantsColor.G;
81 byte b6 = player.pantsColor.B;
82 byte r7 = player.shoeColor.R;
83 byte g7 = player.shoeColor.G;
84 byte b7 = player.shoeColor.B;
85 Item[] armor = player.armor;
86 long entityId = armor.entityId;
87 int netID = armor.netID;
88 byte prefix = player.armor.prefix;
89 Item[] armor2 = player.armor;
90 Item[] dye = player.dye;
91 long entityId2 = dye.entityId;
92 int netID2 = dye.netID;
93 byte prefix2 = player.dye.prefix;
94 Item[] dye2 = player.dye;
95 int netID3 = player.inventory.netID;
96 int stack = player.inventory.stack;
97 byte prefix3 = player.inventory.prefix;
98 bool favorited = player.inventory.favorited;
99 Item[] miscEquips = player.miscEquips;
100 long entityId3 = miscEquips.entityId;
101 int netID4 = miscEquips.netID;
102 byte prefix4 = player.miscEquips.prefix;
103 int netID5 = player.miscDyes.netID;
104 byte prefix5 = player.miscDyes.prefix;
105 Item[] miscEquips2 = player.miscEquips;
106 int netID6 = player.bank.item.netID;
107 int stack2 = player.bank.item.stack;
108 byte prefix6 = player.bank.item.prefix;
109 int netID7 = player.bank2.item.netID;
110 int stack3 = player.bank2.item.stack;
111 byte prefix7 = player.bank2.item.prefix;
112 int netID8 = player.bank3.item.netID;
113 int stack4 = player.bank3.item.stack;
114 byte prefix8 = player.bank3.item.prefix;
115 int netID9 = player.bank4.item.netID;
116 int stack5 = player.bank4.item.stack;
117 byte prefix9 = player.bank4.item.prefix;
118 BitsByte voidVaultInfo = player.voidVaultInfo;
119 bool[] hideInfo = player.hideInfo;
120 bool[] hideInfo2 = player.hideInfo;
121 }
122
123 // Token: 0x0600109A RID: 4250 RVA: 0x000516F4 File Offset: 0x0004F8F4
125 {
126 int num = this.fileCountPending;
128 FileMetadata metadata = worldFileData.Metadata;
129 string path = worldFileData._path;
130 string savePath = Main.SavePath;
131 string text = path.Replace(savePath, "");
132 string name = worldFileData.Name;
133 int worldSizeX = worldFileData.WorldSizeX;
134 int worldSizeY = worldFileData.WorldSizeY;
135 int gameMode = worldFileData.GameMode;
136 bool drunkWorld = worldFileData.DrunkWorld;
137 bool hasCorruption = worldFileData.HasCorruption;
138 bool isHardMode = worldFileData.IsHardMode;
140 IntPtr method_code = sendData.method_code;
141 IntPtr invoke_impl = sendData.invoke_impl;
142 IntPtr method = sendData.method;
143 if (invoke_impl != 0)
144 {
145 }
146 }
147
148 // Token: 0x0600109B RID: 4251 RVA: 0x00051824 File Offset: 0x0004FA24
149 private void SendNextFile()
150 {
151 if (!this.sentPlayers)
152 {
153 int num = this.fileOffset;
154 return;
155 }
156 if (!this.sentWorlds)
157 {
158 int num2 = this.fileOffset;
159 bool isComplete = this.IsComplete;
160 int num3 = this.fileOffset;
162 return;
163 }
164 if (!this.sentEndList)
165 {
166 int num4 = 1;
167 this.IsComplete = num4 != 0;
168 }
169 }
170
171 // Token: 0x0600109C RID: 4252 RVA: 0x00051890 File Offset: 0x0004FA90
173 {
174 int num = this.fileCountPending;
176 this.SendNextFile();
177 if (this.fileCountPending == 0)
178 {
179 int num2 = 1;
180 this.IsComplete = num2 != 0;
181 }
182 }
183
184 // Token: 0x0600109D RID: 4253 RVA: 0x000518C4 File Offset: 0x0004FAC4
185 public override string GetStatus()
186 {
187 if (!this.sentPlayers)
188 {
189 int num = this.fileOffset;
190 return "Finalising Save Data Sync";
191 }
192 if (this.sentWorlds)
193 {
194 return "Finalising Save Data Sync";
195 }
196 int num2 = this.fileOffset;
197 return string.Format("Transmitting World Save Data State {0}%", "Finalising Save Data Sync");
198 }
199
200 // Token: 0x04001F78 RID: 8056
201 private int fileCountPending;
202
203 // Token: 0x04001F79 RID: 8057
204 private int fileOffset;
205
206 // Token: 0x04001F7A RID: 8058
207 private bool sentPlayers;
208
209 // Token: 0x04001F7B RID: 8059
210 private bool sentWorlds;
211
212 // Token: 0x04001F7C RID: 8060
213 private bool sentEndList;
214}
class f__AnonymousType0<< Count > j__TPar
override void ProcessMessage(SaveSynchronisationOperation.MessageId messageId, byte[] data)
SaveSynchronisationOperation_SendFileList(SaveSynchronisationOperation.SendDataFunction sendOperation)
readonly SaveSynchronisationOperation.SendDataFunction SendData
Item[] item
Definition Chest.cs:1344
bool favorited
Definition Item.cs:2063
byte prefix
Definition Item.cs:2397
static string SavePath
Definition Main.cs:4045
Microsoft.Xna.Framework.Graphics.Color pantsColor
Definition Player.cs:22628
Microsoft.Xna.Framework.Graphics.Color shoeColor
Definition Player.cs:22631
bool downedDD2EventAnyDifficulty
Definition Player.cs:21758
bool unlockedBiomeTorches
Definition Player.cs:21929
BitsByte hideMisc
Definition Player.cs:21434
Item[] miscEquips
Definition Player.cs:21134
bool[] hideInfo
Definition Player.cs:20297
Microsoft.Xna.Framework.Graphics.Color hairColor
Definition Player.cs:22613
bool UsingBiomeTorches
Definition Player.cs:1376
Microsoft.Xna.Framework.Graphics.Color skinColor
Definition Player.cs:22616
bool extraAccessory
Definition Player.cs:20375
bool[] hideVisibleAccessory
Definition Player.cs:21431
Item[] miscDyes
Definition Player.cs:21137
BitsByte voidVaultInfo
Definition Player.cs:21284
Microsoft.Xna.Framework.Graphics.Color eyeColor
Definition Player.cs:22619
Item[] inventory
Definition Player.cs:21263
Microsoft.Xna.Framework.Graphics.Color shirtColor
Definition Player.cs:22622
Microsoft.Xna.Framework.Graphics.Color underShirtColor
Definition Player.cs:22625