Skip to content

Commit

Permalink
Merge branch 'general-devel' into quickstack-rm-rangecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiCM authored Mar 25, 2023
2 parents b833e48 + 20bb8c4 commit df04c81
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
5 changes: 4 additions & 1 deletion TShockAPI/Bouncer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 3 additions & 0 deletions TShockAPI/DB/CharacterManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"));
Expand Down
8 changes: 8 additions & 0 deletions TShockAPI/Handlers/SendTileRectHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public class SendTileRectHandler : IPacketHandler<GetDataHandlers.SendTileRectEv
{
TileID.JungleGrass
} },
{ TileID.AshPlants, new HashSet<ushort>()
{
TileID.AshGrass
} },
};

/// <summary>
Expand Down Expand Up @@ -67,6 +71,10 @@ public class SendTileRectHandler : IPacketHandler<GetDataHandlers.SendTileRectEv
{
9, 10, 11, 12, 13, 14, 15, 16,
} },
{ TileID.AshPlants, new HashSet<ushort>()
{
6, 7, 8, 9, 10,
} },
};

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ 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)

## TShock 5.1.3
Expand Down

0 comments on commit df04c81

Please sign in to comment.