summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp62
1 files changed, 29 insertions, 33 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 4f48a34af4..80804e9b5a 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -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