From 9f097590ab1aa08a976149629d25834161a4e71f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 01:39:17 +0000 Subject: [PATCH] Decompile fn_11307 (ItemLinkDisplay::BracketName) Batch #6680 by Bielhp: 0 byte-identical, 1 confirmed by peer review. - fn_11307 ItemLinkDisplay::BracketName: logic confirmed by peer review Peer-reviewed-by: eAthena, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Text/ItemLinkDisplay.cpp | 10 ++++++++++ Source/UI/Text/ItemLinkDisplay.h | 1 + 2 files changed, 11 insertions(+) diff --git a/Source/UI/Text/ItemLinkDisplay.cpp b/Source/UI/Text/ItemLinkDisplay.cpp index 472549818..b582b57aa 100644 --- a/Source/UI/Text/ItemLinkDisplay.cpp +++ b/Source/UI/Text/ItemLinkDisplay.cpp @@ -124,3 +124,13 @@ std::string ItemLinkDisplay::Convert(const std::string& text) { result += remaining; return result; } + +// OFFSET: 0x00884460 +// FUNCTION: fn_11307 +std::string ItemLinkDisplay::BracketName(const std::string& name) { + std::string result; + result += '<'; + result += FitText(this->surface, name, this->width / 2); + result += '>'; + return result; +} diff --git a/Source/UI/Text/ItemLinkDisplay.h b/Source/UI/Text/ItemLinkDisplay.h index 5f27f1912..1026e0825 100644 --- a/Source/UI/Text/ItemLinkDisplay.h +++ b/Source/UI/Text/ItemLinkDisplay.h @@ -20,6 +20,7 @@ struct ItemLinkDisplay { bool Name(const std::string& encoded, std::string& output); bool Next(std::string& remaining, std::string& encoded, unsigned& position, const char* original); std::string Convert(const std::string& text); + std::string BracketName(const std::string& name); }; #endif