Removing User::class public array $items for Stat()::class.

This commit is contained in:
Ivor Barhansky 2024-01-16 07:18:06 +02:00
parent b0d1388cda
commit 68ef35d14a
3 changed files with 28 additions and 379 deletions

View File

@ -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 = '';

View File

@ -1436,6 +1436,9 @@ $tma = '';
<div class="dtz" ID='dL5'>
<div style="margin:5px;">
<?php
$statnames = new \Model\Constant\Stat();
$statnames->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 .= '&nbsp;&bull; ' . $u->is[$u->items['add'][$j]] . '<br>';
$v4 = $v3['add_' . $u->items['add'][$j]];
while ($j < count($statnames->sysBonusNames)) {
if (isset($v3['add_' . $statnames->sysBonusNames[$j]])) {
$v1 .= '&nbsp;&bull; ' . $statnames->bonusNames[$statnames->sysBonusNames[$j]] . '<br>';
$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 .= '&nbsp;&bull; ' . $u->is[$u->items['add'][$j]] . '<br>';
$v4 = $v3['add_' . $u->items['add'][$j]];
while ($j < count($statnames->sysBonusNames)) {
if (isset($v3['add_' . $statnames->sysBonusNames[$j]])) {
$v1 .= '&nbsp;&bull; ' . $statnames->bonusNames[$statnames->sysBonusNames[$j]] . '<br>';
$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] .= '&nbsp;&nbsp;&nbsp;&bull; ' . $u->is[$u->items['add'][$j]] . ': ' . $vr . '<br>';
$b[$i] .= '&nbsp;&nbsp;&nbsp;&bull; ' . $statnames->bonusNames[$statnames->sysBonusNames[$j]] . ': ' . $vr . '<br>';
}
$j++;
}
@ -1917,19 +1920,17 @@ $tma = '';
}
$cmss .= '<br>';
$ia = $u->items['add'];
//добавляем действия комплекта
$cmss .= '<small style="color:grey">';
$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 .= '&nbsp; &nbsp; &nbsp; &nbsp; &bull; ' . $u->is[$ia[$ij]] . ': ' . $mad . '<br>';
$cmss .= '&nbsp; &nbsp; &nbsp; &nbsp; &bull; ' . $statnames->bonusNames[$statnames->sysBonusNames[$ij]] . ': ' . $mad . '<br>';
}
$ij++;
}

View File

@ -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++;