diff options
author | Machiavelli <none@none> | 2009-12-06 01:01:40 +0100 |
---|---|---|
committer | Machiavelli <none@none> | 2009-12-06 01:01:40 +0100 |
commit | 1b41af6ea8c9f92a10d90b7848ef9f87286bcbc7 (patch) | |
tree | 625df9b3b976883d7d86c742312d274149603f44 | |
parent | 3fc7c8cf95e0c0af3ec6caa9eeea416c62a57096 (diff) |
Better way to fix 6416, with help from Maximius.
--HG--
branch : trunk
-rw-r--r-- | src/game/LootMgr.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index e51945b3684..6f131167c5e 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -882,8 +882,7 @@ void LootTemplate::LootGroup::Process(Loot& loot, uint16 lootMode) const itemSource = 1; float Roll = rand_chance(); // check each explicitly chanced entry in the template and modify its chance based on quality - itr = ExplicitPossibleDrops.begin(); - while (itr != ExplicitPossibleDrops.end()) + for (itr = ExplicitPossibleDrops.begin(); itr != ExplicitPossibleDrops.end(); itr = ExplicitPossibleDrops.erase(itr)) { if (itr->chance >= 100.0f) { @@ -897,7 +896,6 @@ void LootTemplate::LootGroup::Process(Loot& loot, uint16 lootMode) const item = &*itr; break; } - itr = ExplicitPossibleDrops.erase(itr); } } if (item == NULL && !EqualPossibleDrops.empty()) // If nothing selected yet - an item is taken from equal-chanced part |