fixed XpGetPercentage
This commit is contained in:
parent
79a98627a2
commit
ea778c7027
Binary file not shown.
@ -318,8 +318,10 @@ int cPlayer::XpGetLevel()
|
||||
float cPlayer::XpGetPercentage()
|
||||
{
|
||||
int currentLevel = CalcLevelFromXp(m_XpTotal);
|
||||
int currentLevel_XpBase = XpForLevel(currentLevel);
|
||||
|
||||
return (float)m_XpTotal / (float)XpForLevel(1+currentLevel);
|
||||
return (float)(m_XpTotal - currentLevel_XpBase) /
|
||||
(float)(XpForLevel(1+currentLevel) - currentLevel_XpBase);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user