*Never add the same loot item twice.
--HG-- branch : trunk
This commit is contained in:
@@ -965,6 +965,10 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, bool rate, uint16
|
|||||||
if (!i->Roll(rate))
|
if (!i->Roll(rate))
|
||||||
continue; // Bad luck for the entry
|
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
|
if (i->mincountOrRef < 0) // References processing
|
||||||
{
|
{
|
||||||
LootTemplate const* Referenced = LootTemplates_Reference.GetLootFor(-i->mincountOrRef);
|
LootTemplate const* Referenced = LootTemplates_Reference.GetLootFor(-i->mincountOrRef);
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ struct Loot;
|
|||||||
class LootTemplate;
|
class LootTemplate;
|
||||||
|
|
||||||
typedef std::vector<QuestItem> QuestItemList;
|
typedef std::vector<QuestItem> QuestItemList;
|
||||||
|
typedef std::vector<LootItem> LootItemList;
|
||||||
typedef std::map<uint32, QuestItemList *> QuestItemMap;
|
typedef std::map<uint32, QuestItemList *> QuestItemMap;
|
||||||
typedef std::vector<LootStoreItem> LootStoreItemList;
|
typedef std::vector<LootStoreItem> LootStoreItemList;
|
||||||
typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap;
|
typedef UNORDERED_MAP<uint32, LootTemplate*> LootTemplateMap;
|
||||||
|
|||||||
Reference in New Issue
Block a user