diff options
Diffstat (limited to '')
-rw-r--r-- | src/UI/SlotArea.cpp | 14 | ||||
-rw-r--r-- | src/UI/SlotArea.h | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 23108c256..eb528d7ca 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -628,11 +628,11 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio { if ((a_ClickAction == caShiftLeftClick) || (a_ClickAction == caShiftRightClick)) { - ShiftClickedResult(a_Player); + ShiftClickedSlot(a_Player); } else { - ClickedResult(a_Player); + ClickedSlot(a_Player); } } } @@ -641,7 +641,7 @@ void cSlotAreaEnchanting::Clicked(cPlayer & a_Player, int a_SlotNum, eClickActio -void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player) +void cSlotAreaEnchanting::ClickedSlot(cPlayer & a_Player) { cItem Item = *GetSlot(0, a_Player); @@ -651,7 +651,7 @@ void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player) m_ParentWindow.SetProperty(1, 0, a_Player); m_ParentWindow.SetProperty(2, 0, a_Player); } - else if (cItem::IsEnchantable(Item.m_ItemType)) + else if (cItem::IsEnchantable(Item.m_ItemType) && Item.m_Enchantments.IsEmpty()) { int PosX = 0; int PosY = 0; @@ -707,9 +707,11 @@ void cSlotAreaEnchanting::ClickedResult(cPlayer & a_Player) -void cSlotAreaEnchanting::ShiftClickedResult(cPlayer & a_Player) +void cSlotAreaEnchanting::ShiftClickedSlot(cPlayer & a_Player) { - LOGWARN("Shift Click!"); + m_ParentWindow.SetProperty(0, 0, a_Player); + m_ParentWindow.SetProperty(1, 0, a_Player); + m_ParentWindow.SetProperty(2, 0, a_Player); } diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index 7feb74aa1..a6af72273 100644 --- a/src/UI/SlotArea.h +++ b/src/UI/SlotArea.h @@ -266,10 +266,10 @@ public: protected: /// Handles a click in the item slot. - void ClickedResult(cPlayer & a_Player); + void ClickedSlot(cPlayer & a_Player); /// Handles a shift-click in the item slot. - void ShiftClickedResult(cPlayer & a_Player); + void ShiftClickedSlot(cPlayer & a_Player); }; |