Core/Accounts: Fixed saving account tutorials
This commit is contained in:
@@ -702,7 +702,7 @@ void WorldSession::SaveTutorialsData(SQLTransaction &trans)
|
|||||||
|
|
||||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_HAS_TUTORIALS);
|
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_GET_HAS_TUTORIALS);
|
||||||
stmt->setUInt32(0, GetAccountId());
|
stmt->setUInt32(0, GetAccountId());
|
||||||
bool hasTutorials = CharacterDatabase.Query(stmt).null();
|
bool hasTutorials = !CharacterDatabase.Query(stmt).null();
|
||||||
// Modify data in DB
|
// Modify data in DB
|
||||||
stmt = CharacterDatabase.GetPreparedStatement(hasTutorials ? CHAR_SET_TUTORIALS : CHAR_ADD_TUTORIALS);
|
stmt = CharacterDatabase.GetPreparedStatement(hasTutorials ? CHAR_SET_TUTORIALS : CHAR_ADD_TUTORIALS);
|
||||||
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
|
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
|
||||||
|
|||||||
Reference in New Issue
Block a user