Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix first SSC login appearance reset for new players#3226

Open
Xekep wants to merge 1 commit intoPryaxis:general-develfrom
TerraZ-Team:pr/micro-fix-ssc-initial-appearance-clean
Open

Fix first SSC login appearance reset for new players#3226
Xekep wants to merge 1 commit intoPryaxis:general-develfrom
TerraZ-Team:pr/micro-fix-ssc-initial-appearance-clean

Conversation

@Xekep
Copy link

@Xekep Xekep commented Feb 28, 2026

Players reported that with SSC enabled, first-time players can get default appearance values after they log in.

This patch keeps SSC behavior the same, but if the seeded tsCharacter row has missing appearance fields, it fills them from the current player data at login and reloads PlayerData.

It is applied in all login paths (UUID login, password login, and /login).

@greptile-apps
Copy link

greptile-apps bot commented Feb 28, 2026

Greptile Summary

Fixed appearance reset bug for first-time SSC players by detecting seeded database rows with missing appearance fields and syncing them from the client's character data at login.

  • Added detection method IsSeededAppearanceMissing() that checks if all nullable appearance fields are null
  • Added sync method SyncSeededAppearance() that updates the database with the player's current appearance from player.TPlayer
  • Applied fix consistently across all three login paths: /login command, UUID login, and password login
  • Reload PlayerData after syncing to ensure the updated appearance is applied

Confidence Score: 5/5

  • This PR is safe to merge with no blocking issues found
  • The fix is well-implemented, consistently applied across all login paths, and properly handles the edge case of seeded SSC rows. The logic is sound and the changes are minimal and focused.
  • No files require special attention

Important Files Changed

Filename Overview
TShockAPI/DB/CharacterManager.cs Added IsSeededAppearanceMissing() and SyncSeededAppearance() methods to detect and fix missing appearance fields in seeded SSC rows
TShockAPI/Commands.cs Applied appearance fix after GetPlayerData() in /login command to sync missing appearance fields
TShockAPI/GetDataHandlers.cs Applied appearance fix in both UUID login (line 2810-2814) and password login (line 3440-3444) paths

Last reviewed commit: 9a6c6a3

@lost-werewolf
Copy link
Contributor

lost-werewolf commented Feb 28, 2026

Was this an issue prior to #3199 ? Just curious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants