1
This commit is contained in:
parent
7ebbe621e1
commit
6a6c901a02
@ -546,19 +546,19 @@ 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) {
|
||||||
if (info->IsObject() &&
|
auto info = obj.At("items")->At(i);
|
||||||
info->HasKey("item_id") &&
|
if (info->IsObject() &&
|
||||||
info->HasKey("item_num") &&
|
info->HasKey("item_id") &&
|
||||||
info->At("item_id")->IsSimple() &&
|
info->HasKey("item_num") &&
|
||||||
info->At("item_num")->IsSimple()
|
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();
|
int item_id = info->Get("item_id").GetInt();
|
||||||
items_.push_back(std::make_tuple(item_id, item_num));
|
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