mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 01:23:51 +00:00
27 lines
604 B
C++
27 lines
604 B
C++
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include "PacketPlayerTopic.hpp"
|
|
|
|
using namespace std;
|
|
using namespace mwmp;
|
|
|
|
PacketPlayerTopic::PacketPlayerTopic(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
|
{
|
|
packetID = ID_PLAYER_TOPIC;
|
|
}
|
|
|
|
void PacketPlayerTopic::Packet(RakNet::BitStream *bs, bool send)
|
|
{
|
|
PlayerPacket::Packet(bs, send);
|
|
|
|
uint32_t count;
|
|
|
|
if (send)
|
|
count = static_cast<uint32_t>(player->topicChanges.topics.size());
|
|
|
|
RW(count, send);
|
|
|
|
for (auto &&topic : player->topicChanges.topics)
|
|
{
|
|
RW(topic.topicId, send, true);
|
|
}
|
|
}
|