Merge branch 'general-devel' into h/ips

This commit is contained in:
Lucas Nicodemus 2021-05-28 19:36:25 -07:00
commit 5e09f5133d
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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;
}
}