Merge pull request #2211 from jan64/master
Fix incorrent experience sending for 1.7 clients
This commit is contained in:
commit
e2c4a0a595
@ -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<Int16>(std::max<int>(Player->GetXpLevel(), std::numeric_limits<Int16>::max())));
|
||||
Pkt.WriteBEInt16(static_cast<Int16>(std::max<int>(Player->GetCurrentXp(), std::numeric_limits<Int16>::max())));
|
||||
Pkt.WriteBEInt16(static_cast<Int16>(std::min<int>(Player->GetXpLevel(), std::numeric_limits<Int16>::max())));
|
||||
Pkt.WriteBEInt16(static_cast<Int16>(std::min<int>(Player->GetCurrentXp(), std::numeric_limits<Int16>::max())));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user