Add debugging info for which method called Disable()
This commit is contained in:
parent
71117ae0b5
commit
b85754ee1f
2 changed files with 9 additions and 2 deletions
|
|
@ -48,5 +48,5 @@ using System.Runtime.InteropServices;
|
||||||
// Build Number
|
// Build Number
|
||||||
// MMdd of the build
|
// MMdd of the build
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.4.5.0113")]
|
[assembly: AssemblyVersion("3.4.5.0114")]
|
||||||
[assembly: AssemblyFileVersion("3.4.5.0113")]
|
[assembly: AssemblyFileVersion("3.4.5.0114")]
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
|
@ -365,6 +366,12 @@ namespace TShockAPI
|
||||||
SetBuff(23, 330, true); //Cursed
|
SetBuff(23, 330, true); //Cursed
|
||||||
if (!string.IsNullOrEmpty(reason))
|
if (!string.IsNullOrEmpty(reason))
|
||||||
Log.ConsoleInfo(string.Format("Player {0} has been disabled for {1}", Name, reason));
|
Log.ConsoleInfo(string.Format("Player {0} has been disabled for {1}", Name, reason));
|
||||||
|
|
||||||
|
var trace = new StackTrace();
|
||||||
|
StackFrame frame = null;
|
||||||
|
frame = trace.GetFrame(1);
|
||||||
|
if (frame != null && frame.GetMethod().DeclaringType != null)
|
||||||
|
Log.Debug(frame.GetMethod().DeclaringType.Name + " called Disable()");
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Whoopie(object time)
|
public virtual void Whoopie(object time)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue