Decompile fn_09146 (sub_7AEC00)

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

- fn_09146 sub_7AEC00: logic confirmed by peer review

Peer-reviewed-by: Yommy, secret
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 10:59:12 +00:00
commit 570daf33d2

View file

@ -456,6 +456,7 @@ int sub_7AEA20(lua_State* state) {
}
// OFFSET: 0x007AEC00
// FUNCTION: fn_09146
int sub_7AEC00(lua_State* state) {
if (!lua_isstring(state, -1)) {
lua_pushboolean(state, 0);
@ -479,13 +480,19 @@ int sub_7AEC00(lua_State* state) {
}
const int id = static_cast<int>(lua_tonumber(state, -4));
TipBoxEntry& entry = g_itemTagOwner->m_entries[id];
if (id > g_itemTagOwner->m_maximumId) {
g_itemTagOwner->m_maximumId = id;
const char* title = lua_tostring(state, -3);
const double flag = lua_tonumber(state, -2);
const char* text = lua_tostring(state, -1);
CTipBoxMgr* owner = g_itemTagOwner;
const std::string textString(text);
const std::string titleString(title);
int key = id;
if (owner->m_maximumId < key) {
owner->m_maximumId = key;
}
entry.title = lua_tostring(state, -3);
entry.searchable = static_cast<int>(lua_tonumber(state, -2)) == 1;
entry.unknown_001C = lua_tostring(state, -1);
owner->m_entries[key].title = titleString;
owner->m_entries[key].unknown_0018 = static_cast<int>(flag) == 1;
owner->m_entries[key].unknown_001C = textString;
lua_pushboolean(state, 1);
lua_pushstring(state, "good");
return 2;