From a0958831c861b4cbea4e0f23f5149e6e33b89ab2 Mon Sep 17 00:00:00 2001 From: Meji Date: Fri, 3 May 2024 15:58:05 +0200 Subject: Core/Creatures: Allow profession tools to be used as equipment (#29915) (cherry picked from commit 2238844f567b63de1edd394b654b62ac4ddeb666) --- src/server/game/Globals/ObjectMgr.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/server/game/Globals/ObjectMgr.cpp') diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index d74c79c8d36..d29124ea59f 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1547,15 +1547,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); -- cgit v1.2.3