![]() |
Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
|
Keeps track of agents and their simulation. More...
Protected Member Functions | |
| void | PlayerAgentPool (PlayerBase player) |
| void | AddAgent (int agent_id, float count) |
| Add agent into Agent Pool. | |
| void | AntibioticsAttack (float attack_value) |
| Antibiotics treatment agains agents which are not resistent to it (see agent attributes). | |
| void | AntibioticsAttackEx (float attack_value, EMedicalDrugsType drugType) |
| void | DigestAgent (int agent_id, float count) |
| Digest (add) agent from food/drink in PlayerStomach into Agent Pool. | |
| void | DrugsAttack (EMedicalDrugsType drugType, float attackValue) |
| Drugs attack calculation. | |
| int | GetAgents () |
| Reduce bitmask of currently active agents. | |
| int | GetSingleAgentCount (int agent_id) |
| Number of agents of specified id. | |
| int | GetStorageVersion () |
| float | GetTemporaryResistance (int agentId) |
| Returns remaining temporary resistance time for specified agent. | |
| float | GetTotalAgentCount () |
| Total number of agents active. | |
| void | GrowAgents (float deltaT) |
| Agent's growth/death simulation. | |
| void | ImmuneSystemTick (float value, float deltaT) |
| Agent pool simulation entry point. | |
| bool | OnStoreLoad (ParamsReadContext ctx, int version) |
| void | OnStoreSave (ParamsWriteContext ctx) |
| void | ProcessTemporaryResistance (float deltaTime) |
| Temporary resistance simulation. | |
| void | ReduceAgent (int id, float percent) |
| Reduce count of specified agent by a given percentage from Agent Pool. | |
| void | RemoveAgent (int agent_id) |
| Remove agent from Agent Pool. | |
| void | RemoveAllAgents () |
| Remove all agents from Agent Pool. | |
| void | SetAgentCount (int agent_id, float count) |
| Directly set the count of agents for give id in pool. | |
| void | SetTemporaryResistance (int agentId, float time) |
| Sets temporary resistance time against specified agent contraction. | |
| void | SpawnAgents (float deltaT) |
| Autoinfection mechanism for agents with that attribute enabled. | |
Protected Attributes | |
| ref map< int, float > | m_AgentTemporaryResistance |
| PluginTransmissionAgents | m_PluginTransmissionAgents = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents)) |
Private Member Functions | |
| void | GetDebugObject (array< ref Param > object_out) |
| void | PrintAgents () |
| void | RemoteGrowRequestDebug (ParamsReadContext ctx) |
| void | ResetTemporaryResistance () |
| Resets temporary resistance for all agents (internal usage only). | |
Private Attributes | |
| int | m_AgentMask |
| float | m_LastTicked |
| PlayerBase | m_Player |
| float | m_TotalAgentCount |
| ref map< int, float > | m_VirusPool |
| ref array< int > | m_VirusPoolArray = new array<int>() |
| DEPRECATED. | |
| const int | STORAGE_VERSION = 137 |
Keeps track of agents and their simulation.
Definition at line 8 of file playeragentpool.c.
|
inlineprotected |
Definition at line 23 of file playeragentpool.c.
References m_AgentTemporaryResistance, m_LastTicked, m_Player, and m_VirusPool.
Add agent into Agent Pool.
| agent_id | Id of agent (see eAgents enum) |
| count | Amount of agents to add |
Definition at line 187 of file playeragentpool.c.
References GetTemporaryResistance(), m_PluginTransmissionAgents, m_VirusPool, and SetAgentCount().
Referenced by DigestAgent(), RemoteGrowRequestDebug(), and SpawnAgents().
|
inlineprotected |
Antibiotics treatment agains agents which are not resistent to it (see agent attributes).
| attack_value | Strength of the anitibiotics attack |
Definition at line 323 of file playeragentpool.c.
References AntibioticsAttackEx().
|
inlineprotected |
Definition at line 328 of file playeragentpool.c.
References m_Player, m_PluginTransmissionAgents, m_VirusPool, and SetAgentCount().
Referenced by AntibioticsAttack().
Digest (add) agent from food/drink in PlayerStomach into Agent Pool.
| agent_id | Id of agent (see eAgents enum) |
| count | Amount of agents to add |
Definition at line 177 of file playeragentpool.c.
References AddAgent(), m_Player, and m_PluginTransmissionAgents.
|
inlineprotected |
Drugs attack calculation.
| drugType | Type of drug used (see EMedicalDrugsType enum) |
| attackValue | Strength of the drug attack |
Definition at line 346 of file playeragentpool.c.
References m_Player, m_PluginTransmissionAgents, m_VirusPool, and SetAgentCount().
|
inlineprotected |
Reduce bitmask of currently active agents.
Definition at line 244 of file playeragentpool.c.
References m_AgentMask.
Definition at line 405 of file playeragentpool.c.
References AgentBase::GetAgentType(), AgentBase::GetName(), GetSingleAgentCount(), GetTemporaryResistance(), and m_PluginTransmissionAgents.
Number of agents of specified id.
| agent_id | Id of agent to add into pool (see eAgents) |
Definition at line 254 of file playeragentpool.c.
References m_VirusPool.
Referenced by GetDebugObject(), OnStoreSave(), ReduceAgent(), and SpawnAgents().
|
inlineprotected |
Definition at line 32 of file playeragentpool.c.
References STORAGE_VERSION.
Returns remaining temporary resistance time for specified agent.
param agent_id Id of agent to add into pool (see eAgents)
Definition at line 375 of file playeragentpool.c.
References m_AgentTemporaryResistance.
Referenced by AddAgent(), GetDebugObject(), GrowAgents(), OnStoreSave(), and ProcessTemporaryResistance().
|
inlineprotected |
Total number of agents active.
Definition at line 266 of file playeragentpool.c.
References m_VirusPool.
|
inlineprotected |
Agent's growth/death simulation.
| deltaT | tick |
Definition at line 55 of file playeragentpool.c.
References Math::Clamp(), GetTemporaryResistance(), IsPluginManagerExists(), m_Player, m_PluginTransmissionAgents, m_TotalAgentCount, m_VirusPool, and SetAgentCount().
Referenced by ImmuneSystemTick().
Agent pool simulation entry point.
| value | Immunity value (deprecated, used in previous versions) |
| deltaT | tick |
Definition at line 42 of file playeragentpool.c.
References GrowAgents(), ProcessTemporaryResistance(), and SpawnAgents().
|
inlineprotected |
Definition at line 133 of file playeragentpool.c.
References m_PluginTransmissionAgents, Serializer::Read(), SetAgentCount(), and SetTemporaryResistance().
|
inlineprotected |
Definition at line 121 of file playeragentpool.c.
References GetSingleAgentCount(), GetTemporaryResistance(), m_PluginTransmissionAgents, and Serializer::Write().
|
inlineprivate |
Definition at line 424 of file playeragentpool.c.
References Debug::Log(), and m_VirusPool.
|
inlineprotected |
Temporary resistance simulation.
Definition at line 105 of file playeragentpool.c.
References GetTemporaryResistance(), m_AgentTemporaryResistance, and SetTemporaryResistance().
Referenced by ImmuneSystemTick().
Reduce count of specified agent by a given percentage from Agent Pool.
| agent_id | Id of agent (see eAgents enum) |
| percent | How many percents of the agents should be reduced |
Definition at line 231 of file playeragentpool.c.
References Math::Clamp(), GetSingleAgentCount(), and SetAgentCount().
|
inlineprivate |
Definition at line 392 of file playeragentpool.c.
References Math::AbsInt(), AddAgent(), m_PluginTransmissionAgents, CachedObjectsParams::PARAM1_INT, and Serializer::Read().
|
inlineprotected |
Remove agent from Agent Pool.
| agent_id | Id of agent (see eAgents enum) |
Definition at line 209 of file playeragentpool.c.
References SetAgentCount().
|
inlineprotected |
Remove all agents from Agent Pool.
| agent_id | Id of agent (see eAgents enum) |
Definition at line 218 of file playeragentpool.c.
References m_AgentMask, m_VirusPool, and ResetTemporaryResistance().
|
inlineprivate |
Resets temporary resistance for all agents (internal usage only).
Definition at line 386 of file playeragentpool.c.
References m_AgentTemporaryResistance, and SetTemporaryResistance().
Referenced by RemoveAllAgents().
Directly set the count of agents for give id in pool.
| agent_id | Id of agent to add into pool (see eAgents) |
| count | Number of agents to be set |
Definition at line 297 of file playeragentpool.c.
References m_AgentMask, m_Player, and m_VirusPool.
Referenced by AddAgent(), AntibioticsAttackEx(), DrugsAttack(), GrowAgents(), OnStoreLoad(), ReduceAgent(), and RemoveAgent().
Sets temporary resistance time against specified agent contraction.
param agent_id Id of agent to add into pool (see eAgents)
| time | Length of resistance in seconds |
Definition at line 365 of file playeragentpool.c.
References Math::Clamp(), m_AgentTemporaryResistance, and MAX.
Referenced by OnStoreLoad(), ProcessTemporaryResistance(), and ResetTemporaryResistance().
|
inlineprotected |
Autoinfection mechanism for agents with that attribute enabled.
| deltaT | tick |
Definition at line 279 of file playeragentpool.c.
References AddAgent(), AgentBase::AutoinfectCheck(), AgentBase::GetAgentType(), AgentBase::GetAutoinfectCount(), GetSingleAgentCount(), m_Player, and m_PluginTransmissionAgents.
Referenced by ImmuneSystemTick().
|
private |
Definition at line 12 of file playeragentpool.c.
Referenced by GetAgents(), RemoveAllAgents(), and SetAgentCount().
Definition at line 19 of file playeragentpool.c.
Referenced by PlayerAgentPool(), GetTemporaryResistance(), ProcessTemporaryResistance(), ResetTemporaryResistance(), and SetTemporaryResistance().
|
private |
Definition at line 13 of file playeragentpool.c.
Referenced by PlayerAgentPool().
|
private |
Definition at line 15 of file playeragentpool.c.
Referenced by PlayerAgentPool(), AntibioticsAttackEx(), DigestAgent(), DrugsAttack(), GrowAgents(), SetAgentCount(), and SpawnAgents().
|
protected |
Definition at line 21 of file playeragentpool.c.
Referenced by AddAgent(), AntibioticsAttackEx(), DigestAgent(), DrugsAttack(), GetDebugObject(), GrowAgents(), OnStoreLoad(), OnStoreSave(), RemoteGrowRequestDebug(), and SpawnAgents().
|
private |
Definition at line 14 of file playeragentpool.c.
Referenced by GrowAgents().
Definition at line 17 of file playeragentpool.c.
Referenced by PlayerAgentPool(), AddAgent(), AntibioticsAttackEx(), DrugsAttack(), GetSingleAgentCount(), GetTotalAgentCount(), GrowAgents(), PrintAgents(), RemoveAllAgents(), and SetAgentCount().
DEPRECATED.
Definition at line 437 of file playeragentpool.c.
|
private |
Definition at line 10 of file playeragentpool.c.
Referenced by GetStorageVersion().