Rochet2 / TrinityCore

Rochet2's stuff for TC
https://rochet2.github.io
89 stars 144 forks source link

Transmog sets not saving Legion transmog 3.3.5 branch #154

Closed mertchicken closed 5 months ago

mertchicken commented 7 months ago

I was having an issue with the legion transmog 3.3.5 branch where sets weren't saving past a player relogging. This may've been a "me" problem because I haven't seen it mentioned but I did fix the problem by changing the CharacterHandler.cpp. Changing this:

stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_TRANSMOG_SETS); stmt->setUInt32(0, m_accountId); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_SETS, stmt);

to

stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_TRANSMOG_SETS); stmt->setUInt32(0, lowGuid); // Use the 32-bit lower part of the GUID res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_TRANSMOG_SETS, stmt);

Player.cpp saves the info to the database with the owner's guid but its being loaded looking for account ID, which is causing the server to delete all the sets.

Again, I don't know why this would only be an issue for me but I've never seen anyone mention it before but here was my solution anyway.

Rochet2 commented 5 months ago

Thanks a lot for reporting. Fixed in a60a4d956c And dont worry about someone else not reporting, only few do.