DayZ 1.24
Loading...
Searching...
No Matches
PainKillersMdfr.c
Go to the documentation of this file.
2{
3 const int LIFETIME = 240;
4 const int ACTIVATION_DELAY = 15;
5 override void Init()
6 {
8 m_IsPersistent = true;
9 m_ID = eModifiers.MDF_PAINKILLERS;
13 }
14
16 {
17 return false;
18 }
19
21 {
23 }
24
25 override string GetDebugText()
26 {
27 return (LIFETIME - GetAttachedTime()).ToString();
28 }
29
30
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 }
42
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 }
55
57 {
59
61 return true;
62 else
63 return false;
64 }
65
66 override void OnTick(PlayerBase player, float deltaT)
67 {
69 m_Player.m_InjuryHandler.m_ForceInjuryAnimMask = m_Player.m_InjuryHandler.m_ForceInjuryAnimMask | eInjuryOverrides.PAIN_KILLERS_LVL1;
70 }
71};
eBrokenLegs
Definition EBrokenLegs.c:2
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
DayZPlayer m_Player
Definition Hand_Events.c:42
bool m_TrackActivatedTime
float GetAttachedTime()
void DisableActivateCheck()
float m_TickIntervalActive
float m_TickIntervalInactive
bool m_IsPersistent
const int DEFAULT_TICK_TIME_INACTIVE
override bool ActivateCondition(PlayerBase player)
override void OnReconnect(PlayerBase player)
override void OnActivate(PlayerBase player)
override void OnDeactivate(PlayerBase player)
override void OnTick(PlayerBase player, float deltaT)
override bool DeactivateCondition(PlayerBase player)
const int ACTIVATION_DELAY
override string GetDebugText()
override void Init()
eModifiers
Definition eModifiers.c:2
class HumanMovementState OnActivate()
HumanCommandScript fully scriptable command.
Definition human.c:1167