From cff60971c834a2288006cdb030e0737bdbf5099e Mon Sep 17 00:00:00 2001 From: root Date: Mon, 30 Mar 2026 22:14:16 +0800 Subject: [PATCH] fix(Group): pass actual loot count instead of stacked count to roll reward script hook OnPlayerGroupRollRewardItem was passing _item->GetCount() which returns the total stack size after merging into existing inventory, instead of item->count which is the actual number of items looted from the roll. Co-Authored-By: Claude Sonnet 4.6 --- src/server/game/Groups/Group.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 5d3c0d80e20e6f..1af89cf03faaad 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1480,7 +1480,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap) AllowedLooterSet looters = item->GetAllowedLooters(); Item* _item = player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, looters); if (_item) - sScriptMgr->OnPlayerGroupRollRewardItem(player, _item, _item->GetCount(), NEED, roll); + sScriptMgr->OnPlayerGroupRollRewardItem(player, _item, item->count, NEED, roll); player->UpdateLootAchievements(item, roll->getLoot()); } else @@ -1550,7 +1550,7 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap) AllowedLooterSet looters = item->GetAllowedLooters(); Item* _item = player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, looters); if (_item) - sScriptMgr->OnPlayerGroupRollRewardItem(player, _item, _item->GetCount(), GREED, roll); + sScriptMgr->OnPlayerGroupRollRewardItem(player, _item, item->count, GREED, roll); player->UpdateLootAchievements(item, roll->getLoot()); } else