From ac531a7d1483b48a79c72d62668ec63eba8191be Mon Sep 17 00:00:00 2001 From: Tyler Watson Date: Sun, 16 Aug 2015 14:15:20 +1000 Subject: [PATCH] Removing TSPlayer.user from heapshot --- TShockAPI/TShock.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 82716cb4..5a1024ff 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -176,6 +176,8 @@ namespace TShockAPI string logFilename; string logPathSetupWarning; + TerrariaApi.Reporting.CrashReporter.HeapshotRequesting += CrashReporter_HeapshotRequesting; + try { HandleCommandLine(Environment.GetCommandLineArgs()); @@ -339,6 +341,14 @@ namespace TShockAPI } } + protected void CrashReporter_HeapshotRequesting(object sender, EventArgs e) + { + foreach (TSPlayer player in TShock.Players) + { + player.User = null; + } + } + /// Dispose - Called when disposing. /// disposing - If set, disposes of all hooks and other systems. protected override void Dispose(bool disposing)