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

◆ SpawnSymptom()

SymptomBase SymptomManager::SpawnSymptom ( int symptom_id,
int uid = -1 )
inlineprivate

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

437 {
438 if (m_AvailableSymptoms.Get(symptom_id))
439 {
440 SymptomBase symptom = SymptomBase.Cast(m_AvailableSymptoms.Get(symptom_id).ClassName().ToType().Spawn());
441 if (uid == -1)
442 {
443 uid = CreateUniqueID();
444 }
445
446 symptom.Init(this, m_Player,uid);
447
448 if ( m_SymptomsUIDs.Contains(uid) )
449 ErrorEx(string.Format("Symptoms: Unique ID (=%1) already exists!", uid));
450
451 m_SymptomsUIDs.Insert(uid, symptom);
452 IncreaseSymptomCount(symptom_id);
453
454 return symptom;
455 }
456
457 if (!symptom)
458 {
459 Error("Symptom not registered");
460 }
461
462 return null;
463 }
void Init(SymptomManager manager, PlayerBase player, int uid)
Определения StateBase.c:39
PlayerBase m_Player
Определения StateManager.c:49
int CreateUniqueID()
Определения StateManager.c:176
ref map< int, ref SymptomBase > m_AvailableSymptoms
Определения StateManager.c:50
void IncreaseSymptomCount(int symptom_id)
Определения StateManager.c:413
ref map< int, SymptomBase > m_SymptomsUIDs
Определения StateManager.c:56
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
enum ShapeType ErrorEx

Перекрестные ссылки CreateUniqueID(), Error(), ErrorEx, IncreaseSymptomCount(), SymptomBase::Init(), m_AvailableSymptoms, m_Player и m_SymptomsUIDs.

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