From 09f75e0db9c3718a54eedbd93e26b3c40421abd5 Mon Sep 17 00:00:00 2001 From: stacey <57187883+moisterrific@users.noreply.github.com> Date: Wed, 26 May 2021 19:31:46 -0400 Subject: [PATCH] Update OnNPCAddBuff to account for Frost armor set This fixes false positive cheat detection when throwing rotten eggs at town NPCs while wearing Frost armor set. Also made the debug and kick messages more clear for future reference. --- TShockAPI/Bouncer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index ed4c031a..443eb135 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1537,7 +1537,7 @@ namespace TShockAPI if (npc.townNPC && npc.netID != NPCID.Guide && npc.netID != NPCID.Clothier) { if (type != BuffID.Lovestruck && type != BuffID.Stinky && type != BuffID.DryadsWard && - type != BuffID.Wet && type != BuffID.Slimed && type != BuffID.GelBalloonBuff) + type != BuffID.Wet && type != BuffID.Slimed && type != BuffID.GelBalloonBuff && type != BuffID.Frostburn2) { detectedNPCBuffTimeCheat = true; } @@ -1550,8 +1550,8 @@ namespace TShockAPI if (detectedNPCBuffTimeCheat) { - TShock.Log.ConsoleDebug("Bouncer / OnNPCAddBuff rejected abnormal buff ({1}) from {0}", args.Player.Name, type); - args.Player.Kick($"Added buff to NPC abnormally.", true); + TShock.Log.ConsoleDebug("Bouncer / OnNPCAddBuff rejected abnormal buff ({0}) added to {1} ({2}) from {3}.", type, npc.TypeName, npc.netID, args.Player.Name); + args.Player.Kick($"Added buff to {npc.TypeName} NPC abnormally.", true); args.Handled = true; } }