From 8ced5d5dfc36b02756aa83fde2074ae6ce04fdc6 Mon Sep 17 00:00:00 2001 From: Patrikkk Date: Mon, 18 May 2020 18:47:39 +0200 Subject: [PATCH] Adding new buffs to OnNPCAddBuff Missed these buffs with their bufftimes, so it was always caught by the bouncer, thinking players are hacking. --- TShockAPI/Bouncer.cs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 5fcc306f..11d293f0 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1402,7 +1402,8 @@ namespace TShockAPI if (detectedNPCBuffTimeCheat) { - args.Player.Kick("Added buff to NPC abnormally.", true); + + args.Player.Kick($"Added buff to NPC abnormally.", true); args.Handled = true; } } @@ -1867,8 +1868,8 @@ namespace TShockAPI } } } - - + + // These time values are references from Projectile.cs, at npc.AddBuff() calls. private static Dictionary NPCAddBuffTimeMax = new Dictionary() { { BuffID.Poisoned, 3600 }, @@ -1891,9 +1892,18 @@ namespace TShockAPI { BuffID.BetsysCurse, 600 }, { BuffID.Oiled, 540 }, { BuffID.Confused, 450 }, // Brain of Confusion Internal Item ID: 3223 - { BuffID.Daybreak, 300 } // Solar Eruption Item ID: 3473, Daybreak Item ID: 3543 + { BuffID.Daybreak, 300 }, // Solar Eruption Item ID: 3473, Daybreak Item ID: 3543 + { BuffID.BlandWhipEnemyDebuff, 240 }, + { BuffID.SwordWhipNPCDebuff, 240 }, + { BuffID.ScytheWhipEnemyDebuff, 240 }, + { BuffID.FlameWhipEnemyDebuff, 240 }, + { BuffID.ThornWhipNPCDebuff, 240 }, + { BuffID.RainbowWhipNPCDebuff, 240 }, + { BuffID.MaceWhipNPCDebuff, 240 }, + { BuffID.GelBalloonBuff, 1800 } + }; - + /// /// Tile IDs that can be oriented: /// Cannon,