mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
* (fix) TFS 1.x not showing promoted vocations in highscores
This commit is contained in:
parent
cb8d8c4173
commit
9dc3d6d8d6
@ -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;
|
||||
}
|
||||
}
|
||||
@ -182,7 +190,7 @@ foreach($skills as $player) {
|
||||
$players[] = $player['id'];
|
||||
}
|
||||
|
||||
if($db->hasTable('players_online')) {
|
||||
if($db->hasTable('players_online') && count($players) > 0) {
|
||||
$query = $db->query('SELECT `player_id`, 1 FROM `players_online` WHERE `player_id` IN (' . implode(', ', $players) . ')')->fetchAll();
|
||||
foreach($query as $t) {
|
||||
$is_online[$t['player_id']] = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user