Core/Misc: Revert the loot-related code from 74616464f2, the iterator is needed later

This commit is contained in:
Shocker
2011-09-16 00:37:04 +03:00
parent bd4cf4b78b
commit 400716926c
+3 -1
View File
@@ -1075,7 +1075,9 @@ void LootTemplate::LootGroup::Process(Loot& loot, uint16 lootMode) const
if (item == NULL && !EqualPossibleDrops.empty()) // If nothing selected yet - an item is taken from equal-chanced part
{
itemSource = 2;
item = const_cast<LootStoreItem*>(&SelectRandomContainerElement(EqualPossibleDrops));
itr = EqualPossibleDrops.begin();
std::advance(itr, irand(0, EqualPossibleDrops.size()-1));
item = &*itr;
}
// finish rolling