Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Grant unlock point per badge instead of per badge level #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading