From 98c019d8317797f885deca1e60aef98b9d36df74 Mon Sep 17 00:00:00 2001 From: hartie95 Date: Mon, 9 Jan 2023 10:41:57 +0100 Subject: [PATCH] [FIX] check currentTalentLevel in unlockConstelations to prevent an exception during force unlock on common traveler --- src/main/java/emu/grasscutter/game/avatar/Avatar.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/emu/grasscutter/game/avatar/Avatar.java b/src/main/java/emu/grasscutter/game/avatar/Avatar.java index f0577ef6..8d2a34ee 100644 --- a/src/main/java/emu/grasscutter/game/avatar/Avatar.java +++ b/src/main/java/emu/grasscutter/game/avatar/Avatar.java @@ -771,6 +771,9 @@ public class Avatar { } public boolean unlockConstellation(boolean skipPayment) { int currentTalentLevel = this.getCoreProudSkillLevel(); + if(currentTalentLevel == -1){ + return false; + } int talentId = this.skillDepot.getTalents().get(currentTalentLevel); return this.unlockConstellation(talentId, skipPayment); }