Core/Loot: do not show unique items if player already has the maximum allowed quantity.
(cherry picked from commit 5c5b8df6138a94f5bc74d7eda0f894d825b5f63c) Core/Loot: limit unique items check in LootItem::AllowedForPlayer() to bind-when-picked-up items only. (cherry picked from commit ea6911517d38aa8ea493dbe88a33c9734d86bb04)
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