Bug behoben (benutzen von Früchten)

Im Anfängerturnier können keine Charaktere mit TF's teilnehmen
main
radiskull 14 years ago
parent 519f8f7ea0
commit 9b6bbe77b7

@ -35,6 +35,7 @@ include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/monster.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/npc.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/shop.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/user.inc.php');
include_once($_SERVER['DOCUMENT_ROOT'].'ag/gm/include/tournament.inc.php');
function logaction($message){
$sql = 'Insert into gm_actions(userid, time, message, ip) values('.$_SESSION['user'].', now(), \''.$message.'\', \''.$_SERVER['REMOTE_ADDR'].'\')';
@ -149,6 +150,12 @@ function displayOptions(){
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=bann">Banns und andere unsch&ouml;ne Sachen</a>
</td>
</tr>
<tr>
<td>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=tournament">Turniere</a>
</td>
</tr>
<tr>
<tr>
<td>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?choose=qnpc">Monster bearbeiten</a>
@ -242,9 +249,10 @@ if(checkLoginData($_SESSION['user'],$_SESSION['password'])){
} else if($_REQUEST['choose'] == 'shop'){
displayShop($_REQUEST['action'], $_REQUEST['s_id'],$_REQUEST['info'], $_REQUEST['s_name'] , $_REQUEST['s2_name'], $_REQUEST['s3_name'], $_REQUEST['s_typ'], $_REQUEST['preis'], $_REQUEST['frei'], $_REQUEST['anzahl']);
} else if($_REQUEST['choose'] == 'usergroups'){
//displayUserGroups($_REQUEST['action'], $_REQUEST['uname']);
displayUserGroups($_REQUEST['action'] ,$_REQUEST['uname'] ,$_REQUEST['ugname'], $_REQUEST['delete'], $_REQUEST['add']);
} else {
} else if($_REQUEST['choose'] == 'tournament'){
displayTournamentOptions($_REQUEST['action']);
}else {
displayOptions();
}
} else if(isset($_POST['user'])){

@ -14,8 +14,10 @@ function displayNPC($action, $task, $charid, $table, $page, $data){
echo "\t".'<input type="hidden" name="choose" value="items"></input>'."\n";
echo "\t".'<table width="80%">'."\n";
if($action == 'edit'){
$d_array = array('charakter', 'name', 'zeit_rec', 'lvlmin', 'lvlmax');
$desc_array = array('ID', 'Name', 'Kampfdauer in Sekunden', 'Min-Level', 'Max-Level');
$d_array = array('charakter', 'name', 'type', 'hp', 'mp', 'starke', 'verteidigung', 'speed',
'ausdauer', 'glueck', 'zeit_rec', 'lvlmin', 'lvlmax');
$desc_array = array('ID', 'Name', 'Type', 'HP', 'MP', 'Stärke', 'Verteidigung', 'Geschwindigkeit',
'Ausdauer', 'Glück', 'Kampfdauer in Sekunden', 'Min-Level', 'Max-Level');
$sql = 'SELECT * FROM chars c inner join npc_item ni on ni.charakter = c.id inner join kampf_list kl on ni.charakter = kl.charakter WHERE c.id ='.$charid;
$qry = mysql_query($sql);

@ -0,0 +1,123 @@
<?php
/*
* Created on 31.05.2011
*
* @copyright (c) 2011 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
print_r($_GET);
?>
<?php
function displayTournamentOptions($action) {
/*if($action === "starttnmt") {
if(is_numeric($_REQUEST['anzahl']) && is_numeric($_REQUEST['minlevel']) && is_numeric($_REQUEST['maxlevel'])
&& is_numeric($_REQUEST['grp_size']) && is_numeric($_REQUEST['grp_proceed'])) {
include_once($_SERVER['DOCUMENT_ROOT'].'cronjob/generic_turnier.php');
} else {
echo 'Keine gültige Eingabe<br>';
echo '<a href="'.$_SERVER['PHP_SELF'].'?choose=tournament">Zur&uuml;ck</a>';
}
} else {*/
?>
<!-- <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET" onSubmit="start();">
<input type="hidden" name="choose" value="tournament"> <input
type="hidden" name="action" value="starttnmt"> -->
<table width="80%">
<tr>
<th colspan="2"><h1 style="text-align: center">Übersicht</h1></th>
</tr>
<tr>
<td>Art</td>
<td style="text-align: center"><select id="input" name="name">
<option value="klein">Anf&auml;ngerturnier</option>
<option value="wochen">Wochenturnier</option>
<option value="gross">Weltturnier</option>
</select>
</td>
</tr>
<tr>
<td>Anzahl</td>
<td style="text-align: center"><input name="anzahl" value=""></td>
</tr>
<tr>
<td>Fusion erlaubt?</td>
<td style="text-align: center"><select id="input" name="fusion">
<option value="1">ja</option>
<option value="0">nein</option>
</select>
</td>
</tr>
<tr>
<td>Spezialcharaktere erlaubt? (Kaio/Shichi)</td>
<td style="text-align: center"><select id="input" name="fusion">
<option value="1">ja</option>
<option value="0">nein</option>
</select>
</td>
</tr>
<tr>
<td>Min. Level</td>
<td style="text-align: center"><input name="minlevel" value="1"></td>
</tr>
<tr>
<td>Max. Level</td>
<td style="text-align: center"><input name="maxlevel" value="150"></td>
</tr>
<tr>
<td>Teilnehmer</td>
<td style="text-align: center"><select id="input" name="gain">
<option value="Anmeldung">Anmeldung</option>
<option value="PL">Powerlevel</option>
<option value="Level">Level</option>
</select>
</td>
</tr>
<tr>
<td>Zufällige Reihenfolge?</td>
<td style="text-align: center"><select id="input" name="randomize">
<option value="1">ja</option>
<option value="0">nein</option>
</select>
</td>
</tr>
<tr>
<td>Gruppenphase?</td>
<td style="text-align: center"><select id="input" name="gruppenphase">
<option value="0">nein</option>
<option value="1">ja</option>
</select>
</td>
</tr>
<tr>
<td>Gruppengr&ouml;sse</td>
<td style="text-align: center"><input name="grp_size" value="0"></td>
</tr>
<tr>
<td>Anzahl der Sieger die eine Gruppe verlassen</td>
<td style="text-align: center"><input name="grp_proceed" value="0"></td>
</tr>
<tr>
<td align="center" colspan="2"><a href="include/tournament.inc.php"
target="_blank">Turnier starten!</a></td>
<!-- <td align="center" colspan="2"><input type="submit" value="start" />
<?php $_SERVER['DOCUMENT_ROOT'].'cronjob/generic_turnier.php'?>
</td> -->
</tr>
<tr>
<td><br>
</td>
</tr>
<tr>
<td align="center" colspan="2"><a
href="<?php echo $_SERVER['PHP_SELF']; ?>">Zum Hauptmenu</a>
</td>
</tr>
</table>
<!-- </form> -->
<?php
}
//}
?>

@ -138,13 +138,10 @@ if ($charm == 6) {
exit;
}
if ($char_id1['status'] != 'frei') {
if ($char_id1['status'] != 'Frei') {
displayErrorMessage(NULL,'Dieser Charakter ist nicht frei!', displayHistoryBackLink());
exit;
}
echo 'vars:';
print_r($char_id1);
}
$hp1 = explode(",", $char_id1['hp']);
$mp1 = explode(",", $char_id1['mp']);

@ -93,7 +93,6 @@ function changeProfil($user, $usergroups, $new_pw, $new_nick, $new_nick2, $alt_p
removeUserFromGroup($user['nickname'], Werbung_an);
}
}
echo 'Accountdelete: '.$acc_delete;
if($acc_delete == 1) {
if(!isUserInGroup($usergroups, aktiv_loeschschutz)) {
addUserToGroup($user['nickname'], aktiv_loeschschutz);

@ -40,12 +40,12 @@ function anmelden($user, $charid, $art){
if($art == 'klein'){
// Char darf max lvl 25 haben und keine Fusion sein
$special_clue = 'AND level<=25 AND fusion =\'nein\' AND char_type = \'\' ';
$special_clue = 'AND level<=25 AND fusion =\'nein\' AND char_type = \'\' AND id not in (SELECT c.id FROM chars c RIGHT JOIN wochen_markt wm on c.frucht=wm.item where c.id = \''.$charid.'\')';
$anzahl = 32;
} else{
$anzahl = 64;
}
// sehr speziell und deswegen nicht getChar();
// sehr speziell und deswegen nicht getChar();
$PRUEF = mysql_num_rows(mysql_query('SELECT id FROM chars WHERE id=\''.$charid.'\' '.$special_clue.' AND besitzer=\''.$user['id'].'\' LIMIT 1'));
if(!$PRUEF) {
displayErrorMessage(NULL,'Charakter erf&uuml;llt die Bestimungen nicht!','<a href="index.php?as=turnier&art='.$art.'">weiter...</a>');

Loading…
Cancel
Save