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

◆ ContainsFirstClass()

bool PluginBase::ContainsFirstClass ( string config_class_path,
string class_path )
inlineprivate

См. определение в файле PluginConfigViewer.c строка 114

115 {
116 int start = class_path.IndexOf(" ");
117 string name = class_path;
118 if ( start > -1 )
119 {
120 name = class_path.Substring(0, start );
121 }
122
123 int cfg_class_count = GetGame().ConfigGetChildrenCount( config_class_path );
124
125 for ( int i = 0; i < cfg_class_count; i++ )
126 {
127 string cfg_class_name = "";
128 GetGame().ConfigGetChildName( config_class_path, i, cfg_class_name );
129
130 if ( cfg_class_name == name )
131 {
132 string full_name = config_class_path + " " + name;
133 int type = GetGame().ConfigGetType( full_name );
134
135 if ( type == CT_CLASS )
136 {
137 return true;
138 }
139 }
140 }
141
142 if ( start == -1 )
143 {
144 return false;
145 }
146 else
147 {
148 string new_name = class_path.Substring(start + 1, class_path.Length() - (start + 1) );
149 return ContainsFirstClass( config_class_path + " " + name, new_name );
150 }
151 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native int ConfigGetType(string path)
Returns type of config value.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
bool ContainsFirstClass(string config_class_path, string class_path)
Определения PluginConfigViewer.c:114
proto native CGame GetGame()
proto native int Length()
Returns length of string.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.

Перекрестные ссылки CGame::ConfigGetChildName(), CGame::ConfigGetChildrenCount(), CGame::ConfigGetType(), ContainsFirstClass(), GetGame(), string::IndexOf(), string::Length(), name и string::Substring().

Используется в ContainsFirstClass() и GetBaseClassPathRecursive().