Commit 2572d55c authored by Melledy's avatar Melledy Committed by GitHub
Browse files

Merge pull request #24 from Yazawazi/main

Fix weapon refine
parents aedfb598 3da79a1d
......@@ -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;
}
......
......@@ -438,9 +438,15 @@ public class InventoryManager {
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) {
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment