remove runes
This commit is contained in:
parent
094b8a6027
commit
f3503a0fad
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
ыр<?php
|
||||
/**
|
||||
* Copyright (c) 2018.
|
||||
* Author: Igor Barkov <lopar.4ever@gmail.com>
|
||||
@ -1456,17 +1456,6 @@ function showpersout($pas = 0) //FIXME Сделать по человеческ
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<table cellspacing="0" cellpadding="0" border="0"
|
||||
style="background: url('i/runes_slots.jpg') no-repeat center bottom;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="59" height="48" align="right"><?= show_rune(1, $user['id']) ?></td>
|
||||
<td width="74" height="48" align="center"><?= show_rune(2, $user['id']) ?></td>
|
||||
<td width="57" height="48" align="left"><?= show_rune(3, $user['id']) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<TABLE cellPadding=0 cellSpacing=0 width="100%">
|
||||
<TBODY>
|
||||
<?
|
||||
@ -1688,7 +1677,7 @@ function showitem($row, $type = null, $returned = false, $infOnly = false)
|
||||
if ($type != 10) {
|
||||
$returnHTML .= '<br />ID: ' . $row['id'] . '<br />';
|
||||
if ($row["koll"] > 1) $returnHTML .= "<a title=\"Разделить\" onclick=\"splitstack('$row[name]','main.php?edit=1&unstack=$row[id]', '$row[img]', 1);return false;\" href=\"javascript:void(0)\"><img border=\"0\" src=\"i/unstack.gif\"></a> ";
|
||||
$returnHTML .= "<img src=i/clear.gif style=\"cursor:hand;\" onclick=\"delItmsNo('Выкинуть предмет?','deleteItems',0,'','" . $row['img'] . "','" . $row['name'] . "','main.php?edit=1&destruct=" . $row['id'] . "');\"></TD><td>";
|
||||
$returnHTML .= "<img src=i/clear.gif style=\"cursor:hand;\" onclick=\"delItmsNo('Выкинуть предмет?','deleteItems',0,'','" . $row['img'] . "','" . $row['name'] . "','main.php?edit=1&destruct=" . $row['id'] . ";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1876,34 +1865,6 @@ function showitem($row, $type = null, $returned = false, $infOnly = false)
|
||||
echo $returnHTML;
|
||||
}
|
||||
|
||||
function show_rune($slot, $uid, $type = 0)
|
||||
{
|
||||
global $user;
|
||||
$runes_exp = ['1' => 10500, '2' => 23500, '3' => 38500, '4' => 57000, '5' => 77000, '6' => 103000, '7' => 136500, '8' => 171500, '9' => 212500, '10' => 257500];
|
||||
$us = db::c()->query('SELECT `id`, `rune_1`, `rune_2`, `rune_3` FROM `users` WHERE `id` = ?i', $uid)->fetch_assoc();
|
||||
if (isset($us['id'])) {
|
||||
if ($us['rune_' . $slot] > 0) {
|
||||
$ruid = $us['rune_' . $slot];
|
||||
$rtype = (23 + $slot);
|
||||
$dress = db::c()->query('SELECT `id`, `img`, `name`, `duration`, `maxdur`, `rune_level`, `rune_exp` FROM `inventory` WHERE `id` = ?i AND `owner` = ?i', $ruid, $us['id'])->fetch_assoc();
|
||||
if (isset($dress['id'])) {
|
||||
if ($us['id'] == $user['id'] && $type == 1) {
|
||||
$r = '<a href=\'main.php?edit=1&drop=' . $rtype . '\'><img class=\'tooltip\' src="i/sh/' . $dress['img'] . '" width="30" height="30" title="Снять <b>' . $dress['name'] . '</b><br />Уровень: ' . $dress['rune_level'] . '<br />Опыт: ' . $dress['rune_exp'] . '/' . $runes_exp[$dress['rune_level'] + 1] . '<br />Прочность: ' . $dress['duration'] . '/' . $dress['maxdur'] . '" /></a>';
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/sh/' . $dress['img'] . '" width="30" height="30" title="<b>' . $dress['name'] . '</b><br />Уровень: ' . $dress['rune_level'] . '<br />Прочность : ' . $dress['duration'] . '/' . $dress['maxdur'] . '" />';
|
||||
}
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/none.gif" width="30" height="30" title="<b>Пустой слот Руна</b>" />';
|
||||
}
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/none.gif" width="30" height="30" title="<b>Пустой слот Руна</b>" />';
|
||||
}
|
||||
} else {
|
||||
$r = '<img class=\'tooltip\' src="i/none.gif" width="30" height="30" title="<b>Пустой слот Руна</b>" />';
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
function undressall($id)
|
||||
{
|
||||
for ($i = 1; $i <= 26; $i++) {
|
||||
@ -1984,15 +1945,6 @@ function dropitemid($slot, $id)
|
||||
case 23:
|
||||
$slot1 = 'plaw';
|
||||
break;
|
||||
case 24:
|
||||
$slot1 = 'rune_1';
|
||||
break;
|
||||
case 25:
|
||||
$slot1 = 'rune_2';
|
||||
break;
|
||||
case 26:
|
||||
$slot1 = 'rune_3';
|
||||
break;
|
||||
default:
|
||||
$slot1 = '';
|
||||
break;
|
||||
@ -2082,15 +2034,6 @@ function dropitem($slot)
|
||||
case 23:
|
||||
$slot1 = 'plaw';
|
||||
break;
|
||||
case 24:
|
||||
$slot1 = 'rune_1';
|
||||
break;
|
||||
case 25:
|
||||
$slot1 = 'rune_2';
|
||||
break;
|
||||
case 26:
|
||||
$slot1 = 'rune_3';
|
||||
break;
|
||||
default:
|
||||
$slot1 = '';
|
||||
break;
|
||||
@ -2308,15 +2251,6 @@ function destructitem($id)
|
||||
case 23:
|
||||
$slot1 = 'plaw';
|
||||
break;
|
||||
case 24:
|
||||
$slot1 = 'rune_1';
|
||||
break;
|
||||
case 25:
|
||||
$slot1 = 'rune_2';
|
||||
break;
|
||||
case 26:
|
||||
$slot1 = 'rune_3';
|
||||
break;
|
||||
}
|
||||
if ($dress['type'] == 5) {
|
||||
if ($user['r1'] == $dress['id']) {
|
||||
@ -2326,14 +2260,6 @@ function destructitem($id)
|
||||
} elseif ($user['r3'] == $dress['id']) {
|
||||
$slot1 = 'r3';
|
||||
}
|
||||
} elseif ($dress['type'] == 24) {
|
||||
if ($user['rune_1'] == $dress['id']) {
|
||||
$slot1 = 'rune_1';
|
||||
} elseif ($user['rune_2'] == $dress['id']) {
|
||||
$slot1 = 'rune_2';
|
||||
} elseif ($user['rune_3'] == $dress['id']) {
|
||||
$slot1 = 'rune_3';
|
||||
}
|
||||
} elseif ($dress['type'] == 12) {
|
||||
if ($user['m1'] == $dress['id']) {
|
||||
$slot1 = 'm1';
|
||||
|
35
main.php
35
main.php
@ -248,15 +248,6 @@ function dressitem($id)
|
||||
case 23:
|
||||
$slot1 = 'plaw';
|
||||
break;
|
||||
case 24:
|
||||
$slot1 = 'rune_1';
|
||||
break;
|
||||
case 25:
|
||||
$slot1 = 'rune_2';
|
||||
break;
|
||||
case 26:
|
||||
$slot1 = 'rune_3';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($item['type'] == 5) {
|
||||
@ -270,17 +261,6 @@ function dressitem($id)
|
||||
$slot1 = 'r1';
|
||||
dropitem(5);
|
||||
}
|
||||
} elseif ($item['type'] == 24) {
|
||||
if (!$user['rune_1']) {
|
||||
$slot1 = 'rune_1';
|
||||
} elseif (!$user['rune_2']) {
|
||||
$slot1 = 'rune_2';
|
||||
} elseif (!$user['rune_3']) {
|
||||
$slot1 = 'rune_3';
|
||||
} else {
|
||||
$slot1 = 'rune_1';
|
||||
dropitem(24);
|
||||
}
|
||||
} elseif ($item['type'] == 12) {
|
||||
if (!$user['m1']) {
|
||||
$slot1 = 'm1';
|
||||
@ -604,17 +584,6 @@ function showpersinv($id)
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0"
|
||||
style="background: url('http://i.oldbk.com/i/runes_slots.jpg') no-repeat center bottom;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="59" height="48" align="right"><? echo show_rune(1, $user['id'], 1); ?></td>
|
||||
<td width="74" height="48" align="center"><? echo show_rune(2, $user['id'], 1); ?></td>
|
||||
<td width="57" height="48" align="left"><? echo show_rune(3, $user['id'], 1); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</CENTER> <?php
|
||||
}
|
||||
|
||||
@ -1609,12 +1578,12 @@ if (input::get('edit')) {
|
||||
$q = db::c()->query('SELECT `id` FROM `komplekt` WHERE `name` = "?s" AND `owner` = ?i', input::get('savecomplect'), $_SESSION['uid'])->getNumRows();
|
||||
if (empty($q)) {
|
||||
$items = [];
|
||||
$q2 = db::c()->query('SELECT `id` FROM `inventory` WHERE `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i',
|
||||
$q2 = db::c()->query('SELECT `id` FROM `inventory` WHERE `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i',
|
||||
$user['sergi'], $user['kulon'], $user['perchi'], $user['weap'],
|
||||
$user['bron'], $user['rybax'], $user['r1'], $user['r2'], $user['r3'],
|
||||
$user['helm'], $user['shit'], $user['m1'], $user['m2'], $user['m3'],
|
||||
$user['m4'], $user['m5'], $user['m6'], $user['m7'], $user['m8'], $user['m9'], $user['m10'],
|
||||
$user['boots'], $user['plaw'], $user['rune_1'], $user['rune_2'], $user['rune_3']);
|
||||
$user['boots'], $user['plaw']);
|
||||
while ($res = $q2->fetch_assoc()) $items[] = $res['id'];
|
||||
$t_items = implode(";", $items);
|
||||
db::c()->query('INSERT INTO `komplekt` (`name`, `owner`, `items`) VALUES ("?s",?i,"?s")', input::get('savecomplect'), $_SESSION['uid'], $t_items);
|
||||
|
Loading…
Reference in New Issue
Block a user