Update Bouncer / OnNPCAddBuff
This commit is contained in:
parent
632df52ce7
commit
4621a2f7f5
3 changed files with 46 additions and 26 deletions
|
|
@ -1981,6 +1981,8 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (!args.Player.HasPermission(Permissions.ignorenpcbuffdetection))
|
||||
{
|
||||
bool detectedNPCBuffTimeCheat = false;
|
||||
|
||||
if (NPCAddBuffTimeMax.ContainsKey(type))
|
||||
|
|
@ -1990,11 +1992,24 @@ namespace TShockAPI
|
|||
detectedNPCBuffTimeCheat = true;
|
||||
}
|
||||
|
||||
if (npc.townNPC && npc.netID != NPCID.Guide && npc.netID != NPCID.Clothier)
|
||||
if (npc.townNPC)
|
||||
{
|
||||
if (type != BuffID.Lovestruck && type != BuffID.Stinky && type != BuffID.DryadsWard &&
|
||||
type != BuffID.Wet && type != BuffID.Slimed && type != BuffID.GelBalloonBuff && type != BuffID.Frostburn2 &&
|
||||
type != BuffID.Shimmer)
|
||||
if (type != BuffID.Poisoned
|
||||
&& type != BuffID.OnFire
|
||||
&& type != BuffID.Confused
|
||||
&& type != BuffID.CursedInferno
|
||||
&& type != BuffID.Ichor
|
||||
&& type != BuffID.Venom
|
||||
&& type != BuffID.Midas
|
||||
&& type != BuffID.Wet
|
||||
&& type != BuffID.Lovestruck
|
||||
&& type != BuffID.Stinky
|
||||
&& type != BuffID.Slimed
|
||||
&& type != BuffID.DryadsWard
|
||||
&& type != BuffID.GelBalloonBuff
|
||||
&& type != BuffID.OnFire3
|
||||
&& type != BuffID.Frostburn2
|
||||
&& type != BuffID.Shimmer)
|
||||
{
|
||||
detectedNPCBuffTimeCheat = true;
|
||||
}
|
||||
|
|
@ -2012,6 +2027,7 @@ namespace TShockAPI
|
|||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The Bouncer handler for when an NPC is rehomed.</summary>
|
||||
/// <param name="sender">The object that triggered the event.</param>
|
||||
|
|
@ -2842,7 +2858,7 @@ namespace TShockAPI
|
|||
{ BuffID.MaceWhipNPCDebuff, 240 }, // BuffID: 319
|
||||
{ BuffID.GelBalloonBuff, 1800 }, // BuffID: 320
|
||||
{ BuffID.OnFire3, 1200 }, // BuffID: 323
|
||||
{ BuffID.Frostburn2, 900 }, // BuffID: 324
|
||||
{ BuffID.Frostburn2, 1200 }, // BuffID: 324
|
||||
{ BuffID.BoneWhipNPCDebuff, 240 }, // BuffID: 326
|
||||
{ BuffID.TentacleSpike, 540 }, // BuffID: 337
|
||||
{ BuffID.CoolWhipNPCDebuff, 240 }, // BuffID: 340
|
||||
|
|
|
|||
|
|
@ -155,6 +155,9 @@ namespace TShockAPI
|
|||
[Description("Prevents your actions from being ignored if damage is too high.")]
|
||||
public static readonly string ignoredamagecap = "tshock.ignore.damage";
|
||||
|
||||
[Description("Prevents your from being kicked by npc buff hack detection.")]
|
||||
public static readonly string ignorenpcbuffdetection = "tshock.ignore.npcbuff";
|
||||
|
||||
[Description("Bypass server side character checks.")]
|
||||
public static readonly string bypassssc = "tshock.ignore.ssc";
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ Use past tense when adding new entries; sign your name off when you add or chang
|
|||
* Check loadout slots for hacked item stacks. (@drunderscore)
|
||||
* Fix players being kicked after using the Flamethrower to apply the `OnFire3` debuff for `1200` ticks. (@BashGuy10)
|
||||
* Fix being kicked for using the new sponge types on liquid. (@BashGuy10)
|
||||
* Allow flask buffs to be applied on town npc due to the Flymeal. Add a permission could skip the buff detection. (@KawaiiYuyu)
|
||||
|
||||
## TShock 4.5.18
|
||||
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@PotatoCider)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue