2018-01-28 16:40:49 +00:00
< ? php
2021-01-27 15:19:05 +00:00
use Battles\DressedItems ;
use Battles\GameLogs ;
use Battles\InventoryItem ;
use Battles\Template ;
use Battles\Travel ;
use Battles\UserInfo ;
2021-03-10 21:38:14 +00:00
use Battles\UserStats ;
2021-01-27 15:19:05 +00:00
2020-06-23 19:34:52 +00:00
ob_start ( " ob_gzhandler " );
2018-01-28 16:40:49 +00:00
session_start ();
2019-02-15 22:31:18 +00:00
$get = filter_input ( INPUT_SERVER , 'QUERY_STRING' );
2020-10-26 23:07:27 +00:00
if ( $get == 'exit' ) {
2019-02-15 22:33:58 +00:00
session_destroy ();
header ( " Location: fight.php " );
}
2020-06-23 18:19:52 +00:00
require_once 'functions.php' ;
2020-06-23 19:34:52 +00:00
2021-03-10 22:55:08 +00:00
$user -> setOnline ();
2020-08-29 23:21:22 +00:00
// Инициализируем входящие GET\POST переменные.
$goto = $_GET [ 'goto' ] ? ? null ;
$obraz = $_GET [ 'obraz' ] ? ? null ;
$del = $_GET [ 'del' ] ? ? null ;
$effectId = $_GET [ 'efid' ] ? ? null ;
$brons = $_GET [ 'modif_bron' ] ? ? null ;
$stats = $_GET [ 'modif_stat' ] ? ? null ;
$mfs = $_GET [ 'modif_mf' ] ? ? null ;
$ids = $_GET [ 'ids' ] ? ? null ;
$setShadow = $_POST [ 'setshadow' ] ? ? null ;
$edit = $_GET [ 'edit' ] ? ? null ;
2021-03-10 22:55:08 +00:00
if ( $edit ) {
$ups = $_GET [ 'ups' ] ? ? null ;
$upm = $_GET [ 'upm' ] ? ? null ;
$use = $_GET [ 'use' ] ? ? null ;
$useTarget = $_POST [ 'target' ] ? ? null ;
$drop = $_GET [ 'drop' ] ? ? null ;
$dress = $_GET [ 'dress' ] ? ? null ;
$undress = $_GET [ 'undress' ] ? ? null ;
$destruct = $_GET [ 'destruct' ] ? ? null ;
if ( $ups ) {
$user -> addOnePointToStat ( $ups );
}
if ( $upm ) {
addOnePoint ( $upm , 'mastery' );
}
if ( $drop ) {
$items = new DressedItems ( $_SESSION [ 'uid' ]);
$items -> undressItem ( $drop );
}
//Пока что одеваем предмет отсюда.
if ( $dress ) {
echo dressitem ( $dress );
}
if ( $destruct ) {
$q = db :: c () -> query ( 'SELECT `id`, `dressed`, `name`, `duration`, `maxdur` FROM `inventory` WHERE `owner` = ?i AND `id` = ?i' , $_SESSION [ 'uid' ], $destruct );
if ( $q -> getNumRows ()) {
$q = $q -> fetch_assoc ();
if ( empty ( $q [ 'dressed' ])) {
destructitem ( $q [ 'id' ]);
GameLogs :: addUserLog ( $user -> getId (), $user -> getLogin () . ' выбросил предмет ' . $q [ 'name' ] . ' id:(cap' . $q [ 'id' ] . ')' );
err ( 'Предмет ' . $q [ 'name' ] . ' выброшен.' );
} else {
err ( 'Ошибка: нельзя выбросить одетый предмет!' );
}
} else {
err ( 'Ошибка: предмет не найден!' );
}
}
if ( $use ) {
usemagic ( $use , $useTarget );
}
if ( $undress ) {
2021-03-11 18:58:38 +00:00
\Battles\DressedItems :: undressAllItems ( $_SESSION [ 'uid' ]);
2021-03-10 22:55:08 +00:00
}
}
2020-08-29 23:21:22 +00:00
// Подготавливаем отображение инфы и предметов.
2021-02-01 16:42:52 +00:00
$userInfo = new UserInfo ( $user -> getId ());
2021-03-10 21:38:14 +00:00
$userStats = new UserStats ( $user -> getId ());
2021-03-10 21:20:56 +00:00
$data = \Battles\Database\DBPDO :: INIT () -> ofetchAll ( 'SELECT * FROM inventory WHERE owner_id = ? AND dressed_slot = 0 AND on_sale = 0' , $user -> getId ());
2020-08-29 23:21:22 +00:00
$iteminfo = [];
2021-03-10 21:20:56 +00:00
foreach ( $data as $row ) {
2021-01-27 15:19:05 +00:00
$iteminfo [] = new InventoryItem ( $row );
2020-07-06 19:54:50 +00:00
}
2018-01-28 16:40:49 +00:00
2020-09-29 10:07:08 +00:00
//Обработчики нажатий на кнопки.
2021-02-01 19:20:23 +00:00
if ( $_POST [ 'battlefield' ] ? ? 0 && $user -> getRoom () == 1 ) {
2020-09-28 14:44:33 +00:00
header ( 'Location: zayavka.php' );
exit ();
}
2020-10-26 23:07:27 +00:00
if ( $_POST [ 'module_quest' ] ? ? 0 ) {
header ( 'Location: module_quest.php' );
exit ();
}
2021-02-01 19:20:23 +00:00
if ( $_POST [ 'move_inside' ] ? ? 0 && $user -> getRoom () == 20 ) {
2020-10-26 23:07:27 +00:00
header ( 'Location: main.php?goto=arena' );
exit ();
}
2021-02-01 19:20:23 +00:00
if ( $_POST [ 'move_outside' ] ? ? 0 && $user -> getRoom () == 1 ) {
2020-10-26 23:07:27 +00:00
header ( 'Location: main.php?goto=plo' );
exit ();
}
2020-10-26 23:18:02 +00:00
if ( $_POST [ 'main_page' ] ? ? 0 ) {
header ( 'Location: main.php' );
exit ();
}
2020-08-30 10:44:57 +00:00
2020-10-26 23:43:54 +00:00
if ( $edit === null ) {
/* === проверяем соответствие комнаты и скрипта === */
2021-02-01 19:20:23 +00:00
if ( in_array ( $user -> getRoom (), [ 20 , 21 , 26 , 48 , 51 , 52 , 651 , 2655 , 2601 , 2701 , 2702 , 2111 ])) {
2020-10-26 23:43:54 +00:00
header ( 'Location: city.php' );
exit ();
}
2021-02-01 19:20:23 +00:00
if ( in_array ( $user -> getRoom (), [ 22 , 23 , 25 , 27 , 29 , 30 , 31 , 34 , 45 , 53 , 61 , 402 , 403 , 600 , 601 , 602 , 603 , 620 , 621 , 650 , 660 , 661 , 662 , 666 , 760 , 1051 , 1052 , 1055 ])) {
header ( 'location: ' . Travel :: $roomFileName [ $user -> getRoom ()]);
2020-10-26 23:43:54 +00:00
exit ();
}
2018-07-02 15:35:25 +00:00
}
2020-08-29 14:54:26 +00:00
function del_efs ( $id , $type )
2018-07-02 15:35:25 +00:00
{
2020-08-29 14:54:26 +00:00
if ( $id && ! in_array ( $type , [ 2 , 3 , 4 , 5 , 8 , 10 , 11 , 12 , 13 , 14 , 20 ])) {
db :: c () -> query ( 'DELETE FROM users_effects WHERE owner_id = ?i AND effect_id = ?i' , $_SESSION [ 'uid' ], $id );
if ( $type == 1022 ) {
db :: c () -> query ( 'UPDATE `users` SET `invis` = 0 WHERE `id` = ?i' , $_SESSION [ 'uid' ]);
2018-07-02 15:35:25 +00:00
}
2020-08-29 14:54:26 +00:00
return 'Эффект удалён.' ;
} else {
return 'Эффект нельзя удалить.' ;
2018-07-02 15:35:25 +00:00
}
}
// одеть предмет
function dressitem ( $id )
{
2020-08-29 11:15:29 +00:00
define ( 'HELMET' , 1 );
define ( 'ARMOR' , 2 );
define ( 'LEGS' , 3 );
define ( 'BOOTS' , 4 );
define ( 'GLOVES' , 5 );
define ( 'WEAPON' , 6 );
define ( 'SHIELD' , 7 );
define ( 'BELT' , 8 );
define ( 'RING' , 9 );
define ( 'AMULET' , 10 );
2020-08-29 14:54:26 +00:00
define ( 'DRESSITEM_ERROR' , [
'TOO_MANY_ITEMS_IN_SLOTS' => 'Критическая ошибка: Переполнение слота!' ,
'UNKNOWN_ITEM_TYPE' => 'Неизвестный тип предмета!' ,
'ITEM_NOT_FOUND' => 'Предмет не найден!' ,
2021-03-11 17:43:20 +00:00
'REQUIREMENTS_NOT_MET' => 'Персонаж не соответствует требованиям!' ,
2020-08-29 14:54:26 +00:00
]);
2021-03-11 17:43:20 +00:00
$userStats = new UserStats ( $_SESSION [ 'uid' ]);
2020-08-29 13:59:22 +00:00
$itemInSlot = [];
2021-03-11 17:43:20 +00:00
$selectedItemRow = db :: c () -> query ( 'SELECT item_type,need_strength,need_dexterity,need_intuition,need_endurance,need_intelligence,need_wisdom FROM `inventory` WHERE item_id = ?i AND owner_id = ?i AND `dressed_slot` = 0 AND `durability` != 0' , $id , $_SESSION [ 'uid' ]);
//$userStats->getStrength()
if ( ! $selectedItemRow -> getNumRows ()) {
//с предметом что-то сильно не ок, ошибка.
$error = DRESSITEM_ERROR [ 'ITEM_NOT_FOUND' ];
} else {
2020-08-29 11:15:29 +00:00
$selectedItem = $selectedItemRow -> fetch_object ();
2021-03-11 18:14:41 +00:00
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 ) {
2021-03-11 17:43:20 +00:00
$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 );
$itemInSlotQuantity = $itemInSlotRow -> getNumRows ();
if ( $itemInSlotQuantity ) {
while ( $row = $itemInSlotRow -> fetch_object ()) {
$itemInSlot [] = $row -> dressed_slot ;
}
2020-08-29 11:15:29 +00:00
}
2021-03-11 17:43:20 +00:00
if ( in_array ( $selectedItem -> item_type , [ HELMET , ARMOR , LEGS , BOOTS , GLOVES , WEAPON , SHIELD , BELT , AMULET ])) {
//работаем с нормальными слотами
if ( ! $itemInSlotQuantity ) {
// просто одеваем предмет
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = item_type WHERE item_id = ?i' , $id );
} elseif ( $itemInSlotQuantity == 1 ) {
// снимаем предмет и одеваем вместо
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = 0 WHERE dressed_slot = ?i' , $itemInSlot [ 0 ]);
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = item_type WHERE item_id = ?i' , $id );
} else {
// невозможная ситуация - два предмета в одиночном слоте. критическая ошибка, запись в лог, раздевание.
$error = DRESSITEM_ERROR [ 'TOO_MANY_ITEMS_IN_SLOTS' ];
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = 0 WHERE dressed_slot BETWEEN 1 AND 12 AND owner_id = ?i' , $_SESSION [ 'uid' ]);
}
} elseif ( $selectedItem -> item_type == RING ) {
// работаем с кольцами
if ( $itemInSlotQuantity < 3 ) {
// Сравниваем массив колец и массив слотов для колец.
$emptyRingSlots = array_diff ([ 9 , 10 , 11 ], $itemInSlot );
// Сортируем массив свободных слотов по возрастанию.
sort ( $emptyRingSlots );
// Одеваем предмет в первый свободный слот.
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = ?i WHERE item_id = ?i' , $emptyRingSlots [ 0 ], $id );
} elseif ( $itemInSlotQuantity == 3 ) {
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = 0 WHERE dressed_slot = 11' );
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = 11 WHERE item_id = ?i' , $id );
// снимаем предмет из слота 11 и одеваем вместо
} else {
// невозможная ситуация - больше трёх предметов на три слота. критическая ошибка, запись в лог, раздевание.
$error = DRESSITEM_ERROR [ 'TOO_MANY_ITEMS_IN_SLOTS' ];
db :: c () -> query ( 'UPDATE inventory SET dressed_slot = 0 WHERE dressed_slot BETWEEN 1 AND 12 AND owner_id = ?i' , $_SESSION [ 'uid' ]);
}
2020-08-29 11:15:29 +00:00
} else {
2021-03-11 17:43:20 +00:00
//предмет вообще не должен одеваться, ошибка
$error = DRESSITEM_ERROR [ 'UNKNOWN_ITEM_TYPE' ];
2020-08-29 11:15:29 +00:00
}
2018-07-02 15:35:25 +00:00
}
2020-06-23 08:49:49 +00:00
}
2018-07-02 15:35:25 +00:00
2020-08-29 11:15:29 +00:00
if ( isset ( $error )) {
return $error ;
2020-06-23 08:49:49 +00:00
} else {
2020-08-29 13:02:52 +00:00
return null ;
2020-06-23 08:49:49 +00:00
}
2018-07-02 15:35:25 +00:00
}
2019-09-17 14:37:44 +00:00
// Входим и выходим если можем.
2020-08-29 23:21:22 +00:00
if ( $goto ) {
2019-09-17 14:37:44 +00:00
$imove = true ;
2021-02-01 16:42:52 +00:00
$d = db :: c () -> query ( 'SELECT SUM(weight) AS sum_weight FROM inventory WHERE owner_id = ?i AND on_sale = 0' , $user -> getId ()) -> fetch_assoc ();
$eff = db :: c () -> query ( 'SELECT 1 FROM `users_effects` WHERE `owner_id` = ?i AND (`type` = 14 OR `type` = 13)' , $user -> getId ());
2020-08-30 09:48:53 +00:00
//(масса: <?= $getItemsBonuses->getItemsWeight() . '/' . $user->strength * 4
2020-07-21 11:52:39 +00:00
2021-03-10 21:38:14 +00:00
if ( $d [ 'sum_weight' ] > $userStats -> getStrength () * 4 && $goto ) {
2019-09-17 14:37:44 +00:00
err ( 'У вас переполнен рюкзак, вы не можете передвигаться...' );
$imove = false ;
}
2020-08-29 23:21:22 +00:00
if ( $eff -> getNumRows () && $goto ) {
2019-09-17 14:37:44 +00:00
err ( 'У вас тяжелая травма, вы не можете передвигатся...' );
$imove = false ;
}
2021-02-01 19:20:23 +00:00
if ( $goto == 'plo' && ! $user -> getZayavka () && $imove && $user -> getRoom () != 20 ) {
db :: c () -> query ( 'UPDATE users, online SET users.room = 20, online.room = 20 WHERE online.user_id = users.id AND online.user_id = ?i' , $user -> getId ());
2019-09-17 14:37:44 +00:00
header ( 'Location: city.php' );
2020-08-29 23:21:22 +00:00
exit ( " <i>Топ-топ-топ...</i> " );
2020-06-23 08:49:49 +00:00
} else {
err ( 'Подали заявку на бой и убегаете из клуба? Нехорошо...' );
}
2021-02-01 19:20:23 +00:00
if ( $goto == 'arena' && $user -> getRoom () == 20 && $imove ) {
db :: c () -> query ( 'UPDATE users, online SET users.room = 1, online.room = 1 WHERE online.user_id = users.id AND online.user_id = ?i' , $user -> getId ());
2019-09-17 14:37:44 +00:00
header ( 'Location: main.php' );
2020-08-29 23:21:22 +00:00
exit ( " <i>Топ-топ-топ...</i> " );
2019-09-17 14:37:44 +00:00
}
}
if ( isset ( $_GET [ 'use' ])) {
usemagic ( $_GET [ 'use' ], $_POST [ 'target' ]);
}
2021-03-10 21:38:14 +00:00
if ( $obraz ) {
$user -> setShadow ( $obraz );
$user -> saveShadow ();
2018-01-28 16:40:49 +00:00
}
2020-08-29 23:21:22 +00:00
if ( $setShadow ) {
2021-01-27 15:19:05 +00:00
Template :: header ( 'Образ персонажа' );
2018-03-02 14:33:58 +00:00
?>
2020-07-21 09:20:44 +00:00
< div style = " text-align: right; " >
2020-08-29 23:21:22 +00:00
< input type = button value = " Вернуться " onClick = " location.href='main.php?edit=<?= mt_rand() ?>'; " class = " button " >
2020-07-21 09:20:44 +00:00
</ div >
2018-03-30 20:21:35 +00:00
< table style = " padding:5px; margin:auto; " >
2020-07-21 09:20:44 +00:00
< caption >< b style = " color: red; " > Внимание ! Образ персонажа выбирается только один раз .</ b ></ caption >
2018-03-30 20:21:35 +00:00
< tr >
2020-07-21 09:20:44 +00:00
< td >< a href = " ?edit=1&obraz=m1 " >< img alt = " m01 " src = " i/shadow/m1.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m2 " >< img alt = " m02 " src = " i/shadow/m2.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m3 " >< img alt = " m03 " src = " i/shadow/m3.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m4 " >< img alt = " m04 " src = " i/shadow/m4.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m5 " >< img alt = " m05 " src = " i/shadow/m5.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m6 " >< img alt = " m06 " src = " i/shadow/m6.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m7 " >< img alt = " m07 " src = " i/shadow/m7.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m8 " >< img alt = " m08 " src = " i/shadow/m8.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m9 " >< img alt = " m09 " src = " i/shadow/m9.gif " ></ a >
< td >< a href = " ?edit=1&obraz=m10 " >< img alt = " m10 " src = " i/shadow/m10.gif " ></ a >
2018-03-30 20:21:35 +00:00
< tr >
2020-07-21 09:20:44 +00:00
< td >< a href = " ?edit=1&obraz=f1 " >< img alt = " f01 " src = " i/shadow/f1.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f2 " >< img alt = " f02 " src = " i/shadow/f2.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f3 " >< img alt = " f03 " src = " i/shadow/f3.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f4 " >< img alt = " f04 " src = " i/shadow/f4.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f5 " >< img alt = " f05 " src = " i/shadow/f5.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f6 " >< img alt = " f06 " src = " i/shadow/f6.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f7 " >< img alt = " f07 " src = " i/shadow/f7.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f8 " >< img alt = " f08 " src = " i/shadow/f8.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f9 " >< img alt = " f09 " src = " i/shadow/f9.gif " ></ a >
< td >< a href = " ?edit=1&obraz=f10 " >< img alt = " f10 " src = " i/shadow/f10.gif " ></ a >
2018-03-02 14:33:58 +00:00
</ table >
< ? php
2020-08-29 23:21:22 +00:00
exit ();
2018-03-02 14:33:58 +00:00
}
2021-01-27 15:19:05 +00:00
Template :: header ( 'Игра' );
2020-07-21 15:57:15 +00:00
?>
2020-09-30 19:12:34 +00:00
< script src = " js/funcs.js " ></ script >
< script >
$ ( function () {
$ ( " .tooltip " ) . tipTip ({ maxWidth : " auto " , edgeOffset : 0 , fadeIn : 300 , fadeOut : 500 });
});
2018-03-02 14:33:58 +00:00
2020-09-30 19:12:34 +00:00
let Hint3Name = '' ;
2020-07-06 19:54:50 +00:00
2020-09-30 19:12:34 +00:00
function okno ( title , script , name , errk ) {
let errkom = '' ;
let com = '' ;
if ( errk === 1 ) {
errkom = 'Нельзя использовать символы: /\:*?"<>|+%<br>' ;
2020-07-21 15:57:15 +00:00
}
2021-03-10 21:47:33 +00:00
document . getElementById ( " hint3 " ) . innerHTML = `
< table width = 100 % cellspacing = 1 cellpadding = 0 bgcolor = CCC3AA >
< tr >
< td align = center >
< b > $ { title } </ b >
</ td >
< td width = 20 align = right valign = top style = 'cursor: pointer' onclick = 'closehint3();' >
< BIG >< B > x
</ td >
</ tr >
< tr >
< td colspan = 2 >
< form action = " ${ script } " method = POST >
< table width = 100 % cellspacing = 0 cellpadding = 2 bgcolor = FFF6DD >
< tr >
< INPUT TYPE = hidden name = sd4 value = '6' >
< td colspan = 2 >
< span class = 'error' > $ { errkom } </ span > введите название предмета
</ TD >
</ TR >
< TR >
< TD width = 50 % align = right >
< INPUT TYPE = text NAME = " ${ name } " value = " ${ com } " >
</ TD >
< TD width = 50 %>
< INPUT TYPE = 'submit' value = ' »» ' >
</ TD >
</ TR >
</ TABLE >
</ FORM >
</ td >
</ tr >
</ table >
` ;
2020-09-30 19:12:34 +00:00
document . getElementById ( " hint3 " ) . style . visibility = " visible " ;
document . getElementById ( " hint3 " ) . style . left = '100' ;
document . getElementById ( " hint3 " ) . style . top = '100' ;
document . getElementById ( name ) . focus ();
Hint3Name = name ;
}
</ script >
2020-07-21 15:57:15 +00:00
< div id = hint3 class = ahint ></ div >
< div id = " chpassbank " style = " display:none; position:absolute; top:50px; left:250px; " ></ div >
2021-03-10 21:47:33 +00:00
< table style = " width: 100% " >
2020-07-21 15:57:15 +00:00
< TR >
< td style = " vertical-align: top; width: 350px " >
2020-08-30 10:47:22 +00:00
< ? php $userInfo -> showUserDoll ( 0 , 1 ); ?> <!-- Первый столбец -->
2021-03-10 21:47:33 +00:00
< div style = " text-align: center; " >
2020-08-30 01:09:52 +00:00
< a href = 'main.php?edit=1&undress=all' class = " button " > Снять все </ a >< BR >
2018-12-11 17:40:12 +00:00
< div class = " effectList " style = " padding-top: 15px; max-height: 150px; width: 220px; " >
2021-03-11 19:47:52 +00:00
< ? = $userInfo -> showUserEffects () ?>
2018-12-11 17:40:12 +00:00
</ div >
</ div >
< br >
2018-03-02 14:33:58 +00:00
</ td >
2020-07-21 15:57:15 +00:00
< td style = " vertical-align: top; width: 250px " > <!-- Второй столбец -->
2018-12-11 17:40:12 +00:00
< div >
2021-02-01 16:42:52 +00:00
< br > Уровень : < strong >< ? = $user -> getLevel () ?> </strong>
2021-02-01 19:20:23 +00:00
< br > Опыт : < strong >< ? = $user -> getExperience () ?> </strong>
2020-08-29 23:21:22 +00:00
< br > Побед : < strong > ? ? </ strong >
< br > Поражений : < strong > ? ? </ strong >
< br > Ничьих : < strong > ? ? </ strong >
2021-02-01 16:42:52 +00:00
< br > Деньги : < strong >< ? = $user -> getMoney () ?> </strong> кр.
2018-12-11 17:40:12 +00:00
< HR >
</ div >
2018-03-02 14:33:58 +00:00
<!-- Параметры -->
2018-12-11 17:40:12 +00:00
< div >
2018-12-11 22:26:21 +00:00
< div class = " container " >
2021-03-11 18:14:41 +00:00
Сила : < ? = ( $userStats -> getFreeStatPoints () ? $userStats -> getStat ( 'strength' , 1 ) . '(' . strval ( $userStats -> getFullStats () -> strength ) . ')' : $userStats -> getFullStats () -> strength ) ?>
2020-07-22 14:08:40 +00:00
< br >
2021-03-11 18:14:41 +00:00
Ловкость : < ? = ( $userStats -> getFreeStatPoints () ? $userStats -> getStat ( 'dexterity' , 1 ) . '(' . strval ( $userStats -> getFullStats () -> dexterity ) . ')' : $userStats -> getFullStats () -> dexterity ) ?>
2020-07-21 15:57:15 +00:00
< br >
2021-03-11 18:14:41 +00:00
Интуиция : < ? = ( $userStats -> getFreeStatPoints () ? $userStats -> getStat ( 'intuition' , 1 ) . '(' . strval ( $userStats -> getFullStats () -> intuition ) . ')' : $userStats -> getFullStats () -> intuition ) ?>
2020-07-21 15:57:15 +00:00
< br >
2021-03-11 18:14:41 +00:00
Выносливость : < ? = ( $userStats -> getFreeStatPoints () ? $userStats -> getStat ( 'endurance' , 1 ) . '(' . strval ( $userStats -> getFullStats () -> endurance ) . ')' : $userStats -> getFullStats () -> endurance ) ?>
2020-07-22 14:18:25 +00:00
< br >
2021-03-11 18:14:41 +00:00
Интеллект : < ? = ( $userStats -> getFreeStatPoints () ? $userStats -> getStat ( 'intelligence' , 1 ) . '(' . strval ( $userStats -> getFullStats () -> intelligence ) . ')' : $userStats -> getFullStats () -> intelligence ) ?>
2020-07-22 14:18:25 +00:00
< br >
2021-03-11 18:14:41 +00:00
Мудрость : < ? = ( $userStats -> getFreeStatPoints () ? $userStats -> getStat ( 'wisdom' , 1 ) . '(' . strval ( $userStats -> getFullStats () -> wisdom ) . ')' : $userStats -> getFullStats () -> wisdom ) ?>
2020-08-29 14:54:26 +00:00
< br >
2021-03-10 21:38:14 +00:00
< ? php if ( $userStats -> getFreeStatPoints ()) : ?>
2020-07-22 14:08:40 +00:00
< small style = " color: darkgreen; " > Возможных
2021-03-10 21:38:14 +00:00
увеличений : < ? = $userStats -> getFreeStatPoints () ?> </small><br>
2020-07-22 14:08:40 +00:00
< ? php endif ; ?>
2020-07-20 13:27:32 +00:00
< br >
2021-03-10 21:38:14 +00:00
Здоровье : < ? = $userStats -> getHealth () ?> <br>
Пыль : < ? = $userStats -> getMana () ?> <br>
2021-03-11 19:20:36 +00:00
Уворот : < ? = $userStats -> getFullStats () -> evasion ?> <br>
Точность : < ? = $userStats -> getFullStats () -> accuracy ?> <br>
Шанс крита : < ? = $userStats -> getFullStats () -> criticals ?> <br>
Урон : < ? = $userStats -> getFullStats () -> min_physical_damage ?>
- < ? = $userStats -> getFullStats () -> max_physical_damage ?> <br>
2018-12-11 21:03:48 +00:00
< br >
2020-08-29 23:21:22 +00:00
Защита от огня : ? ? < br >
Защита от воды : ? ? < br >
Защита от вохдуха : ? ? < br >
Защита от земли : ? ? < br >
Защита от яда : ? ? < br >
2021-03-10 21:38:14 +00:00
Броня головы : < ? = $userStats -> getHeadArmor () ?> <br>
Броня корпуса : < ? = $userStats -> getChestArmor () ?> <br>
Броня ног : < ? = $userStats -> getLegArmor () ?> <br>
2018-12-11 22:26:21 +00:00
</ div >
2018-12-11 17:40:12 +00:00
</ div >
2020-07-21 15:57:15 +00:00
</ td >
2021-03-10 21:47:33 +00:00
< td style = " vertical-align: top; " >
2020-07-22 08:43:14 +00:00
< div class = " button-container " > <!-- Меню - кнопки -->
2020-07-21 15:57:15 +00:00
< FORM METHOD = POST ACTION = " ?edit=1 " name = f1 >
2021-02-01 19:20:23 +00:00
< ? php if ( $user -> getShadow () == '0.gif' || $user -> getAdmin () == 1 ) : ?>
2020-07-22 14:08:40 +00:00
< INPUT class = " button primary icon user " TYPE = " submit " name = " setshadow " value = " Образы "
title = " Образы " >
2020-07-21 15:57:15 +00:00
< ? php endif ; ?>
2020-07-22 08:43:14 +00:00
< div class = " button-group " >
2021-02-01 19:20:23 +00:00
< ? php if ( $user -> getRoom () == 20 ) : ?>
2020-10-29 23:30:05 +00:00
< input class = " button icon move " type = " submit " name = " move_inside " value = " Войти внутрь " >
2021-02-01 19:20:23 +00:00
< ? php elseif ( $user -> getRoom () == 1 ) : ?>
2020-10-26 23:43:54 +00:00
< input class = " button primary " type = " submit " name = " battlefield " value = " Поединки " >
2020-10-26 23:07:27 +00:00
< input class = " button icon move " type = " submit " name = " move_outside " value = " Выйти на улицу " >
2020-07-22 08:43:14 +00:00
< ? php endif ; ?>
2020-10-26 23:43:54 +00:00
< input class = " button " type = " submit " name = " module_quest " value = " Активные задания " >
2020-10-26 23:18:02 +00:00
< input class = " button " type = " submit " name = " main_page " value = " Н а главную" >
2020-07-22 08:43:14 +00:00
</ div >
2020-07-21 15:57:15 +00:00
</ div >
2020-08-29 23:21:22 +00:00
< div > <!-- рюкзак -->
2021-03-10 21:47:33 +00:00
< table style = " border: 0; padding: 2px; border-spacing: 1px; width: 100%; background-color: #a5a5a5 " >
2020-07-21 15:57:15 +00:00
< caption > Рюкзак
2021-03-11 18:14:41 +00:00
( масса : < ? = '?? /' . ( int ) $userStats -> getStrength () * 4 ?> )
2020-07-21 15:57:15 +00:00
</ caption >
< ? php
2019-02-12 18:31:23 +00:00
foreach ( $iteminfo as $ii ) {
2021-03-10 21:47:33 +00:00
echo " <tr><td style='width: 100px; text-align: center; background-color: #d3d3d3'> " ;
2019-02-12 18:31:23 +00:00
$ii -> printImage ();
$ii -> printControls ();
2021-03-10 21:47:33 +00:00
echo " <td style='vertical-align: top; background-color: #d3d3d3'> " ;
2019-02-12 18:31:23 +00:00
$ii -> printInfo ();
}
2021-03-10 21:20:56 +00:00
if ( ! $data ) {
echo " <tr><th colspan='3' style='text-align: center; background-color: #c7c7c7'>Пусто " ;
2020-06-23 08:49:49 +00:00
}
2018-03-02 14:33:58 +00:00
?>
</ table >
2020-07-06 19:54:50 +00:00
</ div >
2020-07-21 15:57:15 +00:00
</ td >
2018-03-02 14:33:58 +00:00
</ tr >
2020-09-30 19:12:34 +00:00
</ table >