Decompile fn_12147 (UINpcTextEditDialogWnd::InsertItemTag)
Batch #7931 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_12147 UINpcTextEditDialogWnd::InsertItemTag: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, secret, Romain, pedrao Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
abdfcc5016
commit
2f8d574379
1 changed files with 26 additions and 0 deletions
|
|
@ -1466,6 +1466,32 @@ bool UIStatusWnd::Slot03() {
|
|||
}
|
||||
|
||||
// OFFSET: 0x008DA460
|
||||
// FUNCTION: fn_12147
|
||||
void UINpcTextEditDialogWnd::InsertItemTag(const ITEM_INFO& item) {
|
||||
if (!this->m_tagCtrl) {
|
||||
this->m_tagCtrl = new UIItemTagOnMegaPhone;
|
||||
if (!this->m_tagCtrl) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ItemDescriptions descriptions{g_itemDescriptions};
|
||||
bool languagePrefix = false;
|
||||
WORD language = g_serverLanguage->language;
|
||||
ItemNaming naming{descriptions, g_itemCardNames, *g_playerNameDictionary, languagePrefix, g_serviceType, language};
|
||||
|
||||
if (!this->m_tagCtrl->CanInsertTag(naming.DisplayName(item, 0), this->edit->geometry.width)) {
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
std::string text = this->edit->Text();
|
||||
this->m_tagCtrl->taggedText = text;
|
||||
}
|
||||
this->edit->SetText(this->m_tagCtrl->AppendTag(naming.DisplayName(item, 0)).c_str());
|
||||
this->edit->MoveCursorToEnd();
|
||||
this->m_tagCtrl->sub_89CFE0(item, 0x12B8A4);
|
||||
}
|
||||
|
||||
// OFFSET: 0x008DACF0
|
||||
// FUNCTION: fn_12149
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue