1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 19:19:55 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Object/PacketObjectDialogueChoice.cpp
David Cernat 1a4b817b31 [General] Rework ObjectDialogueChoice for multilingual compatibility
Use a different system for sending and applying ObjectDialogueChoice packets.
2020-12-13 08:09:14 +02:00

21 lines
611 B
C++

#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketObjectDialogueChoice.hpp"
using namespace mwmp;
PacketObjectDialogueChoice::PacketObjectDialogueChoice(RakNet::RakPeerInterface *peer) : ObjectPacket(peer)
{
packetID = ID_OBJECT_DIALOGUE_CHOICE;
hasCellData = true;
}
void PacketObjectDialogueChoice::Object(BaseObject& baseObject, bool send)
{
ObjectPacket::Object(baseObject, send);
RW(baseObject.dialogueChoiceType, send);
if (baseObject.dialogueChoiceType == DialogueChoiceType::TOPIC)
RW(baseObject.topicId, send, true);
RW(baseObject.guiId, send);
}