1336 {
1341
1343
1344 for ( int m = 0; m < slots.Count(); ++m )
1345 {
1347 }
1348
1350 string inv_slot;
1351 string childName;
1352
1353 for ( int s = 0; s < searching_in.Count(); ++s )
1354 {
1355 string config_path = searching_in.Get(s);
1356
1357 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
1358 for (int i = 0; i < objects_count; i++)
1359 {
1360 g_Game.ConfigGetChildName(config_path, i, childName);
1361
1362 g_Game.ConfigGetTextArray(config_path +
" " + childName +
" inventorySlot", inv_slots);
1363
1364 if ( inv_slots.Count() > 0 )
1365 {
1366 for ( int j = 0; j < inv_slots.Count(); ++j )
1367 {
1368 inv_slot = "";
1369 inv_slot = inv_slots.Get(j);
1370
1371 for ( int k = 0; k < slots.Count(); ++k )
1372 {
1373 string finding_slot_type = slots.Get(k);
1374
1375 if ( inv_slot == finding_slot_type )
1376 {
1377 array_ret.Get(finding_slot_type).Insert(childName);
1378 }
1379 }
1380 }
1381 }
1382 else
1383 {
1384 inv_slot = "";
1385 g_Game.ConfigGetText(config_path +
" " + childName +
" inventorySlot", inv_slot);
1386
1387 if ( inv_slot != "" )
1388 {
1389 for ( int l = 0; l < slots.Count(); ++l )
1390 {
1391 string finding_slot_type_2 = slots.Get(l);
1392
1393 if ( inv_slot == finding_slot_type_2 )
1394 {
1395 array_ret.Get(finding_slot_type_2).Insert(childName);
1396 }
1397 }
1398 }
1399 }
1400 }
1401 }
1402
1403 return array_ret;
1404 }
array< string > TStringArray