DayZ 1.29
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 = g_Game.ConfigGetChildrenCount( config_class_path );
124
125 for ( int i = 0; i < cfg_class_count; i++ )
126 {
127 string cfg_class_name = "";
128 g_Game.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 = g_Game.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
DayZGame g_Game
Определения DayZGame.c:3942
bool ContainsFirstClass(string config_class_path, string class_path)
Определения PluginConfigViewer.c:114
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.

Перекрестные ссылки ContainsFirstClass(), g_Game, string::IndexOf(), string::Length(), name и string::Substring().

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