diff options
author | Shauren <shauren.trinity@gmail.com> | 2012-05-31 15:39:18 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2012-05-31 15:39:18 +0200 |
commit | 5eee40249c51b35719a18907da94d64d98f89258 (patch) | |
tree | c599a974f1734a2eedceaeab38764d3f87a88aa3 /src/server/game/Loot/LootMgr.cpp | |
parent | b5443af772f54800321a30cc789cfa6ae85c5188 (diff) |
Core/Items: Added custom flags field to item_template, currently 2 flag values are available
* ITEM_FLAGS_CU_DURATION_REAL_TIME determines item duration counts even if offline (replaced ugly negative duration workaround, easy to lose data when importing fresh wdb)
* ITEM_FLAGS_CU_IGNORE_QUEST_STATUS quest status will not affect this item appearing in loot, currently needed for Arena Master trinket
Diffstat (limited to 'src/server/game/Loot/LootMgr.cpp')
-rwxr-xr-x | src/server/game/Loot/LootMgr.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 75065158ef6..a5ad46c9ec4 100755 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -356,18 +356,9 @@ bool LootItem::AllowedForPlayer(Player const* player) const if ((pProto->Flags2 & ITEM_FLAGS_EXTRA_ALLIANCE_ONLY) && player->GetTeam() != ALLIANCE) return false; - if (needs_quest) - { - // Checking quests for quest-only drop (check only quests requirements in this case) - if (!player->HasQuestForItem(itemid)) - return false; - } - else - { - // Not quest only drop (check quest starting items for already accepted non-repeatable quests) - if (pProto->StartQuest && player->GetQuestStatus(pProto->StartQuest) != QUEST_STATUS_NONE && !player->HasQuestForItem(itemid)) - return false; - } + // check quest requirements + 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 true; } |