Файл: DARK WARS/dark_war/attack/finish.php
Строк: 54
<?php
if ($forwards['hp'] <= 0) {
$rand_msg = ini::array_ini('../files_ini/view_msg_attack.ini', true);
$msg = $rand_msg['defiat'][mt_rand(0,7)] . "nrВаш противник был $ank->nick";
$jo = new journal($player->id, $msg, 'После наподения');
$msg1 = $rand_msg['victory'][mt_rand(0,7)] . "nrВаш противник был $player->nick";
$jo = new journal($ank->id, $msg1, 'На вас напали');
mysql_query("DELETE FROM `dark_war_attack` WHERE `id_player` = '{$player->id}' LIMIT 1");
mysql_query("DELETE FROM `dark_war_attack` WHERE `number` = '{$player->id}' LIMIT 1");
mysql_query("UPDATE `dark_war_users` SET `energy` = (`energy`-'2'), `hp` = '10', `mp` = '$forwards[mp]' WHERE `id` = '{$player->id}'");
header ("Location: /dark_war/my_profil.php");
exit;
} elseif ($defending['hp'] <= 0) {
$rand_msg = ini::array_ini('../files_ini/view_msg_attack.ini', true);
$msg = $rand_msg['defiat'][mt_rand(0,7)] . "nrВаш противник был $player->nick";
$jo = new journal($ank->id, $msg, 'На вас напали');
$msg1 = $rand_msg['victory'][mt_rand(0,7)] . "nrВаш противник был $ank->nick";
$jo = new journal($player->id, $msg1, 'После нападения');
mysql_query("DELETE FROM `dark_war_attack` WHERE `id_player` = '{$player->id}' LIMIT 1");
mysql_query("DELETE FROM `dark_war_attack` WHERE `number` = '{$player->id}' LIMIT 1");
$lvl = ((($ank->level + 20) - (($ank->level + 20) * 26 / 100)) * 1.7) + $ank->level;
mysql_query("UPDATE `dark_war_users` SET `present_level` = (`present_level`+'$lvl'), `energy` = (`energy`-'2'), `hp` = '$forwards[hp]', `mp` = '$forwards[mp]'
WHERE `id` = '{$player->id}'");
header ("Location: /dark_war/my_profil.php");
exit;
}
?>