Skip to content

Commit

Permalink
fix: Grant unlock point per badge instead of per badge level
Browse files Browse the repository at this point in the history
  • Loading branch information
cetteup committed Nov 22, 2024
1 parent df86f71 commit d2bc731
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ASP/aspx/getunlocksinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ function getBonusUnlockCountByBadges($pid, $rank, $connection)
// Count number of kit badges obtained
$checkawds = implode(",", $kitbadges);
$query = <<<SQL
SELECT COUNT(`award_id`) AS `count`
-- Using DISTINCT here to ensure we never return more than 7 unlock points based on badges
-- Without DISTINCT, we'd return up to 14 points ($level = 2 and player has all level 2 + 3 badges)
SELECT COUNT(DISTINCT `award_id`) AS `count`
FROM `player_award`
WHERE `player_id` = $pid
AND (
Expand Down

0 comments on commit d2bc731

Please sign in to comment.