DayZ 1.24
Loading...
Searching...
No Matches
CharcoalMdfr Class Reference
Inheritance diagram for CharcoalMdfr:
[legend]
Collaboration diagram for CharcoalMdfr:
[legend]

Private Member Functions

override void Init ()
 
override bool ActivateCondition (PlayerBase player)
 
override void OnReconnect (PlayerBase player)
 
override string GetDebugTextSimple ()
 
override void OnActivate (PlayerBase player)
 
override void OnDeactivate (PlayerBase player)
 
override bool DeactivateCondition (PlayerBase player)
 
override void OnTick (PlayerBase player, float deltaT)
 

Private Attributes

float m_Killrate
 
const int CHARCOAL_LIFETIME = 300
 
const int CHARCOAL_EFFECT_TIME = 100
 

Detailed Description

Definition at line 1 of file CharcoalMdfr.c.

Member Function Documentation

◆ ActivateCondition()

override bool CharcoalMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 18 of file CharcoalMdfr.c.

19 {
20 return false;
21 }

◆ DeactivateCondition()

override bool CharcoalMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 66 of file CharcoalMdfr.c.

67 {
69
71 return true;
72 else
73 return false;
74 }
float GetAttachedTime()
const int CHARCOAL_LIFETIME
Definition CharcoalMdfr.c:4

References CHARCOAL_LIFETIME, and GetAttachedTime().

◆ GetDebugTextSimple()

override string CharcoalMdfr::GetDebugTextSimple ( )
inlineprivate

Definition at line 49 of file CharcoalMdfr.c.

50 {
51 return ((int)(CHARCOAL_LIFETIME - GetAttachedTime())).ToString() + " | " + (((int)(CHARCOAL_LIFETIME - CHARCOAL_EFFECT_TIME - GetAttachedTime())) * -1).ToString();
52 }
Param3 int
proto string ToString()
const int CHARCOAL_EFFECT_TIME
Definition CharcoalMdfr.c:5

References CHARCOAL_EFFECT_TIME, CHARCOAL_LIFETIME, GetAttachedTime(), and ToString().

◆ Init()

override void CharcoalMdfr::Init ( )
inlineprivate

Definition at line 7 of file CharcoalMdfr.c.

8 {
10 m_IsPersistent = true;
11 m_ID = eModifiers.MDF_CHARCOAL;
14 m_Killrate = 2.85; // # of killed agents per sec
16 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
void DisableActivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
bool m_IsPersistent
const int DEFAULT_TICK_TIME_INACTIVE
float m_Killrate
Definition CharcoalMdfr.c:3
eModifiers
Definition eModifiers.c:2

References DEFAULT_TICK_TIME_INACTIVE, DisableActivateCheck(), m_ID, m_IsPersistent, m_Killrate, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnActivate()

override void CharcoalMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 54 of file CharcoalMdfr.c.

55 {
56 player.IncreaseHealingsCount();
57
58 }

◆ OnDeactivate()

override void CharcoalMdfr::OnDeactivate ( PlayerBase player)
inlineprivate

Definition at line 60 of file CharcoalMdfr.c.

61 {
62 player.DecreaseHealingsCount();
63
64 }

◆ OnReconnect()

override void CharcoalMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 23 of file CharcoalMdfr.c.

24 {
26 }
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167

References OnActivate().

◆ OnTick()

override void CharcoalMdfr::OnTick ( PlayerBase player,
float deltaT )
inlineprivate

Definition at line 76 of file CharcoalMdfr.c.

77 {
79 player.m_AgentPool.AddAgent(eAgents.SALMONELLA, -m_Killrate * deltaT);
80 }
eAgents
Definition EAgents.c:3

References CHARCOAL_EFFECT_TIME, CHARCOAL_LIFETIME, GetAttachedTime(), and m_Killrate.

Member Data Documentation

◆ CHARCOAL_EFFECT_TIME

const int CharcoalMdfr::CHARCOAL_EFFECT_TIME = 100
private

Definition at line 5 of file CharcoalMdfr.c.

Referenced by GetDebugTextSimple(), and OnTick().

◆ CHARCOAL_LIFETIME

const int CharcoalMdfr::CHARCOAL_LIFETIME = 300
private

Definition at line 4 of file CharcoalMdfr.c.

Referenced by DeactivateCondition(), GetDebugTextSimple(), and OnTick().

◆ m_Killrate

float CharcoalMdfr::m_Killrate
private

Definition at line 3 of file CharcoalMdfr.c.

Referenced by Init(), and OnTick().


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