summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-14 11:48:12 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-14 11:48:12 +0200
commit856e900bf8e74cb478904d6322dcb6310ff7a3b2 (patch)
treead793b40bdefc94e9fe9a59fe76333f4769869b7 /src/ClientHandle.cpp
parentFixed invisibility enchantments (diff)
downloadcuberite-856e900bf8e74cb478904d6322dcb6310ff7a3b2.tar
cuberite-856e900bf8e74cb478904d6322dcb6310ff7a3b2.tar.gz
cuberite-856e900bf8e74cb478904d6322dcb6310ff7a3b2.tar.bz2
cuberite-856e900bf8e74cb478904d6322dcb6310ff7a3b2.tar.lz
cuberite-856e900bf8e74cb478904d6322dcb6310ff7a3b2.tar.xz
cuberite-856e900bf8e74cb478904d6322dcb6310ff7a3b2.tar.zst
cuberite-856e900bf8e74cb478904d6322dcb6310ff7a3b2.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 2dd9cb91e..fc4db1d10 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -2689,14 +2689,14 @@ void cClientHandle::SocketClosed(void)
void cClientHandle::HandleEnchantItem(Byte & WindowID, Byte & Enchantment)
{
- cItem Item = m_Player->GetDraggingItem();
+ cEnchantingWindow * Window = (cEnchantingWindow*)m_Player->GetWindow();
+ cItem Item = *Window->m_SlotArea->GetSlot(0, *m_Player);
if (!cItem::IsEnchantable(Item.m_ItemType))
{
return;
}
- cEnchantingWindow * Window = (cEnchantingWindow*)m_Player->GetWindow();
int BaseEnchantmentLevel = Window->GetPropertyValue(Enchantment);
// Step 1 from Enchanting