Новое отображение модификаторов. Фиксы интерфейса.
This commit is contained in:
parent
94e1dccaef
commit
fd7806d2ba
71
main.php
71
main.php
@ -322,7 +322,18 @@ function del_efs($uid, $id, $type)
|
||||
|
||||
function countmf()
|
||||
{ //TODO пересчитать модификаторы
|
||||
global $user;
|
||||
//global $user;
|
||||
|
||||
// Защита от урона и сокрушение?
|
||||
$zo = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 201 AND `owner_id` = ?i', $user['id'])->getNumRows();
|
||||
$sokr = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 202 AND `owner_id` = ?i', $user['id'])->getNumRows();
|
||||
|
||||
$user = new User($_SESSION['uid']);
|
||||
$userDressedItems = new DressedItems($_SESSION['uid']);
|
||||
if ($userDressedItems->getBonusesAmount()) {
|
||||
$allBonuses = $userDressedItems->getBonusesAmount();
|
||||
}
|
||||
|
||||
|
||||
function GetWeaponType($idwep)
|
||||
{
|
||||
@ -346,8 +357,6 @@ function countmf()
|
||||
return $type;
|
||||
}
|
||||
|
||||
$zo = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 201 AND `owner_id` = ?i', $user['id'])->getNumRows();
|
||||
$sokr = db::c()->query('SELECT 1 FROM `users_effects` WHERE `type` = 202 AND `owner_id` = ?i', $user['id'])->getNumRows();
|
||||
|
||||
$bmfud = $bmfbron = 0;
|
||||
|
||||
@ -360,7 +369,8 @@ function countmf()
|
||||
|
||||
$mf = [];
|
||||
|
||||
$user_dress = db::c()->query('SELECT SUM(`minu`), SUM(`maxu`), SUM(`mfkrit`), SUM(`mfakrit`), SUM(`mfuvorot`), SUM(`mfauvorot`), SUM(`bron1`), SUM(`bron2`), SUM(`bron3`), SUM(`bron4`) FROM `inventory` WHERE `dressed` = 1 AND `owner` = ?i', $user['id'])->fetch_row();
|
||||
//$user_dress = db::c()->query('SELECT SUM(`minu`), SUM(`maxu`), SUM(`mfkrit`), SUM(`mfakrit`), SUM(`mfuvorot`), SUM(`mfauvorot`), SUM(`bron1`), SUM(`bron2`), SUM(`bron3`), SUM(`bron4`) FROM `inventory` WHERE `dressed` = 1 AND `owner` = ?i', $user['id'])->fetch_row();
|
||||
|
||||
$user_dress[6] = $bmfbron;
|
||||
$user_dress[7] = $bmfbron;
|
||||
$user_dress[8] = $bmfbron;
|
||||
@ -402,7 +412,10 @@ function countmf()
|
||||
break;
|
||||
}
|
||||
|
||||
return ['minu' => $mf['me']['udar'] + $bmfud + $weap_b, 'maxu' => $mf['me']['maxudar'] + $bmfud + $weap_b, 'fkrit' => round($mykrit, 0), 'fakrit' => round($myakrit, 0), 'fuvorot' => round($myuvorot, 0), 'fauvorot' => round($myauvorot, 0), 'bron1' => $user_dress[6], 'bron2' => $user_dress[7], 'bron3' => $user_dress[8], 'bron4' => $user_dress[9]];
|
||||
$minu = $mf['me']['udar'] + $bmfud + $weap_b;
|
||||
$maxu = $mf['me']['maxudar'] + $bmfud + $weap_b;
|
||||
|
||||
return ['minu' => $minu, 'maxu' => $maxu, 'fkrit' => round($mykrit, 0), 'fakrit' => round($myakrit, 0), 'fuvorot' => round($myuvorot, 0), 'fauvorot' => round($myauvorot, 0), 'bron1' => $user_dress[6], 'bron2' => $user_dress[7], 'bron3' => $user_dress[8], 'bron4' => $user_dress[9]];
|
||||
}
|
||||
|
||||
// одеть предмет
|
||||
@ -979,36 +992,12 @@ if (input::get('edit')) {
|
||||
<!--Параметры-->
|
||||
<div>
|
||||
<div class="container">
|
||||
Сила: <?= $showUser->strength ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=sila'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Ловкость: <?= $showUser->dexterity ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=lovk'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Интуиция: <?= $showUser->intuition ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=inta'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Выносливость: <?= $showUser->endurance ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=vinos'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Интеллект: <?= $showUser->intelligence ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=intel'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Мудрость: <?= $showUser->wisdom ?>
|
||||
<?php if ($showUser->stat_points): ?>
|
||||
<img src=i/up.gif onclick="location.href='?edit=1&ups=mudra'">
|
||||
<?php endif; ?>
|
||||
<br>
|
||||
Сила: <?= $user->getStrength(1) ?><br>
|
||||
Ловкость: <?= $user->getDexterity(1) ?><br>
|
||||
Интуиция: <?= $user->getIntuition(1) ?><br>
|
||||
Выносливость: <?= $user->getEndurance(1) ?><br>
|
||||
Интеллект: <?= $user->getIntelligence(1) ?><br>
|
||||
Мудрость: <?= $user->getWisdom(1) ?><br>
|
||||
<small style="color: darkgreen;">Возможных увеличений: <?= $showUser->stat_points ?></small>
|
||||
<br><br>
|
||||
</div>
|
||||
@ -1017,9 +1006,9 @@ if (input::get('edit')) {
|
||||
$min_dmg = 0;
|
||||
$max_dmg = 0;
|
||||
|
||||
$item_mf = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 1 AND `add_proc_mf` > 0', $_SESSION['uid'])->fetch_assoc();
|
||||
$item_damage = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 1 AND `add_proc_uron` > 0', $_SESSION['uid'])->fetch_assoc();
|
||||
$item_bron = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 1 AND `add_proc_bron` > 0', $_SESSION['uid'])->fetch_assoc();
|
||||
$item_mf = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` > 0 AND `add_proc_mf` > 0', $_SESSION['uid'])->fetch_assoc();
|
||||
$item_damage = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` > 0 AND `add_proc_uron` > 0', $_SESSION['uid'])->fetch_assoc();
|
||||
$item_bron = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` > 0 AND `add_proc_bron` > 0', $_SESSION['uid'])->fetch_assoc();
|
||||
|
||||
if (isset($item_mf['id'])) {
|
||||
$max_mf = max_mf();
|
||||
@ -1198,9 +1187,9 @@ if (input::get('edit')) {
|
||||
<div id="mZeInventory">
|
||||
<?php endif ?>
|
||||
<?php
|
||||
|
||||
if (in_array(input::get('razdel'), [0, 1, 2, 3, 4, 5])) {
|
||||
$_SESSION['razdel'] = input::get('razdel');
|
||||
$razdel = $_GET['razdel'] ?? 0;
|
||||
if (in_array($razdel, [0, 1, 2, 3, 4, 5])) {
|
||||
$_SESSION['razdel'] = $razdel;
|
||||
}
|
||||
?>
|
||||
<table class="allzeroes" style="background-color: #a5a5a5;">
|
||||
|
Loading…
Reference in New Issue
Block a user