aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 10cb845f24d..d3f17f0acf4 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1526,15 +1526,7 @@ void ObjectMgr::LoadEquipmentTemplates()
continue;
}
- if (dbcItem->InventoryType != INVTYPE_WEAPON &&
- dbcItem->InventoryType != INVTYPE_SHIELD &&
- dbcItem->InventoryType != INVTYPE_RANGED &&
- dbcItem->InventoryType != INVTYPE_2HWEAPON &&
- dbcItem->InventoryType != INVTYPE_WEAPONMAINHAND &&
- dbcItem->InventoryType != INVTYPE_WEAPONOFFHAND &&
- dbcItem->InventoryType != INVTYPE_HOLDABLE &&
- dbcItem->InventoryType != INVTYPE_THROWN &&
- dbcItem->InventoryType != INVTYPE_RANGEDRIGHT)
+ if (std::ranges::none_of(InventoryTypesEquipable, [dbcItem](InventoryType inventoryType) { return inventoryType == dbcItem->InventoryType; }))
{
TC_LOG_ERROR("sql.sql", "Item (ID={}) in creature_equip_template.ItemID{} for CreatureID = {} and ID = {} is not equipable in a hand, forced to 0.",
equipmentInfo.Items[i].ItemId, i + 1, entry, id);