From 44034c76496fab809d1c5aaccf586b95a087456d Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Mon, 28 Feb 2022 00:20:00 -0800 Subject: [PATCH] Set args.Result to 0 in PlayerAnnounce hook In https://github.com/SignatureBeef/Open-Terraria-API/commit/8204e2b3f9550aa2743f80dd87f4ca92f6408453, `PlayerAnnounceResult` was introduced, replacing `HookResult`, which changed the result for `PlayerAnnounce` to a byte called `PlayerAnnounceResult`. There are two options, `SendToPlayer` and `WriteToConsole`, set to 1 and 2 respectively. Because TShock handles this, we're setting it to 0, i.e., don't notify anybody. --- TShockAPI/TShock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 57ce7422..93986a1f 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -254,7 +254,7 @@ namespace TShockAPI OTAPI.Hooks.NetMessage.PlayerAnnounce += (sender, args) => { //TShock handles this - args.Result = OTAPI.HookResult.Cancel; + args.Result = 0; }; // if sqlite.interop cannot be found, try and search the runtimes folder. this usually happens when debugging tsapi // since it does not have the dependency installed directly