diff --git a/ag/dragonballs.php b/ag/dragonballs.php index 42638d5..3e35060 100644 --- a/ag/dragonballs.php +++ b/ag/dragonballs.php @@ -92,7 +92,7 @@ function wuenscheSpecialChar($user, $specialcharname, $newname = ''){ $chars = getCharsOfUser($user['id']); foreach($chars as $char) { - if($char['rasse_a']['id'] == $rasse) { + if($char['rasse_a']['id'] == $rasse['id']) { displayErrorMessage(NULL,'Der '.$specialcharname.'-Slot ist schon durch '.$char['name'].' belegt!!',displayHistoryBackLink()); return false; } diff --git a/ag/include/erstellfunctions.inc.php b/ag/include/erstellfunctions.inc.php index 13eb99b..b9959ed 100644 --- a/ag/include/erstellfunctions.inc.php +++ b/ag/include/erstellfunctions.inc.php @@ -34,7 +34,7 @@ function hasUserFreeCharSlot($user, $special = false) { } } - if(!$special) { + if(!$special || $special_chars > 0) { if($special_chars > 0) $special_chars--; @@ -42,7 +42,8 @@ function hasUserFreeCharSlot($user, $special = false) { $slots_avail = $user['char_max']; return $chars_avail < $slots_avail; } else { - return $special_chars < 2; + // special char but no special char yet available! + return true; } return false;