Decompile fn_06594 (ITEM_INFO::UnidentifiedName)
Batch #18219 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_06594 ITEM_INFO::UnidentifiedName: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, alisonrag, bibinir 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
9068da9154
commit
d0f06709e9
4 changed files with 6 additions and 5 deletions
|
|
@ -91,6 +91,7 @@ struct alignas(8) ITEM_INFO {
|
|||
bool IsAboveItemId600() const;
|
||||
int Refine(char* output, int& capacity, unsigned char consume) const;
|
||||
int GetIdDisplayName(char* output, int& capacity, unsigned char consume) const;
|
||||
int UnidentifiedName(char* output, int& capacity, unsigned char consume) const;
|
||||
const std::vector<const char*>& Description() const;
|
||||
std::vector<unsigned char> Serialize() const;
|
||||
std::uint32_t Deserialize(const std::vector<unsigned char>& data);
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ std::string ITEM_INFO::DisplayName(unsigned char detailed) const {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
AppendText(result, text, ItemUnidentifiedName(*this, text, capacity, 0));
|
||||
AppendText(result, text, this->UnidentifiedName(text, capacity, 0));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
@ -465,8 +465,9 @@ int ItemSlotsCount(const ITEM_INFO& item) {
|
|||
|
||||
// OFFSET: 0x006D7760
|
||||
// FUNCTION: fn_06594
|
||||
int ItemUnidentifiedName(const ITEM_INFO& item, char* output, int& capacity, unsigned char consume) {
|
||||
const char* name = FindItemDescription(std::atoi(item.itemId.c_str())).unidentifiedName;
|
||||
int ITEM_INFO::UnidentifiedName(char* output, int& capacity, unsigned char consume) const {
|
||||
const int id = std::atoi(this->itemId.c_str());
|
||||
const char* name = FindItemDescription(id, g_itemDescriptions).unidentifiedName;
|
||||
return CopyText(output, capacity, consume, name ? name : " ");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ std::uint32_t __fastcall ItemCardColor(const ITEM_INFO* item);
|
|||
std::string ItemDisplayName(int id);
|
||||
const char* ItemResourcePath(const ITEM_INFO& item);
|
||||
int ItemSlotsCount(const ITEM_INFO& item);
|
||||
int ItemUnidentifiedName(const ITEM_INFO& item, char* output, int& capacity, unsigned char consume);
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(sizeof(ItemCardName) == 12);
|
||||
|
|
|
|||
|
|
@ -11813,7 +11813,7 @@ int UIFrameWnd::BuildItemName(
|
|||
}
|
||||
}
|
||||
} else {
|
||||
*cursor += ItemUnidentifiedName(*item, *cursor, capacity, 1);
|
||||
*cursor += item->UnidentifiedName(*cursor, capacity, 1);
|
||||
breaks->push_back(*cursor);
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue