code clean
This commit is contained in:
+9
-8
@@ -1650,10 +1650,10 @@ function echoscroll($slot)
|
||||
$script = 'main';
|
||||
}
|
||||
|
||||
if ($user['battle'] > 0) $bat = mysql_fetch_array(mysql_query("SELECT `id`, `magic` FROM `battle` WHERE `id` = '{$user['battle']}' LIMIT 1"));
|
||||
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']);
|
||||
$dress = mysql_fetch_array(mysql_query("SELECT `id`, `magic`, `name`, `img`, `duration`, `maxdur` FROM `inventory` WHERE `id` = '{$user[$slot]}' LIMIT 1"));
|
||||
$need_charge = mysql_fetch_array(mysql_query("SELECT `needcharge` FROM `magic` WHERE `id` = '{$dress['magic']}' LIMIT 1"));
|
||||
$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']) {
|
||||
@@ -2561,12 +2561,13 @@ function showpersout($pas = 0)
|
||||
<TBODY>
|
||||
<?
|
||||
if (!$pas) {
|
||||
if ($trt) {
|
||||
echo "<TR><TD><IMG height=25 src=\"i/travma.gif\" width=40></TD><TD><SMALL>У персонажа $trt травма.</SMALL></TD></TR>";
|
||||
}
|
||||
$dd = mysql_query("SELECT * FROM `effects` WHERE `owner` = " . $user['id'] . ";");
|
||||
// FIXME Научиться отображать травмы
|
||||
// if ($trt) {
|
||||
// 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 = [];
|
||||
while ($row = mysql_fetch_array($dd)) {
|
||||
while ($row = $dd->fetch_assoc()) {
|
||||
if ($row['time'] < time()) {
|
||||
$row['time'] = time();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user