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

◆ ObjectIsKindOf()

bool CGame::ObjectIsKindOf ( Object object,
string cfg_parent_name )
inlineprotected

Returns is object inherited from parent class name.

Аргументы
objectObject
cfg_parent_nameParent Config Class name ("DZ_LightAI")
Возвращает
bool is object inherited from parent class name
bool is_kind = g_Game.IsKindOf( my_animal, "DZ_LightAI");
>> 1
DayZGame g_Game
Определения DayZGame.c:3942
proto string ToString()
class array< Class T > PrintString

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

1466 {
1467 TStringArray full_path = new TStringArray;
1468 ConfigGetObjectFullPath(object, full_path);
1469
1470 cfg_parent_name.ToLower();
1471
1472 int nFullPath = full_path.Count();
1473 for (int i = 0; i < nFullPath; i++)
1474 {
1475 string tmp = full_path.Get(i);
1476 tmp.ToLower();
1477 if (tmp == cfg_parent_name)
1478 {
1479 return true;
1480 }
1481 }
1482
1483 return false;
1484 }
proto native void ConfigGetObjectFullPath(Object obj, out TStringArray full_path)
array< string > TStringArray
Определения EnScript.c:712
proto int ToLower()
Changes string to lowercase. Returns length.

Перекрестные ссылки ConfigGetObjectFullPath() и string::ToLower().