aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKandera <KanderaDev@gmail.com>2012-07-06 16:57:13 -0400
committerKandera <KanderaDev@gmail.com>2012-07-06 16:57:13 -0400
commit6a337bfa2369b2c08739bc3822fb62ca41dcde29 (patch)
tree8c2e1a6e180d6c1cd7fbf92708140f8673ab4750 /src
parent9eab1a23cfb3e520ed997cac26ff8cf48870b837 (diff)
Core/Loot: correctly fix rolling on quest loot that follows group loot rules via custom flags.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Groups/Group.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 26faa7e6ae8..f9d609150ef 100755
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -1283,7 +1283,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_NEED_ON_LOOT, roll->itemid, maxresul);
ItemPosCountVec dest;
- LootItem* item = &(roll->getLoot()->items[roll->itemSlot]);
+ LootItem* item = &(roll->itemSlot >= roll->getLoot()->items.size() ? roll->getLoot()->quest_items[roll->itemSlot - roll->getLoot()->items.size()] : roll->getLoot()->items[roll->itemSlot]);
InventoryResult msg = player->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, roll->itemid, item->count);
if (msg == EQUIP_ERR_OK)
{
@@ -1332,7 +1332,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
{
player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ROLL_GREED_ON_LOOT, roll->itemid, maxresul);
- LootItem* item = &(roll->getLoot()->items[roll->itemSlot]);
+ LootItem* item = &(roll->itemSlot >= roll->getLoot()->items.size() ? roll->getLoot()->quest_items[roll->itemSlot - roll->getLoot()->items.size()] : roll->getLoot()->items[roll->itemSlot]);
if (rollvote == GREED)
{
@@ -1369,7 +1369,7 @@ void Group::CountTheRoll(Rolls::iterator rollI)
SendLootAllPassed(*roll);
// remove is_blocked so that the item is lootable by all players
- LootItem* item = &(roll->getLoot()->items[roll->itemSlot]);
+ LootItem* item = &(roll->itemSlot >= roll->getLoot()->items.size() ? roll->getLoot()->quest_items[roll->itemSlot - roll->getLoot()->items.size()] : roll->getLoot()->items[roll->itemSlot]);
if (item)
item->is_blocked = false;
}