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

◆ QueueUpPrimarySymptom()

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

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

474 {
475 if ((GetSymptomCount(symptom_id) >= GetSymptomMaxCount(symptom_id)) && GetSymptomMaxCount(symptom_id) != -1)
476 return null;
477
478 SymptomBase symptom = m_AvailableSymptoms.Get(symptom_id);
479 if (m_Player.IsUnconscious() && !symptom.AllowInUnconscious())
480 return null;
481 else
482 symptom = null; // needed for check below
483
484 for (int i = 0; i < m_SymptomQueuePrimary.Count(); i++)
485 {
486 if (m_SymptomQueuePrimary.Get(i).CanBeInterupted() && ComparePriority(GetSymptomPriority(symptom_id), m_SymptomQueuePrimary.Get(i).GetPriority()) == 1)
487 {
488 symptom = SpawnSymptom(symptom_id, uid);
489 m_SymptomQueuePrimary.InsertAt(symptom,i);
490
492 m_SymptomQueuePrimary.Get(MAX_QUEUE_SIZE).RequestDestroy();// no need to remove from the array, that's done via Symptom callback on destruct
493
494 break;
495 }
496 }
497 if ( !symptom && m_SymptomQueuePrimary.Count() < MAX_QUEUE_SIZE)
498 {
499 symptom = SpawnSymptom( symptom_id, uid );
500 m_SymptomQueuePrimary.Insert(symptom);
501 }
502 #ifdef DIAG_DEVELOPER
503 SendServerDebugToClient();
504 #endif
505 return symptom;
506 }
const int MAX_QUEUE_SIZE
Определения StateManager.c:45
bool AllowInUnconscious()
Определения StateBase.c:149
int GetSymptomCount(int symptom_id)
Определения StateManager.c:405
PlayerBase m_Player
Определения StateManager.c:49
int GetSymptomMaxCount(int symptom_id)
Определения StateManager.c:399
int GetSymptomPriority(int symptom_id)
Определения StateManager.c:585
ref map< int, ref SymptomBase > m_AvailableSymptoms
Определения StateManager.c:50
ref array< ref SymptomBase > m_SymptomQueuePrimary
Определения StateManager.c:53
SymptomBase SpawnSymptom(int symptom_id, int uid=-1)
Определения StateManager.c:436
int ComparePriority(int prio1, int prio2)
Определения StateManager.c:572

Перекрестные ссылки SymptomBase::AllowInUnconscious(), ComparePriority(), GetSymptomCount(), GetSymptomMaxCount(), GetSymptomPriority(), m_AvailableSymptoms, m_Player, m_SymptomQueuePrimary, MAX_QUEUE_SIZE и SpawnSymptom().

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