diff options
author | daniel0916 <theschokolps@gmail.com> | 2014-04-13 13:53:10 +0200 |
---|---|---|
committer | daniel0916 <theschokolps@gmail.com> | 2014-04-13 13:53:10 +0200 |
commit | 9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e (patch) | |
tree | 76b2f29752b01df1fb612c0247f462fec2222511 | |
parent | Fixed Server Crash (diff) | |
download | cuberite-9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e.tar cuberite-9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e.tar.gz cuberite-9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e.tar.bz2 cuberite-9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e.tar.lz cuberite-9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e.tar.xz cuberite-9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e.tar.zst cuberite-9dc4617e8d6ad6d3fa874e67dff2f79f4d1a651e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index a5ce510a3..96afff5bc 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -3113,7 +3113,7 @@ void cClientHandle::HandleEnchantItem(Byte & WindowID, Byte & Enchantment) Item.m_Enchantments.AddFromString(Enchantment3.ToString()); enchantments.erase(std::remove(enchantments.begin(), enchantments.end(), Enchantment3), enchantments.end()); - if (m_Player->DeltaExperience(Window->GetPropertyValue(Enchantment)) >= 0 || m_Player->IsGameModeCreative()) + if (m_Player->DeltaExperience(-m_Player->XpForLevel(Window->GetPropertyValue(Enchantment))) >= 0 || m_Player->IsGameModeCreative()) { m_Player->GetWindow()->SetSlot(*m_Player, 0, Item); |