summaryrefslogtreecommitdiffstats
path: root/src/UI/AnvilWindow.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/UI/AnvilWindow.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/UI/AnvilWindow.h b/src/UI/AnvilWindow.h
index 97dd792d3..fd5c77871 100644
--- a/src/UI/AnvilWindow.h
+++ b/src/UI/AnvilWindow.h
@@ -55,6 +55,24 @@ public:
a_PosZ = m_BlockZ;
}
+ virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override
+ {
+ cSlotAreas AreasInOrder;
+
+ if (a_ClickedArea == m_SlotAreas[0])
+ {
+ // Anvil Slot
+ AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
+ AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
+ }
+ else
+ {
+ // Inventory or Hotbar
+ AreasInOrder.push_back(m_SlotAreas[0]); /* Anvil */
+ }
+ super::DistributeStack(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ }
+
protected:
cSlotAreaAnvil * m_AnvilSlotArea;
AString m_RepairedItemName;