diff options
author | Mattes D <github@xoft.cz> | 2015-01-25 17:04:53 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-27 14:53:34 +0100 |
commit | edce2cbdcfdc7eae280bf27a91770b7009b31ebe (patch) | |
tree | 83be869fd376b28647a6391fd051aa4df65e0dfa /src/ClientHandle.cpp | |
parent | Turned off echo in Windows script. (diff) | |
download | cuberite-edce2cbdcfdc7eae280bf27a91770b7009b31ebe.tar cuberite-edce2cbdcfdc7eae280bf27a91770b7009b31ebe.tar.gz cuberite-edce2cbdcfdc7eae280bf27a91770b7009b31ebe.tar.bz2 cuberite-edce2cbdcfdc7eae280bf27a91770b7009b31ebe.tar.lz cuberite-edce2cbdcfdc7eae280bf27a91770b7009b31ebe.tar.xz cuberite-edce2cbdcfdc7eae280bf27a91770b7009b31ebe.tar.zst cuberite-edce2cbdcfdc7eae280bf27a91770b7009b31ebe.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index e90114d1b..a06ddd045 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -711,9 +711,9 @@ void cClientHandle::HandleEnchantItem(Byte a_WindowID, Byte a_Enchantment) return; } - cEnchantingWindow * Window = (cEnchantingWindow*) m_Player->GetWindow(); - cItem Item = *Window->m_SlotArea->GetSlot(0, *m_Player); - int BaseEnchantmentLevel = Window->GetPropertyValue(a_Enchantment); + cEnchantingWindow * Window = reinterpret_cast<cEnchantingWindow *>(m_Player->GetWindow()); + cItem Item = *Window->m_SlotArea->GetSlot(0, *m_Player); // Make a copy of the item + short BaseEnchantmentLevel = Window->GetPropertyValue(a_Enchantment); if (Item.EnchantByXPLevels(BaseEnchantmentLevel)) { |