OTS_Toolbox::getVocationName($id, $promotion);

This commit is contained in:
slawkens
2025-06-13 22:25:36 +02:00
parent d423ddd07a
commit e222957893
2 changed files with 11 additions and 9 deletions

View File

@@ -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';
}
}
/**#@-*/