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

Private Member Functions

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

Private Attributes

const int UNCONSIOUSS_COOLDOWN_TIME = 60
 

Detailed Description

Definition at line 1 of file Unconsciousness.c.

Member Function Documentation

◆ ActivateCondition()

override bool UnconsciousnessMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 13 of file Unconsciousness.c.

14 {
15 if (player.GetHealth("", "Shock") <= PlayerConstants.UNCONSCIOUS_THRESHOLD)
16 return true;
17 return false;
18 }
static const float UNCONSCIOUS_THRESHOLD

References PlayerConstants::UNCONSCIOUS_THRESHOLD.

◆ DeactivateCondition()

override bool UnconsciousnessMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 43 of file Unconsciousness.c.

44 {
45 if (player.GetHealth("", "Shock") >= PlayerConstants.CONSCIOUS_THRESHOLD && player.GetPulseType() == EPulseType.REGULAR)
46 return true;
47 return false;
48 }
EPulseType
Definition EPulseType.c:2
static const float CONSCIOUS_THRESHOLD

References PlayerConstants::CONSCIOUS_THRESHOLD.

◆ GetDebugText()

override string UnconsciousnessMdfr::GetDebugText ( )
inlineprivate

Definition at line 31 of file Unconsciousness.c.

32 {
33 string text_pulse = "pulse type:" + m_Player.GetPulseType() + "|";
34 string text_shock = (PlayerConstants.CONSCIOUS_THRESHOLD - m_Player.GetHealth("", "Shock")).ToString();
36 return debug_text;
37 }
proto string ToString()
DayZPlayer m_Player
Definition Hand_Events.c:42

References PlayerConstants::CONSCIOUS_THRESHOLD, m_Player, and ToString().

◆ Init()

override void UnconsciousnessMdfr::Init ( )
inlineprivate

Definition at line 5 of file Unconsciousness.c.

6 {
8 m_ID = eModifiers.MDF_UNCONSCIOUSNESS;
11 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
float m_TickIntervalActive
float m_TickIntervalInactive
eModifiers
Definition eModifiers.c:2

References m_ID, m_TickIntervalActive, m_TickIntervalInactive, and m_TrackActivatedTime.

◆ OnActivate()

override void UnconsciousnessMdfr::OnActivate ( PlayerBase player)
inlineprivate

◆ OnDeactivate()

override void UnconsciousnessMdfr::OnDeactivate ( PlayerBase player)
inlineprivate

Definition at line 25 of file Unconsciousness.c.

26 {
27 player.m_UnconsciousEndTime = GetGame().GetTime();
29 }
proto native CGame GetGame()

References GetGame(), and DayZPlayerSyncJunctures::SendPlayerUnconsciousness().

◆ OnReconnect()

override void UnconsciousnessMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 39 of file Unconsciousness.c.

40 {
41 }

◆ OnTick()

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

Definition at line 50 of file Unconsciousness.c.

51 {
52
53 }

Member Data Documentation

◆ UNCONSIOUSS_COOLDOWN_TIME

const int UnconsciousnessMdfr::UNCONSIOUSS_COOLDOWN_TIME = 60
private

Definition at line 3 of file Unconsciousness.c.


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