From f76cf29b0527eae37436a4dc0d759247ab16b8ae Mon Sep 17 00:00:00 2001 From: Tinydetoon Date: Tue, 5 Sep 2017 08:43:52 +0200 Subject: [PATCH] Issue #156 : Profile XP Counter- Fix progress Bar --- .../views/components/player/playerRoleplayProfil.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/views/components/player/playerRoleplayProfil.php b/system/views/components/player/playerRoleplayProfil.php index 0a566355d..a1475c07a 100755 --- a/system/views/components/player/playerRoleplayProfil.php +++ b/system/views/components/player/playerRoleplayProfil.php @@ -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 '
'; - echo 'Expérience / Expérience nécessaire pour le prochain niveau'; - echo ''. Format::numberFormat($exp) . ' / ' . Format::numberFormat($nlv) . ''; - echo ''; + echo 'Expérience'; + echo ''. Format::numberFormat($exp).' / ' . Format::numberFormat($nextlvl) . ''; + echo ''; echo ''; echo ''; echo '
';