Core/CharDB Cleanup: alter corpse table making column names lowerCamel and move all queries to prepared statements.
NOTICE: column can be named `guid` only if it represents character guid. All other guids will be renamed to reflect their purpose (like corpseGuid in this specific case)
This commit is contained in:
@@ -1243,7 +1243,9 @@ void World::SetInitialWorldSettings()
|
||||
LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID);
|
||||
|
||||
///- Remove the bones (they should not exist in DB though) and old corpses after a restart
|
||||
CharacterDatabase.PExecute("DELETE FROM corpse WHERE corpse_type = '0' OR time < (UNIX_TIMESTAMP()-'%u')", 3 * DAY);
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_OLD_CORPSES);
|
||||
stmt->setUInt32(0, 3 * DAY);
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
///- Load the DBC files
|
||||
sLog->outString("Initialize data stores...");
|
||||
|
||||
Reference in New Issue
Block a user