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

◆ ErasePlayer()

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

Definition at line 4628 of file Main.cs.

4629 {
4630 try
4631 {
4632 FileUtilities.Delete(PlayerList[i].Path, PlayerList[i].IsCloudSave);
4633 FileUtilities.Delete(PlayerList[i].Path + ".bak", PlayerList[i].IsCloudSave);
4634 }
4635 catch
4636 {
4637 }
4638 PlayerIO.ErasePlayer(PlayerList[i].Path, PlayerList[i].IsCloudSave);
4639 try
4640 {
4641 string text = PlayerList[i].Path.Substring(0, PlayerList[i].Path.Length - 4);
4642 if (text.Substring(text.Length - 1) != "." && text.Substring(text.Length - 1) != "\\" && Directory.Exists(text))
4643 {
4644 Directory.Delete(text, recursive: true);
4645 }
4646 LoadPlayers();
4647 }
4648 catch
4649 {
4650 }
4651 }
static void LoadPlayers()
Definition Main.cs:3891
static List< PlayerFileData > PlayerList
Definition Main.cs:2088
static void ErasePlayer(string path, bool cloudSave)
Definition PlayerIO.cs:464
static void Delete(string path, bool cloud, bool forceDeleteFile=false)

References Terraria.Utilities.FileUtilities.Delete(), Terraria.ModLoader.IO.PlayerIO.ErasePlayer(), Terraria.Main.LoadPlayers(), and Terraria.Main.PlayerList.

Referenced by Terraria.Main.DrawMenu().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: