diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index affa1609f..6ff7fd1aa 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -2659,9 +2659,12 @@ internal void OnPlayerDamage(object sender, GetDataHandlers.PlayerDamageEventArg * If the player was not specified, that is, the player index is -1, then it is definitely a custom cause, as you can only deal damage with a projectile or another player. * This is how everything else works. If an NPC is specified, its value is not -1, which is a custom cause. * + * An exception to this is damage dealt by the Inferno potion to other players -- it is only identified by the other index value of 16, + * even lacking a source player index. + * * Checking whether this damage came from the player is necessary, because the damage from the player can come even when it is hit by a NPC */ - if (TShock.Config.Settings.DisableCustomDeathMessages && id != args.Player.Index && + if (TShock.Config.Settings.DisableCustomDeathMessages && id != args.Player.Index && reason._sourceOtherIndex != 16 && (reason._sourcePlayerIndex == -1 || reason._sourceNPCIndex != -1 || reason._sourceOtherIndex != -1 || reason._sourceCustomReason != null)) { TShock.Log.ConsoleDebug(GetString("Bouncer / OnPlayerDamage rejected custom death message from {0}", args.Player.Name)); diff --git a/TShockAPI/DB/CharacterManager.cs b/TShockAPI/DB/CharacterManager.cs index 575ac3dcb..5a5e13a64 100644 --- a/TShockAPI/DB/CharacterManager.cs +++ b/TShockAPI/DB/CharacterManager.cs @@ -189,6 +189,9 @@ public bool InsertPlayerData(TSPlayer player, bool fromCommand = false) if (!player.IsLoggedIn) return false; + if (player.State < 10) + return false; + if (player.HasPermission(Permissions.bypassssc) && !fromCommand) { TShock.Log.ConsoleInfo(GetParticularString("{0} is a player name", $"Skipping SSC save (due to tshock.ignore.ssc) for {player.Account.Name}")); diff --git a/TShockAPI/Handlers/SendTileRectHandler.cs b/TShockAPI/Handlers/SendTileRectHandler.cs index cb0163072..80d5a47c4 100644 --- a/TShockAPI/Handlers/SendTileRectHandler.cs +++ b/TShockAPI/Handlers/SendTileRectHandler.cs @@ -38,6 +38,10 @@ public class SendTileRectHandler : IPacketHandler() + { + TileID.AshGrass + } }, }; /// @@ -67,6 +71,10 @@ public class SendTileRectHandler : IPacketHandler() + { + 6, 7, 8, 9, 10, + } }, }; /// diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 7a5a38af7..65380a523 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -676,17 +676,13 @@ private void OnItemForceIntoChest(ForceItemIntoChestEventArgs args) if (args.Chest != null) { + // After checking for protected regions, no further range checking is necessarily because the client packet only specifies the + // inventory slot to quick stack. The vanilla Terraria server itself determines what chests are close enough to the player. if (Config.Settings.RegionProtectChests && !Regions.CanBuild((int)args.WorldPosition.X, (int)args.WorldPosition.Y, tsplr)) { args.Handled = true; return; } - - if (!tsplr.IsInRange(args.Chest.x, args.Chest.y)) - { - args.Handled = true; - return; - } } } diff --git a/docs/changelog.md b/docs/changelog.md index 053afcffd..c4a95d142 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -106,6 +106,9 @@ Use past tense when adding new entries; sign your name off when you add or chang * Allowed multiple test cases to be in TShock's test suite. (@drunderscore) * Fixed unable to use Purification/Evil Powder in jungle. (@sgkoishi) * Set the `GetDataHandledEventArgs.Player` property for the `SyncTilePicking` data handler. (@drunderscore) +* Relaxed custom death message restrictions to allow Inferno potions in PvP. (@drunderscore) +* Allowed Flower Boots to place Ash Flowers on Ash Grass blocks. (@punchready) +* Removed unnecessary range check that artifically shortened quick stack reach. (@boddyn, #2885, @bcat) * Improved the exploit protection in tile rect handling. (@punchready) ## TShock 5.1.3