Fix crafting for mystic enhancement ores.

This commit is contained in:
GanyusLeftHorn 2022-07-11 17:25:34 -07:00 committed by memetrollsXD
parent 5e6a1f399c
commit fbf80e7156
2 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,7 @@ public class ForgeData extends GameResource {
private int id; private int id;
private int playerLevel; private int playerLevel;
private int forgeType; private int forgeType;
private int showItemId;
private int resultItemId; private int resultItemId;
private int resultItemCount; private int resultItemCount;
private int forgeTime; private int forgeTime;
@ -66,6 +67,10 @@ public class ForgeData extends GameResource {
return materialItems; return materialItems;
} }
public int getShowItemId() {
return showItemId;
}
@Override @Override
public void onLoad() { public void onLoad() {
} }

View File

@ -198,8 +198,9 @@ public class ForgingManager {
// Give finished items to the player. // Give finished items to the player.
ForgeData data = GameData.getForgeDataMap().get(forge.getForgeId()); 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); GameItem addItem = new GameItem(resultItemData, data.getResultItemCount() * finished);
this.player.getInventory().addItem(addItem); this.player.getInventory().addItem(addItem);