Core/Loot: correctly fix rolling on quest loot that follows group loot rules via custom flags.

This commit is contained in:
Kandera
2012-07-06 16:57:13 -04:00
parent 9eab1a23cf
commit 6a337bfa23

View File

@@ -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;
}