Merge branch 'general-devel' into patch-3
This commit is contained in:
commit
eae8ae1fb5
5 changed files with 52 additions and 25 deletions
|
|
@ -1981,36 +1981,52 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
bool detectedNPCBuffTimeCheat = false;
|
||||
|
||||
if (NPCAddBuffTimeMax.ContainsKey(type))
|
||||
if (!args.Player.HasPermission(Permissions.ignorenpcbuffdetection))
|
||||
{
|
||||
if (time > NPCAddBuffTimeMax[type])
|
||||
bool detectedNPCBuffTimeCheat = false;
|
||||
|
||||
if (NPCAddBuffTimeMax.ContainsKey(type))
|
||||
{
|
||||
if (time > NPCAddBuffTimeMax[type])
|
||||
{
|
||||
detectedNPCBuffTimeCheat = true;
|
||||
}
|
||||
|
||||
if (npc.townNPC)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
detectedNPCBuffTimeCheat = true;
|
||||
}
|
||||
|
||||
if (npc.townNPC && npc.netID != NPCID.Guide && npc.netID != NPCID.Clothier)
|
||||
if (detectedNPCBuffTimeCheat)
|
||||
{
|
||||
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)
|
||||
{
|
||||
detectedNPCBuffTimeCheat = true;
|
||||
}
|
||||
TShock.Log.ConsoleDebug(GetString("Bouncer / OnNPCAddBuff rejected abnormal buff ({0}) added to {1} ({2}) from {3}.", type, npc.TypeName, npc.netID, args.Player.Name));
|
||||
args.Player.Kick(GetString($"Added buff to {npc.TypeName} NPC abnormally."), true);
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
detectedNPCBuffTimeCheat = true;
|
||||
}
|
||||
|
||||
if (detectedNPCBuffTimeCheat)
|
||||
{
|
||||
TShock.Log.ConsoleDebug(GetString("Bouncer / OnNPCAddBuff rejected abnormal buff ({0}) added to {1} ({2}) from {3}.", type, npc.TypeName, npc.netID, args.Player.Name));
|
||||
args.Player.Kick(GetString($"Added buff to {npc.TypeName} NPC abnormally."), true);
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>The Bouncer handler for when an NPC is rehomed.</summary>
|
||||
|
|
@ -2842,12 +2858,12 @@ 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
|
||||
{ BuffID.BloodButcherer, 540 }, // BuffID: 344
|
||||
{ BuffID.Shimmer, 100 }, // BuffID: 353
|
||||
{ BuffID.Shimmer, 100 }, // BuffID: 353
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
@ -439,7 +442,7 @@ namespace TShockAPI
|
|||
|
||||
[Description("User can kill others.")]
|
||||
public static readonly string kill = "tshock.kill";
|
||||
|
||||
|
||||
[Description("Player can respawn themselves.")]
|
||||
public static readonly string respawn = "tshock.respawn";
|
||||
|
||||
|
|
|
|||
|
|
@ -945,6 +945,9 @@ namespace TShockAPI
|
|||
{
|
||||
PrepareLangForDump();
|
||||
// Lang.setLang(true);
|
||||
|
||||
Directory.CreateDirectory("docs");
|
||||
|
||||
Configuration.TShockConfig.DumpDescriptions();
|
||||
Permissions.DumpDescriptions();
|
||||
Configuration.ServerSideConfig.DumpDescriptions();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue