Файл: inc/regeneration.php
Строк: 26
<?php
$date = time();
$be=mysql_fetch_array(mysql_query("SELECT * FROM `account` WHERE `id`= '$account[id]' LIMIT 1"));
$k_point=intval((time()-$be['regenerator'])/10);
if($k_point>=1){
$newhp=$account[hp]+1*$k_point;
$newmp=$account[mp]+1*$k_point;
if($newhp>$account[hpall]){$newhp=$account[hpall];}
if($newmp>$account[mpall]){$newmp=$account[mpall];}
mysql_query("UPDATE `account` SET `hp`= '$newhp',`mp`='$newmp',`regenerator` = '$date' WHERE `id`='$account[id]' LIMIT 1");
}
?>