mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
Retrieve descriptive vocation name if id is not configured.
This commit is contained in:
parent
9f95fa4bb8
commit
a76e468645
@ -325,7 +325,7 @@ function online_id_to_name($id) {
|
||||
// Parameter: players.vocation_id. Returns: Configured vocation name.
|
||||
function vocation_id_to_name($id) {
|
||||
$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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user