diff options
author | peterbell10 <peterbell10@live.co.uk> | 2020-10-05 12:27:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 12:27:14 +0200 |
commit | a9031b6bae742b333b1b390192fa590f2ecb07ea (patch) | |
tree | b2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/ClientHandle.cpp | |
parent | Fixed current end generator (#4968) (diff) | |
download | cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.gz cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.bz2 cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.lz cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.xz cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.zst cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index c7d96f9b3..0ef041f32 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -809,10 +809,10 @@ void cClientHandle::HandleEnchantItem(UInt8 a_WindowID, UInt8 a_Enchantment) const auto DeltaForPercent = CurrentFillPercent * (m_Player->XpForLevel(TargetLevel + 1) - m_Player->XpForLevel(TargetLevel)); // Apply the experience delta: - m_Player->DeltaExperience(DeltaForLevel + DeltaForPercent); + m_Player->DeltaExperience(FloorC(DeltaForLevel + DeltaForPercent)); // Now reduce the lapis in our stack and send it back: - LapisStack.AddCount(-LapisRequired); + LapisStack.AddCount(static_cast<char>(-LapisRequired)); Window->m_SlotArea->SetSlot(1, *m_Player, LapisStack); } else |