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:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user