Decompile 2 functions in Source/UI/Rodex/UIRodexInboxWnd.cpp, Source/UI/Rodex/UIRodexInboxWnd.h, ...

Batch #7201 by aDw: 0 byte-identical, 2 confirmed by peer review.

- fn_10043 RequestRodexMailAction: logic confirmed by peer review
- fn_10044 UIRodexInboxWnd::RequestAllMailActions: logic confirmed by peer review

Peer-reviewed-by: eAthena, alisonrag, gordaoprogramas
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 06:38:03 +00:00
commit 153bb0dd91
3 changed files with 55 additions and 2 deletions

View file

@ -48,7 +48,7 @@ public:
/* 0004 */ int unknown_0004;
/* 0008 */ int unknown_0008;
/* 000C */ int unknown_000C;
/* 0010 */ bool unknown_0010;
/* 0010 */ unsigned char unknown_0010;
/* 0014 */ int unknown_0014;
/* 0018 */ int unknown_0018;
/* 001C */ bool unknown_001C;

View file

@ -360,7 +360,7 @@ bool RodexMailEntryLess::operator()(const RodexMailEntry& left, const RodexMailE
// OFFSET: 0x008054D0
// FUNCTION: fn_10043
bool RequestRodexMailAction(int type, std::uint64_t mailId) {
bool __stdcall RequestRodexMailAction(int type, std::uint64_t mailId) {
std::map<std::int64_t, RodexMail>* mails = RodexMailsOfType(type);
if (mails == nullptr) {
return false;
@ -372,5 +372,57 @@ bool RequestRodexMailAction(int type, std::uint64_t mailId) {
}
g_modeMgr.GetGameMode()->SendMsg(0xC4, static_cast<int>(mailId), type, 0, 0);
if (g_windowMgr.unknown_045C != 0) {
g_windowMgr.CloseWindow(265);
}
return true;
}
// OFFSET: 0x00805570
// FUNCTION: fn_10044
void UIRodexInboxWnd::RequestAllMailActions() {
int requested = 0;
int skipped = 0;
if (this->unknown_01D4 == 1) {
for (std::vector<RodexMailEntry>::iterator entry = this->searchResults.begin(); entry != this->searchResults.end(); ++entry) {
std::map<std::int64_t, RodexMail>* mails = RodexMailsOfType(entry->first);
if (mails == nullptr) {
continue;
}
std::map<std::int64_t, RodexMail>::iterator mail = mails->find(entry->second);
if (mail == mails->end()) {
continue;
}
if ((mail->second.unknown_0001 & 6) == 0) {
g_modeMgr.GetGameMode()->SendMsg(0xC4, static_cast<int>(entry->second), entry->first, 0, 0);
++requested;
} else {
++skipped;
}
}
} else {
int type = g_rodexMailStore->unknown_0010;
std::map<std::int64_t, RodexMail>* mails = RodexMailsOfType(type);
if (mails == nullptr) {
return;
}
for (std::map<std::int64_t, RodexMail>::iterator mail = mails->begin(); mail != mails->end(); ++mail) {
if ((mail->second.unknown_0001 & 6) == 0) {
g_modeMgr.GetGameMode()->SendMsg(0xC4, static_cast<int>(mail->first), type, 0, 0);
++requested;
} else {
++skipped;
}
}
}
if (requested > 0 && g_windowMgr.unknown_045C != 0) {
g_windowMgr.CloseWindow(265);
}
if (skipped > 0) {
g_windowMgr.SendNotice(1, reinterpret_cast<std::intptr_t>(LookupMessage(0xA34)), 0x64FFFF, 0, 0, 0);
}
}

View file

@ -56,6 +56,7 @@ public:
void SearchBySender(std::string keyword);
void SearchByTitle(std::string keyword);
void InitializeMailActions();
void RequestAllMailActions();
/* 012C */ unsigned char unknown_012C[0x4];
/* 0130 */ int unknown_0130;