From 9641092078226ae49040431985d95ae34bda5299 Mon Sep 17 00:00:00 2001 From: SaW Date: Fri, 16 May 2025 13:39:04 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(#1276)=20Prevent=20bots=20from=20?= =?UTF-8?q?equipping=20relics=20intended=20for=20other=20clas=E2=80=A6"=20?= =?UTF-8?q?(#1303)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f365b79e96628b48ec5c193f7db2577fa26ba959. --- src/strategy/actions/EquipAction.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/strategy/actions/EquipAction.cpp b/src/strategy/actions/EquipAction.cpp index dccc2a9d..3b4c3880 100644 --- a/src/strategy/actions/EquipAction.cpp +++ b/src/strategy/actions/EquipAction.cpp @@ -67,19 +67,6 @@ void EquipAction::EquipItem(Item* item) uint32 itemId = itemProto->ItemId; uint8 invType = itemProto->InventoryType; - // Ensure only the correct classes attempt to equip relics - if (itemProto->SubClass == ITEM_SUBCLASS_ARMOR_IDOL && bot->getClass() != CLASS_DRUID) - return; - - if (itemProto->SubClass == ITEM_SUBCLASS_ARMOR_SIGIL && bot->getClass() != CLASS_DEATH_KNIGHT) - return; - - if (itemProto->SubClass == ITEM_SUBCLASS_ARMOR_LIBRAM && bot->getClass() != CLASS_PALADIN) - return; - - if (itemProto->SubClass == ITEM_SUBCLASS_ARMOR_TOTEM && bot->getClass() != CLASS_SHAMAN) - return; - // Handle ammunition separately if (invType == INVTYPE_AMMO) { @@ -95,6 +82,7 @@ void EquipAction::EquipItem(Item* item) if (itemProto->Class == ITEM_CLASS_CONTAINER) { // Attempt to equip as a bag + Bag* pBag = reinterpret_cast(item); uint8 newBagSlot = GetSmallestBagSlot(); if (newBagSlot > 0) { @@ -343,7 +331,7 @@ bool EquipUpgradesAction::Execute(Event event) return true; } -bool EquipUpgradeAction::Execute(Event /*event*/) +bool EquipUpgradeAction::Execute(Event event) { ListItemsVisitor visitor; IterateItems(&visitor, ITERATE_ITEMS_IN_BAGS);