From a76e4686459783de4da15f339af9924e8c965a82 Mon Sep 17 00:00:00 2001 From: Znote Date: Wed, 3 Apr 2019 22:46:24 +0200 Subject: [PATCH] Retrieve descriptive vocation name if id is not configured. --- engine/function/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/function/general.php b/engine/function/general.php index 74a0a68..e318e21 100644 --- a/engine/function/general.php +++ b/engine/function/general.php @@ -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.