Jump to content

[10708][patch] Fix ACHIEVEMENT_CRITERIA_TYPE_LOOT_* with group roll


Recommended Posts

Posted

* What bug does the patch fix? What features does the patch add?

Fix ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE and ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM never checked while looting items with group roll for example Sinister Calling 2nd criteria (no problem with master loot and free for all)

* For which repository revision was the patch created?

10675

* Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

none that I know.

* Who has been writing this patch? Please include either forum user names or email addresses.

Revils

diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index dd4b371..5d47f5f 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -851,6 +851,9 @@ void Group::CountTheRoll(Rolls::iterator& rollI)
                    roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
                    --roll->getLoot()->unlootedCount;
                    player->StoreNewItem( dest, roll->itemid, true, item->randomPropertyId);
+                    player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, roll->itemid, item->count);
+                    player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, roll->getLoot()->loot_type, item->count);
+                    player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM, roll->itemid, item->count);
                }
                else
                {
@@ -903,6 +906,9 @@ void Group::CountTheRoll(Rolls::iterator& rollI)
                        roll->getLoot()->NotifyItemRemoved(roll->itemSlot);
                        --roll->getLoot()->unlootedCount;
                        player->StoreNewItem( dest, roll->itemid, true, item->randomPropertyId);
+                        player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_ITEM, roll->itemid, item->count);
+                        player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_TYPE, roll->getLoot()->loot_type, item->count);
+                        player->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_LOOT_EPIC_ITEM, roll->itemid, item->count);
                    }
                    else
                    {

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use