From fd717a293ba1beec2af6294dd1db7c63f0a7d191 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 19:41:34 +0000 Subject: [PATCH] Decompile fn_13819 (UINewSkillListWnd::Slot28) Batch #6080 by SapitoSucio: 0 byte-identical, 1 confirmed by peer review. - fn_13819 UINewSkillListWnd::Slot28: logic confirmed by peer review Peer-reviewed-by: Lumen, kyoshi, Snow Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UINewSkillListWnd.cpp | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Source/UI/Window/UINewSkillListWnd.cpp b/Source/UI/Window/UINewSkillListWnd.cpp index cf186afa..70b09348 100644 --- a/Source/UI/Window/UINewSkillListWnd.cpp +++ b/Source/UI/Window/UINewSkillListWnd.cpp @@ -288,6 +288,34 @@ void UINewSkillListWnd::Slot31(int x, int y) { } // OFFSET: 0x009B28F0 +// FUNCTION: fn_13819 +void UINewSkillListWnd::Slot28(int x, int y) { + const int gate = *reinterpret_cast(0x017326EC); + if (!this->IsSkillArea(x, y) || (gate != 0 && x > 96)) { + return; + } + + const int previous = this->m_selectedSkill; + this->m_selectedSkill = this->SkillIndexAt(x, y); + if (this->m_selectedSkill != -1) { + std::pair skill = this->SkillPtr(this->m_selectedSkill, false); + if (skill.second && skill.first->available != 0) { + int tooltipX = -10; + int tooltipY = -20; + this->ToScreen(tooltipX, tooltipY); + const char* name = skill.first->DisplayName(*g_luaScript); + (*reinterpret_cast(0x013495BC))->Show(name, tooltipX + x, tooltipY + y, -1, 0, 1); + } + } + + if (previous != this->m_selectedSkill) { + if (!this->m_showDetail) { + this->sub_9B2CD0(); + } + this->m_needsRedraw = 1; + this->Invalidate(); + } +} // OFFSET: 0x009B29E0