From fbf80e7156945de5a28306e9cfb7a14e1a622ab2 Mon Sep 17 00:00:00 2001 From: GanyusLeftHorn <1244229+GanyusLeftHorn@users.noreply.github.com> Date: Mon, 11 Jul 2022 17:25:34 -0700 Subject: [PATCH] Fix crafting for mystic enhancement ores. --- src/main/java/emu/grasscutter/data/excels/ForgeData.java | 5 +++++ .../grasscutter/game/managers/forging/ForgingManager.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/data/excels/ForgeData.java b/src/main/java/emu/grasscutter/data/excels/ForgeData.java index 554c9f446..3e6bf3e83 100644 --- a/src/main/java/emu/grasscutter/data/excels/ForgeData.java +++ b/src/main/java/emu/grasscutter/data/excels/ForgeData.java @@ -12,6 +12,7 @@ public class ForgeData extends GameResource { private int id; private int playerLevel; private int forgeType; + private int showItemId; private int resultItemId; private int resultItemCount; private int forgeTime; @@ -66,6 +67,10 @@ public class ForgeData extends GameResource { return materialItems; } + public int getShowItemId() { + return showItemId; + } + @Override public void onLoad() { } diff --git a/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java b/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java index 28257a685..54ad374e1 100644 --- a/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java +++ b/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java @@ -198,8 +198,9 @@ public class ForgingManager { // Give finished items to the player. ForgeData data = GameData.getForgeDataMap().get(forge.getForgeId()); - ItemData resultItemData = GameData.getItemDataMap().get(data.getResultItemId()); + int resultId = data.getResultItemId() > 0 ? data.getResultItemId() : data.getShowItemId(); + ItemData resultItemData = GameData.getItemDataMap().get(resultId); GameItem addItem = new GameItem(resultItemData, data.getResultItemCount() * finished); this.player.getInventory().addItem(addItem);