removing errors and notices

This commit is contained in:
lopar 2018-03-09 00:30:57 +02:00
parent b115f4823b
commit d91463b2eb

View File

@ -1644,16 +1644,22 @@ function setHP($hp, $maxhp)
function echoscroll($slot)
{
global $user;
if ($user['battle']) {
$script = 'fbattle';
} else {
$script = 'main';
}
if ($user['battle'] > 0) $bat = db::c()->query('SELECT `id`, `magic` FROM `battle` WHERE `id` = ?i', $user['battle'])->fetch_assoc();
$all_magic = unserialize($bat['magic']);
$all_magic = 0;
if ($user['battle'] > 0) {
$bat = db::c()->query('SELECT `magic` FROM `battle` WHERE `id` = ?i', $user['battle'])->fetch_assoc();
$all_magic = unserialize($bat['magic']);
}
$dress = db::c()->query('SELECT `id`, `magic`, `name`, `img`, `duration`, `maxdur` FROM `inventory` WHERE `id` = ?i', $user[$slot])->fetch_assoc();
$need_charge = db::c()->query('SELECT `needcharge` FROM `magic` WHERE `id` = ?i', $dress['magic'])->fetch_assoc();
if (($user[$slot] > 0) && ($all_magic[$user['id']] < 1 || $need_charge['needcharge'] == 0)) {
$row['id'] = $user[$slot];
if ($dress['magic']) {
@ -2566,14 +2572,14 @@ function showpersout($pas = 0)
// echo "<TR><TD><IMG height=25 src=\"i/travma.gif\" width=40></TD><TD><SMALL>У персонажа $trt травма.</SMALL></TD></TR>";
// }
$dd = db::c()->query('SELECT `time`, `type` FROM `effects` WHERE `owner` = ?i', $user['id']);
$param_bonus = [];
array_fill_keys($param_bonus, 0);
while ($row = $dd->fetch_assoc()) {
if ($row['time'] < time()) {
$row['time'] = time();
}
if ($row['type'] == 21) {
$param_bonus = array();
$param_bonus = [];
$param_bonus['sila'] = $row['sila'];
$param_bonus['lovk'] = $row['lovk'];
$param_bonus['inta'] = $row['inta'];