diff --git a/CHANGELOG.md b/CHANGELOG.md index 92cf8760..cef5ea8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Fixed torchgod settings to include whether or not torchgod has been fought by the player before and respect `usingBiomeTorches` setting. (@Quinci135) * Fixed /worldmode not synchronising data to players after updating the world state (@bartico6, @Arthri) * Added `OnSendNetData` hook to TSAPI, which enables developers to intercept traffic being sent from the server to clients. (@Stealownz) +* Fixed false positive `OnNPCAddBuff` detection when throwing rotten eggs at town NPCs while wearing Frost armor set. (@moisterrific) * Moved the emoji player index check into a new class of handlers called `IllegalPerSe`, which is designed to help isolate parts of TShock and make it so that "protocol violations" are treated separately from heuristic based anti-cheat checks. (@hakusaro) ## TShock 4.5.3 diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index d211d50a..5bce5d2c 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1541,7 +1541,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; } @@ -1554,8 +1554,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; } }