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

◆ ErasePlayer()

static void Terraria.Main.ErasePlayer ( int i)
inlinestaticprivate

Definition at line 4413 of file Main.cs.

4414 {
4415 try
4416 {
4418 FileUtilities.Delete(PlayerList[i].Path + ".bak", PlayerList[i].IsCloudSave);
4419 }
4420 catch
4421 {
4422 }
4423 try
4424 {
4425 string text = PlayerList[i].Path.Substring(0, PlayerList[i].Path.Length - 4);
4426 if (text.Substring(text.Length - 1) != "." && text.Substring(text.Length - 1) != "\\" && Directory.Exists(text))
4427 {
4429 }
4430 LoadPlayers();
4431 }
4432 catch
4433 {
4434 }
4435 }
static void Delete(string path)
Definition Directory.cs:355
static bool Exists([NotNullWhen(true)] string? path)
Definition Directory.cs:43
static void LoadPlayers()
Definition Main.cs:3718
static List< PlayerFileData > PlayerList
Definition Main.cs:1938
static void Delete(string path, bool cloud, bool forceDeleteFile=false)

References System.IO.Directory.Delete(), Terraria.Utilities.FileUtilities.Delete(), System.IO.Directory.Exists(), System.Text.RegularExpressions.i, Terraria.Main.LoadPlayers(), Terraria.Main.PlayerList, and System.text.

Referenced by Terraria.Main.DrawMenu().