Decompile fn_24219 (SendClientOption)
Batch #1572 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_24219 SendClientOption: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Network/ClientOptionPacket.cpp
This commit is contained in:
parent
25e5bacc00
commit
ac43540f18
3 changed files with 36 additions and 0 deletions
26
Source/Network/ClientOptionPacket.cpp
Normal file
26
Source/Network/ClientOptionPacket.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include "Network/ClientOptionPacket.h"
|
||||
#include "Network/Connection/Connection.h"
|
||||
#include "Network/Packets/PacketLengths.h"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace {
|
||||
#pragma pack(push, 1)
|
||||
struct ClientOptionPacket {
|
||||
/* 0000 */ std::int16_t id;
|
||||
/* 0002 */ int option;
|
||||
/* 0006 */ int value;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
static_assert(sizeof(ClientOptionPacket) == 10);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00E48400
|
||||
// FUNCTION: fn_24219
|
||||
void SendClientOption(unsigned char value, CConnection& connection, const PacketLengths& lengths) {
|
||||
ClientOptionPacket packet;
|
||||
packet.id = 0x02D8;
|
||||
packet.option = 6;
|
||||
packet.value = value;
|
||||
connection.Send(lengths.FixedLength(packet.id), &packet);
|
||||
}
|
||||
9
Source/Network/ClientOptionPacket.h
Normal file
9
Source/Network/ClientOptionPacket.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef RAGNAROK_SOURCE_NETWORK_CLIENTOPTIONPACKET_H
|
||||
#define RAGNAROK_SOURCE_NETWORK_CLIENTOPTIONPACKET_H
|
||||
|
||||
class CConnection;
|
||||
class PacketLengths;
|
||||
|
||||
void SendClientOption(unsigned char value, CConnection& connection, const PacketLengths& lengths);
|
||||
|
||||
#endif
|
||||
|
|
@ -444,6 +444,7 @@
|
|||
"Source/File/ResourcePath.cpp": 1,
|
||||
"Source/File/ShortcutFilename.cpp": 1,
|
||||
"Source/Network/ClientKeepalive.cpp": 0,
|
||||
"Source/Network/ClientOptionPacket.cpp": 0,
|
||||
"Source/Network/Connection/Connection.cpp": 0,
|
||||
"Source/Network/Connection/ConnectionBuffer.cpp": 0,
|
||||
"Source/Network/Connection/ConnectionRuntime.cpp": 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue