diff --git a/ag/char.php b/ag/char.php index 0aac99e..aa37e73 100644 --- a/ag/char.php +++ b/ag/char.php @@ -27,6 +27,7 @@ $char_name = validateName($_GET['char_name']); $char_1_type = validateString($_GET['char_1_Type']); $char_bild = validateURL($_GET['char_bild']); $char_lvl = validateInteger($_GET['char_lvl'], NULL); +$randomize = validateInteger($_GET['random'], NULL); // Unkritisch $charm = $_REQUEST['charm']; @@ -69,7 +70,7 @@ function handleErstelleCharRequest($user, $type, $name, $bild){ function handleErstelleCharRequestOfTestUser($user, $type, $name, $bild, $lvl, $lp, $hp, $mp, $str, $def, $spd, $end, $lck){ //stats auf numeric prüfen! if($type != 'Mensch' && $type != 'Saiyajin' && $type != 'Dämon' && $type != 'Mutant' && $type != 'Cyborg' && - $type != 'Namekianer' && $type != 'Pirat' && $type != 'Schwertkämpfer' && $type != 'Grandline Maschine' && $type != 'Kaioshin' && $type != 'Shichibukai'){ + $type != 'Namekianer' && $type != 'Pirat' && $type != 'Schwertkämpfer' && $type != 'Grandline Maschine' && $type != 'Kaioshin' && $type != 'Shichibukai'){ displayErrorMessage(NULL,'Rasse kann nicht erstellt werden!',displayHistoryBackLink()); return; } @@ -147,9 +148,9 @@ function handleSecondPhase($type, $name){ function handleSecondPhaseForTester($type, $name){ ?>
- = 1 AND $user_daten['char_max'] == 7) { - $chars_max= 8; -} else { - $chars_max= $user_daten['char_max']; -} + if ($anzahl_spezialchars >= 1 AND $user_daten['char_max'] == 7) { + $chars_max= 8; + } else { + $chars_max= $user_daten['char_max']; + } -if ($anzahl_charactere < $chars_max) { - if($charm === NULL){ - handleFirstPhase($user_daten,$anzahl_charactere); - } else if($charm == 1){ - if(isUserInGroup($usergroups, TESTER)) { - handleSecondPhaseForTester($char_type, $char_name); - } else { - handleSecondPhase($char_type, $char_name); - } - } else if($charm == 2){ - handleErstelleCharRequest($user_ida, $char_1_type, $char_name, $char_bild); - } else if($charm == 3) { - handleThirdPhaseForTester($char_1_type, $char_name, $char_lvl); - } else if($charm == 4) { - handleErstelleCharRequestOfTestUser($user_ida, $_REQUEST['char_type'], $_REQUEST['char_name'], $_REQUEST['char_bild'], $_REQUEST['lvl'], $_REQUEST['lp'], + if ($anzahl_charactere < $chars_max) { + if($charm === NULL){ + handleFirstPhase($user_daten,$anzahl_charactere); + } else if($charm == 1){ + if(isUserInGroup($usergroups, TESTER)) { + handleSecondPhaseForTester($char_type, $char_name); + } else { + handleSecondPhase($char_type, $char_name); + } + } else if($charm == 2){ + handleErstelleCharRequest($user_ida, $char_1_type, $char_name, $char_bild); + } else if($charm == 3) { + handleThirdPhaseForTester($char_1_type, $char_name, $char_lvl, $randomize, $user_ida); + } else if($charm == 4) { + handleErstelleCharRequestOfTestUser($user_ida, $_REQUEST['char_type'], $_REQUEST['char_name'], $_REQUEST['char_bild'], $_REQUEST['lvl'], $_REQUEST['lp'], $_REQUEST['hp'], $_REQUEST['mp'], $_REQUEST['str'], $_REQUEST['def'], $_REQUEST['spd'], $_REQUEST['end'], $_REQUEST['lck']); + } + } else { + echo 'Du hast bereits die maximal mögliche Menge an Characteren erstellt, die du erstellen kannst.