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

◆ QueueUpPrimarySymptom()

SymptomBase QueueUpPrimarySymptom ( int symptom_id,
int uid = -1 )

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

535 {
536 if ((GetSymptomCount(symptom_id) >= GetSymptomMaxCount(symptom_id)) && GetSymptomMaxCount(symptom_id) != -1)
537 return null;
538
539 SymptomBase symptom = m_AvailableSymptoms.Get(symptom_id);
540 if (m_Player.IsUnconscious() && !symptom.AllowInUnconscious())
541 return null;
542 else
543 symptom = null; // needed for check below
544
545 for (int i = 0; i < m_SymptomQueuePrimary.Count(); i++)
546 {
547 if (m_SymptomQueuePrimary.Get(i).CanBeInterupted() && ComparePriority(GetSymptomPriority(symptom_id), m_SymptomQueuePrimary.Get(i).GetPriority()) == 1)
548 {
549 symptom = SpawnSymptom(symptom_id, uid);
550 m_SymptomQueuePrimary.InsertAt(symptom,i);
551
553 m_SymptomQueuePrimary.Get(MAX_QUEUE_SIZE).RequestDestroy();// no need to remove from the array, that's done via Symptom callback on destruct
554
555 break;
556 }
557 }
558 if ( !symptom && m_SymptomQueuePrimary.Count() < MAX_QUEUE_SIZE)
559 {
560 symptom = SpawnSymptom( symptom_id, uid );
561 m_SymptomQueuePrimary.Insert(symptom);
562 }
563 #ifdef DIAG_DEVELOPER
564 SendServerDebugToClient();
565 #endif
566 return symptom;
567 }
DayZPlayer m_Player
Определения Hand_Events.c:42
int GetSymptomPriority(int symptom_id)
Определения StateManager.c:646
SymptomBase SpawnSymptom(int symptom_id, int uid=-1)
Определения StateManager.c:496
int GetSymptomCount(int symptom_id)
Определения StateManager.c:465
ref array< ref SymptomBase > m_SymptomQueuePrimary
Определения StateManager.c:110
int ComparePriority(int prio1, int prio2)
Определения StateManager.c:633
int GetSymptomMaxCount(int symptom_id)
Определения StateManager.c:459
const int MAX_QUEUE_SIZE
Определения StateManager.c:48
ref map< int, ref SymptomBase > m_AvailableSymptoms
Определения StateManager.c:107
bool AllowInUnconscious()
Определения StateBase.c:149
Определения StateBase.c:2

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

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