Rename cheat var to detectedNPCBuffTimeCheat.
This commit is contained in:
parent
6efa0d2bb6
commit
e9372be276
1 changed files with 6 additions and 6 deletions
|
|
@ -509,13 +509,13 @@ namespace TShockAPI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cheat = false;
|
bool detectedNPCBuffTimeCheat = false;
|
||||||
|
|
||||||
if (NPCAddBuffTimeMax.ContainsKey(type))
|
if (NPCAddBuffTimeMax.ContainsKey(type))
|
||||||
{
|
{
|
||||||
if (time > NPCAddBuffTimeMax[type])
|
if (time > NPCAddBuffTimeMax[type])
|
||||||
{
|
{
|
||||||
cheat = true;
|
detectedNPCBuffTimeCheat = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (npc.townNPC && npc.netID != NPCID.Guide && npc.netID != NPCID.Clothier)
|
if (npc.townNPC && npc.netID != NPCID.Guide && npc.netID != NPCID.Clothier)
|
||||||
|
|
@ -523,18 +523,18 @@ namespace TShockAPI
|
||||||
if (type != BuffID.Lovestruck && type != BuffID.Stinky && type != BuffID.DryadsWard &&
|
if (type != BuffID.Lovestruck && type != BuffID.Stinky && type != BuffID.DryadsWard &&
|
||||||
type != BuffID.Wet && type != BuffID.Slimed)
|
type != BuffID.Wet && type != BuffID.Slimed)
|
||||||
{
|
{
|
||||||
cheat = true;
|
detectedNPCBuffTimeCheat = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cheat = true;
|
detectedNPCBuffTimeCheat = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cheat)
|
if (detectedNPCBuffTimeCheat)
|
||||||
{
|
{
|
||||||
args.Player.Disable("Add buff to NPC abnormally.", DisableFlags.WriteToLogAndConsole);
|
args.Player.Disable("Added buff to NPC abnormally.", DisableFlags.WriteToLogAndConsole);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue