From 7ab1c1170f86ca11158c685ee15f3c191c654024 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Sun, 7 Jan 2018 11:57:26 +0100 Subject: [PATCH] * fixed saving custom vocations in admin panel (#36) --- system/pages/admin/players.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/system/pages/admin/players.php b/system/pages/admin/players.php index 75544c7e..f26a2ea3 100644 --- a/system/pages/admin/players.php +++ b/system/pages/admin/players.php @@ -120,7 +120,11 @@ if($id > 0) { verify_number($experience, 'Experience', 20); $vocation = $_POST['vocation']; - verify_number($vocation, 'Vocation id', 1); + verify_number($vocation, 'Vocation id', 11); + + if(!isset($config['vocations'][$vocation])) { + echo_error("Vocation with this id doesn't exist."); + } // health $health = $_POST['health']; @@ -357,14 +361,12 @@ $account = $player->getAccount();