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

Private Member Functions

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

Private Attributes

const int LIFETIME = 240
 
const int ACTIVATION_DELAY = 15
 

Detailed Description

Definition at line 1 of file PainKillersMdfr.c.

Member Function Documentation

◆ ActivateCondition()

override bool PainKillersMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 15 of file PainKillersMdfr.c.

16 {
17 return false;
18 }

◆ DeactivateCondition()

override bool PainKillersMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 56 of file PainKillersMdfr.c.

57 {
59
61 return true;
62 else
63 return false;
64 }
float GetAttachedTime()

References GetAttachedTime(), and LIFETIME.

◆ GetDebugText()

override string PainKillersMdfr::GetDebugText ( )
inlineprivate

Definition at line 25 of file PainKillersMdfr.c.

26 {
27 return (LIFETIME - GetAttachedTime()).ToString();
28 }

References GetAttachedTime(), and LIFETIME.

◆ Init()

override void PainKillersMdfr::Init ( )
inlineprivate

Definition at line 5 of file PainKillersMdfr.c.

6 {
8 m_IsPersistent = true;
9 m_ID = eModifiers.MDF_PAINKILLERS;
13 }
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
eModifiers
Definition eModifiers.c:2

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

◆ OnActivate()

override void PainKillersMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 31 of file PainKillersMdfr.c.

32 {
33 if (player.GetBrokenLegs() != eBrokenLegs.NO_BROKEN_LEGS)
34 player.m_ShockHandler.SetMultiplier(0.5);//was 0.75 //Switch the shock multiplier NEED A CONST
35 player.IncreaseHealingsCount();
36 /*
37 if( player.GetNotifiersManager() )
38 player.GetNotifiersManager().ActivateByType(eNotifiers.NTF_PILLS);
39 */
40 m_Player.m_InjuryHandler.m_ForceInjuryAnimMask = m_Player.m_InjuryHandler.m_ForceInjuryAnimMask | eInjuryOverrides.PAIN_KILLERS_LVL0;
41 }
eBrokenLegs
Definition EBrokenLegs.c:2
DayZPlayer m_Player
Definition Hand_Events.c:42

References m_Player.

◆ OnDeactivate()

override void PainKillersMdfr::OnDeactivate ( PlayerBase player)
inlineprivate

Definition at line 43 of file PainKillersMdfr.c.

44 {
45 if (player.GetBrokenLegs() != eBrokenLegs.NO_BROKEN_LEGS)
46 player.m_ShockHandler.SetMultiplier(1); //Reset the shock multiplier when modifier stops
47 player.DecreaseHealingsCount();
48 /*
49 if( player.GetNotifiersManager() )
50 player.GetNotifiersManager().DeactivateByType(eNotifiers.NTF_PILLS);
51 */
52 m_Player.m_InjuryHandler.m_ForceInjuryAnimMask = m_Player.m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.PAIN_KILLERS_LVL0;
53 m_Player.m_InjuryHandler.m_ForceInjuryAnimMask = m_Player.m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.PAIN_KILLERS_LVL1;
54 }

References m_Player.

◆ OnReconnect()

override void PainKillersMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 20 of file PainKillersMdfr.c.

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

References OnActivate().

◆ OnTick()

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

Definition at line 66 of file PainKillersMdfr.c.

67 {
69 m_Player.m_InjuryHandler.m_ForceInjuryAnimMask = m_Player.m_InjuryHandler.m_ForceInjuryAnimMask | eInjuryOverrides.PAIN_KILLERS_LVL1;
70 }
const int ACTIVATION_DELAY

References ACTIVATION_DELAY, GetAttachedTime(), and m_Player.

Member Data Documentation

◆ ACTIVATION_DELAY

const int PainKillersMdfr::ACTIVATION_DELAY = 15
private

Definition at line 4 of file PainKillersMdfr.c.

Referenced by OnTick().

◆ LIFETIME

const int PainKillersMdfr::LIFETIME = 240
private

Definition at line 3 of file PainKillersMdfr.c.

Referenced by DeactivateCondition(), and GetDebugText().


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