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

◆ SetAgentCount()

void PlayerAgentPool::SetAgentCount ( int agent_id,
float count )
inlineprotected

Directly set the count of agents for give id in pool.

Аргументы
agent_idId of agent to add into pool (see eAgents)
countNumber of agents to be set

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

298 {
299 if (count > 0)
300 {
301 //Debug.Log("+ growing agent"+ agent_id.ToString() +"to count: "+count.ToString(), "Agents");
302 m_VirusPool.Set(agent_id, count);
303 m_AgentMask = m_AgentMask | agent_id;
304 }
305 else
306 {
307 //Debug.Log("- REMOVING agent"+ agent_id.ToString(), "Agents");
308 m_VirusPool.Remove(agent_id);
309 m_AgentMask = m_AgentMask & ~agent_id;
310 }
311
312 if (m_Player.m_Agents != m_AgentMask)
313 {
314 m_Player.m_Agents = m_AgentMask;
315 m_Player.SetSynchDirty();
316 }
317 }
PlayerBase m_Player
Определения PlayerAgentPool.c:15
ref map< int, float > m_VirusPool
Определения PlayerAgentPool.c:17
int m_AgentMask
Определения PlayerAgentPool.c:12

Перекрестные ссылки m_AgentMask, m_Player и m_VirusPool.

Используется в AddAgent(), AntibioticsAttack(), DrugsAttack(), GrowAgents(), OnStoreLoad(), ReduceAgent() и RemoveAgent().