From 1460c792efb8e2595f57fed40b68d2e19f95fc55 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 12:30:28 +0000 Subject: [PATCH] Decompile fn_24171 (MessengerMember::Serialize) Batch #7905 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_24171 MessengerMember::Serialize: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, alisonrag, Snow Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Replay.cpp | 52 +++++++++++++++++++++ Source/Client/Session.h | 1 + Source/Contents/Messenger/MessengerMember.h | 1 + 3 files changed, 54 insertions(+) diff --git a/Source/Client/Replay.cpp b/Source/Client/Replay.cpp index dba39761..c75cdc06 100644 --- a/Source/Client/Replay.cpp +++ b/Source/Client/Replay.cpp @@ -14,6 +14,9 @@ #include "UI/Window/UIWindowMgr.h" #include "Client/Session.h" #include "Contents/RenewQuestMgr.h" +#include "Contents/ClientState.h" +#include "Contents/Configuration/ServiceOptions.h" +#include "Contents/Messenger/MessengerMember.h" // GLOBAL: gl_24549 int g_replayAnimationScaling = 0; @@ -1102,6 +1105,55 @@ struct ReplayShopFlagRecord { }; } +// OFFSET: 0x00E30A90 +// FUNCTION: fn_24171 +std::vector MessengerMember::Serialize() const { + std::vector records; + { + const auto record = BuildReplayTaggedRecord(251, nullptr, 0); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(253, &this->valid, sizeof(this->valid)); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(254, &this->accountId, sizeof(this->accountId)); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(255, &this->characterId, sizeof(this->characterId)); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(258, &this->leader, sizeof(this->leader)); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(259, &this->offline, sizeof(this->offline)); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(260, &this->color, sizeof(this->color)); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(256, this->name.c_str(), this->name.size()); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(257, this->map.c_str(), this->map.size()); + records.insert(records.end(), record.begin(), record.end()); + } + { + const auto record = BuildReplayTaggedRecord(252, nullptr, 0); + records.insert(records.end(), record.begin(), record.end()); + } + return records; +} + +// OFFSET: 0x00E3E550 + // OFFSET: 0x00E41E60 // FUNCTION: fn_24201 std::vector CSession::BuildShopReplayRecords() { diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 0eb50a4f..bc90f4c6 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -743,6 +743,7 @@ public: std::uint32_t ReadReplayReserved(const std::vector& data); std::uint32_t ReadReplayEntryQueue(const std::vector& data); std::vector BuildShortcutReplayRecords(); + std::vector BuildCharacterReplayRecords(); std::vector BuildReservedReplayRecords(); std::vector BuildShopReplayRecords(); std::vector BuildExtraReplayRecords(); std::vector BuildStatsReplayRecords(); std::vector BuildSkillListReplayPacket(short id); void SetHomunculusAutoFeed(bool enabled); diff --git a/Source/Contents/Messenger/MessengerMember.h b/Source/Contents/Messenger/MessengerMember.h index 20787db6..a9a5a410 100644 --- a/Source/Contents/Messenger/MessengerMember.h +++ b/Source/Contents/Messenger/MessengerMember.h @@ -13,6 +13,7 @@ struct MessengerMember { MessengerMember& operator=(const MessengerMember& other); ~MessengerMember(); std::uint32_t Deserialize(const std::vector& data); + std::vector Serialize() const; /* 0000 */ std::int32_t valid; /* 0004 */ std::uint32_t accountId;