From 227cef3bd67214b48c7d3897a07c39507e0d6e65 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 6 Mar 2022 18:46:55 -0800 Subject: [PATCH 1/7] Version tick: 4.5.16 --- CHANGELOG.md | 4 ++++ TShockAPI/Properties/AssemblyInfo.cs | 6 +++--- TerrariaServerAPI | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e99d9db5..9801acac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. ## Upcoming changes +* You could be here! + +## TShock 4.5.16 +* Added preliminary support for Terraria 1.4.3.6. (@SignatureBeef, @hakusaro) ## TShock 4.5.15 * Added preliminary support for Terraria 1.4.3.5. (@SignatureBeef, @hakusaro) diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index ace87f43..1ff3c585 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -28,7 +28,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Re-Logic, Pryaxis & TShock Contributors")] [assembly: AssemblyProduct("TShockAPI")] -[assembly: AssemblyCopyright("Copyright © Re-Logic, Pryaxis & TShock Contributors 2011-2021")] +[assembly: AssemblyCopyright("Copyright © Re-Logic, Pryaxis & TShock Contributors 2011-2022")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -53,5 +53,5 @@ using System.Runtime.InteropServices; // Also, be sure to release on github with the exact assembly version tag as below // so that the update manager works correctly (via the Github releases api and mimic) -[assembly: AssemblyVersion("4.5.15")] -[assembly: AssemblyFileVersion("4.5.15")] +[assembly: AssemblyVersion("4.5.16")] +[assembly: AssemblyFileVersion("4.5.16")] diff --git a/TerrariaServerAPI b/TerrariaServerAPI index b3e3dd1b..4c2075fb 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit b3e3dd1b4e9a2a178dd3ff5f697a8d1f8586590f +Subproject commit 4c2075fbdd7e9b17dd96d6495fe9f491a2af0bbb From 8b064a7e22b9dfd8967afda7f8180a6cc89aa270 Mon Sep 17 00:00:00 2001 From: gohjoseph Date: Fri, 18 Mar 2022 00:35:02 +0800 Subject: [PATCH 2/7] Fix `NetHooks_NameCollision` to kick duplicate players. - Fixes Pryaxis/TShock#2530 --- CHANGELOG.md | 1 + TShockAPI/TShock.cs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9801acac..6469df36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. ## Upcoming changes +* Fixed duplicate characters (twins) after repeatedly logging in as the same character due to connection not being immediately closed during `NetHooks_NameCollision`. (@gohjoseph) * You could be here! ## TShock 4.5.16 diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index ce5b59bf..9da8c51a 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -521,7 +521,7 @@ namespace TShockAPI { if (player.IP == ip) { - Netplay.Clients[player.Index].PendingTermination = true; + player.Kick("You logged in from the same IP.", true, true, "Server", true); args.Handled = true; return; } @@ -530,7 +530,7 @@ namespace TShockAPI var ips = JsonConvert.DeserializeObject>(player.Account.KnownIps); if (ips.Contains(ip)) { - Netplay.Clients[player.Index].PendingTermination = true; + player.Kick("You logged in from another location.", true, true, "Server", true); args.Handled = true; } } @@ -1279,7 +1279,7 @@ namespace TShockAPI //Reset toggle creative powers to default, preventing potential power transfer & desync on another user occupying this slot later. - foreach(var kv in CreativePowerManager.Instance._powersById) + foreach (var kv in CreativePowerManager.Instance._powersById) { var power = kv.Value; From 203b9bf2811459ae459ce4c987ed6d66ca82a95f Mon Sep 17 00:00:00 2001 From: gohjoseph Date: Fri, 18 Mar 2022 01:56:59 +0800 Subject: [PATCH 3/7] Remove unneeded kick display `adminUsername` --- TShockAPI/TShock.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 9da8c51a..6d96cb2d 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -521,7 +521,7 @@ namespace TShockAPI { if (player.IP == ip) { - player.Kick("You logged in from the same IP.", true, true, "Server", true); + player.Kick("You logged in from the same IP.", true, true, null, true); args.Handled = true; return; } @@ -530,7 +530,7 @@ namespace TShockAPI var ips = JsonConvert.DeserializeObject>(player.Account.KnownIps); if (ips.Contains(ip)) { - player.Kick("You logged in from another location.", true, true, "Server", true); + player.Kick("You logged in from another location.", true, true, null, true); args.Handled = true; } } From 3805bb8ca2c08e833c7e3cea644dea0e989fe45f Mon Sep 17 00:00:00 2001 From: gohjoseph Date: Fri, 18 Mar 2022 22:35:43 +0800 Subject: [PATCH 4/7] Fix mobs not dropping picked up coins --- TShockAPI/GetDataHandlers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 72770c93..71ba1da1 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -3958,7 +3958,7 @@ namespace TShockAPI return true; } - return true; + return false; } private static bool HandleKillPortal(GetDataHandlerArgs args) From d26cf20b5c48b4eda1849b01774c84233723d8be Mon Sep 17 00:00:00 2001 From: gohjoseph Date: Fri, 18 Mar 2022 22:53:22 +0800 Subject: [PATCH 5/7] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6469df36..207009c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin ## Upcoming changes * Fixed duplicate characters (twins) after repeatedly logging in as the same character due to connection not being immediately closed during `NetHooks_NameCollision`. (@gohjoseph) +* Fixed mobs not dropping picked up coins (@gohjoseph) * You could be here! ## TShock 4.5.16 From 521e0b57827baff7b5edf05270d7f55c2fac0244 Mon Sep 17 00:00:00 2001 From: gohjoseph Date: Sat, 19 Mar 2022 00:27:47 +0800 Subject: [PATCH 6/7] Update CHANGELOG.md fix punctuation Co-authored-by: Lucas Nicodemus --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 207009c0..68b4fdb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin ## Upcoming changes * Fixed duplicate characters (twins) after repeatedly logging in as the same character due to connection not being immediately closed during `NetHooks_NameCollision`. (@gohjoseph) -* Fixed mobs not dropping picked up coins (@gohjoseph) +* Fixed mobs not dropping picked up coins. (@gohjoseph) * You could be here! ## TShock 4.5.16 From 1e5e3cd864c2b339ebcda13e5d994434af7ece2d Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Fri, 18 Mar 2022 20:35:50 -0700 Subject: [PATCH 7/7] Version tick: 4.5.17 --- CHANGELOG.md | 3 ++- TShockAPI/Properties/AssemblyInfo.cs | 4 ++-- TShockAPI/TShock.cs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b4fdb9..3cb2fd5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,10 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. ## Upcoming changes + +## TShock 4.5.17 * Fixed duplicate characters (twins) after repeatedly logging in as the same character due to connection not being immediately closed during `NetHooks_NameCollision`. (@gohjoseph) * Fixed mobs not dropping picked up coins. (@gohjoseph) -* You could be here! ## TShock 4.5.16 * Added preliminary support for Terraria 1.4.3.6. (@SignatureBeef, @hakusaro) diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index 1ff3c585..a826096c 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -53,5 +53,5 @@ using System.Runtime.InteropServices; // Also, be sure to release on github with the exact assembly version tag as below // so that the update manager works correctly (via the Github releases api and mimic) -[assembly: AssemblyVersion("4.5.16")] -[assembly: AssemblyFileVersion("4.5.16")] +[assembly: AssemblyVersion("4.5.17")] +[assembly: AssemblyFileVersion("4.5.17")] diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 6d96cb2d..e326c6f9 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -58,7 +58,7 @@ namespace TShockAPI /// VersionNum - The version number the TerrariaAPI will return back to the API. We just use the Assembly info. public static readonly Version VersionNum = Assembly.GetExecutingAssembly().GetName().Version; /// VersionCodename - The version codename is displayed when the server starts. Inspired by software codenames conventions. - public static readonly string VersionCodename = "Zelenskyy"; + public static readonly string VersionCodename = "Volodymyr Oleksandrovych Zelenskyy"; /// SavePath - This is the path TShock saves its data in. This path is relative to the TerrariaServer.exe (not in ServerPlugins). public static string SavePath = "tshock";