Decompile fn_04233 (CMCStoreInfoBackup::ImportData)

Batch #11082 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_04233 CMCStoreInfoBackup::ImportData: logic confirmed by peer review

Peer-reviewed-by: Yommy, alisonrag, gordaoprogramas, KWDev, kyoshi
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-05 22:50:25 +00:00
commit 8a225aaf6c

View file

@ -15,6 +15,7 @@ void CMCStoreInfoBackup::ImportData(Json::Value& data) {
this->items.clear();
this->title = FromUtf8(data.get("Title", "").asString(), g_textCodePage);
Json::Value values = data["Item"];
const std::string styledText = values.toStyledString();
if (values.isNull() && this->title.empty()) {
return;
@ -28,7 +29,7 @@ void CMCStoreInfoBackup::ImportData(Json::Value& data) {
}
ITEM_INFO item;
item.itemId = std::to_string(value.get("ID", 0).asInt());
item.SetItemId(value.get("ID", 0).asInt());
item.quantity = value.get("Count", 0).asInt();
item.identified = value.get("Identified", 0).asBool();
item.unknown_0060 = value.get("RefiningLevel", 0).asInt();
@ -42,8 +43,8 @@ void CMCStoreInfoBackup::ImportData(Json::Value& data) {
}
item.unknown_0098 = value.get("RandomOptionCount", 0).asInt();
Json::Value& options = value["RandomOptionList"];
unsigned index = 0;
Json::Value options = value["RandomOptionList"];
int index = 0;
for (auto option = options.begin(); option != options.end() && index <= 5; ++option, ++index) {
const auto id = static_cast<std::uint16_t>((*option).get("OptIndex", 0).asInt());