2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
#include "PacketHandshake.hpp"
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2016-10-17 12:54:36 +00:00
|
|
|
PacketHandshake::PacketHandshake(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
|
|
|
packetID = ID_HANDSHAKE;
|
2017-05-08 16:38:48 +00:00
|
|
|
orderChannel = CHANNEL_SYSTEM;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
void PacketHandshake::Packet(RakNet::BitStream *bs, bool send)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-03-06 09:44:08 +00:00
|
|
|
PlayerPacket::Packet(bs, send);
|
2018-07-03 10:40:58 +00:00
|
|
|
|
2018-12-30 15:23:12 +00:00
|
|
|
if (!RW(player->npc.mName, send, true, maxNameLength) ||
|
|
|
|
!RW(player->serverPassword, send, true, maxPasswordLength))
|
2018-07-03 10:40:58 +00:00
|
|
|
{
|
|
|
|
packetValid = false;
|
|
|
|
return;
|
|
|
|
}
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|