fix /give avatars - currentTalentLevel cannot be negative (#2132)

This commit is contained in:
scooterboo 2023-04-26 20:15:35 -07:00 committed by GitHub
parent 4109cb0625
commit be2eef410a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -895,6 +895,7 @@ public class Avatar {
public boolean unlockConstellation(boolean skipPayment) { public boolean unlockConstellation(boolean skipPayment) {
int currentTalentLevel = this.getCoreProudSkillLevel(); int currentTalentLevel = this.getCoreProudSkillLevel();
if (currentTalentLevel < 0) return false;
int talentId = this.skillDepot.getTalents().get(currentTalentLevel); int talentId = this.skillDepot.getTalents().get(currentTalentLevel);
return this.unlockConstellation(talentId, skipPayment); return this.unlockConstellation(talentId, skipPayment);
} }