Decompile fn_19330 (Replay::RecordCachedPackets)

Batch #7073 by aDw: 0 byte-identical, 1 confirmed by peer review.

- fn_19330 Replay::RecordCachedPackets: logic confirmed by peer review

Peer-reviewed-by: eAthena, Lumen
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-31 03:45:58 +00:00
commit 480be601a0
2 changed files with 27 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#include "Client/Mode/ModeDragState.h"
#include "Client/Replay.h"
#include "Client/ReplayPacketRecorder.h"
#include "Client/Session.h"
#include "Network/Packets/PacketLengths.h"
#include "Network/Packets/PacketId.h"
#include "UI/Window/WindowPolicy.h"
@ -193,6 +194,31 @@ bool Replay::RecordPacket(const std::vector<unsigned char>& packet, int event, s
return true;
}
// OFFSET: 0x00B86500
// FUNCTION: fn_19330
void Replay::RecordCachedPackets() {
ReplayCachedPacket* packets = this->cachedPackets.data();
Replay::Instance().RecordPacket(packets[2459].bytes, 41, 0);
Replay::Instance().RecordPacket(packets[470].bytes, 41, 0);
{
std::vector<unsigned char> packet = g_session.BuildSkillListReplayPacket(0x10F);
Replay::Instance().RecordPacket(packet, 41, 0);
}
{
std::vector<unsigned char> packet = g_session.BuildSkillListReplayPacket(0x235);
Replay::Instance().RecordPacket(packet, 41, 0);
}
{
std::vector<unsigned char> packet = g_session.BuildSkillListReplayPacket(0x29D);
Replay::Instance().RecordPacket(packet, 41, 0);
}
if (g_session.unknown_5C1C != 0) {
std::vector<unsigned char> packet = g_session.BuildStatusReplayPacket();
Replay::Instance().RecordPacket(packet, 41, 0);
}
}
namespace {
#pragma pack(push, 1)
struct DropRecord {