diff options
author | daniel0916 <theschokolps@gmail.com> | 2014-04-13 13:36:03 +0200 |
---|---|---|
committer | daniel0916 <theschokolps@gmail.com> | 2014-04-13 13:36:03 +0200 |
commit | c88464e62aefb104f59391162b8e39da6041d37a (patch) | |
tree | 02ea74f58d426c43568d22095b655b3a48b5d575 | |
parent | Some Fixes (diff) | |
download | cuberite-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 |
-rw-r--r-- | src/ClientHandle.cpp | 6 |
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); |