aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaximius <none@none>2009-11-04 19:17:15 -0800
committermaximius <none@none>2009-11-04 19:17:15 -0800
commit93f3d2744023bf3565dffd3d4875571406f9999b (patch)
tree8524e407dbde1fc06d254243514a68c236d385f8 /src
parentc15a8e201bab900e29cbc260e17451808e3dc897 (diff)
*Also include grouped items in the check added in 3e8840284b77.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/LootMgr.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp
index 9a035896cf3..8555995b6dd 100644
--- a/src/game/LootMgr.cpp
+++ b/src/game/LootMgr.cpp
@@ -468,11 +468,11 @@ QuestItemList* Loot::FillQuestLoot(Player* player)
for (uint8 i = 0; i < quest_items.size(); ++i)
{
LootItem &item = quest_items[i];
- if(!item.is_looted && item.AllowedForPlayer(player) )
+ if (!item.is_looted && item.AllowedForPlayer(player))
{
ql->push_back(QuestItem(i));
- // questitems get blocked when they first apper in a
+ // questitems get blocked when they first appear in a
// player's quest vector
//
// increase once if one looter only, looter-times if free for all
@@ -862,7 +862,13 @@ void LootTemplate::LootGroup::Process(Loot& loot, uint16 lootMode) const
{
LootStoreItem const * item = Roll();
if (item != NULL && item->lootmode & lootMode) // only add this item if roll succeeds and the mode matches
+ {
+ for (LootItemList::const_iterator _item = loot.items.begin(); _item != loot.items.end(); ++_item)
+ if (_item->itemid == i->itemid)
+ return; // Never add the same item twice
+
loot.AddItem(*item);
+ }
}
// Overall chance for the group without equal chanced items