mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
fix(Core/Item): Reduce amount of excessive logging for enforeDBCAttributes (#16508)
bypass code block if enforceDBCAttributes is set to false
This commit is contained in:
@@ -2863,47 +2863,43 @@ void ObjectMgr::LoadItemTemplates()
|
||||
|
||||
if (dbcitem)
|
||||
{
|
||||
if (itemTemplate.Class != dbcitem->ClassID)
|
||||
if (enforceDBCAttributes)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Class value ({}), must be ({}).", entry, itemTemplate.Class, dbcitem->ClassID);
|
||||
if (enforceDBCAttributes)
|
||||
if (itemTemplate.Class != dbcitem->ClassID)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Class value ({}), must be ({}).", entry, itemTemplate.Class, dbcitem->ClassID);
|
||||
itemTemplate.Class = dbcitem->ClassID;
|
||||
}
|
||||
if (itemTemplate.SubClass != dbcitem->SubclassID)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Subclass value ({}) for class {}, must be ({}).", entry, itemTemplate.SubClass, itemTemplate.Class, dbcitem->SubclassID);
|
||||
if (enforceDBCAttributes)
|
||||
}
|
||||
if (itemTemplate.SubClass != dbcitem->SubclassID)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Subclass value ({}) for class {}, must be ({}).", entry, itemTemplate.SubClass, itemTemplate.Class, dbcitem->SubclassID);
|
||||
itemTemplate.SubClass = dbcitem->SubclassID;
|
||||
}
|
||||
if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclassID)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct SoundOverrideSubclass ({}), must be {}.", entry, itemTemplate.SoundOverrideSubclass);
|
||||
if (enforceDBCAttributes)
|
||||
}
|
||||
if (itemTemplate.SoundOverrideSubclass != dbcitem->SoundOverrideSubclassID)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct SoundOverrideSubclass ({}), must be {}.", entry, itemTemplate.SoundOverrideSubclass, dbcitem->SoundOverrideSubclassID);
|
||||
itemTemplate.SoundOverrideSubclass = dbcitem->SoundOverrideSubclassID;
|
||||
}
|
||||
if (itemTemplate.Material != dbcitem->Material)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct material ({}), must be {}.", entry, itemTemplate.Material, dbcitem->Material);
|
||||
if (enforceDBCAttributes)
|
||||
}
|
||||
if (itemTemplate.Material != dbcitem->Material)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct material ({}), must be {}.", entry, itemTemplate.Material, dbcitem->Material);
|
||||
itemTemplate.Material = dbcitem->Material;
|
||||
}
|
||||
if (itemTemplate.InventoryType != dbcitem->InventoryType)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong InventoryType value ({}), must be {}.", entry, itemTemplate.InventoryType, dbcitem->InventoryType);
|
||||
if (enforceDBCAttributes)
|
||||
}
|
||||
if (itemTemplate.InventoryType != dbcitem->InventoryType)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong InventoryType value ({}), must be {}.", entry, itemTemplate.InventoryType, dbcitem->InventoryType);
|
||||
itemTemplate.InventoryType = dbcitem->InventoryType;
|
||||
}
|
||||
if (itemTemplate.DisplayInfoID != dbcitem->DisplayInfoID)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct display id ({}), must be {}.", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayInfoID);
|
||||
if (enforceDBCAttributes)
|
||||
}
|
||||
if (itemTemplate.DisplayInfoID != dbcitem->DisplayInfoID)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) does not have a correct display id ({}), must be {}.", entry, itemTemplate.DisplayInfoID, dbcitem->DisplayInfoID);
|
||||
itemTemplate.DisplayInfoID = dbcitem->DisplayInfoID;
|
||||
}
|
||||
if (itemTemplate.Sheath != dbcitem->SheatheType)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Sheath ({}), must be {}.", entry, itemTemplate.Sheath, dbcitem->SheatheType);
|
||||
if (enforceDBCAttributes)
|
||||
}
|
||||
if (itemTemplate.Sheath != dbcitem->SheatheType)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Item (Entry: {}) has wrong Sheath ({}), must be {}.", entry, itemTemplate.Sheath, dbcitem->SheatheType);
|
||||
itemTemplate.Sheath = dbcitem->SheatheType;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user