Merge pull request #2522 from Terrarxxn/general-devel
Fix item dupe via /logout & NPC (#2495 issue)
This commit is contained in:
commit
b8571d336c
2 changed files with 7 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
|||
|
||||
## TShock 4.5.12
|
||||
* Fixed the ability to spawn Zenith projectile with non-original items. (@AgaSpace)
|
||||
* Fixed item dupe via /logout & NPC. (@Terrarxxn)
|
||||
* Added hook `GetDataHandlers.OnNpcTalk` for NpcTalk and a handler for it that stops unregistered and logged out players from interacting with NPCs, preventing them from smuggling or duplicating items via NPC item slots. (@tru321)
|
||||
* Fixed the ability to create custom messages with your death (or the death of another player) (@AgaSpace)
|
||||
* Added the `OnSignRead` handler in `GetDataHandler`, and added the `SignRead` event. Added check to ensure the sign being read is within world bounds `(x >= 0 && y >= 0 && x < Main.maxTilesX && y < Main.maxTilesY)`. (@drunderscore)
|
||||
|
|
|
|||
|
|
@ -911,6 +911,12 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.TPlayer.talkNPC != -1)
|
||||
{
|
||||
args.Player.SendErrorMessage("Please close NPC windows before logging out.");
|
||||
return;
|
||||
}
|
||||
|
||||
args.Player.Logout();
|
||||
args.Player.SendSuccessMessage("You have been successfully logged out of your account.");
|
||||
if (Main.ServerSideCharacter)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue