summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-16 13:31:37 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-16 13:31:37 +0200
commit8c33b3c4155b030e2174a453ca067be969473736 (patch)
tree44e89cd5b7b2372909abbde43190ba5c9cfe2a4e
parentCode Optimization (diff)
downloadcuberite-8c33b3c4155b030e2174a453ca067be969473736.tar
cuberite-8c33b3c4155b030e2174a453ca067be969473736.tar.gz
cuberite-8c33b3c4155b030e2174a453ca067be969473736.tar.bz2
cuberite-8c33b3c4155b030e2174a453ca067be969473736.tar.lz
cuberite-8c33b3c4155b030e2174a453ca067be969473736.tar.xz
cuberite-8c33b3c4155b030e2174a453ca067be969473736.tar.zst
cuberite-8c33b3c4155b030e2174a453ca067be969473736.zip
Diffstat (limited to '')
-rw-r--r--src/UI/SlotArea.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index d8d02f458..621854518 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -794,13 +794,13 @@ void cSlotAreaEnchanting::UpdateResult(cPlayer & a_Player)
{
cItem Item = *GetSlot(0, a_Player);
- if (Item.IsEmpty())
+ if (Item.IsEmpty() || !Item.m_Enchantments.IsEmpty())
{
m_ParentWindow.SetProperty(0, 0, a_Player);
m_ParentWindow.SetProperty(1, 0, a_Player);
m_ParentWindow.SetProperty(2, 0, a_Player);
}
- else if (cItem::IsEnchantable(Item.m_ItemType) || Item.m_ItemType == E_ITEM_BOOK && Item.m_Enchantments.IsEmpty())
+ else if (cItem::IsEnchantable(Item.m_ItemType) || Item.m_ItemType == E_ITEM_BOOK)
{
int Bookshelves = GetBookshelvesCount(a_Player.GetWorld());