From b91d3e70ccf365e1c63d0786a37244cd5b277b2f Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Fri, 12 Jan 2018 18:13:29 +0100 Subject: [PATCH] * (fix) TFS 1.x not showing promoted vocations in highscores --- system/pages/highscores.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/system/pages/highscores.php b/system/pages/highscores.php index a88cd261..160a588b 100644 --- a/system/pages/highscores.php +++ b/system/pages/highscores.php @@ -24,7 +24,15 @@ if($config['highscores_vocation_box'] && isset($vocation)) { foreach($config['vocations'] as $id => $name) { if(strtolower($name) == $vocation) { - $add_sql = 'AND ' . $db->fieldName('vocation') . ' = ' . $db->quote($id); + $add_vocs = array($id); + + $i = $id + $config['vocations_amount']; + while(isset($config['vocations'][$i])) { + $add_vocs[] = $i; + $i += $config['vocations_amount']; + } + + $add_sql = 'AND `vocation` IN (' . implode(', ', $add_vocs) . ')'; break; } } @@ -176,6 +184,7 @@ $i = 0; $online_exist = false; if(fieldExist('online', 'players')) $online_exist = true; + foreach($skills as $player) { if(!$online_exist) {