Decompile fn_05236 (CAdventureGuideMgr::GetEntryList)
Batch #1838 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_05236 CAdventureGuideMgr::GetEntryList: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
5538d1bb37
commit
5776a19924
2 changed files with 29 additions and 0 deletions
|
|
@ -82,3 +82,31 @@ void CAdventureGuideMgr::GetContentsList(std::list<std::pair<int, AdventureGuide
|
||||||
return lhs.second.unknown_0004 < rhs.second.unknown_0004;
|
return lhs.second.unknown_0004 < rhs.second.unknown_0004;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: 0x006636A0
|
||||||
|
// FUNCTION: fn_05236
|
||||||
|
void CAdventureGuideMgr::GetEntryList(std::list<std::pair<int, AdventureGuideEntry>>& out, int type, int id) {
|
||||||
|
out.clear();
|
||||||
|
|
||||||
|
std::map<int, std::map<int, AdventureGuideEntry>>* table;
|
||||||
|
switch (type) {
|
||||||
|
case 5:
|
||||||
|
table = &unknown_0054;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
table = &unknown_005C;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<std::map<int, AdventureGuideEntry>*> entries = FindMapped(*table, id);
|
||||||
|
if (!entries) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::copy((*entries)->begin(), (*entries)->end(), std::back_inserter(out));
|
||||||
|
out.sort([](const std::pair<int, AdventureGuideEntry>& lhs, const std::pair<int, AdventureGuideEntry>& rhs) {
|
||||||
|
return lhs.second.unknown_0004 < rhs.second.unknown_0004;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ public:
|
||||||
|
|
||||||
void GetEpisodeList(std::list<AdventureGuideEpisode>& out);
|
void GetEpisodeList(std::list<AdventureGuideEpisode>& out);
|
||||||
void GetContentsList(std::list<std::pair<int, AdventureGuideContents>>& out, int type, int id);
|
void GetContentsList(std::list<std::pair<int, AdventureGuideContents>>& out, int type, int id);
|
||||||
|
void GetEntryList(std::list<std::pair<int, AdventureGuideEntry>>& out, int type, int id);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CAdventureGuideMgr* g_adventureGuideMgr;
|
extern CAdventureGuideMgr* g_adventureGuideMgr;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue