rodecomp/Source/Client/ClientOptions.cpp
ragnarok-clanker 56f0054e7d Decompile 2 functions in Source/Client/ClientOptions.cpp, Source/Contents/InstantVar.h
Batch #12022 by SapitoSucio: 0 byte-identical, 2 confirmed by peer review.

- fn_03937 CSession::SetOption: logic confirmed by peer review
- fn_12610 CSession::GetOption: logic confirmed by peer review

Peer-reviewed-by: Yommy, Tanke
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-05 12:26:47 +00:00

15 lines
537 B
C++

#include "Client/Session.h"
// OFFSET: 0x0091BE20
// FUNCTION: fn_12610
int CSession::GetOption(int id) const {
const auto entry = this->m_options.Values().find(id);
return entry == this->m_options.Values().end() ? 0 : static_cast<int>(entry->second);
}
// OFFSET: 0x005E7970
// FUNCTION: fn_03937
void CSession::SetOption(int id, int value, int extra) {
const std::uint64_t bits = static_cast<std::uint32_t>(value) | (static_cast<std::uint64_t>(extra) << 32);
this->m_options.Values()[id] = static_cast<std::int64_t>(bits);
}