chore(Core/Loot): Move OnAllowedForPlayerLootCheck() hook call up

This commit is contained in:
Skjalf
2023-09-07 17:25:13 -03:00
parent 76d1d02dce
commit f841ef9da3

View File

@@ -420,6 +420,11 @@ bool LootItem::AllowedForPlayer(Player const* player, ObjectGuid source) const
return false;
}
if (!sScriptMgr->OnAllowedForPlayerLootCheck(player, source))
{
return false;
}
bool isMasterLooter = player->GetGroup() && player->GetGroup()->GetMasterLooterGuid() == player->GetGUID();
bool itemVisibleForMasterLooter = !needs_quest && (!follow_loot_rules || !is_underthreshold);
@@ -473,11 +478,6 @@ bool LootItem::AllowedForPlayer(Player const* player, ObjectGuid source) const
return false;
}
if (!sScriptMgr->OnAllowedForPlayerLootCheck(player, source))
{
return false;
}
return true;
}