WIP: разгрузка User:class от сторонних методов.

This commit is contained in:
2023-04-18 12:21:54 +03:00
parent 2bc67ce543
commit 02c76e76ad
15 changed files with 548 additions and 4100 deletions

View File

@@ -1,5 +1,6 @@
<?php
use Location\KnowledgeTemple;
use User\StatsModel;
if (!defined('GAME') || $u->room['file'] != 'ab/hram') {
@@ -9,14 +10,12 @@ if (!defined('GAME') || $u->room['file'] != 'ab/hram') {
require_once $_SERVER['DOCUMENT_ROOT'] . '/_incl_data/class/Insallah/Runes/Runes.php';
$qst_hram = true;
$kt = new KnowledgeTemple();
if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
if (isset($_GET['itm']) && $_GET['itm'] > 0) {
if ($_GET['r'] == 1) {
$_GET['itm'] = (int)$_GET['itm'];
//Переплавка вещей
$resz = $u->plavka($_GET['itm'], 1);
$re = '<font color=red><b>' . $resz . '</b></font>';
unset($resz);
$re = $kt->smeltItem($_GET['itm']);
} elseif ($_GET['r'] == 2) {
//Переплавка рун
$resz = '';
@@ -81,7 +80,7 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
$resz = 'Удачно преобразованы руны &quot;' . $itm1['name'] . '&quot;,&quot;' . $itm2['name'] . '&quot; и &quot;' . $itm3['name'] . '&quot; в &quot;' . $itm4['name'] . '&quot;.';
}
$re = '<font color=red><b>' . $resz . '</b></font>';
$re = $resz;
unset($resz);
}
@@ -147,9 +146,7 @@ if (isset($_GET['itm']) && $qst_hram && $_GET['itm'] > 0) {
} elseif ($_GET['r'] == 1) {
echo ', Алтарь предметов';
} ?></div>
<div align="left"><?php if ($re != '') {
echo '<font color="red"><b>' . $re . '</b></font>';
} ?></div>
<div align="left"><?= $re ??= '' ?></div>
<td width="280" valign="top" align="right">
<table align="right" cellpadding="0" cellspacing="0">
<tr>