From 897d68dc35620f0e6c33fe4a6083a76ab43a9a57 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 20 Jul 2014 01:22:58 +0200 Subject: Add armor items directly to the armor slots. --- src/UI/SlotArea.cpp | 4 ++-- src/UI/SlotArea.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/UI') diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 6f4f65ca3..e9b1ef8e0 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -1926,7 +1926,7 @@ void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C return; } - if (DraggingItem.IsEmpty() || CanPlaceInSlot(a_SlotNum, DraggingItem)) + if (DraggingItem.IsEmpty() || CanPlaceArmorInSlot(a_SlotNum, DraggingItem)) { // Swap contents cItem tmp(DraggingItem); @@ -1945,7 +1945,7 @@ void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C -bool cSlotAreaArmor::CanPlaceInSlot(int a_SlotNum, const cItem & a_Item) +bool cSlotAreaArmor::CanPlaceArmorInSlot(int a_SlotNum, const cItem & a_Item) { switch (a_SlotNum) { diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index 7f37159b7..fa842bb81 100644 --- a/src/UI/SlotArea.h +++ b/src/UI/SlotArea.h @@ -161,7 +161,7 @@ public: /** Called when a player clicks in the window. Parameters taken from the click packet. */ virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; - bool CanPlaceInSlot(int a_SlotNum, const cItem & a_Item); + static bool CanPlaceArmorInSlot(int a_SlotNum, const cItem & a_Item); } ; -- cgit v1.2.3