diff options
Diffstat (limited to 'src/UI')
-rw-r--r-- | src/UI/SlotArea.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 24c9bfb03..3729e8dc3 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -730,7 +730,6 @@ void cSlotAreaCrafting::UpdateRecipe(cPlayer & a_Player) cCraftingRecipe & Recipe = GetRecipeForPlayer(a_Player); cRoot::Get()->GetCraftingRecipes()->GetRecipe(a_Player, Grid, Recipe); SetSlot(0, a_Player, Recipe.GetResult()); - m_ParentWindow.SendSlot(a_Player, this, 0); } @@ -1136,7 +1135,9 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player) } } - // TODO: Add enchantments. + // Add the enchantments from the sacrifice to the target + int EnchantmentCost = Input.AddEnchantmentsFromItem(SecondInput); + NeedExp += EnchantmentCost; } } @@ -1166,8 +1167,6 @@ void cSlotAreaAnvil::UpdateResult(cPlayer & a_Player) Input.m_CustomName = RepairedItemName; } - // TODO: Add enchantment exp cost. - m_MaximumCost = RepairCost + NeedExp; if (NeedExp < 0) @@ -2522,6 +2521,8 @@ void cSlotAreaTemporary::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem } itr->second[static_cast<size_t>(a_SlotNum)] = a_Item; + + m_ParentWindow.SendSlot(a_Player, this, a_SlotNum); } |