remove unused not working magic item blinking visual effect

This commit is contained in:
lopar
2019-01-12 23:35:48 +02:00
parent 4f99781622
commit 2ffd272f48
4 changed files with 68 additions and 83 deletions
+5 -34
View File
@@ -215,50 +215,21 @@ if ($sellItemId && is_numeric($sellItemId)) {
echo "<b style='color: red;'>Вы продали \"{$dress['name']}\" $kols за " . $allcost . " кр.</b>";
}
if (isset($_GET['set']) OR isset($_POST['set'])) {
$set = empty($_GET['set']) ?: $_GET['set'];
$set = empty($_POST['set']) ?: $_POST['set'];
if (!empty($_GET['buy'])) {
$count = isset($_GET['count']) && is_numeric($_GET['count']) ? $_GET['count'] : 0;
$count = isset($_POST['count']) && is_numeric($_POST['count']) ? $_POST['count'] : 0;
if ($count < 1) {
if (!empty($_GET['count']) AND is_numeric($_GET['count']) AND $_GET['count'] < 1) {
$count = 0;
$count_ok = 0;
} else $count_ok = 1;
$dress = db::c()->query('SELECT * FROM `shop` WHERE `id`=?i', $set)->fetch_assoc();
// db::c()->query('
// INSERT INTO `inventory` (
// name, maxdur, cost, img, goden, dategoden, massa, prototype, owner,
// nlevel, nsila, nlovk, ninta, nvinos, nintel, nmudra,
// nnoj, ntopor, ndubina, nmech, nalign, nfire, nwater, nair, nearth, nlight, ngray, ndark,
// minu, maxu,
// gsila, glovk, ginta, gintel, ghp, gfire, gwater, gair, gearth, glight, ggray, gdark,
// mfkrit, mfakrit, mfuvorot, mfauvorot,
// gnoj, gtopor, gdubina, gmech,
// bron1, bron2, bron3, bron4, magic, needident,
// gmp, gmeshok, artefact, encicl, koll)
// SELECT
// name, maxdur, cost, img, goden, dategoden, massa, id, ?i,
// nlevel, nsila, nlovk, ninta, nvinos, nintel, nmudra,
// nnoj, ntopor, ndubina, nmech, nalign, nfire, nwater, nair, nearth, nlight, ngray, ndark,
// minu, maxu,
// gsila, glovk, ginta, gintel, ghp, gfire, gwater, gair, gearth, glight, ggray, gdark,
// mfkrit, mfakrit, mfuvorot, mfauvorot,
// gnoj, gtopor, gdubina, gmech,
// bron1, bron2, bron3, bron4, magic, needident,
// gmp, gmeshok, artefact, encicl, koll
// FROM shop WHERE id = inventory.prototype;
//
// ', $user['id']);
if ($count_ok == 0) {
err('Неправильно введено количество.');
} elseif (($dress['massa'] * $count + $itemWeight['m']) > (get_meshok())) {
err('Недостаточно места в рюкзаке.');
} elseif ($count_ok == 1 && ($user['money'] >= ($dress['cost'] * $count)) && ($dress['count'] >= $count)) {
} elseif ($count_ok == 1 && ($user['money'] >= ($dress['cost'] * $count)) && (($dress['count'] >= $count) OR $dress['count'] == -1)) {
$newItem = [
'prototype' => $dress['id'],
@@ -318,7 +289,7 @@ if (isset($_GET['set']) OR isset($_POST['set'])) {
for ($k = 1; $k <= $_GET['count']; $k++) {
db::c()->query('INSERT INTO `inventory` SET ?A[?i,?i,"?s",?i,?i,?i,"?s",?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,?i,"?s",?i,?i,"?s",?i,?i]', $newItem);
db::c()->query('UPDATE `shop` SET `count` = `count` - ?i WHERE `id` =?i', $count, $set);
if ($dress['count'] != -1) db::c()->query('UPDATE `shop` SET `count` = `count` - ?i WHERE `id` = ?i', $count, $set);
echo "<b style='color: red'>Вы купили {$count} шт. \"{$dress['name']}\".</b>";
$user['money'] -= $count * $dress['cost'];
db::c()->query('UPDATE `users` set `money` = ?i WHERE `id` = ?i', $user['money'], $user['id']);
@@ -507,7 +478,7 @@ switch ($shopCategoryTypeNumber) {
<td align=center style='width: 150px;'>
<img src="i/sh/<?= $row['img'] ?>" border=0>
<br>
<a href="shop.php?otdel=<?= $_GET['otdel'] ?>&set=<?= $row['id'] ?>&rnd=<?= mt_rand() ?>">купить</a>
<a href="shop.php?buy=<?= $row['id'] ?>&rnd=<?= mt_rand() ?>">купить</a>
<IMG SRC="i/up.gif" WIDTH=11 HEIGHT=11 BORDER=0 ALT="Купить несколько штук"
style="cursor:hand"
onclick="addCountItems('<?= $row['id'] ?>', '<?= $row['name'] ?>')">