2023-11-06 00:40:12 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace User;
|
|
|
|
|
|
|
|
readonly class UserStats
|
|
|
|
{
|
|
|
|
public int $s1;
|
|
|
|
public int $s2;
|
|
|
|
public int $s3;
|
|
|
|
public int $s4;
|
|
|
|
public int $s5;
|
|
|
|
public int $s6;
|
|
|
|
public int $s7;
|
|
|
|
public int $a1;
|
|
|
|
public int $a2;
|
|
|
|
public int $a3;
|
|
|
|
public int $a4;
|
|
|
|
public int $a5;
|
|
|
|
public int $mg1;
|
|
|
|
public int $mg2;
|
|
|
|
public int $mg3;
|
|
|
|
public int $mg4;
|
|
|
|
public int $mg7;
|
|
|
|
|
2023-11-09 17:24:47 +00:00
|
|
|
public function __construct(array $a)
|
2023-11-06 00:40:12 +00:00
|
|
|
{
|
|
|
|
$this->s1 = $a['s1'] ?? 0;
|
|
|
|
$this->s2 = $a['s2'] ?? 0;
|
|
|
|
$this->s3 = $a['s3'] ?? 0;
|
|
|
|
$this->s4 = $a['s4'] ?? 0;
|
|
|
|
$this->s5 = $a['s5'] ?? 0;
|
|
|
|
$this->s6 = $a['s6'] ?? 0;
|
|
|
|
$this->s7 = $a['s7'] ?? 0;
|
|
|
|
$this->a1 = max($a['a1'] ?? 0, $a['aall'] ?? 0);
|
|
|
|
$this->a2 = max($a['a2'] ?? 0, $a['aall'] ?? 0);
|
|
|
|
$this->a3 = max($a['a3'] ?? 0, $a['aall'] ?? 0);
|
|
|
|
$this->a4 = max($a['a4'] ?? 0, $a['aall'] ?? 0);
|
|
|
|
$this->a5 = max($a['a5'] ?? 0, $a['aall'] ?? 0);
|
|
|
|
$this->mg1 = max($a['mg1'] ?? 0, $a['mall'] ?? 0);
|
|
|
|
$this->mg2 = max($a['mg2'] ?? 0, $a['mall'] ?? 0);
|
|
|
|
$this->mg3 = max($a['mg3'] ?? 0, $a['mall'] ?? 0);
|
|
|
|
$this->mg4 = max($a['mg4'] ?? 0, $a['mall'] ?? 0);
|
|
|
|
$this->mg7 = $a['mg7'] ?? 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|