Decompile fn_16918 (RunWindowAction)

Batch #1984 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_16918 RunWindowAction: logic confirmed by peer review

Peer-reviewed-by: ragnarok-clanker
Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-10-29 08:58:36 +00:00
commit e0311aac48

View file

@ -40,6 +40,7 @@
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <functional>
#include <span>
#include <string>
#include <windows.h>
@ -114,6 +115,17 @@ UIWindow::~UIWindow() {
this->m_context->windowMgr.ForgetWindowReferences(this);
}
// OFFSET: 0x00A79F80
// FUNCTION: fn_16918
bool RunWindowAction(bool primary, bool secondary, int value, int limit, std::function<void()> primaryAction, std::function<void()> secondaryAction) {
if (!primary && !secondary) {
return false;
}
(primary && (!secondary || value <= limit) ? primaryAction : secondaryAction)();
return true;
}
// INLINED
UIWindow* UIWindow::Parent() const {
return this->parent;