feat(Core/Player): Implement player specific settings (#9483)

This commit is contained in:
Skjalf 2021-12-26 08:39:15 -03:00 committed by GitHub
parent d2950b21b9
commit 58302e4196
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 381 additions and 8 deletions

View file

@ -5622,6 +5622,8 @@ bool Player::LoadFromDB(ObjectGuid playerGuid, CharacterDatabaseQueryHolder cons
_LoadBrewOfTheMonth(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_BREW_OF_THE_MONTH));
_LoadCharacterSettings(holder.GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_CHARACTER_SETTINGS));
// Players are immune to taunt
ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
@ -7166,6 +7168,7 @@ void Player::SaveToDB(CharacterDatabaseTransaction trans, bool create, bool logo
GetSession()->SaveTutorialsData(trans); // changed only while character in game
_SaveGlyphs(trans);
_SaveInstanceTimeRestrictions(trans);
_SavePlayerSettings(trans);
// check if stats should only be saved on logout
// save stats can be out of transaction