mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Add comment about power level cap issue
This commit is contained in:
parent
71d1f42cf4
commit
317dc814a4
@ -775,7 +775,9 @@ public class McMMOPlayer implements Identified {
|
|||||||
* @return Modified experience
|
* @return Modified experience
|
||||||
*/
|
*/
|
||||||
private float modifyXpGain(PrimarySkillType primarySkillType, float xp) {
|
private float modifyXpGain(PrimarySkillType primarySkillType, float xp) {
|
||||||
if ((primarySkillType.getMaxLevel() <= getSkillLevel(primarySkillType)) || (Config.getInstance().getPowerLevelCap() <= getPowerLevel())) {
|
//TODO: A rare situation can occur where the default Power Level cap can prevent a player with one skill edited to something silly like Integer.MAX_VALUE from gaining XP in any skill, we may need to represent power level with another data type
|
||||||
|
if ((primarySkillType.getMaxLevel() <= getSkillLevel(primarySkillType))
|
||||||
|
|| (Config.getInstance().getPowerLevelCap() <= getPowerLevel())) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user