- Only use configured PersistentFlags for character database cleaner to determine data saving behaviour during runtime, instead of all original flags set in worldstates.
- Remove the forced deletion of abandoned quest entries in 10828_characters_character_queststatus.sql for those who do not want to lose that data. If you want to purge that data then run the core with CleanupFlags & 0x10. If you want to both purge the data now and prevent it from being saved in the future, run the core with CleanupFlags & 0x10 AND PersistentCleanupFlags & 0x10

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-12-28 09:49:07 +01:00
parent e739d26eac
commit 46328318d2
2 changed files with 7 additions and 5 deletions

View File

@@ -1,5 +1,3 @@
DELETE FROM character_queststatus WHERE `status` = 0;
DROP TABLE IF EXISTS `character_queststatus_rewarded`;
CREATE TABLE `character_queststatus_rewarded` (
`guid` int(10) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier',

View File

@@ -38,8 +38,7 @@ void CharacterDatabaseCleaner::CleanDatabase()
return;
uint32 flags = (*result)[0].GetUInt32();
sWorld->SetCleaningFlags(flags);
// clean up
if (flags & CLEANING_FLAG_ACHIEVEMENT_PROGRESS)
CleanCharacterAchievementProgress();
@@ -56,7 +55,12 @@ void CharacterDatabaseCleaner::CleanDatabase()
if (flags & CLEANING_FLAG_QUESTSTATUS)
CleanCharacterQuestStatus();
CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = value & %u WHERE entry = 20004", sWorld->getIntConfig(CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS));
// 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);
sWorld->SetCleaningFlags(flags);
sLog->outString(">> Cleaned character database in %u ms", GetMSTimeDiffToNow(oldMSTime));
sLog->outString();