Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarNetPackets.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-04-30 12:49:47 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2025-04-30 12:49:47 +1000
commitd3d4345e057d95d784e34be9b23e7fe07fb9a7c1 (patch)
treef59fa890e5be1d590e42a337448cecfc6b61850a /source/game/StarNetPackets.cpp
parent86e229012f84744a1e878124d9a6e2991c0460bb (diff)
parent885502bf11057e7de961f178bc85ce93a9f40723 (diff)
Merge branch 'main' into pr/218
Diffstat (limited to 'source/game/StarNetPackets.cpp')
-rw-r--r--source/game/StarNetPackets.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/game/StarNetPackets.cpp b/source/game/StarNetPackets.cpp
index 4b16ce8..a121beb 100644
--- a/source/game/StarNetPackets.cpp
+++ b/source/game/StarNetPackets.cpp
@@ -495,14 +495,20 @@ ChatSendPacket::ChatSendPacket() : sendMode(ChatSendMode::Broadcast) {}
ChatSendPacket::ChatSendPacket(String text, ChatSendMode sendMode) : text(std::move(text)), sendMode(sendMode) {}
+ChatSendPacket::ChatSendPacket(String text, ChatSendMode sendMode, JsonObject data) : text(std::move(text)), sendMode(sendMode), data(std::move(data)) {}
+
void ChatSendPacket::read(DataStream& ds) {
ds.read(text);
ds.read(sendMode);
+ if (ds.streamCompatibilityVersion() >= 5)
+ ds.read(data);
}
void ChatSendPacket::write(DataStream& ds) const {
ds.write(text);
ds.write(sendMode);
+ if (ds.streamCompatibilityVersion() >= 5)
+ ds.write(data);
}
CelestialRequestPacket::CelestialRequestPacket() {}