From f74ca6e9a036c0a99ce2508a4cc9054e84f1d9fc Mon Sep 17 00:00:00 2001 From: Yazawazi <47273265+Yazawazi@users.noreply.github.com> Date: Tue, 19 Apr 2022 18:55:32 +0800 Subject: [PATCH 1/2] getAwakenMaterial Add --- src/main/java/emu/grasscutter/data/def/ItemData.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/data/def/ItemData.java b/src/main/java/emu/grasscutter/data/def/ItemData.java index 6c87afead..25be666e7 100644 --- a/src/main/java/emu/grasscutter/data/def/ItemData.java +++ b/src/main/java/emu/grasscutter/data/def/ItemData.java @@ -48,6 +48,7 @@ public class ItemData extends GenshinResource { private int WeaponBaseExp; private int StoryId; private int AvatarPromoteId; + private int AwakenMaterial; private int[] AwakenCosts; private int[] SkillAffix; private WeaponProperty[] WeaponProp; @@ -160,6 +161,10 @@ public class ItemData extends GenshinResource { return WeaponBaseExp; } + public int getAwakenMaterial() { + return AwakenMaterial; + } + public int[] getAwakenCosts() { return AwakenCosts; } @@ -250,4 +255,4 @@ public class ItemData extends GenshinResource { } } -} \ No newline at end of file +} From 3da79a1dc1990264b9d89fbb9b616f2219c08ca6 Mon Sep 17 00:00:00 2001 From: Yazawazi <47273265+Yazawazi@users.noreply.github.com> Date: Tue, 19 Apr 2022 18:59:43 +0800 Subject: [PATCH 2/2] Fix refine --- .../grasscutter/game/managers/InventoryManager.java | 10 ++++++++-- 1 file changed, 8 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 282cd2cd8..3d56dfad2 100644 --- a/src/main/java/emu/grasscutter/game/managers/InventoryManager.java +++ b/src/main/java/emu/grasscutter/game/managers/InventoryManager.java @@ -438,8 +438,14 @@ public class InventoryManager { return; } - if (weapon.getItemType() != ItemType.ITEM_WEAPON || weapon.getItemId() != feed.getItemId()) { - return; + if (weapon.getItemData().getAwakenMaterial() == 0) { + if (weapon.getItemType() != ItemType.ITEM_WEAPON || weapon.getItemId() != feed.getItemId()) { + return; + } + } else { + if (weapon.getItemType() != ItemType.ITEM_WEAPON || weapon.getItemData().getAwakenMaterial() != feed.getItemId()) { + return; + } } if (weapon.getRefinement() >= 4 || weapon.getAffixes() == null || weapon.getAffixes().size() == 0) {