mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Retrieve descriptive vocation name if id is not configured.
This commit is contained in:
@@ -325,7 +325,7 @@ function online_id_to_name($id) {
|
|||||||
// Parameter: players.vocation_id. Returns: Configured vocation name.
|
// Parameter: players.vocation_id. Returns: Configured vocation name.
|
||||||
function vocation_id_to_name($id) {
|
function vocation_id_to_name($id) {
|
||||||
$vocations = config('vocations');
|
$vocations = config('vocations');
|
||||||
return ($vocations[$id] >= 0) ? $vocations[$id]['name'] : false;
|
return (isset($vocations[$id]['name'])) ? $vocations[$id]['name'] : "{$id} - Unknown";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parameter: players.name. Returns: Configured vocation id.
|
// Parameter: players.name. Returns: Configured vocation id.
|
||||||
|
Reference in New Issue
Block a user