Skip to content

Commit d0a4c0a

Browse files
committed
Core/DataStores: Remove db2 id startup checks, compatibility validation is done on layout hash already
Closes TrinityCore#31413
1 parent 3cbf5fe commit d0a4c0a

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

src/server/game/DataStores/DB2Stores.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,12 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
10311031
LOAD_DB2(sWorldStateExpressionStore);
10321032

10331033
// error checks
1034+
1035+
// Check loaded DB2 files proper version
1036+
for (uint32 criticalItemId : { ITEM_ACCOUNT_BANK_TAB_BAG, ITEM_CHARACTER_BANK_TAB_BAG })
1037+
if (!sItemSparseStore.LookupEntry(criticalItemId))
1038+
loadErrors.emplace_back(Trinity::StringFormat("Missing required item {} from ItemSparse.db2 (or its hotfix table)", criticalItemId));
1039+
10341040
if (!loadErrors.empty())
10351041
{
10361042
sLog->SetSynchronous(); // server will shut down after this, so set sync logging to prevent messages from getting lost
@@ -1041,22 +1047,6 @@ uint32 DB2Manager::LoadStores(std::string const& dataPath, LocaleConstant defaul
10411047
return 0;
10421048
}
10431049

1044-
// Check loaded DB2 files proper version
1045-
if (!sAreaTableStore.LookupEntry(16579) || // last area added in 11.2.0 (62213)
1046-
!sCharTitlesStore.LookupEntry(937) || // last char title added in 11.2.0 (62213)
1047-
!sFlightCapabilityStore.LookupEntry(1) || // default flight capability (required)
1048-
!sGemPropertiesStore.LookupEntry(4287) || // last gem property added in 11.2.0 (62213)
1049-
!sItemStore.LookupEntry(252009) || // last item added in 11.2.0 (62213)
1050-
!sItemSparseStore.LookupEntry(ITEM_ACCOUNT_BANK_TAB_BAG) ||
1051-
!sItemSparseStore.LookupEntry(ITEM_CHARACTER_BANK_TAB_BAG) ||
1052-
!sItemExtendedCostStore.LookupEntry(10637) || // last item extended cost added in 11.2.0 (62213)
1053-
!sMapStore.LookupEntry(2951) || // last map added in 11.2.0 (62213)
1054-
!sSpellNameStore.LookupEntry(1254022)) // last spell added in 11.2.0 (62213)
1055-
{
1056-
TC_LOG_FATAL("misc", "You have _outdated_ DB2 files. Please extract correct versions from current using client.");
1057-
return 0;
1058-
}
1059-
10601050
TC_LOG_INFO("server.loading", ">> Initialized {} DB2 data stores in {} ms", _stores.size(), GetMSTimeDiffToNow(oldMSTime));
10611051

10621052
return availableDb2Locales.to_ulong();

0 commit comments

Comments
 (0)