chore. Avoid failures in the tests of custom items (#18519)

* chore. Avoid failures in the tests of custom items

* Report error but continue with the rest of the item

* change LOG_ERROR for LOG_DEBUG
This commit is contained in:
Walter Pagani
2024-03-15 20:09:10 -03:00
committed by GitHub
parent 9e5f65c548
commit 64f372fca3
+5 -4
View File
@@ -2868,8 +2868,12 @@ void ObjectMgr::LoadItemTemplates()
// Checks // Checks
ItemEntry const* dbcitem = sItemStore.LookupEntry(entry); ItemEntry const* dbcitem = sItemStore.LookupEntry(entry);
if (dbcitem) if (!dbcitem)
{ {
LOG_DEBUG("sql.sql", "Item (Entry: {}) does not exist in item.dbc! (not correct id?).", entry);
continue;
}
if (enforceDBCAttributes) if (enforceDBCAttributes)
{ {
if (itemTemplate.Class != dbcitem->ClassID) if (itemTemplate.Class != dbcitem->ClassID)
@@ -2908,9 +2912,6 @@ void ObjectMgr::LoadItemTemplates()
itemTemplate.Sheath = dbcitem->SheatheType; itemTemplate.Sheath = dbcitem->SheatheType;
} }
} }
}
else
LOG_ERROR("sql.sql", "Item (Entry: {}) does not exist in item.dbc! (not correct id?).", entry);
if (itemTemplate.Quality >= MAX_ITEM_QUALITY) if (itemTemplate.Quality >= MAX_ITEM_QUALITY)
{ {