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

Skip to content

feat: Save voiceVariant, voicePitchOffset, and team in SSC#3199

Merged
hakusaro merged 6 commits intoPryaxis:general-develfrom
lost-werewolf:playerdata-updates
Feb 26, 2026
Merged

feat: Save voiceVariant, voicePitchOffset, and team in SSC#3199
hakusaro merged 6 commits intoPryaxis:general-develfrom
lost-werewolf:playerdata-updates

Conversation

@lost-werewolf
Copy link
Contributor

  • SSC now saves the player's voiceVariant, voicePitchOffset, and team. (Players now save their team, so it is appropriate to save their team in SSC)
  • Fixed minor issue with the extra accessory slot persisting when inserting initial character data.
  • Also handle the TeamChangeFromUI packet - clients now send this to change their team, which is identical to the existing PlayerTeam packet

- also handle TeamChangeFromUI packet as HandlePlayerTeam
- fix extra accessory slot persisting when initial ssc data is inserted
- also reject team change for IgnoreSSCPackets
- ignore team change packet if team is the same as current team
database.Query(
"INSERT INTO tsCharacter (Account, Health, MaxHealth, Mana, MaxMana, Inventory, extraSlot, spawnX, spawnY, skinVariant, hair, hairDye, hairColor, pantsColor, shirtColor, underShirtColor, shoeColor, hideVisuals, skinColor, eyeColor, questsCompleted, usingBiomeTorches, happyFunTorchTime, unlockedBiomeTorches, currentLoadoutIndex,ateArtisanBread, usedAegisCrystal, usedAegisFruit, usedArcaneCrystal, usedGalaxyPearl, usedGummyWorm, usedAmbrosia, unlockedSuperCart, enabledSuperCart, deathsPVE, deathsPVP) VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, @30, @31, @32, @33, @34, @35);",
player.Account.ID, playerData.health, playerData.maxHealth, playerData.mana, playerData.maxMana, string.Join("~", playerData.inventory), playerData.extraSlot, player.TPlayer.SpawnX, player.TPlayer.SpawnY, player.TPlayer.skinVariant, player.TPlayer.hair, player.TPlayer.hairDye, TShock.Utils.EncodeColor(player.TPlayer.hairColor), TShock.Utils.EncodeColor(player.TPlayer.pantsColor),TShock.Utils.EncodeColor(player.TPlayer.shirtColor), TShock.Utils.EncodeColor(player.TPlayer.underShirtColor), TShock.Utils.EncodeColor(player.TPlayer.shoeColor), TShock.Utils.EncodeBoolArray(player.TPlayer.hideVisibleAccessory), TShock.Utils.EncodeColor(player.TPlayer.skinColor),TShock.Utils.EncodeColor(player.TPlayer.eyeColor), player.TPlayer.anglerQuestsFinished, player.TPlayer.UsingBiomeTorches ? 1 : 0, player.TPlayer.happyFunTorchTime ? 1 : 0, player.TPlayer.unlockedBiomeTorches ? 1 : 0, player.TPlayer.CurrentLoadoutIndex, player.TPlayer.ateArtisanBread ? 1 : 0, player.TPlayer.usedAegisCrystal ? 1 : 0, player.TPlayer.usedAegisFruit ? 1 : 0, player.TPlayer.usedArcaneCrystal ? 1 : 0, player.TPlayer.usedGalaxyPearl ? 1 : 0, player.TPlayer.usedGummyWorm ? 1 : 0, player.TPlayer.usedAmbrosia ? 1 : 0, player.TPlayer.unlockedSuperCart ? 1 : 0, player.TPlayer.enabledSuperCart ? 1 : 0, player.sscDeathsPVE, player.sscDeathsPVP);
"INSERT INTO tsCharacter (Account, Health, MaxHealth, Mana, MaxMana, Inventory, extraSlot, spawnX, spawnY, skinVariant, hair, hairDye, hairColor, pantsColor, shirtColor, underShirtColor, shoeColor, hideVisuals, skinColor, eyeColor, questsCompleted, usingBiomeTorches, happyFunTorchTime, unlockedBiomeTorches, currentLoadoutIndex, ateArtisanBread, usedAegisCrystal, usedAegisFruit, usedArcaneCrystal, usedGalaxyPearl, usedGummyWorm, usedAmbrosia, unlockedSuperCart, enabledSuperCart, deathsPVE, deathsPVP, voiceVariant, voicePitchOffset, team) VALUES (@0, @1, @2, @3, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, @15, @16, @17, @18, @19, @20, @21, @22, @23, @24, @25, @26, @27, @28, @29, @30, @31, @32, @33, @34, @35, @36, @37, @38);",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how the extra space got there, apologies

@lost-werewolf
Copy link
Contributor Author

This currently breaks /uploadssc, fixing ASAP.

@lost-werewolf lost-werewolf marked this pull request as draft February 26, 2026 00:21
- also fix spawnX being set as spawnY when using uploadssc
@lost-werewolf
Copy link
Contributor Author

Actually seems like this was a problem prior in CharacterDB.InsertSpecificPlayerData. Either way, issue should be resolved hopefully. Would be nice if others can test this PR before merging

@lost-werewolf lost-werewolf marked this pull request as ready for review February 26, 2026 00:43
Copy link
Member

@ACaiCat ACaiCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as intended

@hakusaro hakusaro enabled auto-merge February 26, 2026 12:49
@hakusaro hakusaro merged commit 6588001 into Pryaxis:general-devel Feb 26, 2026
7 of 8 checks passed
@pacenadhif778
Copy link
Contributor

sorry i just give suggetion maybe need message "player {name} has joined {color} team" when join in server

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.

4 participants