Fix journey mode / kick on death conflict

This fixes an issue where kick/ban on hardcore/mediumcore death
penalties applied to journey mode characters unintentionally.

Fixes #1901.
This commit is contained in:
Lucas Nicodemus 2020-05-26 22:22:41 -07:00
parent 5a4526b10a
commit 720feed7af
No known key found for this signature in database
GPG key ID: A07BD9023D1664DB
2 changed files with 2 additions and 1 deletions

View file

@ -13,6 +13,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
* `-worldselectpath` is identical to the old `-worldpath`. If you specify `-worldselectpath` and `-world` without specifying an absolute path the server will crash for sure.
* Thank you again to @fjfnaranjo for supplying a [detailed feature request](https://github.com/Pryaxis/TShock/issues/1914) explaining precisely why this option should be available. Without this, we would have had no context as to why this feature was useful or important. Thank you, @fjfnaranjo!
* This change was implemented by (@QuiCM, @hakusaro).
* Fix kick on hardcore death / kick on mediumcore death / ban on either from taking action against journey mode players. (@hakusaro)
## TShock 4.4.0 (Pre-release 8)
* Update for OTAPI 2.0.0.36 and Terraria 1.4.0.4. (@hakusaro, @Patrikkk, @DeathCradle)

View file

@ -3524,7 +3524,7 @@ namespace TShockAPI
}
// Handle kicks/bans on mediumcore/hardcore deaths.
if (args.TPlayer.difficulty != 0) // Player is not softcore
if (args.TPlayer.difficulty == 1 || args.TPlayer.difficulty == 2) // Player is not softcore
{
bool mediumcore = args.TPlayer.difficulty == 1;
bool shouldBan = mediumcore ? TShock.Config.BanOnMediumcoreDeath : TShock.Config.BanOnHardcoreDeath;