summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.cpp
diff options
context:
space:
mode:
authorAlex Sweet <sweet.giorni@gmail.com>2018-04-11 08:46:11 +0200
committerAlexander Harkness <me@bearbin.net>2018-04-11 08:46:11 +0200
commita0896c63d7a02d1b90572d591a16a79b4274feac (patch)
treee3b58fdc79e6891181e057824c8a39769da4ee72 /src/UI/SlotArea.cpp
parentFix cUUID::Variant (#4213) (diff)
downloadcuberite-a0896c63d7a02d1b90572d591a16a79b4274feac.tar
cuberite-a0896c63d7a02d1b90572d591a16a79b4274feac.tar.gz
cuberite-a0896c63d7a02d1b90572d591a16a79b4274feac.tar.bz2
cuberite-a0896c63d7a02d1b90572d591a16a79b4274feac.tar.lz
cuberite-a0896c63d7a02d1b90572d591a16a79b4274feac.tar.xz
cuberite-a0896c63d7a02d1b90572d591a16a79b4274feac.tar.zst
cuberite-a0896c63d7a02d1b90572d591a16a79b4274feac.zip
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)
{