From 2493d88a7224d829bd3b893f637cc255b2a751dc Mon Sep 17 00:00:00 2001 From: funjoker Date: Fri, 12 Jun 2020 11:07:11 +0200 Subject: Core/DataStores: Fix loading hotfixes deleting records for db2s not loaded by worldserver (#24783) * Also load WorldStateExpression.db2 --- src/server/game/DataStores/DB2Stores.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index aa758b408dd..f40a96a8461 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -778,6 +778,7 @@ void DB2Manager::LoadStores(std::string const& dataPath, uint32 defaultLocale) LOAD_DB2(sWMOAreaTableStore); LOAD_DB2(sWorldEffectStore); LOAD_DB2(sWorldMapOverlayStore); + LOAD_DB2(sWorldStateExpressionStore); #undef LOAD_DB2 @@ -1385,9 +1386,9 @@ void DB2Manager::LoadHotfixData() uint32 tableHash = fields[1].GetUInt32(); int32 recordId = fields[2].GetInt32(); bool deleted = fields[3].GetBool(); - if (_stores.find(tableHash) == _stores.end() && _hotfixBlob.find(std::make_pair(tableHash, recordId)) == _hotfixBlob.end()) + if (!deleted && _stores.find(tableHash) == _stores.end() && _hotfixBlob.find(std::make_pair(tableHash, recordId)) == _hotfixBlob.end()) { - TC_LOG_ERROR("sql.sql", "Table `hotfix_data` references unknown DB2 store by hash 0x%X and has no reference to `hotfix_blob` in hotfix id %d", tableHash, id); + TC_LOG_ERROR("sql.sql", "Table `hotfix_data` references unknown DB2 store by hash 0x%X and has no reference to `hotfix_blob` in hotfix id %d with RecordID: %d", tableHash, id, recordId); continue; } -- cgit v1.2.3