Decompile fn_14321 (AdventureGuide::CUIItem::BindItem)

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

- fn_14321 AdventureGuide::CUIItem::BindItem: logic confirmed by peer review

Peer-reviewed-by: gordaoprogramas, Lumen, dori
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 21:12:50 +00:00
commit 3e4660e96e
2 changed files with 24 additions and 2 deletions

View file

@ -17,7 +17,7 @@
#include "UI/Window/UIWindowMgr.h"
#include "Utility/Cipher/XorBytes.h"
#include "Utility/Text/FormatString.h"
#include "Contents/Items/ItemDescription.h"
#include <cstring>
#include <format>
#include <list>
@ -490,6 +490,28 @@ void CUIQuest::OnSelectQuest(CUIQuestInfo* item, const CQuestInfo&) {
this->unknown_0088->Show(selected);
}
// OFFSET: 0x009DC320
// FUNCTION: fn_14321
void CUIItem::BindItem(CUIItemInfo* item, const CItemData& data) {
ITEM_INFO info;
info.SetItemId(data.id);
item->location = this->location;
info.identified = 1;
item->itemId = data.id;
const ITEM_DESC& desc = FindItemDescription(std::atoi(info.itemId.c_str()));
const std::string image = "유저인터페이스\\collection\\" + std::string(desc.identifiedResource) + ".bmp";
const std::string name(desc.identifiedName);
item->nameText->SetText(name.c_str(), name.size());
item->image->SetImage(image);
reinterpret_cast<CUIQuestInfo*>(item)->SetStatusLines(data.first, data.second, data.third);
item->SetDescription(data.type, ItemDescriptions{g_itemDescriptions}.Description(info));
reinterpret_cast<CUITextViewer*>(item->unknown_00F8)->Clear();
for (const std::string& value : data.values) {
reinterpret_cast<CUITextViewer*>(item->unknown_00F8)->AddLine(value);
}
item->unknown_0108 = data.text;
}
// OFFSET: 0x009DC770
// FUNCTION: fn_14323
void __stdcall BindQuestInfo(CUIQuestInfo* owner, const CQuestInfo& data) {