Compare commits
2 Commits
26ed4cd286
...
1d2128830f
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1d2128830f | ||
![]() |
484695af10 |
@ -53,12 +53,12 @@ class UserInfo extends UserStats
|
||||
$captions = 'Уровень:<br>Сила:<br>Ловкость:<br>Интуиция:<br>Выносливость:<br>Интеллект:<br>Мудрость:<br>Местонахождение:';
|
||||
$variables =
|
||||
$this->level . '<br>' .
|
||||
parent::getFullStats()->allStrength . '<br>' .
|
||||
parent::getFullStats()->allDexterity . '<br>' .
|
||||
parent::getFullStats()->allIntuition . '<br>' .
|
||||
parent::getFullStats()->allEndurance . '<br>' .
|
||||
parent::getFullStats()->allIntelligence . '<br>' .
|
||||
parent::getFullStats()->allWisdom . '<br>' .
|
||||
parent::getFullStats()->strength . '<br>' .
|
||||
parent::getFullStats()->dexterity . '<br>' .
|
||||
parent::getFullStats()->intuition . '<br>' .
|
||||
parent::getFullStats()->endurance . '<br>' .
|
||||
parent::getFullStats()->intelligence . '<br>' .
|
||||
parent::getFullStats()->wisdom . '<br>' .
|
||||
Rooms::$roomNames[$this->room];
|
||||
if ($isMainWindow) {
|
||||
$this->Bank = new Bank($this->id);
|
||||
|
@ -221,12 +221,12 @@ class UserStats extends User
|
||||
{
|
||||
$query = "
|
||||
select
|
||||
sum(greatest(strength + (ifnull((select sum(add_strength) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as allStrength,
|
||||
sum(greatest(dexterity + (ifnull((select sum(add_dexterity) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as allDexterity,
|
||||
sum(greatest(intuition + (ifnull((select sum(add_intuition) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as allIntuition,
|
||||
sum(greatest(endurance + (ifnull((select sum(add_endurance) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as allEndurance,
|
||||
sum(greatest(intelligence + (ifnull((select sum(add_intelligence) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as allIntelligence,
|
||||
sum(greatest(wisdom + (ifnull((select sum(add_wisdom) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as allWisdom
|
||||
sum(greatest(strength + (ifnull((select sum(add_strength) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as strength,
|
||||
sum(greatest(dexterity + (ifnull((select sum(add_dexterity) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as dexterity,
|
||||
sum(greatest(intuition + (ifnull((select sum(add_intuition) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as intuition,
|
||||
sum(greatest(endurance + (ifnull((select sum(add_endurance) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as endurance,
|
||||
sum(greatest(intelligence + (ifnull((select sum(add_intelligence) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as intelligence,
|
||||
sum(greatest(wisdom + (ifnull((select sum(add_wisdom) from inventory where dressed_slot != 0 and owner_id = $this->id), 0)), 0)) as wisdom
|
||||
from users where id = $this->id";
|
||||
return self::$db->ofetch($query);
|
||||
}
|
||||
|
24
main.php
24
main.php
@ -164,12 +164,12 @@ function dressitem($id)
|
||||
$error = DRESSITEM_ERROR['ITEM_NOT_FOUND'];
|
||||
} else {
|
||||
$selectedItem = $selectedItemRow->fetch_object();
|
||||
if ($selectedItem->need_strength > $userStats->getFullStats()->allStrength
|
||||
|| $selectedItem->need_dexterity > $userStats->getFullStats()->allDexterity
|
||||
|| $selectedItem->need_intuition > $userStats->getFullStats()->allIntuition
|
||||
|| $selectedItem->need_endurance > $userStats->getFullStats()->allEndurance
|
||||
|| $selectedItem->need_intelligence > $userStats->getFullStats()->allIntelligence
|
||||
|| $selectedItem->need_wisdom > $userStats->getFullStats()->allWisdom) {
|
||||
if ($selectedItem->need_strength > $userStats->getFullStats()->strength
|
||||
|| $selectedItem->need_dexterity > $userStats->getFullStats()->dexterity
|
||||
|| $selectedItem->need_intuition > $userStats->getFullStats()->intuition
|
||||
|| $selectedItem->need_endurance > $userStats->getFullStats()->endurance
|
||||
|| $selectedItem->need_intelligence > $userStats->getFullStats()->intelligence
|
||||
|| $selectedItem->need_wisdom > $userStats->getFullStats()->wisdom) {
|
||||
$error = DRESSITEM_ERROR['REQUIREMENTS_NOT_MET'];
|
||||
} else {
|
||||
$itemInSlotRow = db::c()->query('SELECT dressed_slot FROM inventory WHERE owner_id = ?i AND dressed_slot > 0 AND item_type = ?i', $_SESSION['uid'], $selectedItem->item_type);
|
||||
@ -381,17 +381,17 @@ Template::header('Игра');
|
||||
<!--Параметры-->
|
||||
<div>
|
||||
<div class="container">
|
||||
Сила: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('strength', 1) . '(' . strval($userStats->getFullStats()->allStrength) . ')' : $userStats->getFullStats()->allStrength) ?>
|
||||
Сила: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('strength', 1) . '(' . strval($userStats->getFullStats()->strength) . ')' : $userStats->getFullStats()->strength) ?>
|
||||
<br>
|
||||
Ловкость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('dexterity', 1) . '(' . strval($userStats->getFullStats()->allDexterity) . ')' : $userStats->getFullStats()->allDexterity) ?>
|
||||
Ловкость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('dexterity', 1) . '(' . strval($userStats->getFullStats()->dexterity) . ')' : $userStats->getFullStats()->dexterity) ?>
|
||||
<br>
|
||||
Интуиция: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intuition', 1) . '(' . strval($userStats->getFullStats()->allIntuition) . ')' : $userStats->getFullStats()->allIntuition) ?>
|
||||
Интуиция: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intuition', 1) . '(' . strval($userStats->getFullStats()->intuition) . ')' : $userStats->getFullStats()->intuition) ?>
|
||||
<br>
|
||||
Выносливость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('endurance', 1) . '(' . strval($userStats->getFullStats()->allEndurance) . ')' : $userStats->getFullStats()->allEndurance) ?>
|
||||
Выносливость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('endurance', 1) . '(' . strval($userStats->getFullStats()->endurance) . ')' : $userStats->getFullStats()->endurance) ?>
|
||||
<br>
|
||||
Интеллект: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intelligence', 1) . '(' . strval($userStats->getFullStats()->allIntelligence) . ')' : $userStats->getFullStats()->allIntelligence) ?>
|
||||
Интеллект: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intelligence', 1) . '(' . strval($userStats->getFullStats()->intelligence) . ')' : $userStats->getFullStats()->intelligence) ?>
|
||||
<br>
|
||||
Мудрость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('wisdom', 1) . '(' . strval($userStats->getFullStats()->allWisdom) . ')' : $userStats->getFullStats()->allWisdom) ?>
|
||||
Мудрость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('wisdom', 1) . '(' . strval($userStats->getFullStats()->wisdom) . ')' : $userStats->getFullStats()->wisdom) ?>
|
||||
<br>
|
||||
<?php if ($userStats->getFreeStatPoints()): ?>
|
||||
<small style="color: darkgreen;">Возможных
|
||||
|
Loading…
Reference in New Issue
Block a user