mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Core/Loot: limit unique items check in LootItem::AllowedForPlayer() to bind-when-picked-up items only.
This commit is contained in:
@@ -394,8 +394,8 @@ bool LootItem::AllowedForPlayer(Player const* player) const
|
|||||||
if (!(pProto->FlagsCu & ITEM_FLAGS_CU_IGNORE_QUEST_STATUS) && ((needs_quest || (pProto->StartQuest && player->GetQuestStatus(pProto->StartQuest) != QUEST_STATUS_NONE)) && !player->HasQuestForItem(itemid)))
|
if (!(pProto->FlagsCu & ITEM_FLAGS_CU_IGNORE_QUEST_STATUS) && ((needs_quest || (pProto->StartQuest && player->GetQuestStatus(pProto->StartQuest) != QUEST_STATUS_NONE)) && !player->HasQuestForItem(itemid)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Don't show unique items if player already has the maximum allowed quantity.
|
// Don't show bind-when-picked-up unique items if player already has the maximum allowed quantity.
|
||||||
if (pProto->MaxCount && int32(player->GetItemCount(itemid, true)) >= pProto->MaxCount)
|
if (pProto->Bonding == BIND_WHEN_PICKED_UP && pProto->MaxCount && int32(player->GetItemCount(itemid, true)) >= pProto->MaxCount)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user