This commit is contained in:
aozhiwei 2024-10-12 11:49:03 +08:00
parent 7ebbe621e1
commit 6a6c901a02

View File

@ -546,9 +546,10 @@ void BattleDataContext::ParseResult(a8::XObject& obj)
avatars_.push_back(290001); avatars_.push_back(290001);
} }
} }
if (hero_dto->HasKey("items") && hero_dto->At("items")->IsArray()) { }
for (int i = 0; i < hero_dto->At("items")->Size(); ++i) { if (obj.HasKey("items") && obj.At("items")->IsArray()) {
auto info = hero_dto->At("items")->At(i); for (int i = 0; i < obj.At("items")->Size(); ++i) {
auto info = obj.At("items")->At(i);
if (info->IsObject() && if (info->IsObject() &&
info->HasKey("item_id") && info->HasKey("item_id") &&
info->HasKey("item_num") && info->HasKey("item_num") &&
@ -561,7 +562,6 @@ void BattleDataContext::ParseResult(a8::XObject& obj)
} }
} }
} }
}
if (obj.HasKey("honor_info") && obj.At("honor_info")->IsArray()) { if (obj.HasKey("honor_info") && obj.At("honor_info")->IsArray()) {
auto honor_info = obj.At("honor_info"); auto honor_info = obj.At("honor_info");
for (int i = 0; i < honor_info->Size(); ++i) { for (int i = 0; i < honor_info->Size(); ++i) {