|
|
|
@ -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 . '<br>';
|
|
|
|
|
// echo $sql . '<br>';
|
|
|
|
|
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 . '<br>';
|
|
|
|
|
// echo $sql . '<br>';
|
|
|
|
|
mysql_query($sql);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -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'];
|
|
|
|
|