From 68ef35d14a767d55d9283c18bc8f0a4252c286da Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Tue, 16 Jan 2024 07:18:06 +0200 Subject: [PATCH] Removing User::class public array $items for Stat()::class. --- _incl_data/class/User.php | 351 +------------------------------ modules_data/_umenie.php | 37 ++-- modules_data/location/remont.php | 19 +- 3 files changed, 28 insertions(+), 379 deletions(-) diff --git a/_incl_data/class/User.php b/_incl_data/class/User.php index 0b46c1d4..37c9fc8c 100644 --- a/_incl_data/class/User.php +++ b/_incl_data/class/User.php @@ -202,356 +202,7 @@ class User 'speed_dungeon' => 'Скорость передвижения по подземельям', 'zona' => 'Дополнительная зона атаки', ]; - public array $items = [ - 'tr' => [ - 'sex', - 'align', - 'lvl', - 's1', - 's2', - 's3', - 's4', - 's5', - 's6', - 's7', - 's8', - 's9', - 's10', - 's11', - 'a1', - 'a2', - 'a3', - 'a4', - 'a5', - 'a6', - 'a7', - 'mg1', - 'mg2', - 'mg3', - 'mg4', - 'mg5', - 'mg6', - 'mg7', - 'mall', - 'm2all', - 'aall', - 'rep', - 'align_bs', - ], - 'add' => [ - 'no_vor', - 'antm3', - 'acestar', - 'spasenie', - 'exp', - 'enemy_am1', - 'hod_minmana', - 'yhod', - 'noshock_voda', - 'bronze', - 'silvers', - 'gold', - 'repair_discount', - 'yza', - 'yzm', - 'yzma', - 'yza1', - 'yza2', - 'yza3', - 'yza4', - 'yzm1', - 'yzm2', - 'yzm3', - 'yzm4', - 'yzm5', - 'yzm6', - 'yzm7', - 'repair_z', - 'repair_r', - 'notuse_last_pr', - 'yrn_mg_first', - 'antishock', - 'nopryh', - 'speed_dungeon', - 'naemnik', - 'mg2static_points', - 'yrnhealmpprocmg3', - 'nousepriem', - 'notactic', - 'seeAllEff', - '100proboi1', - 'pog2', - 'pog2p', - 'magic_cast', - 'min_heal_proc', - 'no_yv1', - 'no_krit1', - 'no_krit2', - 'no_contr1', - 'no_contr2', - 'no_bl1', - 'no_pr1', - 'no_yv2', - 'no_bl2', - 'no_pr2', - 'silver', - 'pza', - 'pza1', - 'pza2', - 'pza3', - 'pza4', - 'pzm', - 'pzm1', - 'pzm2', - 'pzm3', - 'pzm4', - 'pzm5', - 'pzm6', - 'pzm7', - 'yron_min', - 'yron_max', - 'notravma', - 'min_zonb', - 'min_zona', - 'nokrit', - 'pog', - 'min_use_mp', - 'za1proc', - 'za2proc', - 'za3proc', - 'za4proc', - 'zaproc', - 'zmproc', - 'zm1proc', - 'zm2proc', - 'zm3proc', - 'zm4proc', - 'shopSale', - 'shopSaleEkr', - 's1', - 's2', - 's3', - 's4', - 's5', - 's6', - 's7', - 's8', - 's9', - 's10', - 's11', - 'aall', - 'a1', - 'a2', - 'a3', - 'a4', - 'a5', - 'a6', - 'a7', - 'm2all', - 'mall', - 'mg1', - 'mg2', - 'mg3', - 'mg4', - 'mg5', - 'mg6', - 'mg7', - 'hpAll', - 'hpVinos', - 'mpVinos', - 'mpAll', - 'enAll', - 'hpProc', - 'mpProc', - 'm1', - 'm2', - 'm3', - 'm4', - 'm5', - 'm6', - 'm7', - 'm8', - 'm9', - 'm14', - 'm15', - 'm16', - 'm17', - 'm18', - 'm19', - 'm20', - 'm21', - 'pa1', - 'pa2', - 'pa3', - 'pa4', - 'pm1', - 'pm2', - 'pm3', - 'pm4', - 'pm5', - 'pm6', - 'pm7', - 'za', - 'za1', - 'za2', - 'za3', - 'za4', - 'zma', - 'zm', - 'zm1', - 'zm2', - 'zm3', - 'zm4', - 'zm5', - 'zm6', - 'zm7', - 'mib1', - 'mab1', - 'mib2', - 'mab2', - 'mib3', - 'mab3', - 'mib4', - 'mab4', - 'speedhp', - 'speedmp', - 'm10', - 'm11', - 'm11a', - 'zona', - 'zonb', - 'maxves', - 'minAtack', - 'maxAtack', - 'bonusexp', - 'speeden', - ], - 'sv' => [ - 'pza', - 'pza1', - 'pza2', - 'pza3', - 'pza4', - 'pzm', - 'pzm1', - 'pzm2', - 'pzm3', - 'pzm4', - 'pzm5', - 'pzm6', - 'pzm7', - 'notravma', - 'min_zonb', - 'min_zona', - 'nokrit', - 'pog', - 'min_use_mp', - 'za1proc', - 'za2proc', - 'za3proc', - 'za4proc', - 'zaproc', - 'zmproc', - 'zm1proc', - 'zm2proc', - 'zm3proc', - 'zm4proc', - 'shopSale', - 'shopSaleEkr', - 's1', - 's2', - 's3', - 's4', - 's5', - 's6', - 's7', - 's8', - 's9', - 's10', - 's11', - 'aall', - 'a1', - 'a2', - 'a3', - 'a4', - 'a5', - 'a6', - 'a7', - 'm2all', - 'mall', - 'mg1', - 'mg2', - 'mg3', - 'mg4', - 'mg5', - 'mg6', - 'mg7', - 'hpAll', - 'mpAll', - 'enAll', - 'm1', - 'm2', - 'm3', - 'm4', - 'm5', - 'm6', - 'm7', - 'm8', - 'm9', - 'm14', - 'm15', - 'm16', - 'm17', - 'm18', - 'm19', - 'm20', - 'm21', - 'pa1', - 'pa2', - 'pa3', - 'pa4', - 'pm1', - 'pm2', - 'pm3', - 'pm4', - 'pm5', - 'pm6', - 'pm7', - 'min_use_mp', - 'za', - 'za1', - 'za2', - 'za3', - 'za4', - 'zma', - 'zm', - 'zm1', - 'zm2', - 'zm3', - 'zm4', - 'zm5', - 'zm6', - 'zm7', - 'mib1', - 'mab1', - 'mib2', - 'mab2', - 'mib3', - 'mab3', - 'mib4', - 'mab4', - 'speedhp', - 'speedmp', - 'm10', - 'm11', - 'zona', - 'zonb', - 'maxves', - 'minAtack', - 'maxAtack', - 'speeden', - ], - ]; + public string $error2 = ''; public string $btl_txt = ''; public string $error = ''; diff --git a/modules_data/_umenie.php b/modules_data/_umenie.php index 00279413..91cdefe7 100644 --- a/modules_data/_umenie.php +++ b/modules_data/_umenie.php @@ -1436,6 +1436,9 @@ $tma = '';
getBonus(); + //D5D5D5 , C7C7C7 //задержка в пещерах $clr = 'D5'; @@ -1450,10 +1453,10 @@ $tma = ''; $v2 = ''; $v3 = Conversion::dataStringToArray($u->stats['effects'][$i]['data']); $j = 0; - while ($j < count($u->items['add'])) { - if (isset($v3['add_' . $u->items['add'][$j]])) { - $v1 .= ' • ' . $u->is[$u->items['add'][$j]] . '
'; - $v4 = $v3['add_' . $u->items['add'][$j]]; + while ($j < count($statnames->sysBonusNames)) { + if (isset($v3['add_' . $statnames->sysBonusNames[$j]])) { + $v1 .= ' • ' . $statnames->bonusNames[$statnames->sysBonusNames[$j]] . '
'; + $v4 = $v3['add_' . $statnames->sysBonusNames[$j]]; if ($v4 > 0) { $v4 = '+' . $v4; } elseif ($v4 < 0) { @@ -1510,10 +1513,10 @@ $tma = ''; $v3 = Conversion::dataStringToArray($e['bonus']); $j = 0; - while ($j < count($u->items['add'])) { - if (isset($v3['add_' . $u->items['add'][$j]])) { - $v1 .= ' • ' . $u->is[$u->items['add'][$j]] . '
'; - $v4 = $v3['add_' . $u->items['add'][$j]]; + while ($j < count($statnames->sysBonusNames)) { + if (isset($v3['add_' . $statnames->sysBonusNames[$j]])) { + $v1 .= ' • ' . $statnames->bonusNames[$statnames->sysBonusNames[$j]] . '
'; + $v4 = $v3['add_' . $statnames->sysBonusNames[$j]]; if ($v4 > 0) { $v4 = '+' . $v4; } elseif ($v4 < 0) { @@ -1845,13 +1848,13 @@ $tma = ''; while ($i <= 8) { if (isset($st[$i])) { $j = 0; - while ($j < count($u->items['add'])) { - if (isset($st[$i][$u->items['add'][$j]])) { - $vr = $st[$i][$u->items['add'][$j]]; + while ($j < count($statnames->sysBonusNames)) { + if (isset($st[$i][$statnames->sysBonusNames[$j]])) { + $vr = $st[$i][$statnames->sysBonusNames[$j]]; if ($vr > 0) { $vr = '+' . $vr; } - $b[$i] .= '   • ' . $u->is[$u->items['add'][$j]] . ': ' . $vr . '
'; + $b[$i] .= '   • ' . $statnames->bonusNames[$statnames->sysBonusNames[$j]] . ': ' . $vr . '
'; } $j++; } @@ -1917,19 +1920,17 @@ $tma = ''; } $cmss .= '
'; - $ia = $u->items['add']; - //добавляем действия комплекта $cmss .= ''; $ij = 0; $sti = Conversion::dataStringToArray($plc['data']); - while ($ij < count($ia)) { - if (isset($ia[$ij]) && isset($sti[$ia[$ij]])) { - $mad = $sti[$ia[$ij]]; + while ($ij < count($statnames->sysBonusNames)) { + if (isset($statnames->sysBonusNames[$ij]) && isset($sti[$statnames->sysBonusNames[$ij]])) { + $mad = $sti[$statnames->sysBonusNames[$ij]]; if ($mad > 0) { $mad = '+' . $mad; } - $cmss .= '        • ' . $u->is[$ia[$ij]] . ': ' . $mad . '
'; + $cmss .= '        • ' . $statnames->bonusNames[$statnames->sysBonusNames[$ij]] . ': ' . $mad . '
'; } $ij++; } diff --git a/modules_data/location/remont.php b/modules_data/location/remont.php index 4c7b8800..211f41ba 100644 --- a/modules_data/location/remont.php +++ b/modules_data/location/remont.php @@ -433,17 +433,14 @@ if (isset($_GET['upgrade']) && true == false) { $restat = []; $i = 0; - while ($i < count($u->items['add'])) { - if (isset($ro['add_' . $u->items['add'][$i]])) { - $po['add_' . $u->items['add'][$i]] -= $ro['add_' . $u->items['add'][$i]]; - if ($po['add_' . $u->items['add'][$i]] == 0) { - unset($po['add_' . $u->items['add'][$i]]); - } - } - if (isset($ro['sv_' . $u->items['add'][$i]])) { - $po['sv_' . $u->items['add'][$i]] -= $ro['sv_' . $u->items['add'][$i]]; - if ($po['sv_' . $u->items['add'][$i]] == 0) { - unset($po['sv_' . $u->items['add'][$i]]); + $statnames = new \Model\Constant\Stat(); + $statnames->getBonus(); + + while ($i < count($statnames->sysBonusNames)) { + if (isset($ro['add_' . $statnames->sysBonusNames[$i]])) { + $po['add_' . $statnames->sysBonusNames[$i]] -= $ro['add_' . $statnames->sysBonusNames[$i]]; + if ($po['add_' . $statnames->sysBonusNames[$i]] == 0) { + unset($po['add_' . $statnames->sysBonusNames[$i]]); } } $i++;