TSPlayer.Disable() now uses new debuffs, removed weird code?
This commit is contained in:
parent
f5e1b79fbb
commit
9df043764c
1 changed files with 9 additions and 9 deletions
|
|
@ -24,6 +24,7 @@ using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
using TShockAPI.DB;
|
using TShockAPI.DB;
|
||||||
using TShockAPI.Net;
|
using TShockAPI.Net;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
@ -770,13 +771,17 @@ namespace TShockAPI
|
||||||
public int ActiveChest = -1;
|
public int ActiveChest = -1;
|
||||||
public Item ItemInHand = new Item();
|
public Item ItemInHand = new Item();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Disables the player for the given <paramref name="reason"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reason">The reason why the player was disabled.</param>
|
||||||
|
/// <param name="displayConsole">Whether or not to log this event to the console.</param>
|
||||||
public virtual void Disable(string reason = "", bool displayConsole = true)
|
public virtual void Disable(string reason = "", bool displayConsole = true)
|
||||||
{
|
{
|
||||||
LastThreat = DateTime.UtcNow;
|
LastThreat = DateTime.UtcNow;
|
||||||
SetBuff(33, 330, true); //Weak
|
SetBuff(BuffID.Frozen, 330, true);
|
||||||
SetBuff(32, 330, true); //Slow
|
SetBuff(BuffID.Stoned, 330, true);
|
||||||
SetBuff(23, 330, true); //Cursed
|
SetBuff(BuffID.Webbed, 330, true);
|
||||||
SetBuff(47, 330, true); //Frozen
|
|
||||||
|
|
||||||
if (ActiveChest != -1)
|
if (ActiveChest != -1)
|
||||||
{
|
{
|
||||||
|
|
@ -798,11 +803,6 @@ namespace TShockAPI
|
||||||
LastDisableNotification = DateTime.UtcNow;
|
LastDisableNotification = DateTime.UtcNow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var trace = new StackTrace();
|
|
||||||
StackFrame frame = null;
|
|
||||||
frame = trace.GetFrame(1);
|
|
||||||
if (frame != null && frame.GetMethod().DeclaringType != null)
|
|
||||||
TShock.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