Decompile 2 functions in Source/Contents/Items/ItemNaming.cpp

Batch #17253 by cremane: 0 byte-identical, 2 confirmed by peer review.

- fn_06581 ITEM_INFO::DisplayName: logic confirmed by peer review (already on main)
- fn_06596 LoadItemNameTables: logic confirmed by peer review

Peer-reviewed-by: alisonrag, Toshiro, 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:
ragnarok-clanker 2026-11-11 18:53:46 +00:00
commit fe10817696

View file

@ -586,13 +586,12 @@ __declspec(noinline) void LoadItemNameTables() {
}
g_tableStorage.LoadTokens(tokens, itemFiles[index], 2);
char** cursor = tokens.empty() ? nullptr : &tokens[0];
char** end = cursor + tokens.size();
std::vector<char*>::iterator cursor = tokens.begin();
while (cursor < end) {
while (cursor < tokens.end()) {
ITEM_DESC& desc = EnsureItemDescription(std::atoi(*cursor), g_itemDescriptions);
cursor += 2;
if (cursor >= end) {
if (cursor >= tokens.end()) {
ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0);
}
@ -603,7 +602,7 @@ __declspec(noinline) void LoadItemNameTables() {
}
desc.identifiedName = name;
cursor += 2;
if (cursor >= end) {
if (cursor >= tokens.end()) {
ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0);
}
@ -613,7 +612,7 @@ __declspec(noinline) void LoadItemNameTables() {
}
++cursor;
if (cursor >= end) {
if (cursor >= tokens.end()) {
ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0);
}
@ -627,7 +626,7 @@ __declspec(noinline) void LoadItemNameTables() {
unidentified = *cursor;
cursor += 2;
desc.unidentifiedName = unidentified;
if (cursor >= end) {
if (cursor >= tokens.end()) {
ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0);
}