Fix item dupe via /logout & NPC (#2495 issue)

This commit is contained in:
shell627 2021-12-01 00:18:02 +06:00
parent b6d56422ff
commit acb6a96245
2 changed files with 7 additions and 0 deletions

View file

@ -911,6 +911,12 @@ namespace TShockAPI
return;
}
if (args.Player.TPlayer.talkNPC != -1)
{
args.Player.SendErrorMessage("Please close NPC window for logging out.");
return;
}
args.Player.Logout();
args.Player.SendSuccessMessage("You have been successfully logged out of your account.");
if (Main.ServerSideCharacter)