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 ^^
************************************************************************/
// Put args into get
// Neccessary for cronjob execution
@ -40,7 +41,7 @@ if ($argv) {
include('db.php');
include('path.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)
@ -124,16 +125,23 @@ if($gruppenphase == 1){
mysql_query('DELETE FROM turnier_kampf WHERE art=\''.$name.'\'');
$race_type = getRaceTypeName("NPC");
// 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 ';
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){
$auswahl_kriteria .= ' AND char_type = \'\' ';
$auswahl_kriteria .= ' AND rasse NOT IN('.implode(',',$special_race_ids).') ';
}
if(is_numeric($minlevel)){

@ -5,6 +5,11 @@
* @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);
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");
while($row=mysql_fetch_array($result))
{
$charas[$row['id']]=$row;
$result=mysql_query("SELECT id FROM chars WHERE id IN(".$list.") LIMIT 250");
while($row=mysql_fetch_array($result)) {
// Nutze getChar um kompatibel mit Aenderungen der Datenstruktur zu bleiben!
$charas[$row['id']]=getChar($row['id']);
}

@ -215,7 +215,7 @@ if (mysql_num_rows($u_qry) != 0) {
mysql_query('Delete from ignolist where user in (' . $users . ') or besitzer in (' . $users . ')');
$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)) {
$char[] = $char['id'];
}

@ -5,6 +5,12 @@
* @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);
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");
while($row=mysql_fetch_array($result))
{
$charas[$row['id']]=$row;
$result=mysql_query("SELECT id FROM chars WHERE id IN(".$list.") LIMIT 500");
while($row=mysql_fetch_array($result)) {
// Nutze getChar um kompatibel mit Aenderungen der Datenstruktur zu bleiben!
$charas[$row['id']]=getChar($row['id']);
}
$a8=0;

Loading…
Cancel
Save