From c30847436956a3555ce7470c512376d37e7ffff8 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 29 Oct 2026 22:50:00 +0000 Subject: [PATCH] Decompile fn_14335 (AdventureGuide::CUIMonster::Slot16) Batch #3588 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_14335 AdventureGuide::CUIMonster::Slot16: logic confirmed by peer review Peer-reviewed-by: eAthena, ntrl, meitogi Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 15 +++++++++++++++ Source/UI/AdventureGuide/UIAdventureGuide.h | 5 ++++- Source/UI/Lists/UIListBoxTemplate.h | 7 ++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index a499822c..be542f16 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -1,3 +1,4 @@ +#include "Contents/AdventureGuideMgr.h" #include "UI/AdventureGuide/UIAdventureGuide.h" #include "UI/Lists/UIListBoxTemplate.h" #include "UI/Lists/UIVScrollBar.h" @@ -51,6 +52,20 @@ void CUIItemInfo::Slot16() { this->unknown_00F8->scrollBar->SetHidden(1); } +// OFFSET: 0x009DD210 +// FUNCTION: fn_14335 +void CUIMonster::Slot16() { + std::list episodes; + g_adventureGuideMgr->GetEpisodeList(episodes); + for (const AdventureGuideEpisode& episode : episodes) { + CMonsterData data; + data.name = episode.name; + data.values = episode.values; + this->monsterList->data.push_back(data); + } + this->monsterList->UpdateScrollBar(); +} + // OFFSET: 0x009DD680 // FUNCTION: fn_14337 void CUIMonsterInfo::Slot16() { diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.h b/Source/UI/AdventureGuide/UIAdventureGuide.h index 1c74f41d..73c438d6 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.h +++ b/Source/UI/AdventureGuide/UIAdventureGuide.h @@ -1,6 +1,7 @@ #ifndef RAGNAROK_SOURCE_UI_ADVENTUREGUIDE_UIADVENTUREGUIDE_H #define RAGNAROK_SOURCE_UI_ADVENTUREGUIDE_UIADVENTUREGUIDE_H +#include "UI/Lists/UIListBoxTemplate.h" #include "UI/Window/UIControl.h" #include @@ -32,11 +33,13 @@ public: class CUIMonster : public CUIPage { public: + void Slot16() override; void Paint() override; void Slot54(int first, int second) override; /* 0084 */ UIWindow* unknown_0084; /* 0088 */ std::string unknown_0088; + /* 0080 */ CUIListBoxEx* monsterList; }; class CUIQuest : public CUIPage { @@ -53,7 +56,7 @@ public: #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(AdventureGuide::CUIIntro) == 0x8C); static_assert(sizeof(AdventureGuide::CUIItem) == 0xA8); -static_assert(sizeof(AdventureGuide::CUIMonster) == 0xA0); +static_assert(sizeof(AdventureGuide::CUIMonster) == 0xA4); static_assert(sizeof(AdventureGuide::CUIQuest) == 0xA4); #endif diff --git a/Source/UI/Lists/UIListBoxTemplate.h b/Source/UI/Lists/UIListBoxTemplate.h index 8ce73fab..3f737a63 100644 --- a/Source/UI/Lists/UIListBoxTemplate.h +++ b/Source/UI/Lists/UIListBoxTemplate.h @@ -8,6 +8,7 @@ #include #include #include +#include #include class CUIListItem : public CUIControl { @@ -79,7 +80,11 @@ public: void Slot16() override; }; class CItemData {}; -class CMonsterData {}; +class CMonsterData { +public: + /* 0000 */ std::string name; + /* 0018 */ std::vector values; +}; class CQuestInfo {}; }