fixed check for special char creation

main
hecht 10 years ago
parent c13a8dd496
commit 966adc533b

@ -90,11 +90,13 @@ function wuenscheSpecialChar($user, $specialcharname, $newname = ''){
$rasse = getRaceByName($specialcharname);
$kaioshin = mysql_fetch_assoc(mysql_query('SELECT char_type,name from chars WHERE (rasse = \''.$specialcharname.'\' or rasse = \''.$rasse['id'].'\' or fusion_rasse = \''.$specialcharname.'\' or fusion_rasse = \''.$rasse['id'].'\') and besitzer='.$user['id']));
if($kaioshin != null){
displayErrorMessage(NULL,'Der '.$specialcharname.'-Slot ist schon durch '.$kaioshin['name'].' belegt!!',displayHistoryBackLink());
$chars = getCharsOfUser($user['id']);
foreach($chars as $char) {
if($char['rasse_a']['id'] == $rasse) {
displayErrorMessage(NULL,'Der '.$specialcharname.'-Slot ist schon durch '.$char['name'].' belegt!!',displayHistoryBackLink());
return false;
}
}
// Kleine Funktion grosse Wirkung
if(!erstelleChar($user, $rasse['id'], $newname)){

Loading…
Cancel
Save