From da7190bf7f2cfd99fb9b278493947a889c89e6fd Mon Sep 17 00:00:00 2001 From: hecht Date: Mon, 9 Jan 2012 15:14:20 +0000 Subject: [PATCH] major fix of the clan fights! --- ag/include/clan_fights.inc.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ag/include/clan_fights.inc.php b/ag/include/clan_fights.inc.php index af65502..e966b38 100644 --- a/ag/include/clan_fights.inc.php +++ b/ag/include/clan_fights.inc.php @@ -817,7 +817,7 @@ function calculateChallenge($clan_challenge_id) { echo $sql.'
'; return 'Konnte Datenbank-Anfrage nicht durchführen ... breche Skript ab!'; } - + return NULL; } @@ -842,11 +842,11 @@ function calculateDavyBackClanFight($clan_challenge_id, $event_id, array $clan_i $winner = battle($event_id, $char_clan_1, $char_clan_2, ATTACK_SET_DAVY_BACK_FIGHT, $start_time + ($runde-1) * $duration, $start_time + $runde * $duration); if($winner['id'] == $char_clan_1['id']){ $sql = 'UPDATE clan_challenge_clans SET points = points + 1 WHERE clan_challenge_id = ' . $clan_challenge_id . ' AND clan_id = ' .$clan_ids[0]; -// echo $sql . '
'; + // echo $sql . '
'; mysql_query($sql); } else { $sql = 'UPDATE clan_challenge_clans SET points = points + 1 WHERE clan_challenge_id = ' . $clan_challenge_id . ' AND clan_id = ' .$clan_ids[1]; -// echo $sql . '
'; + // echo $sql . '
'; mysql_query($sql); } } @@ -885,7 +885,7 @@ function calculateSurvivalClanFight($clan_challenge_id, $event_id, array $clan_i $char_clan_1 = $sieger; // the new array contains the adjusted health parameter mysql_query('UPDATE clan_challenge_clans SET points = points + 1 WHERE clan_challenge_id = ' . $clan_challenge_id . ' AND clan_id = ' .$clan_ids[1]); } - + } $end_time = $start_time + $runde * $duration; return $char_clan_1 != null?1:-1; @@ -926,7 +926,6 @@ function battle($event_id, array $char1, array $char2, $attack_set, $startTimest // first persist the fight and then check who was the winner and adjust the char array for him ;) persistFight($event_id, $combinedArray, $startTimestamp, $endTimestamp); - return; // now get the winners array $rounds = $combinedArray['rounds'];