diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index e043698dd..3d96071b5 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1105,8 +1105,8 @@ void cProtocol172::SendExperience (void) cPacketizer Pkt(*this, 0x1f); // Experience Packet cPlayer * Player = m_Client->GetPlayer(); Pkt.WriteBEFloat(Player->GetXpPercentage()); - Pkt.WriteBEInt16(static_cast(std::max(Player->GetXpLevel(), std::numeric_limits::max()))); - Pkt.WriteBEInt16(static_cast(std::max(Player->GetCurrentXp(), std::numeric_limits::max()))); + Pkt.WriteBEInt16(static_cast(std::min(Player->GetXpLevel(), std::numeric_limits::max()))); + Pkt.WriteBEInt16(static_cast(std::min(Player->GetCurrentXp(), std::numeric_limits::max()))); }