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.
This commit is contained in:
parent
e5e66264d5
commit
09f75e0db9
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue