mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-18 03:33:26 +02:00
OTS_Toolbox::getVocationName($id, $promotion);
This commit is contained in:
@@ -110,6 +110,15 @@ class OTS_Toolbox
|
||||
$list->setFilter($filter);
|
||||
return $list;
|
||||
}
|
||||
|
||||
public static function getVocationName($id, $promotion = 0): string
|
||||
{
|
||||
if($promotion > 0) {
|
||||
$id = ($id + ($promotion * config('vocations_amount')));
|
||||
}
|
||||
|
||||
return config('vocations')[$id] ?? 'Unknown';
|
||||
}
|
||||
}
|
||||
|
||||
/**#@-*/
|
||||
|
Reference in New Issue
Block a user