From d97268f0e99819d2ef68bd80225d55670f805a27 Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Fri, 25 Sep 2026 23:03:22 +0200 Subject: [PATCH] Ranking: after a tie the next place follows (1, 1, 2 instead of 1, 1, 3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Lumipunkte ranking counted places like a competition, so ten members with the same points were all #1 and the next one #11. Places are now dense: equal points share a place, the next lower score gets the next place. - contributions.php counts the place up by one per new score; the dashboard's "Platz X von Y" is 1 + the number of distinct higher scores. - Silver and bronze frames now go to everyone on #2 and #3. - The note for the limited view says "die besten 24 Mitglieder" instead of "Plätze"; patch notes. Co-Authored-By: Claude Opus 5.5 --- contributions.php | 7 ++++--- dashboard.php | 5 +++-- includes/patchnotes.php | 9 +++++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/contributions.php b/contributions.php index 31c67fb..69ca575 100644 --- a/contributions.php +++ b/contributions.php @@ -20,12 +20,13 @@ $currentUser = current_user(); $balances = contribution_balances(); $myBalance = contribution_user_balance((int) $currentUser['id']); -// Rang: gleiche Punktzahl = gleicher Platz. +// Rang: gleiche Punktzahl = gleicher Platz, die naechste Punktzahl bekommt den naechsten Platz +// (1, 1, 2 - nicht 1, 1, 3). Genauso zaehlt der Platz im Dashboard. $rank = 0; $lastPoints = null; foreach ($balances as $index => $member) { if ($lastPoints === null || (int) $member['points'] !== $lastPoints) { - $rank = $index + 1; + $rank++; $lastPoints = (int) $member['points']; } $balances[$index]['rank'] = $rank; @@ -156,7 +157,7 @@ include __DIR__ . '/includes/header.php'; 0): ?>

- Angezeigt werden die besten Plätze. Die vollständige Rangliste + Angezeigt werden die besten Mitglieder. Die vollständige Rangliste ( Mitglieder) ist der Legionsleitung vorbehalten.

diff --git a/dashboard.php b/dashboard.php index 62cd86d..480fa94 100644 --- a/dashboard.php +++ b/dashboard.php @@ -53,13 +53,14 @@ if ($canViewRaids) { } $nextRaids = array_slice($upcomingRaids, 0, 3); -// Eigene Lumipunkte mit Platz in der Rangliste (gleiche Punktzahl = gleicher Platz). +// Eigene Lumipunkte mit Platz in der Rangliste (gleiche Punktzahl = gleicher Platz, danach der naechste - +// wie auf contributions.php): 1 + wie viele verschiedene Punktstaende hoeher sind. $myPoints = null; $myRank = null; if ($canViewContributions) { $myPoints = contribution_user_balance((int) $user['id']); $rankStmt = db()->prepare( - "SELECT COUNT(*) + 1 FROM ( + "SELECT COUNT(DISTINCT points) + 1 FROM ( SELECT u.id, COALESCE(SUM(e.points), 0) AS points FROM users u LEFT JOIN contribution_entries e ON e.user_id = u.id WHERE u.status = 'active' GROUP BY u.id diff --git a/includes/patchnotes.php b/includes/patchnotes.php index 6d54043..0d46b78 100644 --- a/includes/patchnotes.php +++ b/includes/patchnotes.php @@ -19,6 +19,15 @@ const PATCHNOTE_TYPES = [ ]; const PATCHNOTES = [ + [ + 'id' => '2026-09-25-j', + 'date' => '2026-09-25', + 'title' => 'Plätze in der Rangliste', + 'summary' => 'Bei Punktgleichstand geht die Rangliste jetzt mit dem nächsten Platz weiter.', + 'changes' => [ + ['type' => 'behoben', 'area' => 'Lumipunkte', 'text' => 'Teilen sich mehrere Mitglieder einen Platz, kommt danach der nächste: Nach zehnmal Platz 1 folgt Platz 2 statt Platz 11. Dein Platz im Dashboard zählt genauso.'], + ], + ], [ 'id' => '2026-09-25-i', 'date' => '2026-09-25',