From 9975c445f8dbb39cb8463435ae01082eaac33922 Mon Sep 17 00:00:00 2001 From: Chris <2648373+QuiCM@users.noreply.github.com> Date: Mon, 24 Dec 2018 13:54:39 +1030 Subject: [PATCH 1/2] Proposed fix for #1653 - Testing required From #1653: >From latest version (2301) If a player puts on a banned peice of armour, they get the message to say "You are wearing banned equipment" After they take it off, the messages stop, but they keep getting disabled. Solution: Approx line 1131 in tShock.cs on `OnSecondUpdate` the `tsplayer.IsDisabledForBannedWearable` gets set to true, but it never gets set to false. Change: ```csharp if (check != "none") player.IsDisabledForBannedWearable = true; ``` >To: ```csharp if (check != "none") player.IsDisabledForBannedWearable = true; else player.IsDisabledForBannedWearable = false; ``` Requires testing --- TShockAPI/TShock.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index f839019d..40f06b71 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1130,6 +1130,8 @@ namespace TShockAPI } if (check != "none") player.IsDisabledForBannedWearable = true; + else + player.IsDisabledForBannedWearable = false; if (player.IsBeingDisabled()) { From 10d7a4f35bea902cfb3e3f94942eeab676049fb0 Mon Sep 17 00:00:00 2001 From: Chris <2648373+QuiCM@users.noreply.github.com> Date: Mon, 24 Dec 2018 13:56:47 +1030 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a47f26b..77a0d629 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Add NPCAddBuff data handler and bouncer (@AxeelAnder) * Improved config file documentation (@Enerdy) * Add PlayerZone data handler and bouncer (@AxeelAnder) +* Fix banned armour checks not clearing properly (thanks @tysonstrange) ## TShock 4.3.25 * Fixed a critical exploit in the Terraria protocol that could cause massive unpreventable world corruption as well as a number of other problems. Thanks to @bartico6 for reporting. Fixed by the efforts of @QuiCM, @hakusaro, and tips in the right directioon from @bartico6.