fix(Core/Groups): pass actual loot count to OnPlayerGroupRollRewardItem hook (#25312)

Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
FM 2026-04-05 22:23:41 +08:00 committed by GitHub
parent d7c7e7cf3f
commit 27e823fa21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1485,7 +1485,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
@ -1555,7 +1555,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