remove unused not working magic item blinking visual effect
This commit is contained in:
parent
4f99781622
commit
2ffd272f48
@ -125,21 +125,48 @@ abstract class Item
|
||||
$this->mfauvorot = $row['mfauvorot'];
|
||||
|
||||
switch ($this->type) {
|
||||
case 1: $this->typename = 'Серьги'; break;
|
||||
case 2: $this->typename = 'Ожерелье'; break;
|
||||
case 3: $this->typename = 'Оружие'; break;
|
||||
case 4: $this->typename = 'Броня'; break;
|
||||
case 5: $this->typename = 'Кольцо'; break;
|
||||
case 1:
|
||||
$this->typename = 'Серьги';
|
||||
break;
|
||||
case 2:
|
||||
$this->typename = 'Ожерелье';
|
||||
break;
|
||||
case 3:
|
||||
$this->typename = 'Оружие';
|
||||
break;
|
||||
case 4:
|
||||
$this->typename = 'Броня';
|
||||
break;
|
||||
case 5:
|
||||
$this->typename = 'Кольцо';
|
||||
break;
|
||||
|
||||
case 8: $this->typename = 'Шлем'; break;
|
||||
case 9: $this->typename = 'Перчатки'; break;
|
||||
case 10: $this->typename = 'Щит'; break;
|
||||
case 11: $this->typename = 'Обувь'; break;
|
||||
case 12: $this->typename = 'Магический свиток'; break;
|
||||
case 22: $this->typename = 'Рубашка'; break;
|
||||
case 50: $this->typename = 'Волшебное зелье'; break;
|
||||
case 200: $this->typename = 'Сувенир'; break;
|
||||
default: $this->typename = 'Хлам';
|
||||
case 8:
|
||||
$this->typename = 'Шлем';
|
||||
break;
|
||||
case 9:
|
||||
$this->typename = 'Перчатки';
|
||||
break;
|
||||
case 10:
|
||||
$this->typename = 'Щит';
|
||||
break;
|
||||
case 11:
|
||||
$this->typename = 'Обувь';
|
||||
break;
|
||||
case 12:
|
||||
$this->typename = 'Магический свиток';
|
||||
break;
|
||||
case 22:
|
||||
$this->typename = 'Рубашка';
|
||||
break;
|
||||
case 50:
|
||||
$this->typename = 'Волшебное зелье';
|
||||
break;
|
||||
case 200:
|
||||
$this->typename = 'Сувенир';
|
||||
break;
|
||||
default:
|
||||
$this->typename = 'Хлам';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -764,7 +764,7 @@ function echoscroll($slot)
|
||||
// ссылка на магию
|
||||
function showhrefmagic($dress)
|
||||
{
|
||||
$user =db::c()->query('SELECT `battle` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||
$user = db::c()->query('SELECT `battle` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||
$magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $dress['includemagic'])->fetch_assoc();
|
||||
|
||||
$r = '';
|
||||
@ -780,7 +780,7 @@ function showhrefmagic($dress)
|
||||
$r .= "if (confirm('Использовать сейчас?')) window.location='" . $script . ".php?use=" . $dress['id'] . "';";
|
||||
}
|
||||
$r .= "\"href='#'>";
|
||||
$r .= "<img class=\"tooltip\" src='mg2.php?p=" . ($dress['includemagicdex'] / $dress['includemagicmax'] * 100) . "&i={$dress['img']}' style=\"filter:shadow(color=red, direction=90, strength=3);\" title=\"<b>" . $dress['name'] . "</b><br />Прочность " . $dress['duration'] . "/" . $dress['maxdur'] . "" . (($dress['ghp'] > 0) ? "<br />Уровень жизни +{$dress['ghp']}" : "") . (($dress['minu'] > 0) ? "<br />Урон {$dress['minu']}-{$dress['maxu']}" : "") . (($dress['text'] != null) ? "<br />На оружии выгравировано '{$dress['text']}'" : "") . "<br />Встроена магия: <b>" . $magic['name'] . "</b>\" /><br />";
|
||||
$r .= "<img src=\"i/sh/{$dress['img']}\" style=\"filter:shadow(color=red, direction=90, strength=3);\" title=\"" . $dress['name'] . (($dress['text'] != null) ? "<br />На оружии выгравировано '{$dress['text']}'" : "") . "\"><br>";
|
||||
return $r;
|
||||
}
|
||||
|
||||
@ -909,8 +909,8 @@ function timetoheals($user)
|
||||
* Функция отображения персонажа для других персонажей везде и для себя в бою.
|
||||
*
|
||||
* @param $id
|
||||
* @param int $battle - в бою ли персонаж
|
||||
* @param int $me - на себя ли я смотрю
|
||||
* @param int $battle - в бою ли персонаж
|
||||
* @param int $me - на себя ли я смотрю
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -921,7 +921,7 @@ function showinf_pers($id, $battle = 0, $me = 0) //FIXME 37 запросов! Т
|
||||
$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $id)->fetch_assoc();
|
||||
|
||||
|
||||
function item($image,$bg_color = '#AAA',$border_color = '#EEE')
|
||||
function item($image, $bg_color = '#AAA', $border_color = '#EEE')
|
||||
{
|
||||
return '<img src="' . $image . '" style="width: 48px; height: 48px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, 0.25);
|
||||
padding: 7px; display: inline-block; background-repeat: no-repeat;
|
||||
@ -947,10 +947,10 @@ function showinf_pers($id, $battle = 0, $me = 0) //FIXME 37 запросов! Т
|
||||
HTML;
|
||||
} else {
|
||||
$r .= '<div style="text-align: center">';
|
||||
if (!empty($user['align'])) $r .= "<img src='/i/align_{$user['align']}.gif' > ";
|
||||
if (!empty($user['align'])) $r .= "<img src='/i/align_{$user['align']}.gif' > ";
|
||||
if ($user['block']) $r .= "<span class='private'><s>{$user['login']}</s></span>";
|
||||
else $r .= "<b>$user[login]</b> ";
|
||||
if (!empty($user['klan'])) $r .= "<img src='/i/klan/" . ClanImage($user['klan']) . ".gif' > ";
|
||||
if (!empty($user['klan'])) $r .= "<img src='/i/klan/" . ClanImage($user['klan']) . ".gif' > ";
|
||||
$r .= '</div>';
|
||||
|
||||
$r .= showProgressBar($user['hp'], $user['maxhp']);
|
||||
@ -1105,11 +1105,11 @@ HTML;
|
||||
$r .= showhrefmagic($dress);
|
||||
} else {
|
||||
#$r .= '<img class="tooltip" src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b>" . ((!empty($dress['text'])) ? "<br><i>{$dress['text']}</i>" : "") . '" />';
|
||||
$r .= item('i/sh/' . $dress['img'])." ";
|
||||
$r .= item('i/sh/' . $dress['img']) . " ";
|
||||
}
|
||||
} else {
|
||||
#$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
|
||||
$r .= item('i/1x1.gif')." ";
|
||||
$r .= item('i/1x1.gif') . " ";
|
||||
}
|
||||
|
||||
if ($user['r2'] > 0) {
|
||||
@ -1118,11 +1118,11 @@ HTML;
|
||||
$r .= showhrefmagic($dress);
|
||||
} else {
|
||||
#$r .= '<img class="tooltip" src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b>" . ((!empty($dress['text'])) ? "<br><i>{$dress['text']}</i>" : "") . '" />';
|
||||
$r .= item('i/sh/' . $dress['img'])." ";
|
||||
$r .= item('i/sh/' . $dress['img']) . " ";
|
||||
}
|
||||
} else {
|
||||
#$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
|
||||
$r .= item('i/1x1.gif')." ";
|
||||
$r .= item('i/1x1.gif') . " ";
|
||||
}
|
||||
|
||||
if ($user['r3'] > 0) {
|
||||
@ -1131,11 +1131,11 @@ HTML;
|
||||
$r .= showhrefmagic($dress);
|
||||
} else {
|
||||
#$r .= '<img class="tooltip" src="i/sh/' . $dress['img'] . '" width=20 height=20 title="<b>' . $dress['name'] . "</b>" . ((!empty($dress['text'])) ? "<br><i>{$dress['text']}</i>" : "") . '" />';
|
||||
$r .= item('i/sh/' . $dress['img'])." ";
|
||||
$r .= item('i/sh/' . $dress['img']) . " ";
|
||||
}
|
||||
} else {
|
||||
#$r .= '<img class=\'tooltip\' src="i/w6.gif" width=20 height=20 title="Пустой слот Кольцо" />';
|
||||
$r .= item('i/1x1.gif')." ";
|
||||
$r .= item('i/1x1.gif') . " ";
|
||||
}
|
||||
|
||||
$r .= '</div>';
|
||||
@ -1611,10 +1611,10 @@ function showitem2()
|
||||
/**
|
||||
* По ходу, главная функция отображения предметов.
|
||||
*
|
||||
* @param array $row - массив значений, передаваймый из запроса к таблице inventory
|
||||
* @param int $type - тип предмета. Где бы их всех взять?
|
||||
* @param bool $returned
|
||||
* @param bool $infOnly
|
||||
* @param array $row - массив значений, передаваймый из запроса к таблице inventory
|
||||
* @param int $type - тип предмета. Где бы их всех взять?
|
||||
* @param bool $returned
|
||||
* @param bool $infOnly
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -1648,11 +1648,8 @@ function showitem($row, $type = null, $returned = false, $infOnly = false)
|
||||
if ((empty($row['count']) || $type == 10) && $infOnly == false) {
|
||||
$up = ($row['upgrade'] > 0 ? " <b>[" . $row['upgrade'] . "]</b>" : "");
|
||||
$returnHTML .= '<TD align="center" width="100">';
|
||||
if (!empty($incmagic['max'])) {
|
||||
$returnHTML .= "<img class=\"tooltip\" src='mg2.php?p=" . ($incmagic['cur'] / $incmagic['max'] * 100) . "&i={$row['img']}' style=\"filter:shadow(color=red, direction=90, strength=3);\"><BR>";
|
||||
} else {
|
||||
$returnHTML .= "<img " . ((($row['maxdur'] - 2) <= $row['duration'] && $row['duration'] > 2) ? " style='background-image:url(i/blink.gif);' " : "") . " src='i/sh/{$row['img']}'><BR>";
|
||||
}
|
||||
|
||||
$returnHTML .= "<img " . ((($row['maxdur'] - 2) <= $row['duration'] && $row['duration'] > 2) ? " style='background-image:url(i/blink.gif);' " : "") . " src='i/sh/{$row['img']}'><BR>";
|
||||
|
||||
if (($user['sila'] >= $row['nsila']) &&
|
||||
($user['lovk'] >= $row['nlovk']) &&
|
||||
@ -2852,8 +2849,8 @@ function SolveExp($at_id, $def_id, $damage)
|
||||
* Функция записи в личное дело.
|
||||
*
|
||||
* @param string $message - текст записи.
|
||||
* @param int $user_id - ID пользователя которому добавляется запись.
|
||||
* @param int $type - тип записи: (1)обычная, (2)модераторская.
|
||||
* @param int $user_id - ID пользователя которому добавляется запись.
|
||||
* @param int $type - тип записи: (1)обычная, (2)модераторская.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@ -2867,7 +2864,7 @@ function addToDelo($message, $user_id = 0, $type = 1)
|
||||
/**
|
||||
* Апаем стат или мастерство на единицу.
|
||||
*
|
||||
* @param $name - техническое имя параметра, как в базе.
|
||||
* @param $name - техническое имя параметра, как в базе.
|
||||
* @param null $param - выбор что повышать.
|
||||
*
|
||||
* @return void
|
||||
|
10
mg2.php
10
mg2.php
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
$im1=imageCreateFromGIF("i/sh/".$_GET['i']);
|
||||
$colorcount = imagecolorstotal($im1);
|
||||
$size_x=imageSX($im1);
|
||||
$size_y=imageSY($im1);
|
||||
imageColorSet($im1, 1, 198, 64, 1);
|
||||
$transparentcolor = imagecolortransparent($im1);
|
||||
imagefilledrectangle($im1,2,($size_y-$size_y*$_GET['p']/100),4,$size_y,1);
|
||||
Header("Content-type: image/gif");
|
||||
imageGIF($im1);
|
39
shop.php
39
shop.php
@ -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'] ?>')">
|
||||
|
Loading…
Reference in New Issue
Block a user