diff --git a/magic/healing.php b/magic/healing.php index 686937f..a59e659 100644 --- a/magic/healing.php +++ b/magic/healing.php @@ -48,7 +48,7 @@ if ($chance > 95) $chance = 95; $mage_intellect = 0; $mage_intellect = $user['intel']; //Данные игрока, на которого колдуем -$receiver = db::c()->query('SELECT *, (select `id` from `online` WHERE `id` = `users`.`id` AND `date` >= ?i) as `online` FROM `users` WHERE `login` = "?s"', time() - 60, $_POST['target'])->fetch_assoc(); +$receiver = db::c()->query('SELECT `id`, `hp`, `maxhp`, `battle`, `room`, (select `id` from `online` WHERE `id` = `users`.`id` AND `date` >= ?i) as `online` FROM `users` WHERE `login` = "?s"', time() - 60, $target)->fetch_assoc(); //Сила заклинания (на сколько лечим) //Если не указано, лечим на случайное значение от 0 до уровня интеллекта мага. $magic_power = mt_rand(0, $mage_intellect); @@ -92,7 +92,7 @@ if ($receiver['battle'] != $user['battle']) { } db::c()->query('UPDATE `users` SET `hp` = ?i WHERE `id` = ?i', $new_hp, $receiver['id']); - $status = "Вы восстановили {$magic_power} НР персонажу {$receiver['login']}!"; + $status = "Вы восстановили {$magic_power} НР персонажу {$target}!"; } else { $status = "Свиток рассыпался в ваших руках..."; }