diff options
author | Meji <alvaro.megias@outlook.com> | 2024-05-03 15:58:05 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-05-28 16:49:49 +0200 |
commit | a0958831c861b4cbea4e0f23f5149e6e33b89ab2 (patch) | |
tree | ac570318d3741a7948d0e17266842c91c02978a2 /src/server/game/Globals/ObjectMgr.cpp | |
parent | 228ae7e885898184bde9fc484e35aa9109de2bc1 (diff) |
Core/Creatures: Allow profession tools to be used as equipment (#29915)
(cherry picked from commit 2238844f567b63de1edd394b654b62ac4ddeb666)
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
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); |