From 1db13a6fa9867fbf0a7e1ce133fa2f29ce7b69c8 Mon Sep 17 00:00:00 2001 From: Yazawazi <47273265+Yazawazi@users.noreply.github.com> Date: Tue, 19 Apr 2022 19:48:26 +0800 Subject: [PATCH 1/2] Constellation fix --- .../emu/grasscutter/game/managers/InventoryManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/managers/InventoryManager.java b/src/main/java/emu/grasscutter/game/managers/InventoryManager.java index 3d56dfad2..d98f917e2 100644 --- a/src/main/java/emu/grasscutter/game/managers/InventoryManager.java +++ b/src/main/java/emu/grasscutter/game/managers/InventoryManager.java @@ -471,7 +471,7 @@ public class InventoryManager { } // Consume weapon - player.getInventory().removeItem(feed); + player.getInventory().removeItem(feed, 1); // Get weapon.setRefinement(targetRefineLevel); @@ -804,7 +804,11 @@ public class InventoryManager { // Get talent int currentTalentLevel = avatar.getCoreProudSkillLevel(); int nextTalentId = ((avatar.getAvatarId() % 10000000) * 10) + currentTalentLevel + 1; - AvatarTalentData talentData = GenshinData.getAvatarTalentDataMap().get(nextTalentId); + + if (avatar.getAvatarId() == 10000006) { + // Lisa is special in that her talentId starts with 4 instead of 6. + nextTalentId = 40 + currentTalentLevel + 1; + } if (talentData == null) { return; From 5fcecfc73420390651847aaeaa30b2f54bbb613f Mon Sep 17 00:00:00 2001 From: Yazawazi <47273265+Yazawazi@users.noreply.github.com> Date: Tue, 19 Apr 2022 20:05:45 +0800 Subject: [PATCH 2/2] talentData sorry again, forgot to add --- .../java/emu/grasscutter/game/managers/InventoryManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/emu/grasscutter/game/managers/InventoryManager.java b/src/main/java/emu/grasscutter/game/managers/InventoryManager.java index d98f917e2..935652d77 100644 --- a/src/main/java/emu/grasscutter/game/managers/InventoryManager.java +++ b/src/main/java/emu/grasscutter/game/managers/InventoryManager.java @@ -810,6 +810,8 @@ public class InventoryManager { nextTalentId = 40 + currentTalentLevel + 1; } + AvatarTalentData talentData = GenshinData.getAvatarTalentDataMap().get(nextTalentId); + if (talentData == null) { return; }