Skip to content

Commit

Permalink
Issue rtfmcorp#156 : Profile XP Counter- Fix progress Bar
Browse files Browse the repository at this point in the history
  • Loading branch information
xor72000 committed Sep 5, 2017
1 parent d9beb00 commit f76cf29
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions system/views/components/player/playerRoleplayProfil.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@

$baseLevelPlayer = $this->getContainer()->getParameter('zeus.player.base_level');
$exp = $player_playerRoleplayProfil->getExperience();
$nlv = $baseLevelPlayer * (pow(2, ($player_playerRoleplayProfil->getLevel() - 1)));
$clv = $baseLevelPlayer * (pow(2, ($player_playerRoleplayProfil->getLevel() - 2)));
$prc = ((($exp - $clv) * 200) / $nlv);
$nextlvl = $baseLevelPlayer * (pow(2, ($player_playerRoleplayProfil->getLevel() - 1)));
$currentlvl = $baseLevelPlayer * (pow(2, ($player_playerRoleplayProfil->getLevel() - 2)));
$prc = round(($exp -$currentlvl) / ($nextlvl -$currentlvl) * 100) ;

echo '<div class="number-box grey">';
echo '<span class="label">Expérience / Expérience nécessaire pour le prochain niveau</span>';
echo '<span class="value">'. Format::numberFormat($exp) . ' / ' . Format::numberFormat($nlv) . '</span>';
echo '<span class="progress-bar">';
echo '<span class="label">Expérience</span>';
echo '<span class="value">'. Format::numberFormat($exp).' / ' . Format::numberFormat($nextlvl) . '</span>';
echo '<span title="' . $prc . ' %" class="progress-bar hb bl">';
echo '<span style="width:' . $prc . '%;" class="content"></span>';
echo '</span>';
echo '</div>';
Expand Down

0 comments on commit f76cf29

Please sign in to comment.