|
|
@ -131,7 +131,7 @@ function retrieveParticipants($tournament_type) {
|
|
|
|
|
|
|
|
|
|
|
|
$anzahl = $tournament_type['competitors']; // Anzahl (benötigt)
|
|
|
|
$anzahl = $tournament_type['competitors']; // Anzahl (benötigt)
|
|
|
|
$gain = $tournament_type['gain']; // ('Anmeldung', 'PL', 'Level')
|
|
|
|
$gain = $tournament_type['gain']; // ('Anmeldung', 'PL', 'Level')
|
|
|
|
$itemless = !$_GET['without_equip']; // gibt an ob das turnier die items ingorieren soll (standard sind items aktiv)
|
|
|
|
$itemless = $_GET['without_equip']; // gibt an ob das turnier die items ingorieren soll (standard sind items aktiv)
|
|
|
|
|
|
|
|
|
|
|
|
$sql = 'SELECT count(*) as anzahl from chars c where '.$filter_sql;
|
|
|
|
$sql = 'SELECT count(*) as anzahl from chars c where '.$filter_sql;
|
|
|
|
|
|
|
|
|
|
|
@ -294,3 +294,24 @@ function calculateTournament($tournament, $participants) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getFruitItem( $fruit_type, $drop_chance ) {
|
|
|
|
|
|
|
|
$item_hash = NULL;
|
|
|
|
|
|
|
|
if ( $drop_chance == 0 ) {
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
} else if($drop_chance >= 100 || $drop_chance >= mt_random_wrapper(1, 100)) {
|
|
|
|
|
|
|
|
if ($fruit_type == 'natur') {
|
|
|
|
|
|
|
|
$sql = 'SELECT id FROM wochen_markt WHERE art=\''.$fruit_type.'\' order by rand() LIMIT 1';
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$sql = 'SELECT id FROM wochen_markt WHERE kategorie=\''.$fruit_type.'\' order by rand() LIMIT 1';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$qry = db_query($sql);
|
|
|
|
|
|
|
|
$id = mysqli_fetch_row($qry)[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$item_hash = item2Value(array('id' => $id, 'table_name' => 'wochen_markt'));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return $item_hash;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|