From 54f6bb3a7e6b6eee43b4b9e56b239474dc8aeccb Mon Sep 17 00:00:00 2001 From: Simon311 Date: Sat, 11 Mar 2017 06:08:13 +0300 Subject: [PATCH] Fix a client crash exploit --- TShockAPI/GetDataHandlers.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 50f16d4e..55038e91 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -3810,6 +3810,9 @@ namespace TShockAPI if (buff == 10 && TShock.Config.DisableInvisPvP && args.TPlayer.hostile) buff = 0; + if (Netplay.Clients[args.TPlayer.whoAmI].State < 2 && (buff == 156 || buff == 47 || buff == 149)) + buff = 0; + args.TPlayer.buffType[i] = buff; if (args.TPlayer.buffType[i] > 0) {