Убрано дублирование классов. Helpers уехали из Core. Классы во внешних директориях переехали к остальным.

This commit is contained in:
2023-08-14 18:15:05 +03:00
parent 81a8161d32
commit 0d2b4aba63
114 changed files with 12919 additions and 13151 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace DTO;
class BattleSpell
{
public string $name;
public string $elemental;
public int $damage;
public string $color;
public string $colorCrit;
public string $colorMiss;
public function __construct(string $elemental)
{
if (!in_array($elemental, ['fire', 'water', 'air', 'earth', 'light', 'dark'])) {
$this->elemental = 'raw';
}
if ($elemental === 'fire') {
$this->elemental = $elemental;
$this->color = '#a00';
$this->colorCrit = '#f00';
$this->colorMiss = '#909090';
}
}
}
+3 -3
View File
@@ -2,7 +2,7 @@
namespace DTO;
use Core\ConversionHelper;
use Helper\Conversion;
use ItemModel;
class KnowledgeTempleItem
@@ -26,8 +26,8 @@ class KnowledgeTempleItem
// Общий + конкретный.
$itemData = array_merge(
ConversionHelper::dataStringToArray(ItemModel::getItemData($this->id)),
ConversionHelper::dataStringToArray($item['data']),
Conversion::dataStringToArray(ItemModel::getItemData($this->id)),
Conversion::dataStringToArray($item['data']),
);
$this->level = intval($itemData['tr_lvl']);
}