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

◆ GetPlayerPathFromName()

static string Terraria.Main.GetPlayerPathFromName ( string playerName,
bool cloudSave )
inlinestatic

Definition at line 6241 of file Main.cs.

6242 {
6243 if (!true)
6244 {
6245 }
6247 string text2;
6248 string text = text2.Replace("*", "_").Replace("?", "_").Replace("/", "_")
6249 .Replace("\\", "_")
6250 .Replace(">", "_")
6251 .Replace("<", "_")
6252 .Replace(":", "_")
6253 .Replace("|", "_");
6254 int stringLength = text._stringLength;
6255 long num = 0L;
6256 char c = text[(int)num];
6257 string text4;
6258 string text3 = "" + text4;
6259 if (text._stringLength != 0)
6260 {
6261 }
6262 string playerPath = Main.PlayerPath;
6263 string text6;
6264 string text5 = playerPath + text6 + text3 + ".plr";
6265 string text7 = text3 + "_";
6266 string text9;
6267 string text8 = playerPath + text9 + text7 + ".plr";
6268 string text10;
6269 string text11;
6270 if ((playerPath == null || playerPath != null) && (text10 == null || text10 != null) && (text7 == null || text7 != null) && (text11 == null || text11 != null) && (".plr" == null || ".plr" != null))
6271 {
6272 long num2 = 0L;
6273 string text12;
6274 bool flag = FileUtilities.Exists(text12, num2 != 0L);
6275 string text14;
6276 string text13 = text7 + text14;
6277 string text15;
6278 return playerPath + text15 + text13 + ".plr";
6279 }
6280 throw new ArrayTypeMismatchException();
6281 }
class f__AnonymousType0<< Count > j__TPar
static char[] GetInvalidFileNameChars()
Definition Path.cs:314
static bool Exists(string path, bool cloud=false)

References Terraria.Utilities.FileUtilities.Exists(), System.IO.Path.GetInvalidFileNameChars(), j__TPar, Microsoft.Xna.Framework.Input.L, Terraria.Main.PlayerPath, and System.text.

Referenced by Terraria.IO.PlayerFileData.MoveToCloud(), and Terraria.IO.PlayerFileData.MoveToLocal().