1
This commit is contained in:
parent
7ebbe621e1
commit
6a6c901a02
@ -546,19 +546,19 @@ void BattleDataContext::ParseResult(a8::XObject& obj)
|
||||
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) {
|
||||
auto info = hero_dto->At("items")->At(i);
|
||||
if (info->IsObject() &&
|
||||
info->HasKey("item_id") &&
|
||||
info->HasKey("item_num") &&
|
||||
info->At("item_id")->IsSimple() &&
|
||||
info->At("item_num")->IsSimple()
|
||||
) {
|
||||
int item_id = info->Get("item_id").GetInt();
|
||||
int item_num = info->Get("item_num").GetInt();
|
||||
items_.push_back(std::make_tuple(item_id, item_num));
|
||||
}
|
||||
}
|
||||
if (obj.HasKey("items") && obj.At("items")->IsArray()) {
|
||||
for (int i = 0; i < obj.At("items")->Size(); ++i) {
|
||||
auto info = obj.At("items")->At(i);
|
||||
if (info->IsObject() &&
|
||||
info->HasKey("item_id") &&
|
||||
info->HasKey("item_num") &&
|
||||
info->At("item_id")->IsSimple() &&
|
||||
info->At("item_num")->IsSimple()
|
||||
) {
|
||||
int item_id = info->Get("item_id").GetInt();
|
||||
int item_num = info->Get("item_num").GetInt();
|
||||
items_.push_back(std::make_tuple(item_id, item_num));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user