rodecomp/Source/Client/ClientOptions.cpp
ragnarok-clanker af1f0cb451 Decompile fn_03937 (CSession::SetOption)
Batch #16105 by Yommy: 0 byte-identical, 1 confirmed by peer review.

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

Peer-reviewed-by: alisonrag, youko
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-10 14:41:30 +00:00

15 lines
563 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) {
std::int64_t& option = this->m_options.Values()[id];
option = static_cast<std::int64_t>(static_cast<std::uint32_t>(value) | (static_cast<std::uint64_t>(static_cast<std::uint32_t>(extra)) << 32));
}