Skip to content

Commit

Permalink
Merge pull request #2894 from sgkoishi/saveonlyafterjoin
Browse files Browse the repository at this point in the history
Add a check to InsertPlayerData to prevent data overwrite
  • Loading branch information
QuiCM authored Mar 25, 2023
2 parents 00a27d3 + ddc9d77 commit 20bb8c4
Showing 1 changed file with 3 additions and 0 deletions.
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

0 comments on commit 20bb8c4

Please sign in to comment.