mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Loot: correctly fix rolling on quest loot that follows group loot rules via custom flags.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user