From be2eef410ab660500254c79c0b60197ab451cad2 Mon Sep 17 00:00:00 2001 From: scooterboo Date: Wed, 26 Apr 2023 20:15:35 -0700 Subject: [PATCH] fix /give avatars - currentTalentLevel cannot be negative (#2132) --- src/main/java/emu/grasscutter/game/avatar/Avatar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/emu/grasscutter/game/avatar/Avatar.java b/src/main/java/emu/grasscutter/game/avatar/Avatar.java index 3f961b8b9..357981913 100644 --- a/src/main/java/emu/grasscutter/game/avatar/Avatar.java +++ b/src/main/java/emu/grasscutter/game/avatar/Avatar.java @@ -895,6 +895,7 @@ public class Avatar { public boolean unlockConstellation(boolean skipPayment) { int currentTalentLevel = this.getCoreProudSkillLevel(); + if (currentTalentLevel < 0) return false; int talentId = this.skillDepot.getTalents().get(currentTalentLevel); return this.unlockConstellation(talentId, skipPayment); }