Core/Misc: Revert the loot-related code from 74616464f2, the iterator is needed later
This commit is contained in:
@@ -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
|
if (item == NULL && !EqualPossibleDrops.empty()) // If nothing selected yet - an item is taken from equal-chanced part
|
||||||
{
|
{
|
||||||
itemSource = 2;
|
itemSource = 2;
|
||||||
item = const_cast<LootStoreItem*>(&SelectRandomContainerElement(EqualPossibleDrops));
|
itr = EqualPossibleDrops.begin();
|
||||||
|
std::advance(itr, irand(0, EqualPossibleDrops.size()-1));
|
||||||
|
item = &*itr;
|
||||||
}
|
}
|
||||||
// finish rolling
|
// finish rolling
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user