Ещё больше Undefined index fix

This commit is contained in:
Igor Barkov [iwork] 2018-12-11 16:09:11 +02:00
parent 4a2c246203
commit 53fe3e2ce2

View File

@ -1642,28 +1642,25 @@ function showitem($row, $type, $returned = false, $infOnly = false)
global $user;
$runes_exp = ['1' => 10500, '2' => 23500, '3' => 38500, '4' => 57000, '5' => 77000, '6' => 103000, '7' => 136500, '8' => 171500, '9' => 212500, '10' => 257500];
$returnHTML = '';
$magic['chanse'] = 0;
$magic['time'] = 0;
$magic['targeted'] = 0;
$incmagic = [];
$up = '';
if ((($row['maxdur'] <= ($row['duration'])) || ($row['dategoden'] && $row['dategoden'] <= time()))) {
destructitem($row['id']);
}
if (!empty($row['includemagic'])) $incmagic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['includemagic'])->fetch_assoc();
if (!empty($row['magic'])) $magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc();
else {
$magic['chanse'] = $incmagic['chanse'];
$magic['time'] = $incmagic['time'];
$magic['targeted'] = $incmagic['targeted'];
if (!empty($row['includemagic'])) {
$incmagic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['includemagic'])->fetch_assoc();
$incmagic['name'] = $row['includemagicname'];
$incmagic['cur'] = $row['includemagicdex'];
$incmagic['max'] = $row['includemagicmax'];
if (empty($magic)) {
$magic['chanse'] = $incmagic['chanse'];
$magic['time'] = $incmagic['time'];
$magic['targeted'] = $incmagic['targeted'];
}
}
$incmagic['name'] = $row['includemagicname'];
$incmagic['cur'] = $row['includemagicdex'];
$incmagic['max'] = $row['includemagicmax'];
$returnHTML .= '<TR bgcolor="#C7C7C7">';
if ((empty($row['count']) || $type == 10) && $infOnly == false) {