diff --git a/ag/char.php b/ag/char.php
index aa37e73..a6cee4f 100644
--- a/ag/char.php
+++ b/ag/char.php
@@ -19,6 +19,7 @@ include_once(ROOT_PATH.'/include/erstellfunctions.inc.php');
include_once(ROOT_PATH.'/include/parse.inc.php');
include_once(ROOT_PATH.'/include/usergroup.inc.php');
include_once(ROOT_PATH.'/include/exp.inc.php');
+include_once(ROOT_PATH.'/include/rassen.inc.php');
// GET-Section
@@ -58,7 +59,9 @@ function isAPhoneNumber(){
// $user_ida, $char_1_Type, $char_name
function handleErstelleCharRequest($user, $type, $name, $bild){
- if($type != 'Mensch' && $type != 'Saiyajin' && $type != 'Dämon' && $type != 'Mutant' && $type != 'Cyborg' && $type != 'Namekianer' && $type != 'Pirat' && $type != 'Schwertkämpfer' && $type != 'Grandline Maschine'){
+ $race = getRaceById($type);
+ $type = getRaceTypeById($race['id']);
+ if($race == NULL || $race['special'] || $type['gm_only']) {
displayErrorMessage(NULL,'Rasse kann nicht erstellt werden!',displayHistoryBackLink());
return;
}
@@ -69,8 +72,8 @@ 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'){
+ $race = getRaceById($type);
+ if($race == NULL) {
displayErrorMessage(NULL,'Rasse kann nicht erstellt werden!',displayHistoryBackLink());
return;
}
@@ -106,26 +109,34 @@ function handleSecondPhase($type, $name){
Rasse: |
|
@@ -160,30 +171,27 @@ function handleSecondPhaseForTester($type, $name){
Rasse: |
|
@@ -213,6 +221,7 @@ function handleSecondPhaseForTester($type, $name){
}
function handleThirdPhaseForTester($type, $name, $char_lvl, $random, $user){
+ $type_arr = getRaceById($type);
if(($char_lvl >= 1 && $char_lvl <= 150) && $char_lvl !== NULL && is_numeric($char_lvl)) {
$lp = 0;
for ($i = 1; $i < $char_lvl; $i++) {
@@ -253,7 +262,7 @@ function handleThirdPhaseForTester($type, $name, $char_lvl, $random, $user){
CharakterTyp: |
-
+ |
|
@@ -313,7 +322,7 @@ function handleThirdPhaseForTester($type, $name, $char_lvl, $random, $user){
echo 'Ungültiger Levelbereich!';
}
- function handleFirstPhase(){
+ function handleFirstPhase($user_daten,$anzahl_charactere,$tester){
?>