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

◆ GetParticleID()

static int ParticleList::GetParticleID ( string particle_file)
inlinestaticprivate

Returns particle's ID based on the path (without .ptc suffix)

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

542 {
543 particle_file.ToLower();
544
545 int id = m_ParticlePaths.GetKeyByValue(particle_file);
546 if (!IsValidId(id)) // valid id starts from 1, 0 is invalid
547 ErrorEx(string.Format("No particle registered with path: %1", particle_file), ErrorExSeverity.WARNING);
548 return id;
549 }
static ref map< int, string > m_ParticlePaths
Определения ParticleList.c:13
static bool IsValidId(int id)
Purely checks for an invalid number, does NOT mean it is actually registered.
Определения ParticleList.c:520
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx
proto int ToLower()
Changes string to lowercase. Returns length.

Перекрестные ссылки ErrorEx, IsValidId(), m_ParticlePaths и string::ToLower().

Используется в EffectAreaLoader::CreateZones() и ParticleSource::GetParticleIDLegacy().