removing errors and notices
This commit is contained in:
parent
b115f4823b
commit
d91463b2eb
@ -1644,16 +1644,22 @@ function setHP($hp, $maxhp)
|
|||||||
function echoscroll($slot)
|
function echoscroll($slot)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
if ($user['battle']) {
|
if ($user['battle']) {
|
||||||
$script = 'fbattle';
|
$script = 'fbattle';
|
||||||
} else {
|
} else {
|
||||||
$script = 'main';
|
$script = 'main';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user['battle'] > 0) $bat = db::c()->query('SELECT `id`, `magic` FROM `battle` WHERE `id` = ?i', $user['battle'])->fetch_assoc();
|
$all_magic = 0;
|
||||||
$all_magic = unserialize($bat['magic']);
|
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();
|
$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();
|
$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)) {
|
if (($user[$slot] > 0) && ($all_magic[$user['id']] < 1 || $need_charge['needcharge'] == 0)) {
|
||||||
$row['id'] = $user[$slot];
|
$row['id'] = $user[$slot];
|
||||||
if ($dress['magic']) {
|
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>";
|
// 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']);
|
$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()) {
|
while ($row = $dd->fetch_assoc()) {
|
||||||
if ($row['time'] < time()) {
|
if ($row['time'] < time()) {
|
||||||
$row['time'] = time();
|
$row['time'] = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row['type'] == 21) {
|
if ($row['type'] == 21) {
|
||||||
$param_bonus = array();
|
$param_bonus = [];
|
||||||
$param_bonus['sila'] = $row['sila'];
|
$param_bonus['sila'] = $row['sila'];
|
||||||
$param_bonus['lovk'] = $row['lovk'];
|
$param_bonus['lovk'] = $row['lovk'];
|
||||||
$param_bonus['inta'] = $row['inta'];
|
$param_bonus['inta'] = $row['inta'];
|
||||||
|
Loading…
Reference in New Issue
Block a user