mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Character: Fix logic fail with world state in b2928e59fa
This commit is contained in:
@@ -35,7 +35,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
// check flags which clean ups are necessary
|
||||
QueryResult result = CharacterDatabase.Query("SELECT value FROM worldstates WHERE entry = 20004");
|
||||
QueryResult result = CharacterDatabase.PQuery("SELECT value FROM worldstates WHERE entry = %u", WS_CLEANING_FLAGS);
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
@@ -60,7 +60,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
|
||||
// NOTE: In order to have persistentFlags be set in worldstates for the next cleanup,
|
||||
// you need to define them at least once in worldstates.
|
||||
flags &= sWorld->getIntConfig(CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS);
|
||||
CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = 20004", flags);
|
||||
CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = %u", flags, WS_CLEANING_FLAGS);
|
||||
|
||||
sWorld->SetCleaningFlags(flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user