Merge remote-tracking branch 'drunderscore/feature/bouncer-reject-out-of-bounds-npc-talk' into general-devel

This commit is contained in:
Lucas Nicodemus 2021-12-04 22:35:37 -08:00
commit d50ebfea37
2 changed files with 10 additions and 2 deletions

View file

@ -3198,9 +3198,16 @@ namespace TShockAPI
TShock.Log.ConsoleDebug("Bouncer / HandleNpcTalk rejected from bouncer throttle from {0}", args.Player.Name);
return true;
}
// -1 is a magic value, represents not talking to an NPC
if (npc < -1 || npc >= Main.maxNPCs)
{
TShock.Log.ConsoleDebug("Bouncer / HandleNpcTalk rejected from bouncer out of bounds from {0}", args.Player.Name);
return true;
}
return false;
}
}
private static bool HandlePlayerAnimation(GetDataHandlerArgs args)
{
if (OnPlayerAnimation(args.Player, args.Data))