Trac #130: Änderungen in den cronjobs damit diese auch mit den neuen Rassen zurecht kommt.

main
hecht 10 years ago
parent 4b5ba4e829
commit 11f7080510

@ -20,6 +20,7 @@
* bei der Schatzsuche gewünscht ^^ * bei der Schatzsuche gewünscht ^^
************************************************************************/ ************************************************************************/
// Put args into get // Put args into get
// Neccessary for cronjob execution // Neccessary for cronjob execution
@ -40,7 +41,7 @@ if ($argv) {
include('db.php'); include('db.php');
include('path.inc.php'); include('path.inc.php');
include_once(ROOT_PATH.'/include/char.inc.php'); include_once(ROOT_PATH.'/include/char.inc.php');
include_once(ROOT_PATH.'/include/rassen.inc.php');
$name = $_GET['name']; // Name des Turniers (benötigt) $name = $_GET['name']; // Name des Turniers (benötigt)
@ -124,16 +125,23 @@ if($gruppenphase == 1){
mysql_query('DELETE FROM turnier_kampf WHERE art=\''.$name.'\''); mysql_query('DELETE FROM turnier_kampf WHERE art=\''.$name.'\'');
$race_type = getRaceTypeName("NPC");
// Es sollen keine NPC mitmachen :) und nicht die Spezial Wanted NPCs // Es sollen keine NPC mitmachen :) und nicht die Spezial Wanted NPCs
$auswahl_kriteria = ' rasse != \'NPC\' '; $auswahl_kriteria = ' type!=\''.$race_type.'\'';
$auswahl_kriteria .= ' AND besitzer!=2 '; $auswahl_kriteria .= ' AND besitzer!=2 ';
if($fusion != 1){ if($fusion != 1){
$auswahl_kriteria .= ' AND fusion=\'nein\' '; $auswahl_kriteria .= ' AND fusions_rasse = \'0\' ';
}
$races = getSpecialRaceIds();
$special_race_ids = array();
foreach($races as $race) {
$special_race_ids[] = '\''.$race['id'].'\'';
} }
if($special != 1){ if($special != 1){
$auswahl_kriteria .= ' AND char_type = \'\' '; $auswahl_kriteria .= ' AND rasse NOT IN('.implode(',',$special_race_ids).') ';
} }
if(is_numeric($minlevel)){ if(is_numeric($minlevel)){

@ -5,6 +5,11 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
* *
*/ */
include('db.php');
include('path.inc.php');
include_once(ROOT_PATH.'/include/char.inc.php');
set_time_limit(0); set_time_limit(0);
function rand_array($array) function rand_array($array)
{ {
@ -54,11 +59,10 @@ while(current($test3)!=end($test2))
} }
$result=mysql_query("SELECT * FROM chars WHERE id IN(".$list.") LIMIT 250"); $result=mysql_query("SELECT id FROM chars WHERE id IN(".$list.") LIMIT 250");
while($row=mysql_fetch_array($result)) while($row=mysql_fetch_array($result)) {
{ // Nutze getChar um kompatibel mit Aenderungen der Datenstruktur zu bleiben!
$charas[$row['id']]=getChar($row['id']);
$charas[$row['id']]=$row;
} }

@ -215,7 +215,7 @@ if (mysql_num_rows($u_qry) != 0) {
mysql_query('Delete from ignolist where user in (' . $users . ') or besitzer in (' . $users . ')'); mysql_query('Delete from ignolist where user in (' . $users . ') or besitzer in (' . $users . ')');
$char = array (); $char = array ();
$c_qry = mysql_query('Select * from chars where besitzer IN (' . $users . ')'); $c_qry = mysql_query('Select id from chars where besitzer IN (' . $users . ')');
while ($row = mysql_fetch_assoc($c_qry)) { while ($row = mysql_fetch_assoc($c_qry)) {
$char[] = $char['id']; $char[] = $char['id'];
} }

@ -5,6 +5,12 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence * @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
* *
*/ */
include('db.php');
include('path.inc.php');
include_once(ROOT_PATH.'/include/char.inc.php');
set_time_limit(0); set_time_limit(0);
function rand_array($array) function rand_array($array)
{ {
@ -53,11 +59,10 @@ while(current($test3)!=end($test2))
} }
$result=mysql_query("SELECT * FROM chars WHERE id IN(".$list.") LIMIT 500"); $result=mysql_query("SELECT id FROM chars WHERE id IN(".$list.") LIMIT 500");
while($row=mysql_fetch_array($result)) while($row=mysql_fetch_array($result)) {
{ // Nutze getChar um kompatibel mit Aenderungen der Datenstruktur zu bleiben!
$charas[$row['id']]=getChar($row['id']);
$charas[$row['id']]=$row;
} }
$a8=0; $a8=0;

Loading…
Cancel
Save