mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Loot: do not show unique items if player already has the maximum allowed quantity.
(cherry picked from commit5c5b8df613) Core/Loot: limit unique items check in LootItem::AllowedForPlayer() to bind-when-picked-up items only. (cherry picked from commitea6911517d)
This commit is contained in:
@@ -401,6 +401,10 @@ bool LootItem::AllowedForPlayer(Player const* player) const
|
||||
if (!(pProto->FlagsCu & ITEM_FLAGS_CU_IGNORE_QUEST_STATUS) && ((needs_quest || (pProto->GetStartQuest() && player->GetQuestStatus(pProto->GetStartQuest()) != QUEST_STATUS_NONE)) && !player->HasQuestForItem(itemid)))
|
||||
return false;
|
||||
|
||||
// Don't show bind-when-picked-up unique items if player already has the maximum allowed quantity.
|
||||
if (pProto->GetBonding() == BIND_ON_ACQUIRE && pProto->GetMaxCount() && int32(player->GetItemCount(itemid, true)) >= pProto->GetMaxCount())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user