*Never add the same loot item twice.

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-04 19:14:10 -08:00
parent 6aba32bd2b
commit c15a8e201b
2 changed files with 16 additions and 11 deletions
+4
View File
@@ -965,6 +965,10 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, bool rate, uint16
if (!i->Roll(rate))
continue; // Bad luck for the entry
for (LootItemList::const_iterator _item = loot.items.begin(); _item != loot.items.end(); ++_item)
if (_item->itemid == i->itemid)
continue; // Never add the same item twice
if (i->mincountOrRef < 0) // References processing
{
LootTemplate const* Referenced = LootTemplates_Reference.GetLootFor(-i->mincountOrRef);
+1
View File
@@ -137,6 +137,7 @@ struct Loot;
class LootTemplate;
typedef std::vector<QuestItem> QuestItemList;
typedef std::vector<LootItem> LootItemList;
typedef std::map<uint32, QuestItemList *> QuestItemMap;
typedef std::vector<LootStoreItem> LootStoreItemList;
typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap;