summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/UI/SlotArea.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index d093bb337..ab1edf595 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1909,7 +1909,6 @@ const cItem * cSlotAreaFurnace::GetSlot(int a_SlotNum, cPlayer & a_Player) const
void cSlotAreaFurnace::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
{
- UNUSED(a_Player);
m_Furnace->SetSlot(a_SlotNum, a_Item);
}
@@ -1932,6 +1931,12 @@ void cSlotAreaFurnace::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum)
void cSlotAreaFurnace::HandleSmeltItem(const cItem & a_Result, cPlayer & a_Player)
{
+ int Reward = m_Furnace->GetAndResetReward();
+ if (Reward > 0)
+ {
+ a_Player.GetWorld()->SpawnExperienceOrb(a_Player.GetPosX(), a_Player.GetPosY(), a_Player.GetPosZ(), Reward);
+ }
+
/** TODO 2014-05-12 xdot: Figure out when to call this method. */
switch (a_Result.m_ItemType)
{