Merge pull request #3058 from AlexKolpa/fix-total
Fix setting of hiscore stats after combat level
This commit is contained in:
@@ -636,7 +636,10 @@ public class HiscorePanel extends PluginPanel
|
|||||||
*/
|
*/
|
||||||
if (SKILLS.contains(skill))
|
if (SKILLS.contains(skill))
|
||||||
{
|
{
|
||||||
int currentLevel = Experience.getLevelForXp((int) result.getSkill(skill).getExperience());
|
long experience = result.getSkill(skill).getExperience();
|
||||||
|
if (experience >= 0)
|
||||||
|
{
|
||||||
|
int currentLevel = Experience.getLevelForXp((int) experience);
|
||||||
int currentXp = (int) result.getSkill(skill).getExperience();
|
int currentXp = (int) result.getSkill(skill).getExperience();
|
||||||
int xpForCurrentLevel = Experience.getXpForLevel(currentLevel);
|
int xpForCurrentLevel = Experience.getXpForLevel(currentLevel);
|
||||||
int xpForNextLevel = currentLevel + 1 <= Experience.MAX_VIRT_LEVEL ? Experience.getXpForLevel(currentLevel + 1) : -1;
|
int xpForNextLevel = currentLevel + 1 <= Experience.MAX_VIRT_LEVEL ? Experience.getXpForLevel(currentLevel + 1) : -1;
|
||||||
@@ -653,6 +656,7 @@ public class HiscorePanel extends PluginPanel
|
|||||||
+ "</div>"
|
+ "</div>"
|
||||||
+ "</div>";
|
+ "</div>";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return openingTags + content + closingTags;
|
return openingTags + content + closingTags;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user