fix(Core/Players): Properly save resting state to DB. (#8014)

Fixes #7782
This commit is contained in:
UltraNix
2021-09-25 18:16:10 +02:00
committed by GitHub
parent 87a4e493a3
commit 26f1aaa0c8
4 changed files with 22 additions and 8 deletions

View File

@@ -13832,6 +13832,7 @@ void Player::_SaveCharacter(bool create, CharacterDatabaseTransaction trans)
stmt->setString(index++, ss.str());
stmt->setUInt8(index++, GetByteValue(PLAYER_FIELD_BYTES, 2));
stmt->setUInt32(index++, m_grantableLevels);
stmt->setUInt32(index++, _innTriggerId);
}
else
{
@@ -13970,6 +13971,7 @@ void Player::_SaveCharacter(bool create, CharacterDatabaseTransaction trans)
stmt->setString(index++, ss.str());
stmt->setUInt8(index++, GetByteValue(PLAYER_FIELD_BYTES, 2));
stmt->setUInt32(index++, m_grantableLevels);
stmt->setUInt32(index++, _innTriggerId);
stmt->setUInt8(index++, IsInWorld() && !GetSession()->PlayerLogout() ? 1 : 0);
// Index