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

◆ DrugsAttack()

void PlayerAgentPool::DrugsAttack ( EMedicalDrugsType drugType,
float attackValue )
inlineprotected

Drugs attack calculation.

Аргументы
drugTypeType of drug used (see EMedicalDrugsType enum)
attackValueStrength of the drug attack

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

347 {
348 for (int i = 0; i < m_VirusPool.Count(); ++i)
349 {
350 //getting the immunity of the agent and exiting the function early if that agent is immune to the drug
351 int agentId = m_VirusPool.GetKey(i);
352 float resistance = 1 - m_PluginTransmissionAgents.GetAgentSpecificDrugResistance(agentId, drugType, m_Player);
353 float delta = attackValue * resistance;
354 float actualAgentCount = m_VirusPool.Get(agentId);
355 float newAgentCount = actualAgentCount - delta;
356 SetAgentCount(agentId, newAgentCount);
357 }
358 }
PluginTransmissionAgents m_PluginTransmissionAgents
Определения PlayerAgentPool.c:21
PlayerBase m_Player
Определения PlayerAgentPool.c:15
ref map< int, float > m_VirusPool
Определения PlayerAgentPool.c:17
void SetAgentCount(int agent_id, float count)
Directly set the count of agents for give id in pool.
Определения PlayerAgentPool.c:297

Перекрестные ссылки m_Player, m_PluginTransmissionAgents, m_VirusPool и SetAgentCount().