Restore level 119 for hero

Restore level 119 for hero
This commit is contained in:
novgorodschi catalin
2026-07-30 10:15:51 +03:00
parent a9977edc5c
commit fd9e9fa3cb
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ function go_url(url){ location=url; return false; }
<div class="body">
<?php if($isMax):?>
<div style="text-align:center;padding:8px;background:#fef3c7;border:1px solid #fde68a;border-radius:6px;color:#92400e;font-size:12px;margin-bottom:10px;">
Hero is at the maximum level (<?php echo isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 120; ?>) no more points can be added.
Hero is at the maximum level (<?php echo isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 119; ?>) no more points can be added.
</div>
<?php endif;?>
<table class="stat-table">
+1 -1
View File
@@ -150,7 +150,7 @@ if ($hero !== false) {
+ (int)$h['defencebonus'] + (int)$h['regeneration'] + (int)($h['resources'] ?? 0);
// totalul de puncte vine din tabelul de niveluri: 5 initiale + 5 per nivel
$hMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 120;
$hMaxLevel = isset($hero_levels) ? max(array_keys($hero_levels)) - 1 : 119;
$hMaxPoints = 5 + ($hMaxLevel * 5);
$count_level_exp = max(0, $hMaxPoints - $used);
if ($h['points'] > $count_level_exp) $h['points'] = $count_level_exp;