Add None vocation to highscores (can be changed to RookStayer in Admin Panel)

This commit is contained in:
slawkens
2024-11-12 20:51:45 +01:00
parent ddced132cf
commit a4a2480995
2 changed files with 8 additions and 6 deletions

View File

@@ -41,10 +41,12 @@ if($vocation !== 'all') {
$vocationId = $id;
$add_vocs = [$id];
$i = $id + $configVocationsAmount;
while(isset($configVocations[$i])) {
$add_vocs[] = $i;
$i += $configVocationsAmount;
if ($id !== 0) {
$i = $id + $configVocationsAmount;
while (isset($configVocations[$i])) {
$add_vocs[] = $i;
$i += $configVocationsAmount;
}
}
$query->whereIn('players.vocation', $add_vocs);