Правильный урон не отображался.

This commit is contained in:
lopar 2020-08-29 15:15:31 +03:00
parent f32e8a7254
commit 679b9b3b22
2 changed files with 12 additions and 4 deletions

View File

@ -104,15 +104,23 @@ SQL;
}
public function getAccuracyBonus()
{
return self::getBonuses()['sum_accuracy'];
return self::getBonuses()['sum_accuracy'] ?? 0;
}
public function getEvasionBonus()
{
return self::getBonuses()['sum_evasion'];
return self::getBonuses()['sum_evasion'] ?? 0;
}
public function getCriticalsBonus()
{
return self::getBonuses()['sum_criticals'];
return self::getBonuses()['sum_criticals'] ?? 0;
}
public function getMinPhysDamage()
{
return self::getBonuses()['sum_min_phys_damage'];
}
public function getMaxPhysDamage()
{
return self::getBonuses()['sum_max_phys_damage'];
}
/**

View File

@ -745,7 +745,7 @@ try {
Уворот: ?? + <?= $getItemsBonuses->getEvasionBonus() ?><br>
Точность: ?? + <?= $getItemsBonuses->getAccuracyBonus() ?><br>
Шанс крита: ?? + <?= $getItemsBonuses->getCriticalsBonus() ?><br>
Урон: <?= $showUser->minDamage ?> - <?= $showUser->maxDamage ?> <br>
Урон: <?= $showUser->minDamage + $getItemsBonuses->getMinPhysDamage() ?> - <?= $showUser->maxDamage + $getItemsBonuses->getMaxPhysDamage()?> <br>
<br>
<div style="color: gray;">
Защита от огня: ?? <br>