| 331 | } |
| 332 | |
| 333 | int AFCMapModule::GetEntityByDataNode( |
| 334 | const int map_id, const std::string& name, const AFIDataList& value_args, AFIDataList& list) |
| 335 | { |
| 336 | AFCDataList varObjectList; |
| 337 | GetMapOnlineList(map_id, varObjectList); |
| 338 | size_t entity_count = varObjectList.GetCount(); |
| 339 | for (size_t i = 0; i < entity_count; ++i) |
| 340 | { |
| 341 | AFGUID ident = varObjectList.Int64(i); |
| 342 | auto pEntity = m_pKernelModule->GetEntity(ident); |
| 343 | if (pEntity == nullptr) |
| 344 | { |
| 345 | continue; |
| 346 | } |
| 347 | |
| 348 | AFCData data; |
| 349 | if (!pEntity->GetNode(name, data)) |
| 350 | { |
| 351 | continue; |
| 352 | } |
| 353 | |
| 354 | if (value_args.Equal(0, data)) |
| 355 | { |
| 356 | list.AddInt64(ident); |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | return list.GetCount(); |
| 361 | } |
| 362 | |
| 363 | } // namespace ark |