summaryrefslogtreecommitdiffstats
path: root/src/UI/EnchantingWindow.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/UI/EnchantingWindow.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/UI/EnchantingWindow.h b/src/UI/EnchantingWindow.h
index 9e42c1f4f..a6386ffe2 100644
--- a/src/UI/EnchantingWindow.h
+++ b/src/UI/EnchantingWindow.h
@@ -70,6 +70,25 @@ public:
return m_PropertyValue[a_Property];
}
+ 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])
+ {
+ // Enchanting Area
+ AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */
+ AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */
+ super::DistributeStack(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true);
+ }
+ else
+ {
+ // Inventory or Hotbar
+ AreasInOrder.push_back(m_SlotAreas[0]); /* Enchanting */
+ super::DistributeStack(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
+ }
+ }
+
cSlotArea * m_SlotArea;
protected: