From 809fb9894ec5ee5aebda683ecdd264dfcdedd95b Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 23 Aug 2014 14:05:43 +0100 Subject: Core/Auctionhouse: Hide known recipes when the Usable box is checked in the AH By y1x2 @ cmangos Closes #12247 --- src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index f4699f0519e..6d8e695f02a 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -544,8 +544,16 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player if (levelmin != 0x00 && (proto->RequiredLevel < levelmin || (levelmax != 0x00 && proto->RequiredLevel > levelmax))) continue; - if (usable != 0x00 && player->CanUseItem(item) != EQUIP_ERR_OK) - continue; + if (usable != 0x00) + { + if (player->CanUseItem(item) != EQUIP_ERR_OK) + continue; + + if (proto->Class == ITEM_CLASS_RECIPE) + if (SpellEntry const* spell = sSpellStore.LookupEntry(proto->Spells[0].SpellId)) + if (player->HasSpell(spell->EffectTriggerSpell[EFFECT_INDEX_0])) + continue; + } // Allow search by suffix (ie: of the Monkey) or partial name (ie: Monkey) // No need to do any of this if no search term was entered -- cgit v1.2.3