Commit fbf80e71 authored by GanyusLeftHorn's avatar GanyusLeftHorn Committed by memetrollsXD
Browse files

Fix crafting for mystic enhancement ores.

parent 5e6a1f39
......@@ -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() {
}
......
......@@ -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);
......
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