Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
PlayerAgentPool Class Reference

Keeps track of agents and their simulation. More...

Protected Member Functions

void PlayerAgentPool (PlayerBase player)
 
int GetStorageVersion ()
 
void ImmuneSystemTick (float value, float deltaT)
 Agent pool simulation entry point.
 
void GrowAgents (float deltaT)
 Agent's growth/death simulation.
 
void ProcessTemporaryResistance (float deltaTime)
 Temporary resistance simulation.
 
void OnStoreSave (ParamsWriteContext ctx)
 
bool OnStoreLoad (ParamsReadContext ctx, int version)
 
void DigestAgent (int agent_id, float count)
 Digest (add) agent from food/drink in PlayerStomach into Agent Pool.
 
void AddAgent (int agent_id, float count)
 Add agent into Agent Pool.
 
void RemoveAgent (int agent_id)
 Remove agent from Agent Pool.
 
void RemoveAllAgents ()
 Remove all agents from Agent Pool.
 
void ReduceAgent (int id, float percent)
 Reduce count of specified agent by a given percentage from Agent Pool.
 
int GetAgents ()
 Reduce bitmask of currently active agents.
 
int GetSingleAgentCount (int agent_id)
 Number of agents of specified id.
 
float GetTotalAgentCount ()
 Total number of agents active.
 
void SpawnAgents (float deltaT)
 Autoinfection mechanism for agents with that attribute enabled.
 
void SetAgentCount (int agent_id, float count)
 Directly set the count of agents for give id in pool.
 
void AntibioticsAttack (float attack_value)
 Antibiotics treatment agains agents which are not resistent to it (see agent attributes)
 
void DrugsAttack (EMedicalDrugsType drugType, float attackValue)
 Drugs treatment logic.
 
void SetTemporaryResistance (int agentId, float time)
 Sets temporary resistance time against specified agent contraction.
 
float GetTemporaryResistance (int agentId)
 Returns remaining temporary resistance time for specified agent.
 

Protected Attributes

ref map< int, floatm_AgentTemporaryResistance
 
PluginTransmissionAgents m_PluginTransmissionAgents = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents))
 

Detailed Description

Keeps track of agents and their simulation.

  • adding/reducing of agents
  • autoinfection
  • temporary resistance for agents
  • reaction on drugs

Definition at line 8 of file playeragentpool.c.

Constructor & Destructor Documentation

◆ PlayerAgentPool()

void PlayerAgentPool::PlayerAgentPool ( PlayerBase player)
protected

Definition at line 23 of file playeragentpool.c.

Member Function Documentation

◆ AddAgent()

void PlayerAgentPool::AddAgent ( int agent_id,
float count )
protected

Add agent into Agent Pool.

Parameters
agent_idId of agent (see eAgents enum)
countAmount of agents to add

Definition at line 187 of file playeragentpool.c.

◆ AntibioticsAttack()

void PlayerAgentPool::AntibioticsAttack ( float attack_value)
protected

Antibiotics treatment agains agents which are not resistent to it (see agent attributes)

Parameters
attack_valueStrength of the anitibiotics attack

Definition at line 323 of file playeragentpool.c.

◆ DigestAgent()

void PlayerAgentPool::DigestAgent ( int agent_id,
float count )
protected

Digest (add) agent from food/drink in PlayerStomach into Agent Pool.

Parameters
agent_idId of agent (see eAgents enum)
countAmount of agents to add

Definition at line 177 of file playeragentpool.c.

◆ DrugsAttack()

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

Drugs treatment logic.

Parameters
drugTypeType of drug used (see EMedicalDrugsType enum)
attack_valueStrength of the drug attack

Definition at line 341 of file playeragentpool.c.

◆ GetAgents()

int PlayerAgentPool::GetAgents ( )
protected

Reduce bitmask of currently active agents.

Definition at line 244 of file playeragentpool.c.

◆ GetSingleAgentCount()

int PlayerAgentPool::GetSingleAgentCount ( int agent_id)
protected

Number of agents of specified id.

Parameters
agent_idId of agent to add into pool (see eAgents)
Returns
Count of agents specified in param

Definition at line 254 of file playeragentpool.c.

◆ GetStorageVersion()

int PlayerAgentPool::GetStorageVersion ( )
protected

Definition at line 32 of file playeragentpool.c.

◆ GetTemporaryResistance()

float PlayerAgentPool::GetTemporaryResistance ( int agentId)
protected

Returns remaining temporary resistance time for specified agent.

Parameters

param agent_id Id of agent to add into pool (see eAgents)

Returns
time in seconds

Definition at line 374 of file playeragentpool.c.

◆ GetTotalAgentCount()

float PlayerAgentPool::GetTotalAgentCount ( )
protected

Total number of agents active.

Returns
Agents count

Definition at line 266 of file playeragentpool.c.

◆ GrowAgents()

void PlayerAgentPool::GrowAgents ( float deltaT)
protected

Agent's growth/death simulation.

  • based on the potency, invasibility
    • takes into account the temporary resistance
      Parameters
      deltaTtick

Definition at line 55 of file playeragentpool.c.

◆ ImmuneSystemTick()

void PlayerAgentPool::ImmuneSystemTick ( float value,
float deltaT )
protected

Agent pool simulation entry point.

Parameters
valueImmunity value (deprecated, used in previous versions)
deltaTtick

Definition at line 42 of file playeragentpool.c.

◆ OnStoreLoad()

bool PlayerAgentPool::OnStoreLoad ( ParamsReadContext ctx,
int version )
protected

Definition at line 133 of file playeragentpool.c.

◆ OnStoreSave()

void PlayerAgentPool::OnStoreSave ( ParamsWriteContext ctx)
protected

Definition at line 121 of file playeragentpool.c.

◆ ProcessTemporaryResistance()

void PlayerAgentPool::ProcessTemporaryResistance ( float deltaTime)
protected

Temporary resistance simulation.

Definition at line 105 of file playeragentpool.c.

◆ ReduceAgent()

void PlayerAgentPool::ReduceAgent ( int id,
float percent )
protected

Reduce count of specified agent by a given percentage from Agent Pool.

Parameters
agent_idId of agent (see eAgents enum)
percentHow many percents of the agents should be reduced

Definition at line 231 of file playeragentpool.c.

◆ RemoveAgent()

void PlayerAgentPool::RemoveAgent ( int agent_id)
protected

Remove agent from Agent Pool.

Parameters
agent_idId of agent (see eAgents enum)

Definition at line 209 of file playeragentpool.c.

◆ RemoveAllAgents()

void PlayerAgentPool::RemoveAllAgents ( )
protected

Remove all agents from Agent Pool.

Parameters
agent_idId of agent (see eAgents enum)

Definition at line 218 of file playeragentpool.c.

◆ SetAgentCount()

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

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

Parameters
agent_idId of agent to add into pool (see eAgents)
countNumber of agents to be set

Definition at line 297 of file playeragentpool.c.

◆ SetTemporaryResistance()

void PlayerAgentPool::SetTemporaryResistance ( int agentId,
float time )
protected

Sets temporary resistance time against specified agent contraction.

Parameters

param agent_id Id of agent to add into pool (see eAgents)

Parameters
timeLength of resistance in seconds

Definition at line 364 of file playeragentpool.c.

◆ SpawnAgents()

void PlayerAgentPool::SpawnAgents ( float deltaT)
protected

Autoinfection mechanism for agents with that attribute enabled.

Parameters
deltaTtick

Definition at line 279 of file playeragentpool.c.

Member Data Documentation

◆ m_AgentTemporaryResistance

ref map<int, float> PlayerAgentPool::m_AgentTemporaryResistance
protected

Definition at line 19 of file playeragentpool.c.

◆ m_PluginTransmissionAgents

PluginTransmissionAgents PlayerAgentPool::m_PluginTransmissionAgents = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents))
protected

Definition at line 21 of file playeragentpool.c.


The documentation for this class was generated from the following file: