mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 01:53:47 +00:00
fix(Core): Crashfix on loot roll (#12605)
This commit is contained in:
@@ -1449,7 +1449,8 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
|
||||
roll->getLoot()->unlootedCount--;
|
||||
AllowedLooterSet looters = item->GetAllowedLooters();
|
||||
Item* _item = player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, looters);
|
||||
sScriptMgr->OnGroupRollRewardItem(player, _item, _item->GetCount(), NEED, roll);
|
||||
if (_item)
|
||||
sScriptMgr->OnGroupRollRewardItem(player, _item, _item->GetCount(), NEED, roll);
|
||||
player->UpdateLootAchievements(item, roll->getLoot());
|
||||
}
|
||||
else
|
||||
@@ -1518,7 +1519,8 @@ void Group::CountTheRoll(Rolls::iterator rollI, Map* allowedMap)
|
||||
roll->getLoot()->unlootedCount--;
|
||||
AllowedLooterSet looters = item->GetAllowedLooters();
|
||||
Item* _item = player->StoreNewItem(dest, roll->itemid, true, item->randomPropertyId, looters);
|
||||
sScriptMgr->OnGroupRollRewardItem(player, _item, _item->GetCount(), GREED, roll);
|
||||
if (_item)
|
||||
sScriptMgr->OnGroupRollRewardItem(player, _item, _item->GetCount(), GREED, roll);
|
||||
player->UpdateLootAchievements(item, roll->getLoot());
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user