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/6] 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/6] 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. From 2440e044b1c468ce416d9c51d3cacac05b7e2a76 Mon Sep 17 00:00:00 2001 From: Tyson Strange Date: Sun, 3 Feb 2019 15:55:19 +1000 Subject: [PATCH 3/6] Added confused debuff for Brain of Confusion --- TShockAPI/Bouncer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index f4ee7d5f..9e3f62d7 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1869,7 +1869,8 @@ namespace TShockAPI { BuffID.DryadsWardDebuff, 120 }, { BuffID.Daybreak, 300 }, { BuffID.BetsysCurse, 600 }, - { BuffID.Oiled, 540 } + { BuffID.Oiled, 540 }, + { BuffID.Confused, 360 }, }; /// From 12c34256acbdf1042a99bcfa82c2e505207279cd Mon Sep 17 00:00:00 2001 From: Tyson Strange Date: Sun, 3 Feb 2019 15:56:43 +1000 Subject: [PATCH 4/6] Added confused debuff for Brain of Confusion --- TShockAPI/Bouncer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 9e3f62d7..53a88042 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1870,7 +1870,7 @@ namespace TShockAPI { BuffID.Daybreak, 300 }, { BuffID.BetsysCurse, 600 }, { BuffID.Oiled, 540 }, - { BuffID.Confused, 360 }, + { BuffID.Confused, 360 } }; /// From dbf9264d124b32a814c71583fe2e0b360755a294 Mon Sep 17 00:00:00 2001 From: Tyson Strange Date: Sun, 3 Feb 2019 17:19:52 +1000 Subject: [PATCH 5/6] update change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a47f26b..b5b57a9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large. ## Upcoming Changes +* Added confused debuff to Bouncer for confusion applied from Brain of Confusion * API: Added return in OnNameCollision if hook has been handled. (@Patrikkk) * API: Added hooks for item, projectile and tile bans (@deadsurgeon42) * API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42) From 6315086cb183c5010a4e95f701089c79a0fd544e Mon Sep 17 00:00:00 2001 From: Tyson Strange Date: Sun, 3 Feb 2019 17:41:23 +1000 Subject: [PATCH 6/6] Added to Bouncer NPCAddBuffTimeMax for Solar Eruption Item ID: 3473, Daybreak Item ID: 3543 --- TShockAPI/Bouncer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 53a88042..12889b54 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1870,7 +1870,8 @@ namespace TShockAPI { BuffID.Daybreak, 300 }, { BuffID.BetsysCurse, 600 }, { BuffID.Oiled, 540 }, - { BuffID.Confused, 360 } + { BuffID.Confused, 360 }, // Brain of Confusion Internal Item ID: 3223 + { BuffID.Daybreak, 300 } // Solar Eruption Item ID: 3473, Daybreak Item ID: 3543 }; ///