Decompile fn_23822 (CSession::FindTopRecords6144)

Batch #13046 by cremane: 1 byte-identical, 0 confirmed by peer review.

- fn_23822 CSession::FindTopRecords6144: byte-identical

Merged automatically: every function is byte-identical to the original.
This commit is contained in:
ragnarok-clanker 2026-11-06 04:33:03 +00:00
commit 738012143f

View file

@ -1024,17 +1024,17 @@ ITEM_INFO CSession::GetItem3500(int index) const {
void CSession::FindTopRecords6144(int* second, int* first) {
int bestValue = -1;
int secondValue;
for (const auto& entry : this->unknown_6144) {
if (reinterpret_cast<const unsigned char*>(&entry.second.unknown_0000)[1]) {
const int value = entry.second.unknown_002C;
for (auto it = this->unknown_6144.begin(); it != this->unknown_6144.end(); ++it) {
if (reinterpret_cast<const unsigned char*>(&it->second.unknown_0000)[1]) {
const int value = it->second.unknown_002C;
if (bestValue < value) {
secondValue = bestValue;
bestValue = value;
*second = *first;
*first = entry.first;
*first = it->first;
} else if (secondValue < value) {
secondValue = value;
*second = entry.first;
*second = it->first;
}
}
}