From a33f91757d16fe2123c360bb9aec6482d5e76d80 Mon Sep 17 00:00:00 2001 From: hecht Date: Wed, 12 Oct 2011 22:14:53 +0000 Subject: [PATCH] the clanfights have been adjusted to store the timestamp when the fight can be viewed. Also there is a new file that can be used to display event fights. The file can be executed like this -> event_kampf_anzeige.php?event_id=&event_fight_id= and looks like any usual display :) --- ag/clan/add.php | 38 - ag/event_kampf_anzeige.php | 21 + ag/include/arena.inc.php | 1 + ag/include/char.inc.php | 7 + ag/include/clan.inc.php | 45 + ag/include/clan_fights.inc.php | 80 +- ag/include/event.inc.php | 51 +- ag/include/kampf_anzeige.inc.php | 222 ++- ag/include/kampf_wrapper.inc.php | 10 +- ag/test.php | 1 + db/animegame_svn.sql | 2649 +++++++++++------------------ db/clankampf_sql_create_table.txt | 43 - 12 files changed, 1372 insertions(+), 1796 deletions(-) create mode 100644 ag/event_kampf_anzeige.php delete mode 100644 db/clankampf_sql_create_table.txt diff --git a/ag/clan/add.php b/ag/clan/add.php index 55d3237..4abc040 100644 --- a/ag/clan/add.php +++ b/ag/clan/add.php @@ -22,44 +22,6 @@ $pagenum = validateUnsignedInteger($_GET['pagenum'], null); $action = $_GET['action']; $user = $user_ida; -function joinClan($user, $clanid){ - $sql = 'SELECT * FROM user_clan_invitations WHERE userid = '.$user['id'].' and clanid = '.$clanid.' and valid > now();'; - $clan_user = mysql_fetch_assoc(mysql_query($sql)); - - if($clan_user){ - $clan = getClan($clanid); - $members = getClanMembersCount($clanid); - $members_max = getMaximumMembers($clan['id']); - - if($members >= $members_max){ - displayErrorMessage(NULL,'Konnte die Einladung des Clans nicht annehmen (Clan voll)!',displayHistoryBackLink()); - return; - } else{ - $sql = 'UPDATE user SET clan = '.$clanid.' WHERE id = '.$user['id']; - // echo $sql.'
'; - mysql_query($sql); - - // unset the leader if the user is moving from one clan to another - mysql_query('UPDATE clan SET leader = NULL WHERE leader = ' .$user['id']); - mysql_query('UPDATE clan SET co_leader = NULL WHERE co_leader = ' .$user['id']); - - displayErrorMessage('Aufgenommen','Du wurdest erfolgreich in den Clan aufgenommen!','weiter'); - } - } else{ - displayErrorMessage(NULL,'Konnte die Einladung des Clans nicht annehmen!',displayHistoryBackLink()); - return; - } - mysql_query('DELETE FROM user_clan_invitations WHERE userid = '.$user['id'].' and clanid = '.$clanid); -} - -function denyClan($user, $clanid){ - mysql_query('DELETE FROM user_clan_invitations WHERE userid = '.$user['id'].' and clanid = '.$clanid); - if(mysql_affected_rows() > 0){ - displayErrorMessage('Abgelehnt','Du hast die Einladung erfolgreich abgelehnt!','weiter'); - } else{ - displayErrorMessage(NULL,'Einladung des Clans konnte nicht abgelehnt werden!',displayHistoryBackLink()); - } -} if ($action == 'accept') { joinClan($user_ida, $clanid); diff --git a/ag/event_kampf_anzeige.php b/ag/event_kampf_anzeige.php new file mode 100644 index 0000000..25ba42e --- /dev/null +++ b/ag/event_kampf_anzeige.php @@ -0,0 +1,21 @@ +'; +} +?> \ No newline at end of file diff --git a/ag/include/arena.inc.php b/ag/include/arena.inc.php index 63dd7bd..228b2f2 100644 --- a/ag/include/arena.inc.php +++ b/ag/include/arena.inc.php @@ -21,6 +21,7 @@ function calculateArenaData($owner_id, $char_1, $char_2, $factor){ $arena['steh'] = 1000000; $arena['sitz'] = 1000000; $arena['loge'] = 1000000; + $arena['zustand'] = 1; } else { $arena = mysql_fetch_assoc(mysql_query('SELECT * FROM arena WHERE besitzer = '.$owner_id)); } diff --git a/ag/include/char.inc.php b/ag/include/char.inc.php index a9375c6..70a81d2 100644 --- a/ag/include/char.inc.php +++ b/ag/include/char.inc.php @@ -16,6 +16,7 @@ */ // required for status calculation! +include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/event.inc.php'); include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/clan_fights.inc.php'); /* @@ -73,6 +74,12 @@ function getStatus($charid, $buffer_enabled = true) { return 'Clanfight'; } + $event_status = getEventStatus($charid); + if($event_status !== NULL) { + $GLOBALS['char_buffered_statuses'][$charid] = $event_status; + return $event_status; + } + $GLOBALS['char_buffered_statuses'][$charid] = 'Frei'; return 'Frei'; } diff --git a/ag/include/clan.inc.php b/ag/include/clan.inc.php index 38559b4..c750279 100644 --- a/ag/include/clan.inc.php +++ b/ag/include/clan.inc.php @@ -7,6 +7,7 @@ */ include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/defines.inc.php'); +include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/clan_fights.inc.php'); defineIfNotDefined('MAX_CHARS_CLANSIGN', 8); $GLOBALS['clan_buffered_instances'] = array (); @@ -186,4 +187,48 @@ function fireMember($user, $member){ } +function joinClan($user, $clanid){ + // last chance to lock the clan if in the old situation it was having to few members ;) + isClanLocked($clanid); // we only require the calculation not the result! + + $sql = 'SELECT * FROM user_clan_invitations WHERE userid = '.$user['id'].' and clanid = '.$clanid.' and valid > now();'; + $clan_user = mysql_fetch_assoc(mysql_query($sql)); + + if($clan_user){ + $clan = getClan($clanid); + $members = getClanMembersCount($clanid); + $members_max = getMaximumMembers($clan['id']); + + if($members >= $members_max){ + displayErrorMessage(NULL,'Konnte die Einladung des Clans nicht annehmen (Clan voll)!',displayHistoryBackLink()); + return; + } else{ + $sql = 'UPDATE user SET clan = '.$clanid.' WHERE id = '.$user['id']; + // echo $sql.'
'; + mysql_query($sql); + + // unset the leader if the user is moving from one clan to another + mysql_query('UPDATE clan SET leader = NULL WHERE leader = ' .$user['id']); + mysql_query('UPDATE clan SET co_leader = NULL WHERE co_leader = ' .$user['id']); + + displayErrorMessage('Aufgenommen','Du wurdest erfolgreich in den Clan aufgenommen!','weiter'); + } + } else{ + displayErrorMessage(NULL,'Konnte die Einladung des Clans nicht annehmen!',displayHistoryBackLink()); + return; + } + mysql_query('DELETE FROM user_clan_invitations WHERE userid = '.$user['id'].' and clanid = '.$clanid); +} + +function denyClan($user, $clanid){ + mysql_query('DELETE FROM user_clan_invitations WHERE userid = '.$user['id'].' and clanid = '.$clanid); + if(mysql_affected_rows() > 0){ + displayErrorMessage('Abgelehnt','Du hast die Einladung erfolgreich abgelehnt!','weiter'); + } else{ + displayErrorMessage(NULL,'Einladung des Clans konnte nicht abgelehnt werden!',displayHistoryBackLink()); + } +} + + + ?> diff --git a/ag/include/clan_fights.inc.php b/ag/include/clan_fights.inc.php index 9f88020..8026082 100644 --- a/ag/include/clan_fights.inc.php +++ b/ag/include/clan_fights.inc.php @@ -18,8 +18,12 @@ include_once ($_SERVER['DOCUMENT_ROOT'] . 'ag/include/event.inc.php'); defineIfNotDefined('MIN_MEMBERS', 5); defineIfNotDefined('MAX_OPEN_REQUESTS', 3); +defineIfNotDefined('CLANFIGHTS_MAX_FIGHTS_PER_24H', 6); defineIfNotDefined('DAVY_BACK_FIGHT', 1); defineIfNotDefined('SURVIVAL', 2); +defineIfNotDefined('DURATION_DAVY_BACK_FIGHT', 10); +defineIfNotDefined('DURATION_SURVIVAL_FIGHT', 10); + defineIfNotDefined('ATTACK_SET_DAVY_BACK_FIGHT', 2); defineIfNotDefined('ATTACK_SET_SURVIVAL', 2); @@ -61,6 +65,8 @@ function challengeClan(array $user, $clanid, $anzahl = 5, $type = DAVY_BACK_FIGH return 'Einer der Clans erfüllt die Anforderungen an Clanfights nichtmehr (wahrscheinlich zu wenig Members)!'; } + + if(!semaphoreUP($ressource_clan1)) { return 'Fehler beim Verarbeiten der Anfrage für \'' . $clan['clanname'] . '\' versuche es bitte nochmal! '; } @@ -98,6 +104,28 @@ function challengeClan(array $user, $clanid, $anzahl = 5, $type = DAVY_BACK_FIGH return 'Konnte den anderen Clan nicht herausfordern, da dieser Clan schoneinmal in den letzten 24 Stunden herausgefordert wurde!'; } + // it should not be possible to challenge a clan that already has an open match that is not yet calculated! ( not completely possible in sql) + $sql = 'select count(k.anzahl) as anzahl from (SELECT count(*) as anzahl FROM clan_challenges c inner join clan_challenge_clans ccc on c.clan_challenge_id = ccc.clan_challenge_id where (calculated = 1 or enddate > now()) and clan_id IN ('.$user['clan'].', '.$clanid.') group by c.clan_challenge_id) k where k.anzahl = 0'; + //echo $sql .'
'; + $row = mysql_fetch_assoc(mysql_query($sql)); + if($row['anzahl'] > 0) { + semaphoreDown($ressource_clan1); // free the previously reserved semaphore! + semaphoreDown($ressource_clan2); // free the previously reserved semaphore! + return 'Du kannst einen Clan nicht herausfordern, wenn derzeit gerade ein Clanfight zwischen euch läuft oder offen ist!'; + } + + // now calculate how many open fights we currently had or have! + $sql = 'select count(*) as anzahl from (SELECT count(*) as anz FROM clan_challenges c inner join clan_challenge_clans ccc on c.clan_challenge_id = ccc.clan_challenge_id where calculated = 0 or TIMESTAMPADD(day, -1, now()) < enddate and clan_id IN ('.$user['clan'].', '.$clanid.') group by clan_id) k where k.anz >= ' . CLANFIGHTS_MAX_FIGHTS_PER_24H; + //echo $sql .'
'; + $row = mysql_fetch_assoc(mysql_query($sql)); + + if($row['anzahl'] > 0) { + semaphoreDown($ressource_clan1); // free the previously reserved semaphore! + semaphoreDown($ressource_clan2); // free the previously reserved semaphore! + return 'Einer der beiden Clans hat das Limit von ' . CLANFIGHTS_MAX_FIGHTS_PER_24H . ' offenen und abgeschlossenen Clanfights innerhalb von 24 erreicht. Daher kann die Herausforderung nicht versandt werden!'; + } + + // Fordere heraus! mysql_query('INSERT INTO clan_challenge_requests(clan_requester, clan_challenged, type, challenged_time, anzahl_chars, active) VALUES('.$user['clan'].', '.$clanid.','.$type.' , TIMESTAMPADD(HOUR, CURRENT_TIMESTAMP, 4), '.$anzahl.', true)'); @@ -154,6 +182,15 @@ function acceptChallengeRequest($challenged_clan, array $user) { return 'Einer der Clans erfüllt die Anforderungen an Clanfights nichtmehr (wahrscheinlich zu wenig Members)!'; } + // now calculate how many open fights we currently had or have! // FIXME: Good idea to pach this in a semaphore? + $sql = 'select count(*) as anzahl from (SELECT count(*) as anz FROM clan_challenges c inner join clan_challenge_clans ccc on c.clan_challenge_id = ccc.clan_challenge_id where calculated = 0 or TIMESTAMPADD(day, -1, now()) < enddate and clan_id IN ('.$clan_challenge['clan_challenged'].', '.$clan_challenge['clan_requester'].') group by clan_id) k where k.anz >= ' . CLANFIGHTS_MAX_FIGHTS_PER_24H; +// echo $sql . '
'; + $row = mysql_fetch_assoc(mysql_query($sql)); + + if($row['anzahl'] > 0) { + return 'Einer der beiden Clans hat das Limit von ' . CLANFIGHTS_MAX_FIGHTS_PER_24H . ' offenen und abgeschlossenen Clanfights innerhalb von 24 erreicht. Daher kann die Herausforderung nicht angenommen werden!'; + } + $oclan = getClan($clan_challenge['clan_requester']); mysql_query('UPDATE clan_challenge_requests SET active = false WHERE clan_challenged = ' .$user['clan'] . ' AND clan_requester = ' .$challenged_clan . ' AND active = TRUE AND challenged_time > TIMESTAMPADD(day, -1, now())'); @@ -483,6 +520,8 @@ function leaveChallenge($clan_challenge_id, array $user, $charid) { function calculateChallenge($clan_challenge_id) { $challenge = getChallenge($clan_challenge_id); + $start_time = time(); + // okay the calculated flag is already set so readout all the required data for further processing! $clan_ids = getParticipatingClanIDs($clan_challenge_id); $clan_chars = array(); @@ -497,23 +536,32 @@ function calculateChallenge($clan_challenge_id) { } } + $result = NULL; + // okay now determine the type of fight switch($challenge['type']) { case DAVY_BACK_FIGHT: - return calculateDavyBackClanFight($event_id, $clan_ids, $clan_chars); + $result = calculateDavyBackClanFight($event_id, $clan_ids, $clan_chars, $start_time); + if(!is_numeric($result)) + return $result; break; case SURVIVAL: - return calculateSurvivalClanFight($event_id, $clan_ids, $clan_chars); + return calculateSurvivalClanFight($event_id, $clan_ids, $clan_chars, $start_time); + if(!is_numeric($result)) + return $result; break; default: // cannot create anything -.- return 'Der Clanfight Typ "'.$challenge['type'].'" wird nicht unterstützt, bitte melde dich beim Administrator!' ; } + mysql_query('UPDATE clan_challenges set event_id = '.$event_id.', enddate = \''.date("Y-m-d H:i:s",$result).'\' WHERE clan_challenge_id = ' .$clan_challenge_id); + return NULL; } -function calculateDavyBackClanFight($event_id, array $clan_ids, array $clan_char_array) { +function calculateDavyBackClanFight($event_id, array $clan_ids, array $clan_char_array, $start_time) { + $duration = DURATION_DAVY_BACK_FIGHT * 60; // okay, davy back fights are 1 vs. 1 and the winner is the one that has won the most fights. if(count($clan_char_array) != 2) { return 'Davy Back Fights können nur zwischen 2 Clans ausgetragen werden und nicht von ' . count($clan_char_array); @@ -528,11 +576,13 @@ function calculateDavyBackClanFight($event_id, array $clan_ids, array $clan_char $char_clan_2 = $clan_char_array[$clan_ids[1]][$runde]; // we do not need to know right now who won the battle! This is required in the post processing (cronjob)! - battle($event_id, $char_clan_1, $char_clan_2, ATTACK_SET_DAVY_BACK_FIGHT); + battle($event_id, $char_clan_1, $char_clan_2, ATTACK_SET_DAVY_BACK_FIGHT, $start_time + ($runde-1) * $duration, $start_time + $runde * $duration); } + return $start_time + ($runde-1) * $duration; } -function calculateSurvivalClanFight($event_id, array $clan_ids, array $clan_char_array) { +function calculateSurvivalClanFight($event_id, array $clan_ids, array $clan_char_array, $start_time) { + $duration = DURATION_SURVIVAL_FIGHT * 60; // okay, survival fights are 1 vs. 1 and the winner is the one that has the last man standing. if(count($clan_char_array) != 2) { return 'Survival Fights können nur zwischen 2 Clans ausgetragen werden und nicht von ' . count($clan_char_array); @@ -547,9 +597,11 @@ function calculateSurvivalClanFight($event_id, array $clan_ids, array $clan_char $char_clan_1 = $clan_char_array[$clan_ids[0]][$counter_clan_1]; $char_clan_2 = $clan_char_array[$clan_ids[1]][$counter_clan_2]; + $runde = 0; // As long as char 1 and char 2 are set while($char_clan_1 != NULL && $char_clan_2 != NULL) { - $sieger = battle($event_id, $char_clan_1, $char_clan_2, ATTACK_SET_SURVIVAL); + $runde++; + $sieger = battle($event_id, $char_clan_1, $char_clan_2, ATTACK_SET_SURVIVAL, $start_time + ($runde-1) * $duration, $start_time + $runde * $duration); if($sieger['id'] != $char_clan_1['id']) { // the loser is of clan 1 $char_clan_1 = $clan_char_array[$clan_ids[0]][++$counter_clan_1]; @@ -559,6 +611,7 @@ function calculateSurvivalClanFight($event_id, array $clan_ids, array $clan_char $char_clan_2 = $clan_char_array[$clan_ids[1]][++$counter_clan_2]; $char_clan_1 = $sieger; // the new array contains the adjusted health parameter } + return $start_time + $runde * $duration; } } @@ -571,7 +624,7 @@ function calculateSurvivalClanFight($event_id, array $clan_ids, array $clan_char * @param int $attack_set the attack set that should be used! * @return the winners array */ -function battle($event_id, array $char1, array $char2, $attack_set) { +function battle($event_id, array $char1, array $char2, $attack_set, $startTimestamp, $endTimestamp) { $char1['attacken'] = implode(',', getCharAttackSet($char1['id'], $attack_set)); $char2['attacken'] = implode(',', getCharAttackSet($char2['id'], $attack_set)); @@ -582,21 +635,22 @@ function battle($event_id, array $char1, array $char2, $attack_set) { $combinedArray['data'][KEY_EXP_CHAR1] = $exp[$char1['id']]; $combinedArray['data'][KEY_EXP_CHAR2] = $exp[$char2['id']]; - $arena = calculateArenaData(null, $char_1, $char_2, 0.01); + $arena = calculateArenaData(null, $char1, $char2, 0.01); + $combinedArray['data'][KEY_LOGE] = $arena['loge']; $combinedArray['data'][KEY_SITZ] = $arena['sitz']; $combinedArray['data'][KEY_STEH] = $arena['steh']; if($combinedArray['winner'] == $char1['id']) { - $combinedArray['data'][KEY_GELD_CHAR1] = $result['geld'] * 0.7; - $combinedArray['data'][KEY_GELD_CHAR2] = $result['geld'] * 0.3; + $combinedArray['data'][KEY_GELD_CHAR1] = $arena['geld'] * 0.7; + $combinedArray['data'][KEY_GELD_CHAR2] = $arena['geld'] * 0.3; } else { - $combinedArray['data'][KEY_GELD_CHAR2] = $result['geld'] * 0.7; - $combinedArray['data'][KEY_GELD_CHAR1] = $result['geld'] * 0.3; + $combinedArray['data'][KEY_GELD_CHAR2] = $arena['geld'] * 0.7; + $combinedArray['data'][KEY_GELD_CHAR1] = $arena['geld'] * 0.3; } // first persist the fight and then check who was the winner and adjust the char array for him ;) - persistFight($event_id, $combinedArray); + persistFight($event_id, $combinedArray, $startTimestamp, $endTimestamp); return; // now get the winners array diff --git a/ag/include/event.inc.php b/ag/include/event.inc.php index 33a94ff..2b85a55 100644 --- a/ag/include/event.inc.php +++ b/ag/include/event.inc.php @@ -17,13 +17,6 @@ defineIfNotDefined('EVENT_LIGA', 4); defineIfNotDefined('EVENT_WANTED', 5); defineIfNotDefined('EVENT_CLAN_FIGHT', 6); -// The fights duration is fixed -defineIfNotDefined('DURATIONTYPE_FIGHT', 0); -// The fights duration is resolved by the amount of rounds -defineIfNotDefined('DURATIONTYPE_ROUND', 1); -// The fights duration is fixed but the time ouf rounds is resolved! -defineIfNotDefined('DURATIONTYPE_FIGHT_RESOLVED_ROUNDS', 2); - defineIfNotDefined('KEY_LOGE', 'LOGE'); defineIfNotDefined('KEY_SITZ', 'SITZ'); defineIfNotDefined('KEY_STEH', 'STEH'); @@ -64,8 +57,8 @@ function addParticipant($event_id, array $char) { $hp = explode(',', $char['hp']); $mp = explode(',', $char['mp']); - $sql = 'INSERT INTO event_chars(event_id, event_char_id, char_id, char_name, char_bild, user_id, user_name, hp, mp, strength, speed, defense, luck, stamina)'; - $sql .= ' value('. $event_id . ', '.$char['id'] .', '.$char['id'] .', \''.$char['name'].'\', \''.$char['bild'].'\', '.$char['besitzer'].', \''.$user['nickname'].'\', '.$hp[1].', '.$mp[1].', '.$char['starke'].', '.$char['speed'].', '.$char['verteidigung'].', '.$char['glueck'].', '.$char['ausdauer'].')'; + $sql = 'INSERT INTO event_chars(event_id, event_char_id, char_id, char_name, char_bild, user_id, user_name, hp, mp, strength, speed, defense, luck, stamina, block_begin, block_end)'; + $sql .= ' value('. $event_id . ', '.$char['id'] .', '.$char['id'] .', \''.$char['name'].'\', \''.$char['bild'].'\', '.$char['besitzer'].', \''.$user['nickname'].'\', '.$hp[1].', '.$mp[1].', '.$char['starke'].', '.$char['speed'].', '.$char['verteidigung'].', '.$char['glueck'].', '.$char['ausdauer'].', now(), TIMESTAMPADD(Minute, 1, now()))'; // echo $sql . '
'; @@ -84,7 +77,7 @@ function addParticipant($event_id, array $char) { * @param int $durationValue the amount of time in minutes * @return int the id of the fight */ -function persistFight($event_id, array $combinedArray, $startTimestamp, $durationType, $durationValue) { +function persistFight($event_id, array $combinedArray, $startTimestamp, $endTimestamp) { // persist a fight of two chars (calculated by the wrapper) ^^" //echo 'The fight was about ' . count($combinedArray) . ' rounds
'; @@ -99,7 +92,7 @@ function persistFight($event_id, array $combinedArray, $startTimestamp, $duratio while(!$finished) { $sql = 'SELECT IFNULL(max(event_fight_id),0) + 1 FROM event_fights'; $row = mysql_fetch_row(mysql_query($sql)); - $sql = 'INSERT INTO event_fights(event_id, event_fight_id, host, winner) values('.$event_id.', \''.$row[0].'\', '. $hostId . ', ' . $winnerId .')'; + $sql = 'INSERT INTO event_fights(event_id, event_fight_id, host, winner, visible) values('.$event_id.', \''.$row[0].'\', '. $hostId . ', ' . $winnerId .', \''.date("Y-m-d H:i:s",$endTimestamp).'\')'; if(mysql_query($sql) === FALSE) break; $finished = mysql_affected_rows() > 0; @@ -116,8 +109,8 @@ function persistFight($event_id, array $combinedArray, $startTimestamp, $duratio // first persist char1 $chara_1 = $roundsArray[$round]['char1_array']; - $sql = 'INSERT INTO event_fight_rounds(event_id, event_fight_id, round, event_char_id, hp, mp, strength, speed, defense, luck, stamina, attack, damage)'; - $sql .= ' values('.$event_id.','.$event_fight_id.','.$round.',' .$chara_1['id'].','. $chara_1['hp'].', '. $chara_1['mp'].', '. $chara_1['starke'].', '. $chara_1['speed'].', '. $chara_1['verteidigung'].', '. $chara_1['glueck'].', '. $chara_1['ausdauer'].', \''. $roundsArray[$round]['atk_char1'] .'\', \''. $roundsArray[$round]['dmg_char1'] .'\')'; + $sql = 'INSERT INTO event_fight_rounds(event_id, event_fight_id, round, event_char_id, hp, mp, strength, speed, defense, luck, stamina, attack, damage, visible)'; + $sql .= ' values('.$event_id.','.$event_fight_id.','.$round.',' .$chara_1['id'].','. $chara_1['hp'].', '. $chara_1['mp'].', '. $chara_1['starke'].', '. $chara_1['speed'].', '. $chara_1['verteidigung'].', '. $chara_1['glueck'].', '. $chara_1['ausdauer'].', \''. $roundsArray[$round]['atk_char1'] .'\', \''. $roundsArray[$round]['dmg_char1'] .'\', \''.date("Y-m-d H:i:s",$endTimestamp).'\')'; // echo $sql .'
'; @@ -125,8 +118,8 @@ function persistFight($event_id, array $combinedArray, $startTimestamp, $duratio // now persist char2 $chara_2 = $roundsArray[$round]['char2_array']; - $sql = 'INSERT INTO event_fight_rounds(event_id, event_fight_id, round, event_char_id, hp, mp, strength, speed, defense, luck, stamina, attack, damage)'; - $sql .= ' values('.$event_id.','.$event_fight_id.','.$round.',' .$chara_2['id'].', '. $chara_2['hp'].', '. $chara_2['mp'].', '. $chara_2['starke'].', '. $chara_2['speed'].', '. $chara_2['verteidigung'].', '. $chara_2['glueck'].', '. $chara_2['ausdauer'].', \''. $roundsArray[$round]['atk_char2'] .'\', \''. $roundsArray[$round]['dmg_char2'] .'\')'; + $sql = 'INSERT INTO event_fight_rounds(event_id, event_fight_id, round, event_char_id, hp, mp, strength, speed, defense, luck, stamina, attack, damage, visible)'; + $sql .= ' values('.$event_id.','.$event_fight_id.','.$round.',' .$chara_2['id'].', '. $chara_2['hp'].', '. $chara_2['mp'].', '. $chara_2['starke'].', '. $chara_2['speed'].', '. $chara_2['verteidigung'].', '. $chara_2['glueck'].', '. $chara_2['ausdauer'].', \''. $roundsArray[$round]['atk_char2'] .'\', \''. $roundsArray[$round]['dmg_char2'] .'\', \''.date("Y-m-d H:i:s",$endTimestamp).'\')'; // echo $sql .'
'; @@ -139,6 +132,34 @@ function persistFight($event_id, array $combinedArray, $startTimestamp, $duratio // echo $sql . '
'; mysql_query($sql); } + + mysql_query('UPDATE event_chars SET block_begin = \''.date("Y-m-d H:i:s",$startTimestamp).'\', block_end = \''.date("Y-m-d H:i:s",$endTimestamp).'\' WHERE event_id = ' . $event_id); + +} + + +function getEventStatus($charid) { + $sql = 'SELECT event_type FROM event_chars ec inner join events e on ec.event_id = e.event_id where block_end > now() and char_id = ' . $charid; + + $qry = mysql_query($sql); + $row = mysql_fetch_assoc($qry); + switch ($row['event_type']) { + case EVENT_TEST: + return 'Test'; + case EVENT_SCHATZ_SUCHE: + return 'Schatzsuche'; + case EVENT_TURNIER: + return 'Turnier'; + case EVENT_KAMPF: + return 'Kampf'; + case EVENT_LIGA: + return 'Liga'; + case EVENT_WANTED: + return 'Wanted'; + case EVENT_CLAN_FIGHT: + return 'Clanfight'; + } } + ?> \ No newline at end of file diff --git a/ag/include/kampf_anzeige.inc.php b/ag/include/kampf_anzeige.inc.php index a92f320..1627ead 100644 --- a/ag/include/kampf_anzeige.inc.php +++ b/ag/include/kampf_anzeige.inc.php @@ -41,7 +41,7 @@ function displayCharTable($charbild, $charname, $starke, $ver, $speed, $ausdauer - + '; +echo '
'; + + +echo '' . + ''. + ''; + + +echo '' . + ''. + ''. + ''. + '' . + ''; + + +echo '
Der Fight läuft noch!
'.$char1_status.'???'.$char2_status.'???
'; +echo ''; + +} + +function displaySummary($char1_name, $char2_name, $sieger, $exp_char1, $exp_char2, $money_char1, $money_char2, $arena_exp1 = NULL, $arena_exp2 = NULL, $loge = NULL, $sitz = NULL, $steh = NULL){ echo ''; +echo '
'; @@ -86,6 +110,8 @@ echo '' . '' . ''; + if($exp_char1 !== NULL || $exp_char2 !== NULL) { + echo '' . '' . '' . @@ -93,22 +119,60 @@ echo '' . ''. ''; + } + + if($money_char1 !== NULL || $money_char2 !== NULL) { + echo ''. ''. ''. ''. '' . ''; - -echo ''. - ''. - ''. - ''. - '' . - ''; + } + if($arena_exp1 !== NULL || $arena_exp2 !== NULL) { + echo ''. + ''. + ''. + ''. + '' . + ''; + } + + echo '
'.$char2_name.'
Exp +'.$exp_char1.'
'.$exp_char2.'
Geld +'.$money_char1.'Geld +'.$money_char2.'
Arena Exp +'.$arena_exp1.'Arena Exp +'.$arena_exp2.'
Arena Exp +'.$arena_exp1.'Arena Exp +'.$arena_exp2.'
'; + + if($loge !== NULL || $steh !== NULL || $sitz !== NULL) { + ?> + + + + +
+ + + + + + + + + + + + + + + + + +
Zuschauer
Stehplätze
Sitzplätze
Logenplätze
+
+ '; + } -echo ''; } function displayFinalResult($items, $exp, $money, $final_result){ @@ -132,11 +196,11 @@ echo '' . ''; // Letze Eintrag von Items ist false!! if(!$items[0]){ - echo ' '; + echo ' '; } else{ for($i=0;$items[$i];$i++){ echo $items[$i]['name'].'
'; - } + } } echo''; echo '' . @@ -169,25 +233,25 @@ function displaySchatzSuche($char){ echo 'Schatzsuche in '.$ort['stadt'].''; // Hole die Ergebnisse die auch in die Datenbank eingetragen werden muessen! - $row = mysql_fetch_assoc(mysql_query('Select sum(exp) as exp, sum(geld) as geld, count(*) as anzahl from quest_fights where charid = '.$char['id'])); + $row = mysql_fetch_assoc(mysql_query('Select sum(exp) as exp, sum(geld) as geld, count(*) as anzahl from quest_fights where charid = '.$char['id'])); // Ermittle den Endzustand des Chars $end_qf = mysql_fetch_assoc(mysql_query('select max(fightnr) as mf from quest_fights where charid = '.$char['id'])); $end_qr = mysql_fetch_assoc(mysql_query('select max(roundnr) as mr from quest_rounds where fightnr = '.$end_qf['mf'].' and charid = '.$char['id'])); $last_round = mysql_fetch_assoc(mysql_query('Select * from quest_rounds where roundnr = '.$end_qr['mr'].' and fightnr = '.$end_qf['mf'].' and charid = '.$char['id'])); $last_fight = mysql_fetch_assoc(mysql_query('Select * from quest_fights where fightnr = '.$end_qf['mf'].' and charid = '.$char['id'])); - + // Ermittle die Reqs des Chars! $sql = 'SELECT c_attack as a_name, count(*) as anzahl FROM quest_rounds q where roundnr > 0 and charid = '.$char['id'].' group by c_attack'; // echo $sql.'
'; $reqs = mysql_query($sql); - + while($row_r = mysql_fetch_assoc($reqs)){ $c_attacken[] = $row_r; // print_r($c_attacken); // echo '
'; } - + if($last_fight['sieger'] == $char['id']){ $final_result = 'won'; // Nur wer gewinnt bekommt was! @@ -201,19 +265,19 @@ function displaySchatzSuche($char){ $c_attacken[$i]['anzahl'] = floor($c_attacken[$i]['anzahl'] * $lose_rate); } } - + // Zeige als erstes die Zusammenfassung an! displayFinalResult($items, $row['exp'], $row['geld'], $final_result); - + // Lade nun die Fights runter $sql = 'Select * from quest_fights where charid = '.$char['id']; $qry = mysql_query($sql); while($fight = mysql_fetch_assoc($qry)){ displaySchatzSucheFight($quest, $char, $fight); } - + submitCharChanges($char['id'], $items, $row['exp'], $row['geld'], $quest['ortid'], array($last_round['c_hp']) , array($last_round['c_mp']), $c_attacken); echo ''; return null; @@ -223,11 +287,11 @@ function displaySchatzSucheFight($quest, $char, $fight){ // Lade das Monster aus der Datenbank $sql = 'select * from quest_monster where id = '.$fight['monsterid']; $monster = mysql_fetch_assoc(mysql_query($sql)); - + if($monster['bild'] == null || $monster['bild'] == ''){ $monster['bild'] = 'design/bilder/avatare/noavart.gif'; } - + // Platziere den Table-Header echo ''.$char['name'].' Vs '.$monster['name'].''; $sql = 'Select * from quest_rounds where charid = '.$char['id']. ' and fightnr = '.$fight['fightnr']; @@ -238,7 +302,7 @@ function displaySchatzSucheFight($quest, $char, $fight){ } displaySummary($char['name'], $monster['name'], $fight['sieger']==$char['id']?$char['name']:$monster['name'], $fight['exp'], 0, $fight['geld'], 0); // Und dann halt immer noch etwas platz nach unten lassen - + echo ' '; } @@ -251,7 +315,7 @@ function displaySchatzSucheFightRound($char, $monster, $fight, $round){ } echo ''.$runde.''; - // Bild + Avantarinfo | Attacken + Schaden | Bild + Avantarinfo + // Bild + Avantarinfo | Attacken + Schaden | Bild + Avantarinfo // In einer Reihe allerdings echo ''; displayCharTable($char['bild'], $char['name'], $round['c_st'], $round['c_ver'], $round['c_sp'], $round['c_aus'], $round['c_gl'], $round['c_hp'], $char['hp_max'], $round['c_mp'], $char['mp_max'] ); @@ -266,4 +330,116 @@ function displaySchatzSucheFightRound($char, $monster, $fight, $round){ echo ''; } + +function displayEventFight($event_id, $event_fight_id) { + include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/event.inc.php'); // for the defines :) + + // Erstmal die Seite starten + echo ''; + // :D + // first readout the required event data + $event_fight_data = mysql_fetch_assoc(mysql_query('SELECT *, visible <= now() as passed FROM event_fights WHERE event_id = ' . $event_id . ' AND event_fight_id = ' . $event_fight_id )); + // Okay and now get the data of the chars ;) + $sql = 'SELECT * FROM event_chars e where event_id = '.$event_id.' and event_char_id IN (SELECT event_char_id from event_fight_rounds where event_id = '.$event_id.' and event_fight_id = '.$event_fight_id.' and `round` = 0)'; +// echo $sql . '
'; + $qry = mysql_query($sql); + while($row = mysql_fetch_assoc($qry)) { + if($row['char_bild'] == null || $row['char_bild'] == ''){ + $row['char_bild'] = 'design/bilder/avatare/noavart.gif'; + } + if($event_fight_data['host'] == $row['event_char_id']) { + $char1 = $row; + + } else { + $char2 = $row; + } + } + + // Platziere den Table-Header + echo ''; + displayEventFightRound($char1, $char2, array(), array(), 0); + // now get the round data :D + $sql = 'SELECT * from event_fight_rounds WHERE event_id = ' .$event_id . ' AND event_fight_id = ' .$event_fight_id . ' and visible <= now()'; + $qry = mysql_query($sql); + while($row = mysql_fetch_assoc($qry)) { + if($event_fight_data['host'] == $row['event_char_id']) { + $char1_rounds[$row['round']] = $row; + } else { + $char2_rounds[$row['round']] = $row; + } + } + + for($i=0;$i'; + + echo '
'.$char1['char_name'].' Vs '.$char2['char_name'].'
 
'; + return null; +} + +function displayEventFightRound(array $char1_data, array $char2_data, array $char1_round_data, array $char2_round_data, $roundnr) { + // xD + if($roundnr == 0){ + $runde = 'Start:'; + } else{ + $runde = 'Runde: '.$roundnr; + } + echo ''.$runde.''; + + $c1_str = $roundnr==0?$char1_data['strength']:$char1_round_data['strength']; + $c1_def = $roundnr==0?$char1_data['defense']:$char1_round_data['defense']; + $c1_spd = $roundnr==0?$char1_data['speed']:$char1_round_data['speed']; + $c1_stm = $roundnr==0?$char1_data['stamina']:$char1_round_data['stamina']; + $c1_lck = $roundnr==0?$char1_data['luck']:$char1_round_data['luck']; + $c1_hp = $roundnr==0?$char1_data['hp']:$char1_round_data['hp']; + $c1_hpMax = $char1_data['hp']; + $c1_mp = $roundnr==0?$char1_data['mp']:$char1_round_data['mp']; + $c1_mpMax = $char1_data['mp']; + + $c2_str = $roundnr==0?$char2_data['strength']:$char2_round_data['strength']; + $c2_def = $roundnr==0?$char2_data['defense']:$char2_round_data['defense']; + $c2_spd = $roundnr==0?$char2_data['speed']:$char2_round_data['speed']; + $c2_stm = $roundnr==0?$char2_data['stamina']:$char2_round_data['stamina']; + $c2_lck = $roundnr==0?$char2_data['luck']:$char2_round_data['luck']; + $c2_hp = $roundnr==0?$char2_data['hp']:$char2_round_data['hp']; + $c2_hpMax = $char2_data['hp']; + $c2_mp = $roundnr==0?$char2_data['mp']:$char2_round_data['mp']; + $c2_mpMax = $char2_data['mp']; + + // Bild + Avantarinfo | Attacken + Schaden | Bild + Avantarinfo + // In einer Reihe allerdings + echo ''; + displayCharTable($char1_data['char_bild'], $char1_data['char_name'], $c1_str, $c1_def, $c1_spd, $c1_stm, $c1_lck, $c1_hp, $c1_hpMax, $c1_mp, $c1_hpMax ); + echo ''; + if($roundnr != 0){ + displayAttacks($char1_round_data['attack'], $char1_round_data['damage'], $char2_round_data['attack'], $char2_round_data['damage']); + } else{ + echo ' '; + } + echo ''; + + displayCharTable($char2_data['char_bild'], $char2_data['char_name'], $c2_str, $c2_def, $c2_spd, $c2_stm, $c2_lck, $c2_hp, $c2_hpMax, $c2_mp, $c2_hpMax ); + echo ''; + +} ?> \ No newline at end of file diff --git a/ag/include/kampf_wrapper.inc.php b/ag/include/kampf_wrapper.inc.php index fbfa953..e07d46c 100644 --- a/ag/include/kampf_wrapper.inc.php +++ b/ag/include/kampf_wrapper.inc.php @@ -235,12 +235,14 @@ function calculateExperience(array $char1, array $char2, $winner, $factor) { $exp[$char1['id']] = 0; $exp[$char2['id']] = 0; if($winner == $char1['id']) { - $exp[$char1['id']] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * 2.2 * $factor; - $exp[$char2['id']] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * $factor; + $exp[$char1['id']] = (getPowerLevelWithBuffs($char1['id']) + getPowerLevelWithBuffs($char2['id'])) * 2.2 * $factor; + $exp[$char2['id']] = (getPowerLevelWithBuffs($char1['id']) + getPowerLevelWithBuffs($char2['id'])) * $factor; } else { - $exp[$char1['id']] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * $factor; - $exp[$char2['id']] = (getPowerLevelWithBuffs($chara_1['id']) + getPowerLevelWithBuffs($chara_2['id'])) * 2.2 * $factor; + $exp[$char1['id']] = (getPowerLevelWithBuffs($char1['id']) + getPowerLevelWithBuffs($char2['id'])) * $factor; + $exp[$char2['id']] = (getPowerLevelWithBuffs($char1['id']) + getPowerLevelWithBuffs($char2['id'])) * 2.2 * $factor; } + $exp[$char1['id']] = round($exp[$char1['id']]); + $exp[$char2['id']] = round($exp[$char2['id']]); return $exp; } diff --git a/ag/test.php b/ag/test.php index 6d1d4cc..e811f2e 100644 --- a/ag/test.php +++ b/ag/test.php @@ -16,6 +16,7 @@ $acceptTestCase = true; mysql_query('DELETE FROM clan_challenge_requests'); mysql_query('DELETE FROM clan_challenges'); +mysql_query('DELETE FROM events'); $clan1 = getClan(786); $clan2 = getClan(783); diff --git a/db/animegame_svn.sql b/db/animegame_svn.sql index 642af08..04339f5 100644 --- a/db/animegame_svn.sql +++ b/db/animegame_svn.sql @@ -1,7 +1,7 @@ -- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ --- Server version 5.0.75-0ubuntu10.3 +-- Server version 5.1.41-3ubuntu12.10 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; @@ -15,31 +15,25 @@ -- --- Create schema hecht_ag +-- Create schema test_ag -- +CREATE DATABASE IF NOT EXISTS test_ag; +USE test_ag; + -- -- Definition of table `ag_chat` -- DROP TABLE IF EXISTS `ag_chat`; CREATE TABLE `ag_chat` ( - `user` varchar(255) collate utf8_unicode_ci NOT NULL default 'none', - `nachricht` text collate utf8_unicode_ci, - `id` int(11) NOT NULL auto_increment, - `zeit` timestamp NOT NULL default CURRENT_TIMESTAMP, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `ag_chat` --- + `user` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'none', + `nachricht` text COLLATE utf8_unicode_ci, + `id` int(11) NOT NULL AUTO_INCREMENT, + `zeit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=873 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40000 ALTER TABLE `ag_chat` DISABLE KEYS */; -LOCK TABLES `ag_chat` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `ag_chat` ENABLE KEYS */; -- @@ -48,23 +42,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `anon_chatter`; CREATE TABLE `anon_chatter` ( - `ip` varchar(20) collate utf8_unicode_ci NOT NULL, + `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `anon_id` int(11) NOT NULL, - `online` timestamp NOT NULL default CURRENT_TIMESTAMP, - `muted` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`anon_id`), + `online` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `muted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`anon_id`), KEY `ips` (`ip`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `anon_chatter` --- - -/*!40000 ALTER TABLE `anon_chatter` DISABLE KEYS */; -LOCK TABLES `anon_chatter` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `anon_chatter` ENABLE KEYS */; -- @@ -73,35 +59,26 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `arena`; CREATE TABLE `arena` ( - `name` varchar(50) collate utf8_unicode_ci default 'no name arena', - `luxus` int(10) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `besitzer` int(11) NOT NULL default '0', - `exp` varchar(25) collate utf8_unicode_ci NOT NULL default '0,2000', - `level` int(3) NOT NULL default '1', - `skill` int(3) NOT NULL default '0', - `loge` int(11) NOT NULL default '0', - `sitz` int(11) NOT NULL default '5', - `steh` int(11) NOT NULL default '10', - `hausmeister` int(11) NOT NULL default '0', - `zustand` float NOT NULL default '1', - `mietlasten` int(11) NOT NULL default '0', - `einnahmen` int(11) NOT NULL default '0', - `steuerlasten` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), + `name` varchar(50) COLLATE utf8_unicode_ci DEFAULT 'no name arena', + `luxus` int(10) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `besitzer` int(11) NOT NULL DEFAULT '0', + `exp` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,2000', + `level` int(3) NOT NULL DEFAULT '1', + `skill` int(3) NOT NULL DEFAULT '0', + `loge` int(11) NOT NULL DEFAULT '0', + `sitz` int(11) NOT NULL DEFAULT '5', + `steh` int(11) NOT NULL DEFAULT '10', + `hausmeister` int(11) NOT NULL DEFAULT '0', + `zustand` float NOT NULL DEFAULT '1', + `mietlasten` int(11) NOT NULL DEFAULT '0', + `einnahmen` int(11) NOT NULL DEFAULT '0', + `steuerlasten` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), UNIQUE KEY `besitzer` (`besitzer`), CONSTRAINT `fk_arena_besitzer` FOREIGN KEY (`besitzer`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `arena` --- - -/*!40000 ALTER TABLE `arena` DISABLE KEYS */; -LOCK TABLES `arena` WRITE; +) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -UNLOCK TABLES; -/*!40000 ALTER TABLE `arena` ENABLE KEYS */; -- @@ -110,39 +87,55 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `attacken`; CREATE TABLE `attacken` ( - `name` varchar(50) collate utf8_unicode_ci NOT NULL, - `starke` int(10) NOT NULL default '0', - `verteidigung` int(10) NOT NULL default '0', - `speed` int(10) NOT NULL default '0', - `hp` int(10) NOT NULL default '0', - `mp` int(10) NOT NULL default '0', - `rassen` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `level` int(3) NOT NULL default '0', - `geld` int(10) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `type` varchar(10) collate utf8_unicode_ci NOT NULL default 'normal', - `info` text collate utf8_unicode_ci NOT NULL, - `req_atk` varchar(200) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0', - `req_lvl` varchar(20) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0', - `Frucht` int(11) default NULL, - `runden` int(10) NOT NULL default '0', - `maxlvl` int(20) NOT NULL default '20', - PRIMARY KEY (`id`), + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `starke` int(10) NOT NULL DEFAULT '0', + `verteidigung` int(10) NOT NULL DEFAULT '0', + `speed` int(10) NOT NULL DEFAULT '0', + `hp` int(10) NOT NULL DEFAULT '0', + `mp` int(10) NOT NULL DEFAULT '0', + `rassen` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `level` int(3) NOT NULL DEFAULT '0', + `geld` int(10) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'normal', + `info` text COLLATE utf8_unicode_ci NOT NULL, + `req_atk` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0', + `req_lvl` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0', + `Frucht` int(11) DEFAULT NULL, + `runden` int(10) NOT NULL DEFAULT '0', + `maxlvl` int(20) NOT NULL DEFAULT '20', + PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `level` (`level`), KEY `fk_attacken_Frucht` (`Frucht`), CONSTRAINT `fk_attacken_Frucht` FOREIGN KEY (`Frucht`) REFERENCES `wochen_markt` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=752 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + -- --- Dumping data for table `attacken` +-- Definition of table `attackenset` -- -/*!40000 ALTER TABLE `attacken` DISABLE KEYS */; -LOCK TABLES `attacken` WRITE; +DROP TABLE IF EXISTS `attackenset`; +CREATE TABLE `attackenset` ( + `Char_ID` int(11) NOT NULL, + `Attack_ID` int(11) NOT NULL, + `Type` int(11) NOT NULL DEFAULT '1', + `Round` int(2) NOT NULL, + PRIMARY KEY (`Char_ID`,`Type`,`Round`), + KEY `attackenset_attack_id` (`Attack_ID`), + CONSTRAINT `attackenset_attack_id` FOREIGN KEY (`Attack_ID`) REFERENCES `lernen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `attackenset_char_id` FOREIGN KEY (`Char_ID`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Dumping data for table `attackenset` +-- +/*!40000 ALTER TABLE `attackenset` DISABLE KEYS */; +LOCK TABLES `attackenset` WRITE; UNLOCK TABLES; -/*!40000 ALTER TABLE `attacken` ENABLE KEYS */; +/*!40000 ALTER TABLE `attackenset` ENABLE KEYS */; -- @@ -151,33 +144,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `auktion`; CREATE TABLE `auktion` ( - `auktionsid` int(10) unsigned NOT NULL auto_increment, - `anbieter` int(11) default NULL, - `bieter` int(11) default NULL, + `auktionsid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `anbieter` int(11) DEFAULT NULL, + `bieter` int(11) DEFAULT NULL, `itemid` int(10) unsigned NOT NULL, - `itemname` varchar(100) collate utf8_unicode_ci default NULL, - `tablename` varchar(15) collate utf8_unicode_ci NOT NULL, + `itemname` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `tablename` varchar(15) COLLATE utf8_unicode_ci NOT NULL, `anzahl` int(10) unsigned NOT NULL, `startgebot` decimal(10,0) unsigned NOT NULL, - `aktuellesgebot` decimal(10,0) unsigned default NULL, - `deadline` timestamp NULL default NULL, - `startdate` timestamp NULL default NULL, + `aktuellesgebot` decimal(10,0) unsigned DEFAULT NULL, + `deadline` timestamp NULL DEFAULT NULL, + `startdate` timestamp NULL DEFAULT NULL, `cheatingverdacht` int(10) unsigned NOT NULL, - PRIMARY KEY (`auktionsid`), + PRIMARY KEY (`auktionsid`), KEY `auktion_anbieter` (`anbieter`), KEY `auktion_bieter` (`bieter`), CONSTRAINT `fk_auktion_anbieter` FOREIGN KEY (`anbieter`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_auktion_bieter` FOREIGN KEY (`bieter`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `auktion` --- +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40000 ALTER TABLE `auktion` DISABLE KEYS */; -LOCK TABLES `auktion` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `auktion` ENABLE KEYS */; -- @@ -186,21 +171,21 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `auktion_transaktionen`; CREATE TABLE `auktion_transaktionen` ( - `transaktionsid` int(10) unsigned NOT NULL auto_increment, - `anbieter` int(11) default NULL, - `bieter` int(11) default NULL, + `transaktionsid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `anbieter` int(11) DEFAULT NULL, + `bieter` int(11) DEFAULT NULL, `itemid` int(10) unsigned NOT NULL, - `tablename` varchar(15) collate utf8_unicode_ci NOT NULL, + `tablename` varchar(15) COLLATE utf8_unicode_ci NOT NULL, `anzahl` int(10) unsigned NOT NULL, `betrag` decimal(10,0) unsigned NOT NULL, - `deadline` timestamp NULL default NULL, + `deadline` timestamp NULL DEFAULT NULL, `cheatingverdacht` int(10) unsigned NOT NULL, - PRIMARY KEY (`transaktionsid`), + PRIMARY KEY (`transaktionsid`), KEY `fk_auktion_transaktionen_anbieter` (`anbieter`), KEY `fk_auktion_transaktionen_bieter` (`bieter`), CONSTRAINT `fk_auktion_transaktionen_anbieter` FOREIGN KEY (`anbieter`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_auktion_transaktionen_bieter` FOREIGN KEY (`bieter`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `auktion_transaktionen` @@ -212,30 +197,6 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `auktion_transaktionen` ENABLE KEYS */; --- --- Definition of table `avatare` --- - -DROP TABLE IF EXISTS `avatare`; -CREATE TABLE `avatare` ( - `bildid` int(11) NOT NULL auto_increment, - `url` varchar(100) collate utf8_unicode_ci NOT NULL, - `md5` char(32) collate utf8_unicode_ci NOT NULL, - `valid` char(1) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`bildid`), - UNIQUE KEY `url` (`url`) -) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `avatare` --- - -/*!40000 ALTER TABLE `avatare` DISABLE KEYS */; -LOCK TABLES `avatare` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `avatare` ENABLE KEYS */; - - -- -- Definition of table `bot_image_failures` -- @@ -243,23 +204,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `bot_image_failures`; CREATE TABLE `bot_image_failures` ( `userid` int(11) NOT NULL, - `inserted` varchar(10) collate utf8_unicode_ci NOT NULL, - `valid` varchar(10) collate utf8_unicode_ci NOT NULL, - `used` timestamp NOT NULL default CURRENT_TIMESTAMP, - PRIMARY KEY (`userid`,`used`), + `inserted` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `valid` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `used` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`userid`,`used`), CONSTRAINT `new_bot_image_failures_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `bot_image_failures` --- - -/*!40000 ALTER TABLE `bot_image_failures` DISABLE KEYS */; -LOCK TABLES `bot_image_failures` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `bot_image_failures` ENABLE KEYS */; - -- -- Definition of table `bot_images` @@ -267,12 +218,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `bot_images`; CREATE TABLE `bot_images` ( - `id` char(32) collate utf8_unicode_ci NOT NULL, - `phrase` varchar(20) collate utf8_unicode_ci NOT NULL, - `compressed_phrase` varchar(10) collate utf8_unicode_ci NOT NULL, - `created` timestamp NOT NULL default CURRENT_TIMESTAMP, - `userid` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), + `id` char(32) COLLATE utf8_unicode_ci NOT NULL, + `phrase` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `compressed_phrase` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `userid` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `fk_bot_images` (`userid`), CONSTRAINT `fk_bot_images` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -294,21 +245,11 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `char_abholcodes`; CREATE TABLE `char_abholcodes` ( `charid` int(10) NOT NULL, - `code` varchar(32) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`charid`), + `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`charid`), CONSTRAINT `fk_char_abholcodes_charid` FOREIGN KEY (`charid`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `char_abholcodes` --- - -/*!40000 ALTER TABLE `char_abholcodes` DISABLE KEYS */; -LOCK TABLES `char_abholcodes` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `char_abholcodes` ENABLE KEYS */; - -- -- Definition of table `chars` @@ -316,67 +257,61 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `chars`; CREATE TABLE `chars` ( - `level` int(3) NOT NULL default '1', - `name` varchar(40) collate utf8_unicode_ci NOT NULL default '', - `type` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `rasse` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `bild` varchar(100) collate utf8_unicode_ci NOT NULL default '', - `bild_edit` timestamp NOT NULL default CURRENT_TIMESTAMP, - `besitzer` int(11) NOT NULL default '0', - `hp` varchar(100) collate utf8_unicode_ci NOT NULL default '100,100', - `exp` varchar(100) collate utf8_unicode_ci NOT NULL default '0,400', - `starke` double(7,1) NOT NULL default '10.0', - `speed` double(7,1) NOT NULL default '10.0', - `id` int(11) NOT NULL auto_increment, - `verteidigung` double(6,1) NOT NULL default '10.0', - `mp` varchar(100) collate utf8_unicode_ci NOT NULL default '10,10', - `attacken` varchar(200) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0,0,0,0', - `auswahl1` varchar(200) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0,0,0,0', - `auswahl2` varchar(200) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0,0,0,0', - `auswahl3` varchar(200) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0,0,0,0', - `attacken2` varchar(200) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0,0,0,0', - `siege` int(5) NOT NULL default '0', - `niederlagen` int(5) NOT NULL default '0', - `item` int(5) NOT NULL default '0', - `status` varchar(20) collate utf8_unicode_ci NOT NULL default 'Frei', - `ausdauer` double(5,1) NOT NULL default '10.0', - `glueck` double(5,1) NOT NULL default '10.0', - `rustung` varchar(4) collate utf8_unicode_ci NOT NULL default 'nein', - `aufgeben` int(3) NOT NULL default '0', - `liga_punkte` int(55) NOT NULL default '0', - `fusion` varchar(4) collate utf8_unicode_ci NOT NULL default 'nein', - `fusion_rasse` varchar(50) collate utf8_unicode_ci NOT NULL default '0', - `training` text collate utf8_unicode_ci NOT NULL, - `lernpunkte` int(5) NOT NULL default '10', - `char_type` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `frucht` varchar(100) collate utf8_unicode_ci default NULL, - `kampf_item` varchar(50) collate utf8_unicode_ci NOT NULL default '0,0,0,0,0', - `ort` int(11) NOT NULL default '13', - `changes` int(2) NOT NULL default '0', - `training_points` int(20) NOT NULL default '30', - `liga_siege` int(3) NOT NULL default '0', - `liga_niederlagen` int(3) NOT NULL default '0', - `clan_train` int(30) NOT NULL default '0', - `dead_list` text collate utf8_unicode_ci NOT NULL, - `preis` int(50) NOT NULL default '1000', - PRIMARY KEY (`id`), + `level` int(3) NOT NULL DEFAULT '1', + `name` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `rasse` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `bild` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `bild_edit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `besitzer` int(11) NOT NULL DEFAULT '0', + `hp` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '100,100', + `exp` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,400', + `starke` double(7,1) NOT NULL DEFAULT '10.0', + `speed` double(7,1) NOT NULL DEFAULT '10.0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `verteidigung` double(6,1) NOT NULL DEFAULT '10.0', + `mp` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '10,10', + `attacken` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0,0,0,0', + `auswahl1` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0,0,0,0', + `auswahl2` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0,0,0,0', + `auswahl3` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0,0,0,0', + `attacken2` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0,0,0,0', + `siege` int(5) NOT NULL DEFAULT '0', + `niederlagen` int(5) NOT NULL DEFAULT '0', + `item` int(5) NOT NULL DEFAULT '0', + `status` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Frei', + `ausdauer` double(5,1) NOT NULL DEFAULT '10.0', + `glueck` double(5,1) NOT NULL DEFAULT '10.0', + `rustung` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'nein', + `aufgeben` int(3) NOT NULL DEFAULT '10', + `liga_punkte` int(55) NOT NULL DEFAULT '0', + `fusion` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'nein', + `fusion_rasse` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `training` text COLLATE utf8_unicode_ci NOT NULL, + `lernpunkte` int(5) NOT NULL DEFAULT '10', + `char_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `frucht` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + `kampf_item` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0,0,0,0,0', + `ort` int(11) NOT NULL DEFAULT '13', + `changes` int(2) NOT NULL DEFAULT '0', + `training_points` int(20) NOT NULL DEFAULT '30', + `liga_siege` int(3) NOT NULL DEFAULT '0', + `liga_niederlagen` int(3) NOT NULL DEFAULT '0', + `clan_train` int(30) NOT NULL DEFAULT '0', + `dead_list` text COLLATE utf8_unicode_ci NOT NULL, + `preis` int(50) NOT NULL DEFAULT '1000', + PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `fk_chars_besitzer` (`besitzer`), KEY `fk_chars_frucht` (`frucht`), CONSTRAINT `fk_chars_besitzer` FOREIGN KEY (`besitzer`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_chars_frucht` FOREIGN KEY (`frucht`) REFERENCES `wochen_markt` (`item`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=4243 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `chars` -- -/*!40000 ALTER TABLE `chars` DISABLE KEYS */; -LOCK TABLES `chars` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `chars` ENABLE KEYS */; - -- -- Definition of table `cheater` @@ -385,20 +320,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `cheater`; CREATE TABLE `cheater` ( `userid` int(11) NOT NULL, - `delikt` text collate utf8_unicode_ci NOT NULL, - `zeit` timestamp NOT NULL default CURRENT_TIMESTAMP, + `delikt` text COLLATE utf8_unicode_ci NOT NULL, + `zeit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, KEY `userid` (`userid`,`zeit`), CONSTRAINT `fk_cheater_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `cheater` --- - -/*!40000 ALTER TABLE `cheater` DISABLE KEYS */; -LOCK TABLES `cheater` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `cheater` ENABLE KEYS */; -- @@ -407,107 +334,100 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `clan`; CREATE TABLE `clan` ( - `clanname` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `clanz_pre` varchar(25) collate utf8_unicode_ci NOT NULL default '', - `clanz_suff` varchar(25) collate utf8_unicode_ci NOT NULL default '', - `geld` int(15) NOT NULL default '0', - `info` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `leader` int(11) default '0', - `co_leader` int(11) default NULL, - `homepage` varchar(80) collate utf8_unicode_ci NOT NULL default 'Keine', - `banner` varchar(80) collate utf8_unicode_ci NOT NULL default '0', - `level` int(2) NOT NULL default '1', - `exp` int(20) NOT NULL default '0', - `elo` int(20) NOT NULL default '1000', - PRIMARY KEY (`id`), + `clanname` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `clanz_pre` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `clanz_suff` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `geld` int(15) NOT NULL DEFAULT '0', + `info` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `leader` int(11) DEFAULT '0', + `siege` int(25) NOT NULL DEFAULT '0', + `niederlagen` int(25) NOT NULL DEFAULT '0', + `co_leader` int(11) DEFAULT NULL, + `homepage` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Keine', + `banner` varchar(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `level` int(2) NOT NULL DEFAULT '1', + `min_exp` int(20) NOT NULL DEFAULT '0', + `elo` int(11) NOT NULL DEFAULT '1000', + PRIMARY KEY (`id`), KEY `leader` (`leader`), KEY `co_leader` (`co_leader`), CONSTRAINT `fk_clan_co_leader` FOREIGN KEY (`co_leader`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `fk_clan_leader` FOREIGN KEY (`leader`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=787 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + -- --- Dumping data for table `clan` +-- Definition of table `clan_challenge_clans` -- -/*!40000 ALTER TABLE `clan` DISABLE KEYS */; -LOCK TABLES `clan` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan` ENABLE KEYS */; +DROP TABLE IF EXISTS `clan_challenge_clans`; +CREATE TABLE `clan_challenge_clans` ( + `clan_challenge_id` int(11) NOT NULL, + `clan_id` int(11) NOT NULL, + `elo` int(11) NOT NULL, + PRIMARY KEY (`clan_id`,`clan_challenge_id`), + KEY `clan_ch_clans_ch_id` (`clan_challenge_id`), + CONSTRAINT `clan_ch_clans_ch_id` FOREIGN KEY (`clan_challenge_id`) REFERENCES `clan_challenges` (`clan_challenge_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- --- Definition of table `clan_fight_list` +-- Definition of table `clan_challenge_participants` -- -DROP TABLE IF EXISTS `clan_fight_list`; -CREATE TABLE `clan_fight_list` ( - `id` int(13) NOT NULL auto_increment, - `clan` int(13) NOT NULL, - `gclan` int(13) NOT NULL, - `fighter` varchar(150) collate utf8_unicode_ci NOT NULL, - `gfighter` varchar(150) collate utf8_unicode_ci NOT NULL, - `clanfighttyp` int(13) NOT NULL, - `numberoffighter` int(13) NOT NULL, - `zeitpunkt` varchar(10) collate utf8_unicode_ci NOT NULL, - `status` int(5) NOT NULL, - `score_set` smallint(1) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; +DROP TABLE IF EXISTS `clan_challenge_participants`; +CREATE TABLE `clan_challenge_participants` ( + `clan_challenge_id` int(11) NOT NULL, + `clan_id` int(11) NOT NULL, + `char_id` int(11) NOT NULL, + `slot` int(11) NOT NULL, + PRIMARY KEY (`clan_challenge_id`,`clan_id`,`slot`), + UNIQUE KEY `new_index` (`clan_challenge_id`,`clan_id`,`slot`), + KEY `clan_challenge_participants_clan_id` (`clan_id`), + KEY `clan_challenge_participants_char_id` (`char_id`), + CONSTRAINT `clan_challenge_participants_char_id` FOREIGN KEY (`char_id`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `clan_challenge_participants_clan_id` FOREIGN KEY (`clan_challenge_id`, `clan_id`) REFERENCES `clan_challenge_clans` (`clan_challenge_id`, `clan_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --- Dumping data for table `clan_fight_list` +-- Definition of table `clan_challenge_requests` -- -/*!40000 ALTER TABLE `clan_fight_list` DISABLE KEYS */; -LOCK TABLES `clan_fight_list` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_fight_list` ENABLE KEYS */; - - --- --- Definition of table `clan_fights` --- - -DROP TABLE IF EXISTS `clan_fights`; -CREATE TABLE `clan_fights` ( - `id` int(13) unsigned NOT NULL auto_increment, - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL, - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL, - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL, - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL, - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL, - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL, - `clanfight_id` int(20) NOT NULL default '0', - `runde` int(20) NOT NULL default '0', - `kampf` int(10) NOT NULL default '0', - `win` int(10) NOT NULL, - `lose` int(10) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +DROP TABLE IF EXISTS `clan_challenge_requests`; +CREATE TABLE `clan_challenge_requests` ( + `clan_requester` int(11) NOT NULL, + `clan_challenged` int(11) NOT NULL, + `challenged_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `type` int(11) NOT NULL, + `anzahl_chars` int(11) NOT NULL DEFAULT '5', + `active` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`clan_requester`,`clan_challenged`,`challenged_time`), + KEY `fk_clan_challenge_requests_challenged` (`clan_challenged`), + CONSTRAINT `fk_clan_challenge_requests_challenged` FOREIGN KEY (`clan_challenged`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `fk_clan_challenge_requests_requester` FOREIGN KEY (`clan_requester`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --- Dumping data for table `clan_fights` +-- Definition of table `clan_challenges` -- -/*!40000 ALTER TABLE `clan_fights` DISABLE KEYS */; -LOCK TABLES `clan_fights` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_fights` ENABLE KEYS */; +DROP TABLE IF EXISTS `clan_challenges`; +CREATE TABLE `clan_challenges` ( + `clan_challenge_id` int(11) NOT NULL AUTO_INCREMENT, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `enddate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `calculated` tinyint(1) NOT NULL, + `type` int(11) NOT NULL, + `anzahl_chars` int(11) NOT NULL, + `event_id` int(10) unsigned DEFAULT NULL, + PRIMARY KEY (`clan_challenge_id`), + UNIQUE KEY `event_id` (`event_id`), + CONSTRAINT `clan_challenges_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -- @@ -516,127 +436,47 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `clan_item`; CREATE TABLE `clan_item` ( - `name` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `preis` bigint(20) NOT NULL default '0', - `anzahl` int(20) NOT NULL default '0', - `type` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `id` int(11) NOT NULL auto_increment, - `info` text collate utf8_unicode_ci NOT NULL, - `ausdauer` int(10) NOT NULL default '0', - `staerke` int(20) NOT NULL default '0', - `verteidigung` int(20) NOT NULL default '0', - `geschwindigkeit` int(20) NOT NULL default '0', - `tp` int(5) NOT NULL default '0', - `glueck` int(20) NOT NULL default '0', + `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `preis` bigint(20) NOT NULL DEFAULT '0', + `anzahl` int(20) NOT NULL DEFAULT '0', + `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `id` int(11) NOT NULL AUTO_INCREMENT, + `info` text COLLATE utf8_unicode_ci NOT NULL, + `ausdauer` int(10) NOT NULL DEFAULT '0', + `staerke` int(20) NOT NULL DEFAULT '0', + `verteidigung` int(20) NOT NULL DEFAULT '0', + `geschwindigkeit` int(20) NOT NULL DEFAULT '0', + `tp` int(5) NOT NULL DEFAULT '0', + `glueck` int(20) NOT NULL DEFAULT '0', `miete` int(20) NOT NULL, `nutzung` int(20) NOT NULL, - `req_level` int(20) NOT '1', - PRIMARY KEY (`id`), + `req_level` int(20) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), KEY `anzahl` (`anzahl`), KEY `type` (`type`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `clan_item` --- - -/*!40000 ALTER TABLE `clan_item` DISABLE KEYS */; -LOCK TABLES `clan_item` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_item` ENABLE KEYS */; - - --- --- Definition of table `clan_k_list` --- - -DROP TABLE IF EXISTS `clan_k_list`; -CREATE TABLE `clan_k_list` ( - `besitzer` int(55) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `charakter1` int(25) NOT NULL default '0', - `charakter2` int(25) NOT NULL default '0', - `charakter3` int(25) NOT NULL default '0', - `charakter4` int(50) NOT NULL default '0', - `charakter5` int(50) NOT NULL default '0', - `charakter6` int(50) NOT NULL default '0', - `an` int(20) NOT NULL default '0', - `tick` timestamp NULL default NULL, - `gcharakter1` int(50) NOT NULL default '0', - `gcharakter2` int(50) NOT NULL default '0', - `gcharakter3` int(50) NOT NULL default '0', - `gcharakter4` int(50) NOT NULL default '0', - `gcharakter5` int(50) NOT NULL default '0', - `gcharakter6` int(50) NOT NULL default '0', - `aktiv` int(50) NOT NULL default '0', - `anzeige` int(1) NOT NULL default '1', - PRIMARY KEY (`id`), - KEY `besitzer` (`besitzer`), - KEY `charakter1` (`charakter1`), - KEY `charakter2` (`charakter2`), - KEY `charakter3` (`charakter3`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- --- Dumping data for table `clan_k_list` +-- Definition of table `clan_locked` -- -/*!40000 ALTER TABLE `clan_k_list` DISABLE KEYS */; -LOCK TABLES `clan_k_list` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_k_list` ENABLE KEYS */; - - --- --- Definition of table `clan_kampf` --- - -DROP TABLE IF EXISTS `clan_kampf`; -CREATE TABLE `clan_kampf` ( - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `exp1` int(20) NOT NULL default '0', - `exp2` int(20) NOT NULL default '0', - `geld1` int(10) NOT NULL default '0', - `geld2` int(10) NOT NULL default '0', - `win` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `lose` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `db_satz` int(20) NOT NULL default '0', - `dauer` int(50) NOT NULL default '0', - `clan1_id` int(150) NOT NULL default '0', - `clan1_win` int(1) NOT NULL default '0', - `clan2_id` int(50) NOT NULL default '0', - `clan2_win` int(50) NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `char1` (`char1`), - KEY `char2` (`char2`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +DROP TABLE IF EXISTS `clan_locked`; +CREATE TABLE `clan_locked` ( + `clanid` int(11) NOT NULL, + `locked_until` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`clanid`), + CONSTRAINT `clan_locked_clanid` FOREIGN KEY (`clanid`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='this table holds the data for clans beeing locked out of cla'; -- --- Dumping data for table `clan_kampf` +-- Dumping data for table `clan_locked` -- -/*!40000 ALTER TABLE `clan_kampf` DISABLE KEYS */; -LOCK TABLES `clan_kampf` WRITE; +/*!40000 ALTER TABLE `clan_locked` DISABLE KEYS */; +LOCK TABLES `clan_locked` WRITE; UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_kampf` ENABLE KEYS */; +/*!40000 ALTER TABLE `clan_locked` ENABLE KEYS */; -- @@ -647,22 +487,13 @@ DROP TABLE IF EXISTS `clan_ticker`; CREATE TABLE `clan_ticker` ( `clanid` int(11) NOT NULL, `msgid` int(11) NOT NULL, - `text` text collate utf8_unicode_ci NOT NULL, - `date` timestamp NOT NULL default CURRENT_TIMESTAMP, - PRIMARY KEY (`date`,`clanid`,`msgid`), + `text` text COLLATE utf8_unicode_ci NOT NULL, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`date`,`clanid`,`msgid`), KEY `fk_clan_ticker_clanid` (`clanid`), CONSTRAINT `fk_clan_ticker_clanid` FOREIGN KEY (`clanid`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `clan_ticker` --- - -/*!40000 ALTER TABLE `clan_ticker` DISABLE KEYS */; -LOCK TABLES `clan_ticker` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_ticker` ENABLE KEYS */; - -- -- Definition of table `clan_ware` @@ -670,48 +501,146 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `clan_ware`; CREATE TABLE `clan_ware` ( - `item_id` int(20) NOT NULL default '0', - `clan` int(20) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, + `item_id` int(20) NOT NULL DEFAULT '0', + `clan` int(20) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, UNIQUE KEY `clan_item` (`clan`,`item_id`), KEY `id` (`id`), KEY `fk_clan_ware_item_id` (`item_id`), CONSTRAINT `fk_clan_ware_clan` FOREIGN KEY (`clan`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_clan_ware_item_id` FOREIGN KEY (`item_id`) REFERENCES `clan_item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + +-- +-- Definition of table `defines` +-- + +DROP TABLE IF EXISTS `defines`; +CREATE TABLE `defines` ( + `key` varchar(30) NOT NULL, + `value` varchar(20) NOT NULL, + `editable` tinyint(1) NOT NULL, + PRIMARY KEY (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- --- Dumping data for table `clan_ware` +-- Definition of table `event_chars` -- -/*!40000 ALTER TABLE `clan_ware` DISABLE KEYS */; -LOCK TABLES `clan_ware` WRITE; +DROP TABLE IF EXISTS `event_chars`; +CREATE TABLE `event_chars` ( + `event_char_id` int(11) unsigned NOT NULL, + `char_id` int(11) DEFAULT NULL, + `char_name` varchar(30) NOT NULL, + `char_bild` varchar(100) NOT NULL, + `user_id` int(11) DEFAULT NULL, + `user_name` varchar(30) NOT NULL, + `event_id` int(11) unsigned NOT NULL, + `block_begin` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `block_end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `hp` int(11) NOT NULL, + `mp` int(11) NOT NULL, + `strength` int(11) NOT NULL, + `speed` int(11) NOT NULL, + `defense` int(11) NOT NULL, + `luck` int(11) NOT NULL, + `stamina` int(11) NOT NULL, + PRIMARY KEY (`event_id`,`event_char_id`), + KEY `char_bild` (`char_bild`), + CONSTRAINT `event_chars_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_ware` ENABLE KEYS */; -- --- Definition of table `faq_entries` +-- Definition of table `event_fight_metadata` -- -DROP TABLE IF EXISTS `faq_entries`; -CREATE TABLE `faq_entries` ( - `id` int(11) NOT NULL auto_increment, - `parent` int(11) NOT NULL, - `header` text collate utf8_unicode_ci NOT NULL, - `body` text collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`) +DROP TABLE IF EXISTS `event_fight_metadata`; +CREATE TABLE `event_fight_metadata` ( + `event_id` int(10) unsigned NOT NULL, + `event_fight_id` int(10) unsigned NOT NULL, + `key` varchar(20) NOT NULL, + `value` varchar(20) NOT NULL, + PRIMARY KEY (`event_id`,`event_fight_id`,`key`), + CONSTRAINT `event_fight_metadata_fightid` FOREIGN KEY (`event_id`, `event_fight_id`) REFERENCES `event_fights` (`event_id`, `event_fight_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- +-- Definition of table `event_fight_rounds` +-- + +DROP TABLE IF EXISTS `event_fight_rounds`; +CREATE TABLE `event_fight_rounds` ( + `event_id` int(10) unsigned NOT NULL, + `event_fight_id` int(10) unsigned NOT NULL, + `event_char_id` int(10) unsigned NOT NULL, + `round` int(10) unsigned NOT NULL, + `hp` int(11) NOT NULL, + `mp` int(11) NOT NULL, + `strength` int(11) NOT NULL, + `speed` int(11) NOT NULL, + `defense` int(11) NOT NULL, + `luck` int(11) NOT NULL, + `stamina` int(11) NOT NULL, + `attack` varchar(30) NOT NULL, + `damage` varchar(30) NOT NULL, + `visible` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`event_id`,`event_fight_id`,`event_char_id`,`round`), + KEY `event_fight_rounds_chars` (`event_id`,`event_char_id`), + CONSTRAINT `event_fight_rounds_chars` FOREIGN KEY (`event_id`, `event_char_id`) REFERENCES `event_chars` (`event_id`, `event_char_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `event_fight_rounds_event_figths` FOREIGN KEY (`event_id`, `event_fight_id`) REFERENCES `event_fights` (`event_id`, `event_fight_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- +-- Definition of table `event_fights` +-- + +DROP TABLE IF EXISTS `event_fights`; +CREATE TABLE `event_fights` ( + `event_id` int(10) unsigned NOT NULL, + `event_fight_id` int(10) unsigned NOT NULL, + `visible` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `host` int(10) unsigned NOT NULL, + `winner` int(10) unsigned NOT NULL, + PRIMARY KEY (`event_id`,`event_fight_id`), + UNIQUE KEY `new_index` (`event_fight_id`), + KEY `event_fights_host` (`event_id`,`host`), + KEY `event_fights_winner` (`event_id`,`winner`), + CONSTRAINT `event_fights_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `event_fights_host` FOREIGN KEY (`event_id`, `host`) REFERENCES `event_chars` (`event_id`, `event_char_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `event_fights_winner` FOREIGN KEY (`event_id`, `winner`) REFERENCES `event_chars` (`event_id`, `event_char_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- +-- Definition of table `events` +-- + +DROP TABLE IF EXISTS `events`; +CREATE TABLE `events` ( + `event_id` int(11) unsigned NOT NULL, + `event_type` int(11) unsigned NOT NULL, + PRIMARY KEY (`event_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + -- --- Dumping data for table `faq_entries` +-- Definition of table `faq_entries` -- -/*!40000 ALTER TABLE `faq_entries` DISABLE KEYS */; -LOCK TABLES `faq_entries` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `faq_entries` ENABLE KEYS */; +DROP TABLE IF EXISTS `faq_entries`; +CREATE TABLE `faq_entries` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `parent` int(11) NOT NULL, + `header` text COLLATE utf8_unicode_ci NOT NULL, + `body` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -720,25 +649,17 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `ff11_komments`; CREATE TABLE `ff11_komments` ( - `user` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `text` text collate utf8_unicode_ci NOT NULL, - `ip` varchar(25) collate utf8_unicode_ci NOT NULL default '', - `news_id` int(10) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `datum` varchar(25) collate utf8_unicode_ci NOT NULL default '', - `zeit` varchar(25) collate utf8_unicode_ci NOT NULL default '', + `user` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `text` text COLLATE utf8_unicode_ci NOT NULL, + `ip` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `news_id` int(10) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `datum` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `zeit` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', KEY `id` (`id`), KEY `news_id` (`news_id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `ff11_komments` --- +) ENGINE=InnoDB AUTO_INCREMENT=790 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40000 ALTER TABLE `ff11_komments` DISABLE KEYS */; -LOCK TABLES `ff11_komments` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `ff11_komments` ENABLE KEYS */; -- @@ -747,24 +668,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `ff11_news`; CREATE TABLE `ff11_news` ( - `name` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `betreff` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `text` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `zeit` varchar(25) collate utf8_unicode_ci NOT NULL default '', - `datum` varchar(25) collate utf8_unicode_ci NOT NULL default '', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `ff11_news` --- - -/*!40000 ALTER TABLE `ff11_news` DISABLE KEYS */; -LOCK TABLES `ff11_news` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `ff11_news` ENABLE KEYS */; + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `betreff` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `text` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `zeit` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `datum` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -774,22 +685,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `gm_actions`; CREATE TABLE `gm_actions` ( `userid` int(10) NOT NULL, - `time` timestamp NOT NULL default CURRENT_TIMESTAMP, - `message` text collate utf8_unicode_ci NOT NULL, - `ip` varchar(40) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`userid`,`time`) + `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `message` text COLLATE utf8_unicode_ci NOT NULL, + `ip` varchar(40) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`userid`,`time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `gm_actions` --- - -/*!40000 ALTER TABLE `gm_actions` DISABLE KEYS */; -LOCK TABLES `gm_actions` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `gm_actions` ENABLE KEYS */; - -- -- Definition of table `highscore` @@ -798,57 +699,34 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `highscore`; CREATE TABLE `highscore` ( `runde` int(11) NOT NULL, - `art` varchar(35) collate utf8_unicode_ci NOT NULL, + `art` varchar(35) COLLATE utf8_unicode_ci NOT NULL, `datum` date NOT NULL, - `charid` int(11) default NULL, - `charname` varchar(40) collate utf8_unicode_ci NOT NULL, - `userid` int(11) default NULL, - `username` varchar(40) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`art`,`datum`), + `charid` int(11) DEFAULT NULL, + `charname` varchar(40) COLLATE utf8_unicode_ci NOT NULL, + `userid` int(11) DEFAULT NULL, + `username` varchar(40) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`art`,`datum`), KEY `fk_highscore_charid` (`charid`), KEY `fk_highscore_userid` (`userid`), CONSTRAINT `fk_highscore_charid` FOREIGN KEY (`charid`) REFERENCES `chars` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `fk_highscore_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `highscore` --- - -/*!40000 ALTER TABLE `highscore` DISABLE KEYS */; -LOCK TABLES `highscore` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `highscore` ENABLE KEYS */; - - -- -- Definition of table `ignolist` -- DROP TABLE IF EXISTS `ignolist`; CREATE TABLE `ignolist` ( - `user` int(11) NOT NULL default '0', - `besitzer` int(11) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, + `user` int(11) NOT NULL DEFAULT '0', + `besitzer` int(11) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, UNIQUE KEY `user_besitzer` (`user`,`besitzer`), KEY `id` (`id`), KEY `fk_ignolist_besitzer` (`besitzer`), CONSTRAINT `fk_ignolist_besitzer` FOREIGN KEY (`besitzer`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_ignolist_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `ignolist` --- - -/*!40000 ALTER TABLE `ignolist` DISABLE KEYS */; -LOCK TABLES `ignolist` WRITE; -INSERT INTO `ignolist` VALUES (238,8,2), - (3902,1965,3); -UNLOCK TABLES; -/*!40000 ALTER TABLE `ignolist` ENABLE KEYS */; - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `item` @@ -856,93 +734,73 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `item`; CREATE TABLE `item` ( - `name` varchar(100) collate utf8_unicode_ci NOT NULL, - `hp` varchar(100) collate utf8_unicode_ci NOT NULL default '0', - `mp` varchar(100) collate utf8_unicode_ci NOT NULL default '0', - `starke` int(100) NOT NULL default '0', - `verteidigung` int(100) NOT NULL default '0', - `speed` int(100) NOT NULL default '0', - `s_type` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `preis` int(20) NOT NULL default '0', - `anzahl` int(20) NOT NULL default '0', - `type` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `id` int(11) NOT NULL auto_increment, - `info` text collate utf8_unicode_ci NOT NULL, - `level` int(20) NOT NULL default '0', - `tausch_lvl` int(2) NOT NULL default '1', - `tausch_anzahl` int(4) NOT NULL default '1', - PRIMARY KEY (`id`), + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `hp` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `mp` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `starke` int(100) NOT NULL DEFAULT '0', + `verteidigung` int(100) NOT NULL DEFAULT '0', + `speed` int(100) NOT NULL DEFAULT '0', + `s_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `preis` int(20) NOT NULL DEFAULT '0', + `anzahl` int(20) NOT NULL DEFAULT '0', + `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `id` int(11) NOT NULL AUTO_INCREMENT, + `info` text COLLATE utf8_unicode_ci NOT NULL, + `level` int(20) NOT NULL DEFAULT '0', + `tausch_lvl` int(2) unsigned NOT NULL DEFAULT '1', + `tausch_anzahl` int(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), KEY `anzahl` (`anzahl`), KEY `type` (`type`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=408 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- --- Dumping data for table `item` --- - -/*!40000 ALTER TABLE `item` DISABLE KEYS */; -LOCK TABLES `item` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `item` ENABLE KEYS */; - - --- --- Definition of table `kampf` +-- Definition of table `kampf` -- DROP TABLE IF EXISTS `kampf`; CREATE TABLE `kampf` ( - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `glueck1` text collate utf8_unicode_ci NOT NULL, - `glueck2` text collate utf8_unicode_ci NOT NULL, - `exp1` int(20) NOT NULL default '0', - `exp2` int(20) NOT NULL default '0', - `geld1` int(10) NOT NULL default '0', - `geld2` int(10) NOT NULL default '0', - `win` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `lose` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `arena_name` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `db_satz` int(20) NOT NULL default '0', - `dauer` int(50) NOT NULL default '0', - `art` varchar(50) collate utf8_unicode_ci default '...', - `art2` varchar(50) collate utf8_unicode_ci default '...', - `preis` int(20) NOT NULL default '0', - `arena_exp` int(20) NOT NULL default '0', + `hp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `hp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `attacke1` text COLLATE utf8_unicode_ci NOT NULL, + `attacke2` text COLLATE utf8_unicode_ci NOT NULL, + `schaden1` text COLLATE utf8_unicode_ci NOT NULL, + `schaden2` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `char1` int(20) NOT NULL DEFAULT '0', + `char2` int(20) NOT NULL DEFAULT '0', + `starke1` text COLLATE utf8_unicode_ci NOT NULL, + `ver1` text COLLATE utf8_unicode_ci NOT NULL, + `speed1` text COLLATE utf8_unicode_ci NOT NULL, + `starke2` text COLLATE utf8_unicode_ci NOT NULL, + `ver2` text COLLATE utf8_unicode_ci NOT NULL, + `speed2` text COLLATE utf8_unicode_ci NOT NULL, + `ausdauer1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `ausdauer2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `glueck1` text COLLATE utf8_unicode_ci NOT NULL, + `glueck2` text COLLATE utf8_unicode_ci NOT NULL, + `exp1` int(20) NOT NULL DEFAULT '0', + `exp2` int(20) NOT NULL DEFAULT '0', + `geld1` int(10) NOT NULL DEFAULT '0', + `geld2` int(10) NOT NULL DEFAULT '0', + `win` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `lose` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `arena_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `db_satz` int(20) NOT NULL DEFAULT '0', + `dauer` int(50) NOT NULL DEFAULT '0', + `art` varchar(50) COLLATE utf8_unicode_ci DEFAULT '...', + `art2` varchar(50) COLLATE utf8_unicode_ci DEFAULT '...', + `preis` int(20) NOT NULL DEFAULT '0', + `arena_exp` int(20) NOT NULL DEFAULT '0', `loge` int(11) NOT NULL, `sitz` int(11) NOT NULL, `steh` int(11) NOT NULL, - `arena_geld` int(11) NOT NULL default '0', - PRIMARY KEY (`id`), + `arena_geld` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `db_satz_2` (`db_satz`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `kampf` --- - -/*!40000 ALTER TABLE `kampf` DISABLE KEYS */; -LOCK TABLES `kampf` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `kampf` ENABLE KEYS */; +) ENGINE=InnoDB AUTO_INCREMENT=494 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -951,33 +809,22 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `kampf_list`; CREATE TABLE `kampf_list` ( - `kampfname` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `charakter` int(11) NOT NULL default '0', - `rasse` varchar(50) collate utf8_unicode_ci NOT NULL default 'ALL', - `passwort` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `besitzer` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `zeit` int(50) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `zeit_rec` int(50) NOT NULL default '0', - `lvlmax` int(4) NOT NULL default '0', - `ip` varchar(20) collate utf8_unicode_ci NOT NULL default '0', - `lvlmin` int(4) NOT NULL default '0', - PRIMARY KEY (`id`), + `kampfname` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `charakter` int(11) NOT NULL DEFAULT '0', + `rasse` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'ALL', + `passwort` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `besitzer` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `zeit` int(50) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `zeit_rec` int(50) NOT NULL DEFAULT '0', + `lvlmax` int(4) NOT NULL DEFAULT '0', + `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `lvlmin` int(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), UNIQUE KEY `charakter` (`charakter`), KEY `ip` (`ip`), CONSTRAINT `fk_kampf_list_charakter` FOREIGN KEY (`charakter`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `kampf_list` --- - -/*!40000 ALTER TABLE `kampf_list` DISABLE KEYS */; -LOCK TABLES `kampf_list` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `kampf_list` ENABLE KEYS */; - +) ENGINE=InnoDB AUTO_INCREMENT=172352 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `lernen` @@ -985,31 +832,21 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `lernen`; CREATE TABLE `lernen` ( - `name` varchar(50) collate utf8_unicode_ci NOT NULL, - `at_id` int(11) NOT NULL default '0', - `besitzer` int(11) NOT NULL default '0', - `dauer` int(30) NOT NULL default '0', - `aktiv` char(1) collate utf8_unicode_ci NOT NULL default '0', - `benutzt` int(6) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - PRIMARY KEY (`id`), + `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `at_id` int(11) NOT NULL DEFAULT '0', + `besitzer` int(11) NOT NULL DEFAULT '0', + `dauer` int(30) NOT NULL DEFAULT '0', + `aktiv` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `benutzt` int(6) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`), UNIQUE KEY `Gna` (`besitzer`,`at_id`), KEY `fk_lernen_atid` (`at_id`), KEY `fk_lernen_name` (`name`), CONSTRAINT `fk_lernen_atid` FOREIGN KEY (`at_id`) REFERENCES `attacken` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_lernen_besitzer` FOREIGN KEY (`besitzer`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_lernen_name` FOREIGN KEY (`name`) REFERENCES `attacken` (`name`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `lernen` --- - -/*!40000 ALTER TABLE `lernen` DISABLE KEYS */; -LOCK TABLES `lernen` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `lernen` ENABLE KEYS */; - +) ENGINE=InnoDB AUTO_INCREMENT=1471 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `liga_kampf` @@ -1017,55 +854,45 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `liga_kampf`; CREATE TABLE `liga_kampf` ( - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `glueck1` text collate utf8_unicode_ci NOT NULL, - `glueck2` text collate utf8_unicode_ci NOT NULL, - `exp1` int(20) NOT NULL default '0', - `exp2` int(20) NOT NULL default '0', - `geld1` int(10) NOT NULL default '0', - `geld2` int(10) NOT NULL default '0', - `arena_geld` int(20) NOT NULL default '0', - `besucher` int(20) NOT NULL default '0', - `win` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `lose` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `arena_name` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `db_satz` int(20) NOT NULL default '0', - `dauer` int(50) NOT NULL default '0', - `art` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `art2` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `preis` int(20) NOT NULL default '0', - PRIMARY KEY (`id`), + `hp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `hp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `attacke1` text COLLATE utf8_unicode_ci NOT NULL, + `attacke2` text COLLATE utf8_unicode_ci NOT NULL, + `schaden1` text COLLATE utf8_unicode_ci NOT NULL, + `schaden2` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `char1` int(20) NOT NULL DEFAULT '0', + `char2` int(20) NOT NULL DEFAULT '0', + `starke1` text COLLATE utf8_unicode_ci NOT NULL, + `ver1` text COLLATE utf8_unicode_ci NOT NULL, + `speed1` text COLLATE utf8_unicode_ci NOT NULL, + `starke2` text COLLATE utf8_unicode_ci NOT NULL, + `ver2` text COLLATE utf8_unicode_ci NOT NULL, + `speed2` text COLLATE utf8_unicode_ci NOT NULL, + `ausdauer1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `ausdauer2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `glueck1` text COLLATE utf8_unicode_ci NOT NULL, + `glueck2` text COLLATE utf8_unicode_ci NOT NULL, + `exp1` int(20) NOT NULL DEFAULT '0', + `exp2` int(20) NOT NULL DEFAULT '0', + `geld1` int(10) NOT NULL DEFAULT '0', + `geld2` int(10) NOT NULL DEFAULT '0', + `arena_geld` int(20) NOT NULL DEFAULT '0', + `besucher` int(20) NOT NULL DEFAULT '0', + `win` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `lose` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `arena_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `db_satz` int(20) NOT NULL DEFAULT '0', + `dauer` int(50) NOT NULL DEFAULT '0', + `art` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `art2` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `preis` int(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `char1` (`char1`), KEY `char2` (`char2`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `liga_kampf` --- - -/*!40000 ALTER TABLE `liga_kampf` DISABLE KEYS */; -LOCK TABLES `liga_kampf` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `liga_kampf` ENABLE KEYS */; - +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `multiuser` @@ -1075,23 +902,14 @@ DROP TABLE IF EXISTS `multiuser`; CREATE TABLE `multiuser` ( `user1` int(11) NOT NULL, `user2` int(11) NOT NULL, - `occured` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `type` varchar(25) collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`user1`,`user2`,`occured`), + `occured` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `type` varchar(25) COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`user1`,`user2`,`occured`), KEY `multiuser_user2` (`user2`), CONSTRAINT `multiuser_user1` FOREIGN KEY (`user1`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `multiuser_user2` FOREIGN KEY (`user2`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Eine Tabelle die Logbuch ueber multiuser haelt!'; --- --- Dumping data for table `multiuser` --- - -/*!40000 ALTER TABLE `multiuser` DISABLE KEYS */; -LOCK TABLES `multiuser` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `multiuser` ENABLE KEYS */; - -- -- Definition of table `nachricht` @@ -1099,28 +917,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `nachricht`; CREATE TABLE `nachricht` ( - `betreff` varchar(35) collate utf8_unicode_ci default NULL, - `von` varchar(30) collate utf8_unicode_ci NOT NULL, - `datum` timestamp NOT NULL default CURRENT_TIMESTAMP, - `text` text collate utf8_unicode_ci, - `id` int(11) NOT NULL auto_increment, - `besitzer` int(11) NOT NULL default '0', - `ag` varchar(4) collate utf8_unicode_ci NOT NULL default 'neu', - `aktiv` int(1) NOT NULL default '1', - PRIMARY KEY (`id`), + `betreff` varchar(35) COLLATE utf8_unicode_ci DEFAULT NULL, + `von` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `datum` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `text` text COLLATE utf8_unicode_ci, + `id` int(11) NOT NULL AUTO_INCREMENT, + `besitzer` int(11) NOT NULL DEFAULT '0', + `ag` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'neu', + `aktiv` int(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), KEY `besitzer` (`besitzer`), CONSTRAINT `fk_nachricht_besitzer` FOREIGN KEY (`besitzer`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `nachricht` --- - -/*!40000 ALTER TABLE `nachricht` DISABLE KEYS */; -LOCK TABLES `nachricht` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `nachricht` ENABLE KEYS */; - +) ENGINE=InnoDB AUTO_INCREMENT=300 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `npc_item` @@ -1128,31 +936,21 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `npc_item`; CREATE TABLE `npc_item` ( - `charakter` int(11) NOT NULL default '0', - `item` int(20) NOT NULL default '0', - `mal` int(3) NOT NULL default '0', - `datensatz` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `feld` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `wieviel` int(3) NOT NULL default '1', - `preis` int(50) NOT NULL default '0', - `req_charakter` int(11) default NULL, - `id` int(11) NOT NULL auto_increment, - PRIMARY KEY (`id`), + `charakter` int(11) NOT NULL DEFAULT '0', + `item` int(20) NOT NULL DEFAULT '0', + `mal` int(3) NOT NULL DEFAULT '0', + `datensatz` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `feld` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `wieviel` int(3) NOT NULL DEFAULT '1', + `preis` int(50) NOT NULL DEFAULT '0', + `req_charakter` int(11) DEFAULT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`), KEY `fk_npc_item_charakter` (`charakter`), KEY `fk_npc_item_req_charakter` (`req_charakter`), CONSTRAINT `fk_npc_item_charakter` FOREIGN KEY (`charakter`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_npc_item_req_charakter` FOREIGN KEY (`req_charakter`) REFERENCES `chars` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `npc_item` --- - -/*!40000 ALTER TABLE `npc_item` DISABLE KEYS */; -LOCK TABLES `npc_item` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `npc_item` ENABLE KEYS */; - +) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `npc_ware` @@ -1160,25 +958,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `npc_ware`; CREATE TABLE `npc_ware` ( - `user` int(11) NOT NULL default '0', - `charakter` int(11) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - PRIMARY KEY (`id`), + `user` int(11) NOT NULL DEFAULT '0', + `charakter` int(11) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`), KEY `fk_npc_ware_user` (`user`), KEY `fk_npc_ware_charakter` (`charakter`), CONSTRAINT `fk_npc_ware_charakter` FOREIGN KEY (`charakter`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_npc_ware_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `npc_ware` --- - -/*!40000 ALTER TABLE `npc_ware` DISABLE KEYS */; -LOCK TABLES `npc_ware` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `npc_ware` ENABLE KEYS */; - +) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `online` @@ -1186,25 +974,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `online`; CREATE TABLE `online` ( - `anzahl` int(20) NOT NULL default '0', - `datum` timestamp NOT NULL default CURRENT_TIMESTAMP, - `id` int(11) NOT NULL auto_increment, - `turnier` text collate utf8_unicode_ci NOT NULL, - `liga` text collate utf8_unicode_ci NOT NULL, - `turnier_klein` text collate utf8_unicode_ci NOT NULL, - `turnier_gross` text collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `online` --- - -/*!40000 ALTER TABLE `online` DISABLE KEYS */; -LOCK TABLES `online` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `online` ENABLE KEYS */; - + `anzahl` int(20) NOT NULL DEFAULT '0', + `datum` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `id` int(11) NOT NULL AUTO_INCREMENT, + `turnier` text COLLATE utf8_unicode_ci NOT NULL, + `liga` text COLLATE utf8_unicode_ci NOT NULL, + `turnier_klein` text COLLATE utf8_unicode_ci NOT NULL, + `turnier_gross` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `poll` @@ -1212,26 +990,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `poll`; CREATE TABLE `poll` ( - `pollid` int(11) NOT NULL auto_increment, + `pollid` int(11) NOT NULL AUTO_INCREMENT, `ersteller` int(11) NOT NULL, - `thema` varchar(80) collate utf8_unicode_ci NOT NULL, - `open` timestamp NOT NULL default CURRENT_TIMESTAMP, - `close` timestamp NULL default NULL, - `text` text collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`pollid`), + `thema` varchar(80) COLLATE utf8_unicode_ci NOT NULL, + `open` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `close` timestamp NULL DEFAULT NULL, + `text` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`pollid`), UNIQUE KEY `thema` (`thema`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `poll` --- - -/*!40000 ALTER TABLE `poll` DISABLE KEYS */; -LOCK TABLES `poll` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `poll` ENABLE KEYS */; - - -- -- Definition of table `poll_options` -- @@ -1240,45 +1008,26 @@ DROP TABLE IF EXISTS `poll_options`; CREATE TABLE `poll_options` ( `pollid` int(11) NOT NULL, `polloptionid` int(11) NOT NULL, - `text` varchar(100) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`pollid`,`polloptionid`), + `text` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`pollid`,`polloptionid`), CONSTRAINT `fk_poll_options_pollid` FOREIGN KEY (`pollid`) REFERENCES `poll` (`pollid`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `poll_options` --- - -/*!40000 ALTER TABLE `poll_options` DISABLE KEYS */; -LOCK TABLES `poll_options` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `poll_options` ENABLE KEYS */; - - -- -- Definition of table `poll_votes` -- DROP TABLE IF EXISTS `poll_votes`; CREATE TABLE `poll_votes` ( - `pollid` int(11) NOT NULL auto_increment, + `pollid` int(11) NOT NULL AUTO_INCREMENT, `polloptionid` int(11) NOT NULL, `userid` int(11) NOT NULL, - `comment` text collate utf8_unicode_ci NOT NULL, - PRIMARY KEY (`pollid`,`userid`), + `comment` text COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`pollid`,`userid`), KEY `fk_poll_votes_pollid` (`pollid`,`polloptionid`), CONSTRAINT `fk_poll_votes_pollid` FOREIGN KEY (`pollid`, `polloptionid`) REFERENCES `poll_options` (`pollid`, `polloptionid`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `poll_votes` --- - -/*!40000 ALTER TABLE `poll_votes` DISABLE KEYS */; -LOCK TABLES `poll_votes` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `poll_votes` ENABLE KEYS */; - -- -- Definition of table `quest_fights` @@ -1289,22 +1038,13 @@ CREATE TABLE `quest_fights` ( `charid` int(11) NOT NULL, `fightnr` int(11) NOT NULL, `monsterid` int(11) NOT NULL, - `exp` int(11) default '0', - `geld` int(11) default '0', - `sieger` int(11) default '0', - PRIMARY KEY (`charid`,`fightnr`), + `exp` int(11) DEFAULT '0', + `geld` int(11) DEFAULT '0', + `sieger` int(11) DEFAULT '0', + PRIMARY KEY (`charid`,`fightnr`), CONSTRAINT `fk_quest_fights` FOREIGN KEY (`charid`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='in dieser Tabelle werden die Fights eingetragen'; --- --- Dumping data for table `quest_fights` --- - -/*!40000 ALTER TABLE `quest_fights` DISABLE KEYS */; -LOCK TABLES `quest_fights` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `quest_fights` ENABLE KEYS */; - -- -- Definition of table `quest_monster` @@ -1312,31 +1052,22 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `quest_monster`; CREATE TABLE `quest_monster` ( - `name` varchar(75) collate utf8_unicode_ci NOT NULL, - `starke` int(5) NOT NULL default '0', - `speed` int(5) NOT NULL default '0', - `verteidigung` int(5) NOT NULL default '0', - `ausdauer` int(5) NOT NULL default '0', - `hp` int(10) NOT NULL default '0', - `mp` int(5) NOT NULL default '0', - `exp` int(10) NOT NULL default '0', - `level` int(3) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `glueck` int(11) NOT NULL default '5', - `anzahl` int(11) NOT NULL default '1', - `bild` varchar(50) collate utf8_unicode_ci default NULL, - PRIMARY KEY (`id`), + `name` varchar(75) COLLATE utf8_unicode_ci NOT NULL, + `starke` int(5) NOT NULL DEFAULT '0', + `speed` int(5) NOT NULL DEFAULT '0', + `verteidigung` int(5) NOT NULL DEFAULT '0', + `ausdauer` int(5) NOT NULL DEFAULT '0', + `hp` int(10) NOT NULL DEFAULT '0', + `mp` int(5) NOT NULL DEFAULT '0', + `exp` int(10) NOT NULL DEFAULT '0', + `level` int(3) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `glueck` int(11) NOT NULL DEFAULT '5', + `anzahl` int(11) NOT NULL DEFAULT '1', + `bild` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `quest_monster` --- - -/*!40000 ALTER TABLE `quest_monster` DISABLE KEYS */; -LOCK TABLES `quest_monster` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `quest_monster` ENABLE KEYS */; +) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -1347,20 +1078,12 @@ DROP TABLE IF EXISTS `quest_monster_orte`; CREATE TABLE `quest_monster_orte` ( `monsterid` int(11) NOT NULL, `ortid` int(11) NOT NULL, - PRIMARY KEY (`monsterid`,`ortid`), + PRIMARY KEY (`monsterid`,`ortid`), KEY `quest_monster_orte_ortid` (`ortid`), CONSTRAINT `quest_monster_orte_monsterid` FOREIGN KEY (`monsterid`) REFERENCES `quest_monster` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `quest_monster_orte_ortid` FOREIGN KEY (`ortid`) REFERENCES `quest_ort` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `quest_monster_orte` --- - -/*!40000 ALTER TABLE `quest_monster_orte` DISABLE KEYS */; -LOCK TABLES `quest_monster_orte` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `quest_monster_orte` ENABLE KEYS */; -- @@ -1369,28 +1092,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `quest_ort`; CREATE TABLE `quest_ort` ( - `stadt` varchar(25) collate utf8_unicode_ci NOT NULL default '', - `reisende` int(20) NOT NULL default '0', - `kosten` int(20) NOT NULL default '0', - `info` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `x_coord` int(11) NOT NULL default '0', - `y_coord` int(11) NOT NULL default '0', - `bild` varchar(40) collate utf8_unicode_ci NOT NULL default 'red.png', - `name_bild` varchar(40) collate utf8_unicode_ci default NULL, - `name_x` int(11) default NULL, - `name_y` int(11) default NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `quest_ort` --- - -/*!40000 ALTER TABLE `quest_ort` DISABLE KEYS */; -LOCK TABLES `quest_ort` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `quest_ort` ENABLE KEYS */; + `stadt` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `reisende` int(20) NOT NULL DEFAULT '0', + `kosten` int(20) NOT NULL DEFAULT '0', + `info` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `x_coord` int(11) NOT NULL DEFAULT '0', + `y_coord` int(11) NOT NULL DEFAULT '0', + `bild` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'red.png', + `name_bild` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL, + `name_x` int(11) DEFAULT NULL, + `name_y` int(11) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -1402,10 +1116,10 @@ CREATE TABLE `quest_rounds` ( `charid` int(11) NOT NULL, `fightnr` int(11) NOT NULL, `roundnr` int(11) NOT NULL, - `c_attack` varchar(50) collate utf8_unicode_ci default NULL, - `c_dmg` varchar(30) collate utf8_unicode_ci default NULL, - `m_attack` varchar(50) collate utf8_unicode_ci default NULL, - `m_dmg` varchar(30) collate utf8_unicode_ci default NULL, + `c_attack` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `c_dmg` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, + `m_attack` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `m_dmg` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `c_st` int(11) NOT NULL, `c_sp` int(11) NOT NULL, `c_ver` int(11) NOT NULL, @@ -1420,19 +1134,10 @@ CREATE TABLE `quest_rounds` ( `m_mp` int(11) NOT NULL, `m_aus` int(11) NOT NULL, `m_gl` int(11) NOT NULL, - PRIMARY KEY (`charid`,`fightnr`,`roundnr`), + PRIMARY KEY (`charid`,`fightnr`,`roundnr`), CONSTRAINT `fk_quest_rounds_fight` FOREIGN KEY (`charid`, `fightnr`) REFERENCES `quest_fights` (`charid`, `fightnr`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Hier sind die einzelnen Rounden der Fights eingetragen'; --- --- Dumping data for table `quest_rounds` --- - -/*!40000 ALTER TABLE `quest_rounds` DISABLE KEYS */; -LOCK TABLES `quest_rounds` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `quest_rounds` ENABLE KEYS */; - -- -- Definition of table `quests` @@ -1441,7 +1146,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `quests`; CREATE TABLE `quests` ( `charid` int(11) NOT NULL, - `dauer` timestamp NOT NULL default CURRENT_TIMESTAMP, + `dauer` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `st` int(11) NOT NULL, `sp` int(11) NOT NULL, `ver` int(11) NOT NULL, @@ -1449,23 +1154,13 @@ CREATE TABLE `quests` ( `aus` int(11) NOT NULL, `hp` int(11) NOT NULL, `mp` int(11) NOT NULL, - `ortid` int(11) default '13', - PRIMARY KEY (`charid`), + `ortid` int(11) DEFAULT '13', + PRIMARY KEY (`charid`), KEY `fk_quests_ortid` (`ortid`), CONSTRAINT `fk_quests_charid` FOREIGN KEY (`charid`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_quests_ortid` FOREIGN KEY (`ortid`) REFERENCES `quest_ort` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `quests` --- - -/*!40000 ALTER TABLE `quests` DISABLE KEYS */; -LOCK TABLES `quests` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `quests` ENABLE KEYS */; - - -- -- Definition of table `rassen` -- @@ -1476,19 +1171,9 @@ CREATE TABLE `rassen` ( `rassenid` int(11) NOT NULL, `anime` varchar(2) NOT NULL, `createable` tinyint(1) NOT NULL, - PRIMARY KEY (`rassenid`) + PRIMARY KEY (`rassenid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Diese Klass soll die array.php ersetzen'; --- --- Dumping data for table `rassen` --- - -/*!40000 ALTER TABLE `rassen` DISABLE KEYS */; -LOCK TABLES `rassen` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `rassen` ENABLE KEYS */; - - -- -- Definition of table `rassen_attacken` -- @@ -1497,41 +1182,21 @@ DROP TABLE IF EXISTS `rassen_attacken`; CREATE TABLE `rassen_attacken` ( `rassenid` int(11) NOT NULL, `attackenid` int(11) NOT NULL, - PRIMARY KEY (`rassenid`,`attackenid`) + PRIMARY KEY (`rassenid`,`attackenid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='In dieser Tabelle werden den Rassen die Attacken zugewiesen'; --- --- Dumping data for table `rassen_attacken` --- - -/*!40000 ALTER TABLE `rassen_attacken` DISABLE KEYS */; -LOCK TABLES `rassen_attacken` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `rassen_attacken` ENABLE KEYS */; - - -- -- Definition of table `referer` -- DROP TABLE IF EXISTS `referer`; CREATE TABLE `referer` ( - `url` varchar(100) collate utf8_unicode_ci NOT NULL, + `url` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `datum` date NOT NULL, `anzahl` int(11) NOT NULL, - PRIMARY KEY (`url`,`datum`) + PRIMARY KEY (`url`,`datum`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `referer` --- - -/*!40000 ALTER TABLE `referer` DISABLE KEYS */; -LOCK TABLES `referer` WRITE; -INSERT INTO `referer` VALUES ('ag01.animegame.eu','2010-02-04',137); -UNLOCK TABLES; -/*!40000 ALTER TABLE `referer` ENABLE KEYS */; - -- -- Definition of table `semaphore` @@ -1539,21 +1204,27 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `semaphore`; CREATE TABLE `semaphore` ( - `ressource` varchar(20) collate utf8_unicode_ci NOT NULL, - `zeit` timestamp NOT NULL default CURRENT_TIMESTAMP, - PRIMARY KEY (`ressource`), + `ressource` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `zeit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`ressource`), KEY `Zeitindex` (`zeit`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Die Tabelle, die hoffentlich alle Zugriffsprobleme loesen wi'; -- --- Dumping data for table `semaphore` +-- Definition of table `shop` -- -/*!40000 ALTER TABLE `semaphore` DISABLE KEYS */; -LOCK TABLES `semaphore` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `semaphore` ENABLE KEYS */; - +DROP TABLE IF EXISTS `shop`; +CREATE TABLE `shop` ( + `item` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + `mal` int(3) NOT NULL DEFAULT '0', + `datensatz` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `preis` int(50) NOT NULL DEFAULT '0', + `preis_req` int(10) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `com` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Kein Kommentar', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=MyISAM AUTO_INCREMENT=82 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `sp_item` @@ -1561,27 +1232,17 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `sp_item`; CREATE TABLE `sp_item` ( - `name` varchar(100) collate utf8_unicode_ci NOT NULL, - `preis` int(10) NOT NULL default '0', - `wert` mediumint(5) NOT NULL default '0', - `info` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `type` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `slot` int(2) NOT NULL default '0', - `tausch_lvl` int(2) NOT NULL default '1', - `tausch_anzahl` int(4) NOT NULL default '1', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `sp_item` --- - -/*!40000 ALTER TABLE `sp_item` DISABLE KEYS */; -LOCK TABLES `sp_item` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `sp_item` ENABLE KEYS */; - + `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `preis` int(10) NOT NULL DEFAULT '0', + `wert` mediumint(5) NOT NULL DEFAULT '0', + `info` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `slot` int(2) NOT NULL DEFAULT '0', + `tausch_lvl` int(2) NOT NULL DEFAULT '1', + `tausch_anzahl` int(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `sp_ware` @@ -1589,25 +1250,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `sp_ware`; CREATE TABLE `sp_ware` ( - `item` int(11) NOT NULL default '0', - `user` int(11) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - PRIMARY KEY (`id`), + `item` int(11) NOT NULL DEFAULT '0', + `user` int(11) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`), KEY `item` (`item`), KEY `user` (`user`), CONSTRAINT `fk_sp_ware_item` FOREIGN KEY (`item`) REFERENCES `sp_item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_sp_ware_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `sp_ware` --- - -/*!40000 ALTER TABLE `sp_ware` DISABLE KEYS */; -LOCK TABLES `sp_ware` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `sp_ware` ENABLE KEYS */; - +) ENGINE=InnoDB AUTO_INCREMENT=1081 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `spammer` @@ -1616,129 +1267,97 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `spammer`; CREATE TABLE `spammer` ( `userid` int(11) NOT NULL, - `bann_until` timestamp NOT NULL default CURRENT_TIMESTAMP, - PRIMARY KEY (`userid`,`bann_until`), + `bann_until` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`userid`,`bann_until`), CONSTRAINT `fk_spammer_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `spammer` --- - -/*!40000 ALTER TABLE `spammer` DISABLE KEYS */; -LOCK TABLES `spammer` WRITE; -INSERT INTO `spammer` VALUES (54,'2010-02-11 16:31:00'), - (2879,'2010-02-09 16:31:21'); -UNLOCK TABLES; -/*!40000 ALTER TABLE `spammer` ENABLE KEYS */; - - -- -- Definition of table `t_kampf` -- DROP TABLE IF EXISTS `t_kampf`; CREATE TABLE `t_kampf` ( - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `exp1` int(20) NOT NULL default '0', - `exp2` int(20) NOT NULL default '0', - `geld1` int(10) NOT NULL default '0', - `geld2` int(10) NOT NULL default '0', - `arena_geld` int(20) NOT NULL default '0', - `besucher` int(20) NOT NULL default '0', - `win` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `lose` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `arena_name` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `db_satz` int(20) NOT NULL default '0', - `dauer` int(50) NOT NULL default '0', - PRIMARY KEY (`id`), + `hp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `hp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `attacke1` text COLLATE utf8_unicode_ci NOT NULL, + `attacke2` text COLLATE utf8_unicode_ci NOT NULL, + `schaden1` text COLLATE utf8_unicode_ci NOT NULL, + `schaden2` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `char1` int(20) NOT NULL DEFAULT '0', + `char2` int(20) NOT NULL DEFAULT '0', + `starke1` text COLLATE utf8_unicode_ci NOT NULL, + `ver1` text COLLATE utf8_unicode_ci NOT NULL, + `speed1` text COLLATE utf8_unicode_ci NOT NULL, + `starke2` text COLLATE utf8_unicode_ci NOT NULL, + `ver2` text COLLATE utf8_unicode_ci NOT NULL, + `speed2` text COLLATE utf8_unicode_ci NOT NULL, + `ausdauer1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `ausdauer2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `exp1` int(20) NOT NULL DEFAULT '0', + `exp2` int(20) NOT NULL DEFAULT '0', + `geld1` int(10) NOT NULL DEFAULT '0', + `geld2` int(10) NOT NULL DEFAULT '0', + `arena_geld` int(20) NOT NULL DEFAULT '0', + `besucher` int(20) NOT NULL DEFAULT '0', + `win` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `lose` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `arena_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `db_satz` int(20) NOT NULL DEFAULT '0', + `dauer` int(50) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `besucher` (`besucher`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `t_kampf` --- - -/*!40000 ALTER TABLE `t_kampf` DISABLE KEYS */; -LOCK TABLES `t_kampf` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `t_kampf` ENABLE KEYS */; - - -- -- Definition of table `top_kampf` -- DROP TABLE IF EXISTS `top_kampf`; CREATE TABLE `top_kampf` ( - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `glueck1` text collate utf8_unicode_ci NOT NULL, - `glueck2` text collate utf8_unicode_ci NOT NULL, - `exp1` int(20) NOT NULL default '0', - `exp2` int(20) NOT NULL default '0', - `geld1` int(10) NOT NULL default '0', - `geld2` int(10) NOT NULL default '0', - `arena_geld` int(20) NOT NULL default '0', - `besucher` int(20) NOT NULL default '0', - `win` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `lose` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `arena_name` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `db_satz` int(20) NOT NULL default '0', - `dauer` int(50) NOT NULL default '0', - `art` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `art2` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `preis` int(20) NOT NULL default '0', + `hp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `hp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `attacke1` text COLLATE utf8_unicode_ci NOT NULL, + `attacke2` text COLLATE utf8_unicode_ci NOT NULL, + `schaden1` text COLLATE utf8_unicode_ci NOT NULL, + `schaden2` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `char1` int(20) NOT NULL DEFAULT '0', + `char2` int(20) NOT NULL DEFAULT '0', + `starke1` text COLLATE utf8_unicode_ci NOT NULL, + `ver1` text COLLATE utf8_unicode_ci NOT NULL, + `speed1` text COLLATE utf8_unicode_ci NOT NULL, + `starke2` text COLLATE utf8_unicode_ci NOT NULL, + `ver2` text COLLATE utf8_unicode_ci NOT NULL, + `speed2` text COLLATE utf8_unicode_ci NOT NULL, + `ausdauer1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `ausdauer2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `glueck1` text COLLATE utf8_unicode_ci NOT NULL, + `glueck2` text COLLATE utf8_unicode_ci NOT NULL, + `exp1` int(20) NOT NULL DEFAULT '0', + `exp2` int(20) NOT NULL DEFAULT '0', + `geld1` int(10) NOT NULL DEFAULT '0', + `geld2` int(10) NOT NULL DEFAULT '0', + `arena_exp` int(20) NOT NULL DEFAULT '0', + `besucher` int(20) NOT NULL DEFAULT '0', + `win` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `lose` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `arena_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `db_satz` int(20) NOT NULL DEFAULT '0', + `dauer` int(50) NOT NULL DEFAULT '0', + `art` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `art2` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `preis` int(20) NOT NULL DEFAULT '0', `loge` int(11) NOT NULL, `steh` int(11) NOT NULL, `sitz` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `top_kampf` --- - -/*!40000 ALTER TABLE `top_kampf` DISABLE KEYS */; -LOCK TABLES `top_kampf` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `top_kampf` ENABLE KEYS */; - + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=375 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `transaktionen` @@ -1746,53 +1365,60 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `transaktionen`; CREATE TABLE `transaktionen` ( - `kaeufer` int(11) default NULL, - `verkaeufer` int(11) default NULL, - `item` varchar(50) collate utf8_unicode_ci default NULL, - `anzahl` int(10) default NULL, - `verkaeufer_ip` varchar(20) collate utf8_unicode_ci default NULL, - `kaeufer_ip` varchar(20) collate utf8_unicode_ci default NULL, - `betrag` int(30) default NULL, - `zeit` timestamp NOT NULL default CURRENT_TIMESTAMP, + `kaeufer` int(11) DEFAULT NULL, + `verkaeufer` int(11) DEFAULT NULL, + `item` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, + `anzahl` int(10) DEFAULT NULL, + `verkaeufer_ip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `kaeufer_ip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, + `betrag` int(30) DEFAULT NULL, + `zeit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, KEY `Kaeufer` (`kaeufer`,`verkaeufer`,`zeit`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `transaktionen` --- - -/*!40000 ALTER TABLE `transaktionen` DISABLE KEYS */; -LOCK TABLES `transaktionen` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `transaktionen` ENABLE KEYS */; - - -- -- Definition of table `turnier1` -- DROP TABLE IF EXISTS `turnier1`; CREATE TABLE `turnier1` ( - `id` int(11) NOT NULL auto_increment, - `besitzer` int(20) NOT NULL default '0', - `charakter` int(25) NOT NULL default '0', - `art` char(50) collate utf8_unicode_ci NOT NULL default 'wochen', - PRIMARY KEY (`id`), + `id` int(11) NOT NULL AUTO_INCREMENT, + `besitzer` int(20) NOT NULL DEFAULT '0', + `charakter` int(25) NOT NULL DEFAULT '0', + `art` char(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'wochen', + PRIMARY KEY (`id`), KEY `besitzer` (`besitzer`), KEY `charakter` (`charakter`), CONSTRAINT `turnier1_besitzer` FOREIGN KEY (`besitzer`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `turnier1_char` FOREIGN KEY (`charakter`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- --- Dumping data for table `turnier1` +-- Definition of table `turnier_gebuehr` -- -/*!40000 ALTER TABLE `turnier1` DISABLE KEYS */; -LOCK TABLES `turnier1` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `turnier1` ENABLE KEYS */; +DROP TABLE IF EXISTS `turnier_gebuehr`; +CREATE TABLE `turnier_gebuehr` ( + `art` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `gebuehr` int(11) NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + +-- +-- Definition of table `turnier_instances` +-- +DROP TABLE IF EXISTS `turnier_instances`; +CREATE TABLE `turnier_instances` ( + `turnier_id` int(10) unsigned NOT NULL, + `event_id` int(10) unsigned NOT NULL, + `turnier_version` int(10) unsigned NOT NULL, + `turnier_type_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`turnier_id`,`event_id`,`turnier_version`,`turnier_type_id`), + KEY `fk_turnier_instances_turnier_verisons` (`turnier_type_id`,`turnier_version`), + KEY `fk_turnier_instances_events` (`event_id`,`turnier_id`), + CONSTRAINT `fk_turnier_instances_turnier_verisons` FOREIGN KEY (`turnier_type_id`, `turnier_version`) REFERENCES `turnier_versions` (`turnier_type_id`, `turnier_version`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Definition of table `turnier_kampf` @@ -1800,56 +1426,88 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `turnier_kampf`; CREATE TABLE `turnier_kampf` ( - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `glueck1` text collate utf8_unicode_ci NOT NULL, - `glueck2` text collate utf8_unicode_ci NOT NULL, - `exp1` int(20) NOT NULL default '0', - `exp2` int(20) NOT NULL default '0', - `geld1` int(10) NOT NULL default '0', - `geld2` int(10) NOT NULL default '0', - `arena_geld` int(20) NOT NULL default '0', - `besucher` int(20) NOT NULL default '0', - `win` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `lose` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `arena_name` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `db_satz` int(20) NOT NULL default '0', - `dauer` int(50) NOT NULL default '0', - `art` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `art2` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `preis` int(20) NOT NULL default '0', - `round` int(2) NOT NULL default '0', - PRIMARY KEY (`id`), + `hp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `hp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `attacke1` text COLLATE utf8_unicode_ci NOT NULL, + `attacke2` text COLLATE utf8_unicode_ci NOT NULL, + `schaden1` text COLLATE utf8_unicode_ci NOT NULL, + `schaden2` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `char1` int(20) NOT NULL DEFAULT '0', + `char2` int(20) NOT NULL DEFAULT '0', + `starke1` text COLLATE utf8_unicode_ci NOT NULL, + `ver1` text COLLATE utf8_unicode_ci NOT NULL, + `speed1` text COLLATE utf8_unicode_ci NOT NULL, + `starke2` text COLLATE utf8_unicode_ci NOT NULL, + `ver2` text COLLATE utf8_unicode_ci NOT NULL, + `speed2` text COLLATE utf8_unicode_ci NOT NULL, + `ausdauer1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `ausdauer2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `glueck1` text COLLATE utf8_unicode_ci NOT NULL, + `glueck2` text COLLATE utf8_unicode_ci NOT NULL, + `exp1` int(20) NOT NULL DEFAULT '0', + `exp2` int(20) NOT NULL DEFAULT '0', + `geld1` int(10) NOT NULL DEFAULT '0', + `geld2` int(10) NOT NULL DEFAULT '0', + `arena_geld` int(20) NOT NULL DEFAULT '0', + `besucher` int(20) NOT NULL DEFAULT '0', + `win` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `lose` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `arena_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `db_satz` int(20) NOT NULL DEFAULT '0', + `dauer` int(50) NOT NULL DEFAULT '0', + `art` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `art2` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `preis` int(20) NOT NULL DEFAULT '0', + `round` int(2) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `char1` (`char1`), KEY `char2` (`char2`), KEY `round` (`round`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + -- --- Dumping data for table `turnier_kampf` +-- Definition of table `turnier_types` -- -/*!40000 ALTER TABLE `turnier_kampf` DISABLE KEYS */; -LOCK TABLES `turnier_kampf` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `turnier_kampf` ENABLE KEYS */; +DROP TABLE IF EXISTS `turnier_types`; +CREATE TABLE `turnier_types` ( + `turnier_type_id` int(10) unsigned NOT NULL, + `turnier_type_name` varchar(30) NOT NULL, + PRIMARY KEY (`turnier_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Definition of table `turnier_versions` +-- + +DROP TABLE IF EXISTS `turnier_versions`; +CREATE TABLE `turnier_versions` ( + `turnier_type_id` int(10) unsigned NOT NULL, + `turnier_version` int(10) unsigned NOT NULL, + `fusion_chars` tinyint(1) NOT NULL, + `special_chars` tinyint(1) NOT NULL, + `min_level` int(10) unsigned DEFAULT NULL, + `max_level` int(10) unsigned DEFAULT NULL, + `gain` varchar(10) NOT NULL, + `randomize` tinyint(1) NOT NULL, + `fight_duration` int(10) unsigned DEFAULT NULL, + `anzahl` int(10) unsigned DEFAULT NULL, + `frucht_chars` tinyint(1) NOT NULL, + `max_wins` int(10) unsigned DEFAULT NULL, + `valid_from` date NOT NULL, + `repeat_type` int(10) unsigned DEFAULT NULL, + `repeat_param` int(10) unsigned DEFAULT NULL, + `start_time` time NOT NULL, + `persist_winner` tinyint(1) NOT NULL, + `exp_per_round` int(11) NOT NULL, + `mon_per_round` int(11) NOT NULL, + PRIMARY KEY (`turnier_type_id`,`turnier_version`), + CONSTRAINT `fk_turnier_versions_turnier_types` FOREIGN KEY (`turnier_type_id`) REFERENCES `turnier_types` (`turnier_type_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -1859,23 +1517,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `umsatz`; CREATE TABLE `umsatz` ( `betrag` decimal(10,2) NOT NULL, - `waehrung` varchar(10) collate utf8_unicode_ci NOT NULL, - `instanz` varchar(20) collate utf8_unicode_ci NOT NULL, - `kommentar` text collate utf8_unicode_ci NOT NULL, + `waehrung` varchar(10) COLLATE utf8_unicode_ci NOT NULL, + `instanz` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `kommentar` text COLLATE utf8_unicode_ci NOT NULL, `datum` date NOT NULL, `malus` decimal(10,2) NOT NULL, - PRIMARY KEY (`instanz`,`datum`) + PRIMARY KEY (`instanz`,`datum`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Hier werden alle Umsaetze verzeichnet'; --- --- Dumping data for table `umsatz` --- - -/*!40000 ALTER TABLE `umsatz` DISABLE KEYS */; -LOCK TABLES `umsatz` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `umsatz` ENABLE KEYS */; - -- -- Definition of table `user` @@ -1883,49 +1532,43 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( - `nickname` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `passwort` varchar(200) collate utf8_unicode_ci NOT NULL default '', - `mail` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `homepage` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `geschlecht` varchar(10) collate utf8_unicode_ci NOT NULL default '', - `id` int(11) NOT NULL auto_increment, - `geld` int(20) NOT NULL default '300', - `ip` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `online_zeit` timestamp NOT NULL default CURRENT_TIMESTAMP, - `bann` varchar(4) collate utf8_unicode_ci NOT NULL default 'nein', - `icq` varchar(20) collate utf8_unicode_ci NOT NULL default '', - `clan` int(11) default NULL, - `clan_geld` int(50) NOT NULL default '0', - `clan_train` int(20) NOT NULL default '0', - `item_res` int(2) NOT NULL default '0', - `scouter` int(1) NOT NULL default '0', - `char_max` int(11) NOT NULL default '2', - `ks_points` int(20) NOT NULL default '5', - `agb` varchar(4) collate utf8_unicode_ci NOT NULL default 'nein', - `post` int(1) NOT NULL default '1', - `schnelllink` int(1) NOT NULL default '1', - `pw_fight` int(2) NOT NULL default '4', - `cheater` int(11) NOT NULL default '0', - `summon` int(50) NOT NULL default '0', - `chat_anzahl` char(2) collate utf8_unicode_ci NOT NULL default '5', - `code` int(11) NOT NULL default '8', - PRIMARY KEY (`id`), + `nickname` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `passwort` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mail` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `homepage` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `geschlecht` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `id` int(11) NOT NULL AUTO_INCREMENT, + `geld` int(20) NOT NULL DEFAULT '300', + `ip` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `online_zeit` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `bann` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'nein', + `icq` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `clan` int(11) DEFAULT NULL, + `clan_geld` int(50) NOT NULL DEFAULT '0', + `clan_train` int(20) NOT NULL DEFAULT '0', + `item_res` int(2) NOT NULL DEFAULT '0', + `scouter` int(1) NOT NULL DEFAULT '0', + `char_max` int(11) NOT NULL DEFAULT '2', + `ks_points` int(20) NOT NULL DEFAULT '5', + `agb` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'nein', + `post` int(1) NOT NULL DEFAULT '1', + `schnelllink` int(1) NOT NULL DEFAULT '1', + `pw_fight` int(2) NOT NULL DEFAULT '4', + `cheater` int(11) NOT NULL DEFAULT '0', + `summon` int(50) NOT NULL DEFAULT '0', + `chat` int(1) NOT NULL DEFAULT '1', + `chat_anzahl` char(2) COLLATE utf8_unicode_ci NOT NULL DEFAULT '5', + `code` int(11) NOT NULL DEFAULT '8', + `pkt` int(10) unsigned NOT NULL DEFAULT '0', + `pkt_use` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), UNIQUE KEY `nickname_2` (`nickname`), KEY `passwort` (`passwort`), KEY `online_zeit` (`online_zeit`), KEY `ip` (`ip`), KEY `fk_user_clan` (`clan`), CONSTRAINT `fk_user_clan` FOREIGN KEY (`clan`) REFERENCES `clan` (`id`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `user` --- - -/*!40000 ALTER TABLE `user` DISABLE KEYS */; -LOCK TABLES `user` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `user` ENABLE KEYS */; +) ENGINE=InnoDB AUTO_INCREMENT=3584 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -1934,22 +1577,26 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `user_activation`; CREATE TABLE `user_activation` ( - `code` varchar(50) collate utf8_unicode_ci NOT NULL, - `username` varchar(50) collate utf8_unicode_ci NOT NULL, - `passwort` varchar(50) collate utf8_unicode_ci NOT NULL, - `mail` varchar(50) collate utf8_unicode_ci NOT NULL, + `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `username` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `passwort` varchar(50) COLLATE utf8_unicode_ci NOT NULL, + `mail` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `registerdate` date NOT NULL, - PRIMARY KEY (`username`) + PRIMARY KEY (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + -- --- Dumping data for table `user_activation` +-- Definition of table `user_adblock` -- -/*!40000 ALTER TABLE `user_activation` DISABLE KEYS */; -LOCK TABLES `user_activation` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `user_activation` ENABLE KEYS */; +DROP TABLE IF EXISTS `user_adblock`; +CREATE TABLE `user_adblock` ( + `userid` int(11) NOT NULL, + `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`userid`,`time`), + CONSTRAINT `user_adblock_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -1961,22 +1608,57 @@ CREATE TABLE `user_clan` ( `spende` bigint(20) NOT NULL, `userid` int(11) NOT NULL, `clanid` int(11) NOT NULL, - PRIMARY KEY (`userid`,`clanid`), + PRIMARY KEY (`userid`,`clanid`), KEY `fk_user_clan_clanid` (`clanid`), CONSTRAINT `fk_user_clan_clanid` FOREIGN KEY (`clanid`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_user_clan_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + + -- --- Dumping data for table `user_clan` +-- Definition of table `user_clan_invitations` -- -/*!40000 ALTER TABLE `user_clan` DISABLE KEYS */; -LOCK TABLES `user_clan` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `user_clan` ENABLE KEYS */; +DROP TABLE IF EXISTS `user_clan_invitations`; +CREATE TABLE `user_clan_invitations` ( + `userid` int(11) NOT NULL, + `clanid` int(11) NOT NULL, + `valid` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`userid`,`clanid`), + KEY `user_clan_invitations_clanid` (`clanid`), + CONSTRAINT `user_clan_invitations_clanid` FOREIGN KEY (`clanid`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `user_clan_invitations_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- +-- Definition of table `user_gruppe` +-- + +DROP TABLE IF EXISTS `user_gruppe`; +CREATE TABLE `user_gruppe` ( + `gruppen_id` int(11) NOT NULL AUTO_INCREMENT, + `gruppen_name` varchar(50) NOT NULL, + `gruppen_beschreibung` text, + PRIMARY KEY (`gruppen_id`), + UNIQUE KEY `name` (`gruppen_name`) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; + +-- +-- Definition of table `user_gruppe_zuordnung` +-- + +DROP TABLE IF EXISTS `user_gruppe_zuordnung`; +CREATE TABLE `user_gruppe_zuordnung` ( + `user_id` int(11) NOT NULL DEFAULT '0', + `gruppen_id` int(11) NOT NULL DEFAULT '0', + UNIQUE KEY `user_id` (`user_id`,`gruppen_id`), + KEY `fk_gruppe_user_gruppe` (`gruppen_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + -- -- Definition of table `user_rename` -- @@ -1985,10 +1667,10 @@ DROP TABLE IF EXISTS `user_rename`; CREATE TABLE `user_rename` ( `userid` int(11) NOT NULL, `datum` date NOT NULL, - `pre_name` varchar(40) collate utf8_unicode_ci NOT NULL, - `post_name` varchar(40) collate utf8_unicode_ci NOT NULL, - `wunsch` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`userid`,`datum`), + `pre_name` varchar(40) COLLATE utf8_unicode_ci NOT NULL, + `post_name` varchar(40) COLLATE utf8_unicode_ci NOT NULL, + `wunsch` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`userid`,`datum`), CONSTRAINT `fk_user_rename_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -1998,6 +1680,7 @@ CREATE TABLE `user_rename` ( /*!40000 ALTER TABLE `user_rename` DISABLE KEYS */; LOCK TABLES `user_rename` WRITE; +INSERT INTO `user_rename` VALUES (3576,'2011-08-24','Coyote Starrk','Aizen',0); UNLOCK TABLES; /*!40000 ALTER TABLE `user_rename` ENABLE KEYS */; @@ -2009,32 +1692,22 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `user_ticker`; CREATE TABLE `user_ticker` ( `userid` int(11) NOT NULL, - `text` text collate utf8_unicode_ci NOT NULL, + `text` text COLLATE utf8_unicode_ci NOT NULL, `msgid` int(11) NOT NULL, - `date` timestamp NOT NULL default CURRENT_TIMESTAMP, + `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, KEY `new_index` (`userid`,`msgid`,`date`), CONSTRAINT `fk_user_ticker_userid` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `user_ticker` --- - -/*!40000 ALTER TABLE `user_ticker` DISABLE KEYS */; -LOCK TABLES `user_ticker` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `user_ticker` ENABLE KEYS */; - - -- -- Definition of table `vote` -- DROP TABLE IF EXISTS `vote`; CREATE TABLE `vote` ( - `user` int(20) NOT NULL default '0', - `vote` int(20) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, + `user` int(20) NOT NULL DEFAULT '0', + `vote` int(20) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; @@ -2054,45 +1727,45 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `wanted_kampf`; CREATE TABLE `wanted_kampf` ( - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `id` int(11) NOT NULL auto_increment, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL default '', - `glueck1` text collate utf8_unicode_ci NOT NULL, - `glueck2` text collate utf8_unicode_ci NOT NULL, - `exp1` int(20) NOT NULL default '0', - `exp2` int(20) NOT NULL default '0', - `geld1` int(10) NOT NULL default '0', - `geld2` int(10) NOT NULL default '0', - `arena_geld` int(20) NOT NULL default '0', - `besucher` int(20) NOT NULL default '0', - `win` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `lose` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `arena_name` varchar(30) collate utf8_unicode_ci NOT NULL default '', - `db_satz` int(20) NOT NULL default '0', - `dauer` int(50) NOT NULL default '0', - `art` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `art2` varchar(50) collate utf8_unicode_ci NOT NULL default '', - `preis` int(20) NOT NULL default '0', - PRIMARY KEY (`id`), + `hp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `hp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `mp2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `attacke1` text COLLATE utf8_unicode_ci NOT NULL, + `attacke2` text COLLATE utf8_unicode_ci NOT NULL, + `schaden1` text COLLATE utf8_unicode_ci NOT NULL, + `schaden2` text COLLATE utf8_unicode_ci NOT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `char1` int(20) NOT NULL DEFAULT '0', + `char2` int(20) NOT NULL DEFAULT '0', + `starke1` text COLLATE utf8_unicode_ci NOT NULL, + `ver1` text COLLATE utf8_unicode_ci NOT NULL, + `speed1` text COLLATE utf8_unicode_ci NOT NULL, + `starke2` text COLLATE utf8_unicode_ci NOT NULL, + `ver2` text COLLATE utf8_unicode_ci NOT NULL, + `speed2` text COLLATE utf8_unicode_ci NOT NULL, + `ausdauer1` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `ausdauer2` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `glueck1` text COLLATE utf8_unicode_ci NOT NULL, + `glueck2` text COLLATE utf8_unicode_ci NOT NULL, + `exp1` int(20) NOT NULL DEFAULT '0', + `exp2` int(20) NOT NULL DEFAULT '0', + `geld1` int(10) NOT NULL DEFAULT '0', + `geld2` int(10) NOT NULL DEFAULT '0', + `arena_geld` int(20) NOT NULL DEFAULT '0', + `besucher` int(20) NOT NULL DEFAULT '0', + `win` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `lose` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `arena_name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `db_satz` int(20) NOT NULL DEFAULT '0', + `dauer` int(50) NOT NULL DEFAULT '0', + `art` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `art2` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `preis` int(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `char1` (`char1`), KEY `char2` (`char2`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `wanted_kampf` @@ -2110,26 +1783,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `ware`; CREATE TABLE `ware` ( - `item_id` int(20) NOT NULL default '0', - `user` int(20) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `ru_mal` char(1) collate utf8_unicode_ci NOT NULL default '0', - PRIMARY KEY (`id`), + `item_id` int(20) NOT NULL DEFAULT '0', + `user` int(20) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `ru_mal` char(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), KEY `fk_ware_user` (`user`), KEY `fk_ware_item_id` (`item_id`), CONSTRAINT `fk_ware_item_id` FOREIGN KEY (`item_id`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_ware_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `ware` --- - -/*!40000 ALTER TABLE `ware` DISABLE KEYS */; -LOCK TABLES `ware` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `ware` ENABLE KEYS */; - +) ENGINE=InnoDB AUTO_INCREMENT=15931 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Definition of table `wochen_markt` @@ -2137,38 +1800,28 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `wochen_markt`; CREATE TABLE `wochen_markt` ( - `item` varchar(100) collate utf8_unicode_ci NOT NULL, - `starke` int(2) NOT NULL default '0', - `ver` int(2) NOT NULL default '0', - `speed` int(2) NOT NULL default '0', - `ausdauer` int(2) NOT NULL default '0', - `hp` int(5) NOT NULL default '0', - `mp` int(2) NOT NULL default '0', - `glueck` int(2) NOT NULL default '0', - `type` varchar(25) collate utf8_unicode_ci NOT NULL default 'Teufels Frucht', - `preis` int(25) NOT NULL default '0', - `anzahl` int(3) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, - `verteilung` int(10) NOT NULL default '0', - `aktiv` varchar(4) collate utf8_unicode_ci NOT NULL default 'ja', - `art` varchar(50) collate utf8_unicode_ci NOT NULL default 'normal', - `info` text collate utf8_unicode_ci NOT NULL, - `kategorie` varchar(20) collate utf8_unicode_ci NOT NULL, - `tausch_lvl` int(2) NOT NULL default '1', - `tausch_anzahl` int(4) NOT NULL default '1', - PRIMARY KEY (`id`), + `item` varchar(100) COLLATE utf8_unicode_ci NOT NULL, + `starke` int(2) NOT NULL DEFAULT '0', + `ver` int(2) NOT NULL DEFAULT '0', + `speed` int(2) NOT NULL DEFAULT '0', + `ausdauer` int(2) NOT NULL DEFAULT '0', + `hp` int(5) NOT NULL DEFAULT '0', + `mp` int(2) NOT NULL DEFAULT '0', + `glueck` int(2) NOT NULL DEFAULT '0', + `type` varchar(25) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Teufels Frucht', + `preis` int(25) NOT NULL DEFAULT '0', + `anzahl` int(3) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, + `verteilung` int(10) NOT NULL DEFAULT '0', + `aktiv` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'ja', + `art` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'normal', + `info` text COLLATE utf8_unicode_ci NOT NULL, + `kategorie` varchar(20) COLLATE utf8_unicode_ci NOT NULL, + `tausch_lvl` int(2) NOT NULL DEFAULT '1', + `tausch_anzahl` int(4) NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), UNIQUE KEY `item` (`item`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `wochen_markt` --- - -/*!40000 ALTER TABLE `wochen_markt` DISABLE KEYS */; -LOCK TABLES `wochen_markt` WRITE; - -UNLOCK TABLES; -/*!40000 ALTER TABLE `wochen_markt` ENABLE KEYS */; +) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- @@ -2177,340 +1830,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `wochen_ware`; CREATE TABLE `wochen_ware` ( - `item` int(25) NOT NULL default '0', - `user` int(25) NOT NULL default '0', - `id` int(11) NOT NULL auto_increment, + `item` int(25) NOT NULL DEFAULT '0', + `user` int(25) NOT NULL DEFAULT '0', + `id` int(11) NOT NULL AUTO_INCREMENT, KEY `id` (`id`), KEY `fk_wochen_ware_item` (`item`), KEY `fk_wochen_ware_user` (`user`), CONSTRAINT `fk_wochen_ware_item` FOREIGN KEY (`item`) REFERENCES `wochen_markt` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_wochen_ware_user` FOREIGN KEY (`user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - --- --- Dumping data for table `wochen_ware` --- - -/*!40000 ALTER TABLE `wochen_ware` DISABLE KEYS */; -LOCK TABLES `wochen_ware` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `wochen_ware` ENABLE KEYS */; - -DROP TABLE IF EXISTS `user_gruppe_zuordnung`; -CREATE TABLE `user_gruppe_zuordnung` ( - `user_id` int(11) NOT NULL DEFAULT '0', - `gruppen_id` int(11) NOT NULL DEFAULT '0', - UNIQUE (`user_id`,`gruppen_id`), - CONSTRAINT `fk_gruppe_user_gruppe` FOREIGN KEY (`gruppen_id`) REFERENCES `user_gruppe` (`gruppen_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `fk_user_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -DROP TABLE IF EXISTS `user_gruppe`; -CREATE TABLE `user_gruppe` ( - `gruppen_id` int(11) NOT NULL AUTO_INCREMENT, - `gruppen_name` varchar(50) NOT NULL, - `gruppen_beschreibung` text, - PRIMARY KEY (`gruppen_id`), - UNIQUE KEY `name` (`gruppen_name`) -) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - -INSERT INTO user_gruppe(gruppen_name, gruppen_beschreibung) VALUES('admin', 'Wird für das Setzen des Adminstatus verwendet.') -INSERT INTO user_gruppe(gruppen_name,gruppen_beschreibung) VALUES('tester', 'Wird für das Setzen des Testerstatus verwendet.
Sollte nicht im produktivem System gesetzt werden!!!'); -INSERT INTO user_gruppe(gruppen_name,gruppen_beschreibung) VALUES('entwickler', 'Wird für das Setzen des Entwicklerstatus verwendet. Hat keine Auswirkung auf das Spiel, ausser das die Chatfarbe anders ist.'); -INSERT INTO user_gruppe(gruppen_name,gruppen_beschreibung) VALUES('designer', 'Wird für das Setzen des Designerstatus verwendet. Hat keine Auswirkung auf das Spiel, ausser das die Chatfarbe anders ist.'); -INSERT INTO user_gruppe(gruppen_name,gruppen_beschreibung) VALUES('werbung_an', 'Wird für das Setzen der "Hardcore"-Werbung-user verwendet. Hat keine Auswirkung auf das Spiel, ausser das die Chatfarbe anders ist und mehr Werbung erscheint.'); -INSERT INTO user_gruppe(gruppen_name, gruppen_beschreibung) VALUES('inaktiv_loeschschutz','User in dieser Gruppe wird die Option zum Schutz der automatischen Löschung freigeschalten.
Wird automatisch vergeben!'); -INSERT INTO user_gruppe(gruppen_name, gruppen_beschreibung) VALUES('aktiv_loeschschutz','User in dieser Gruppe werden nicht automatisch gelöscht.
Wird durch User gesetzt!'); -INSERT INTO user_gruppe(gruppen_name, gruppen_beschreibung) VALUES ('aktiv_chat', 'User in dieser Gruppe sehen den Chat.
Wird durch User gesetzt!') - -DROP TABLE IF EXISTS `turnier_gebuehr`; -CREATE TABLE `turnier_preis` ( - `art` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `gebuehr` INT NOT NULL DEFAULT 0 -) -ENGINE = InnoDB CHARSET=utf8 COLLATE=utf8_unicode_ci; - -DROP TABLE IF EXISTS `user_clan_invitations`; -CREATE TABLE `user_clan_invitations` ( - `userid` INTEGER NOT NULL, - `clanid` INTEGER NOT NULL, - `valid` TIMESTAMP NOT NULL, - PRIMARY KEY (`userid`, `clanid`), - CONSTRAINT `user_clan_invitations_userid` FOREIGN KEY `user_clan_invitations_userid` (`userid`) - REFERENCES `user` (`id`) - ON DELETE CASCADE - ON UPDATE CASCADE, - CONSTRAINT `user_clan_invitations_clanid` FOREIGN KEY `user_clan_invitations_clanid` (`clanid`) - REFERENCES `clan` (`id`) - ON DELETE CASCADE - ON UPDATE CASCADE -) -ENGINE = InnoDB -CHARACTER SET utf8 COLLATE utf8_general_ci; - -DROP TABLE IF EXISTS `attackenset`; -CREATE TABLE `attackenset` ( - `Char_ID` INT NOT NULL, - `Attack_ID` INT NOT NULL, - `Type` INT NOT NULL DEFAULT 1, - `Round` INT(2) NOT NULL, - PRIMARY KEY (`Char_ID`, `Type`, `Round`), - CONSTRAINT `attackenset_char_id` FOREIGN KEY `attackenset_char_id` (`Char_ID`) - REFERENCES `chars` (`id`) - ON DELETE CASCADE - ON UPDATE CASCADE, - CONSTRAINT `attackenset_attack_id` FOREIGN KEY `attackenset_attack_id` (`Attack_ID`) - REFERENCES `lernen` (`id`) - ON DELETE CASCADE - ON UPDATE CASCADE -) -ENGINE = InnoDB -CHARACTER SET utf8 COLLATE utf8_unicode_ci; - -CREATE TABLE `attack_conditions` ( - `ID` INT NOT NULL AUTO_INCREMENT, - `Name` VARCHAR(20) NOT NULL, - `Formula` VARCHAR(255) NOT NULL, - PRIMARY KEY (`ID`) -) -ENGINE = InnoDB -CHARACTER SET utf8 COLLATE utf8_unicode_ci; - - --- --- Definition of table `clan_challenge_clans` --- - -DROP TABLE IF EXISTS `clan_challenge_clans`; -CREATE TABLE `clan_challenge_clans` ( - `clan_challenge_id` int(11) NOT NULL, - `clan_id` int(11) NOT NULL, - `elo` int(11) NOT NULL, - PRIMARY KEY (`clan_id`,`clan_challenge_id`), - KEY `clan_ch_clans_ch_id` (`clan_challenge_id`), - CONSTRAINT `clan_ch_clans_ch_id` FOREIGN KEY (`clan_challenge_id`) REFERENCES `clan_challenges` (`clan_challenge_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `clan_challenge_clans` --- - -/*!40000 ALTER TABLE `clan_challenge_clans` DISABLE KEYS */; -LOCK TABLES `clan_challenge_clans` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_challenge_clans` ENABLE KEYS */; - - --- --- Definition of table `clan_challenge_participants` --- - -DROP TABLE IF EXISTS `clan_challenge_participants`; -CREATE TABLE `clan_challenge_participants` ( - `clan_challenge_id` int(11) NOT NULL, - `clan_id` int(11) NOT NULL, - `char_id` int(11) NOT NULL, - `slot` int(11) NOT NULL, - PRIMARY KEY (`clan_challenge_id`,`clan_id`,`slot`), - KEY `clan_challenge_participants_clan_id` (`clan_id`), - KEY `clan_challenge_participants_char_id` (`char_id`), - UNIQUE (`clan_challenge_id`, `clan_id`, `slot`), - CONSTRAINT `clan_challenge_participants_char_id` FOREIGN KEY (`char_id`) REFERENCES `chars` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `clan_challenge_participants_clan_id` FOREIGN KEY (`clan_challenge_id`, `clan_id`) REFERENCES `clan_challenge_clans` (`clan_challenge_id`, `clan_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `clan_challenge_participants` --- - -/*!40000 ALTER TABLE `clan_challenge_participants` DISABLE KEYS */; -LOCK TABLES `clan_challenge_participants` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_challenge_participants` ENABLE KEYS */; - - --- --- Definition of table `clan_challenge_requests` --- - -DROP TABLE IF EXISTS `clan_challenge_requests`; -CREATE TABLE `clan_challenge_requests` ( - `clan_requester` int(11) NOT NULL, - `clan_challenged` int(11) NOT NULL, - `challenged_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `type` int(11) NOT NULL, - `anzahl_chars` int(11) NOT NULL DEFAULT '5', - `active` tinyint(1) NOT NULL DEFAULT '1', - PRIMARY KEY (`clan_requester`,`clan_challenged`,`challenged_time`), - KEY `fk_clan_challenge_requests_challenged` (`clan_challenged`), - CONSTRAINT `fk_clan_challenge_requests_challenged` FOREIGN KEY (`clan_challenged`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `fk_clan_challenge_requests_requester` FOREIGN KEY (`clan_requester`) REFERENCES `clan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `clan_challenge_requests` --- - -/*!40000 ALTER TABLE `clan_challenge_requests` DISABLE KEYS */; -LOCK TABLES `clan_challenge_requests` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_challenge_requests` ENABLE KEYS */; - - --- --- Definition of table `clan_challenges` --- - -DROP TABLE IF EXISTS `clan_challenges`; -CREATE TABLE `clan_challenges` ( - `clan_challenge_id` int(11) NOT NULL AUTO_INCREMENT, - `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `calculated` tinyint(1) NOT NULL, - `type` int(11) NOT NULL, - `anzahl_chars` int(11) NOT NULL, - PRIMARY KEY (`clan_challenge_id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; - --- --- Dumping data for table `clan_challenges` --- - -/*!40000 ALTER TABLE `clan_challenges` DISABLE KEYS */; -LOCK TABLES `clan_challenges` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `clan_challenges` ENABLE KEYS */; - - - - - --- --- Definition of table `event_chars` --- - -DROP TABLE IF EXISTS `event_chars`; -CREATE TABLE `event_chars` ( - `event_char_id` int(11) unsigned NOT NULL, - `char_id` int(11) DEFAULT NULL, - `char_name` varchar(30) NOT NULL, - `char_bild` varchar(100) NOT NULL, - `user_id` int(11) DEFAULT NULL, - `user_name` varchar(30) NOT NULL, - `event_id` int(11) unsigned NOT NULL, - `block_begin` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - `block_end` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - `hp` int(11) NOT NULL, - `mp` int(11) NOT NULL, - `strength` int(11) NOT NULL, - `speed` int(11) NOT NULL, - `defense` int(11) NOT NULL, - `luck` int(11) NOT NULL, - `stamina` int(11) NOT NULL, - PRIMARY KEY (`event_id`,`event_char_id`), - KEY `char_bild` (`char_bild`), - CONSTRAINT `event_chars_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `event_chars` --- - -/*!40000 ALTER TABLE `event_chars` DISABLE KEYS */; -LOCK TABLES `event_chars` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `event_chars` ENABLE KEYS */; - - --- --- Definition of table `event_fight_rounds` --- - -DROP TABLE IF EXISTS `event_fight_rounds`; -CREATE TABLE `event_fight_rounds` ( - `event_id` int(10) unsigned NOT NULL, - `event_fight_id` int(10) unsigned NOT NULL, - `event_char_id` int(10) unsigned NOT NULL, - `round` int(10) unsigned NOT NULL, - `hp` int(11) NOT NULL, - `mp` int(11) NOT NULL, - `strength` int(11) NOT NULL, - `speed` int(11) NOT NULL, - `defense` int(11) NOT NULL, - `luck` int(11) NOT NULL, - `stamina` int(11) NOT NULL, - `attack` varchar(30) NOT NULL, - `damage` varchar(30) NOT NULL, - PRIMARY KEY (`event_id`,`event_fight_id`,`event_char_id`,`round`), - KEY `event_fight_rounds_chars` (`event_id`,`event_char_id`), - CONSTRAINT `event_fight_rounds_chars` FOREIGN KEY (`event_id`, `event_char_id`) REFERENCES `event_chars` (`event_id`, `event_char_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `event_fight_rounds_event_figths` FOREIGN KEY (`event_id`, `event_fight_id`) REFERENCES `event_fights` (`event_id`, `event_fight_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- --- Dumping data for table `event_fight_rounds` --- - -/*!40000 ALTER TABLE `event_fight_rounds` DISABLE KEYS */; -LOCK TABLES `event_fight_rounds` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `event_fight_rounds` ENABLE KEYS */; - - --- --- Definition of table `event_fights` --- - -DROP TABLE IF EXISTS `event_fights`; -CREATE TABLE `event_fights` ( - `event_id` int(10) unsigned NOT NULL, - `event_fight_id` int(10) unsigned NOT NULL, - PRIMARY KEY (`event_id`,`event_fight_id`), - UNIQUE KEY `new_index` (`event_fight_id`), - CONSTRAINT `event_fights_event_id` FOREIGN KEY (`event_id`) REFERENCES `events` (`event_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --- --- Dumping data for table `event_fights` --- - -/*!40000 ALTER TABLE `event_fights` DISABLE KEYS */; -LOCK TABLES `event_fights` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `event_fights` ENABLE KEYS */; - - --- --- Definition of table `events` --- - -DROP TABLE IF EXISTS `events`; -CREATE TABLE `events` ( - `event_id` int(11) unsigned NOT NULL, - `event_type` int(11) unsigned NOT NULL, - PRIMARY KEY (`event_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; - - - -DROP TABLE IF EXISTS `defines`; -CREATE TABLE `defines` ( - `key` VARCHAR(30) NOT NULL, - `value` VARCHAR(20) NOT NULL, - `editable` BOOLEAN NOT NULL, - PRIMARY KEY (`key`) -) -ENGINE = InnoDB -CHARACTER SET utf8 COLLATE utf8_general_ci; - - --- --- Dumping data for table `events` --- - -/*!40000 ALTER TABLE `events` DISABLE KEYS */; -LOCK TABLES `events` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `events` ENABLE KEYS */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -2519,4 +1848,4 @@ UNLOCK TABLES; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; \ No newline at end of file diff --git a/db/clankampf_sql_create_table.txt b/db/clankampf_sql_create_table.txt deleted file mode 100644 index 65513c7..0000000 --- a/db/clankampf_sql_create_table.txt +++ /dev/null @@ -1,43 +0,0 @@ -DROP TABLE IF EXISTS `test_ag`.`clan_fight_list`; -CREATE TABLE `test_ag`.`clan_fight_list` ( - `id` int(13) NOT NULL auto_increment, - `clan` int(13) NOT NULL, - `gclan` int(13) NOT NULL, - `fighter` varchar(150) character set latin1 NOT NULL, - `gfighter` varchar(150) character set latin1 NOT NULL, - `clanfighttyp` int(13) NOT NULL, - `numberoffighter` int(13) NOT NULL, - `zeitpunkt` varchar(10) collate utf8_unicode_ci NOT NULL, - `status` int(5) NOT NULL, - `score_set` smallint(1) NOT NULL default '0', - PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; - -DROP TABLE IF EXISTS `test_ag`.`clan_fights`; -CREATE TABLE `test_ag`.`clan_fights` ( - `id` int(13) unsigned NOT NULL auto_increment, - `hp1` varchar(255) collate utf8_unicode_ci NOT NULL, - `hp2` varchar(255) collate utf8_unicode_ci NOT NULL, - `mp1` varchar(255) collate utf8_unicode_ci NOT NULL, - `mp2` varchar(255) collate utf8_unicode_ci NOT NULL, - `attacke1` text collate utf8_unicode_ci NOT NULL, - `attacke2` text collate utf8_unicode_ci NOT NULL, - `schaden1` text collate utf8_unicode_ci NOT NULL, - `schaden2` text collate utf8_unicode_ci NOT NULL, - `char1` int(20) NOT NULL default '0', - `char2` int(20) NOT NULL default '0', - `starke1` text collate utf8_unicode_ci NOT NULL, - `ver1` text collate utf8_unicode_ci NOT NULL, - `speed1` text collate utf8_unicode_ci NOT NULL, - `starke2` text collate utf8_unicode_ci NOT NULL, - `ver2` text collate utf8_unicode_ci NOT NULL, - `speed2` text collate utf8_unicode_ci NOT NULL, - `ausdauer1` varchar(255) collate utf8_unicode_ci NOT NULL, - `ausdauer2` varchar(255) collate utf8_unicode_ci NOT NULL, - `clanfight_id` int(20) NOT NULL default '0', - `runde` int(20) NOT NULL default '0', - `kampf` int(10) NOT NULL default '0', - `win` int(10) NOT NULL, - `lose` int(10) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; \ No newline at end of file