diff options
author | Aokromes <Aokromes@users.noreply.github.com> | 2014-08-23 14:05:43 +0100 |
---|---|---|
committer | DDuarte <dnpd.dd@gmail.com> | 2014-08-23 14:05:43 +0100 |
commit | 809fb9894ec5ee5aebda683ecdd264dfcdedd95b (patch) | |
tree | 61b3b90d676a42171af90f5d87a2aee6cb01324b /src | |
parent | 6dec73f93085428e56cb51bd973a4b63c85d13d6 (diff) |
Core/Auctionhouse: Hide known recipes when the Usable box is checked in the AH
By y1x2 @ cmangos
Closes #12247
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 |