summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-13 13:36:03 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-13 13:36:03 +0200
commitc88464e62aefb104f59391162b8e39da6041d37a (patch)
tree02ea74f58d426c43568d22095b655b3a48b5d575 /src
parentSome Fixes (diff)
downloadcuberite-c88464e62aefb104f59391162b8e39da6041d37a.tar
cuberite-c88464e62aefb104f59391162b8e39da6041d37a.tar.gz
cuberite-c88464e62aefb104f59391162b8e39da6041d37a.tar.bz2
cuberite-c88464e62aefb104f59391162b8e39da6041d37a.tar.lz
cuberite-c88464e62aefb104f59391162b8e39da6041d37a.tar.xz
cuberite-c88464e62aefb104f59391162b8e39da6041d37a.tar.zst
cuberite-c88464e62aefb104f59391162b8e39da6041d37a.zip
Diffstat (limited to 'src')
-rw-r--r--src/ClientHandle.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 2d068ea07..a5ce510a3 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -2690,6 +2690,12 @@ void cClientHandle::SocketClosed(void)
void cClientHandle::HandleEnchantItem(Byte & WindowID, Byte & Enchantment)
{
cItem Item = m_Player->GetDraggingItem();
+
+ if (!cItem::IsEnchantable(Item.m_ItemType))
+ {
+ return;
+ }
+
cEnchantingWindow * Window = (cEnchantingWindow*)m_Player->GetWindow();
int BaseEnchantmentLevel = Window->GetPropertyValue(Enchantment);