From 21700f2760fb22a85bd668462f32c643b402d3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Mauger?= Date: Sat, 7 Jan 2023 17:27:28 +0100 Subject: [PATCH] fix(Core/Loot): Fix too many quest items visible by master looter (#14510) * Fix too many quest items visible by master looter * Fix typo --- src/server/game/Loot/LootMgr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 2be3a9a69..e78bd0cc3 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -414,12 +414,13 @@ bool LootItem::AllowedForPlayer(Player const* player, ObjectGuid source) const } bool isMasterLooter = player->GetGroup() && player->GetGroup()->GetMasterLooterGuid() == player->GetGUID(); + bool itemVisibleForMasterLooter = !needs_quest && (!follow_loot_rules || !is_underthreshold); // DB conditions check if (!sConditionMgr->IsObjectMeetToConditions(const_cast(player), conditions)) { // Master Looter can see conditioned recipes - if (isMasterLooter && (!follow_loot_rules || !is_underthreshold)) + if (isMasterLooter && itemVisibleForMasterLooter) { if ((pProto->Flags & ITEM_FLAG_HIDE_UNUSABLE_RECIPE) || (pProto->Class == ITEM_CLASS_RECIPE && pProto->Bonding == BIND_WHEN_PICKED_UP && pProto->Spells[1].SpellId != 0)) { @@ -442,7 +443,7 @@ bool LootItem::AllowedForPlayer(Player const* player, ObjectGuid source) const } // Master looter can see all items even if the character can't loot them - if (isMasterLooter && (!follow_loot_rules || !is_underthreshold)) + if (isMasterLooter && itemVisibleForMasterLooter) { return true; }