DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ConfigFindClassIndex()

int CGame::ConfigFindClassIndex ( string config_path,
string searched_member )
inlineprotected

Searches given config path (config_path) for the given member (searched_member) and returns its index. \nReturns -1 if not found.
usage:

int skinning_class_index = g_Game.ConfigFindClassIndex(cfgPath_animal, "Skinning");
DayZGame g_Game
Определения DayZGame.c:4074

См. определение в файле Global/game.c строка 1518

1519 {
1520 int class_count = ConfigGetChildrenCount(config_path);
1521 for (int index = 0; index < class_count; index++)
1522 {
1523 string found_class = "";
1524 ConfigGetChildName(config_path, index, found_class);
1525 if (found_class == searched_member)
1526 {
1527 return index;
1528 }
1529 }
1530 return -1;
1531 }
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.

Перекрестные ссылки ConfigGetChildName() и ConfigGetChildrenCount().