DayZ 1.24
Loading...
Searching...
No Matches
MorphineMdfr Class Reference
Inheritance diagram for MorphineMdfr:
[legend]
Collaboration diagram for MorphineMdfr:
[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 = 60
 

Detailed Description

Definition at line 1 of file MorphineMdfr.c.

Member Function Documentation

◆ ActivateCondition()

override bool MorphineMdfr::ActivateCondition ( PlayerBase player)
inlineprivate

Definition at line 15 of file MorphineMdfr.c.

16 {
17 return false;
18 }

◆ DeactivateCondition()

override bool MorphineMdfr::DeactivateCondition ( PlayerBase player)
inlineprivate

Definition at line 51 of file MorphineMdfr.c.

52 {
54
56 return true;
57 else
58 return false;
59 }
float GetAttachedTime()
const int LIFETIME
Definition MorphineMdfr.c:3

References GetAttachedTime(), and LIFETIME.

◆ GetDebugText()

override string MorphineMdfr::GetDebugText ( )
inlineprivate

Definition at line 25 of file MorphineMdfr.c.

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

References GetAttachedTime(), and LIFETIME.

◆ Init()

override void MorphineMdfr::Init ( )
inlineprivate

Definition at line 5 of file MorphineMdfr.c.

6 {
8 m_IsPersistent = true;
9 m_ID = eModifiers.MDF_MORPHINE;
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 MorphineMdfr::OnActivate ( PlayerBase player)
inlineprivate

Definition at line 30 of file MorphineMdfr.c.

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

References m_Player.

◆ OnDeactivate()

override void MorphineMdfr::OnDeactivate ( PlayerBase player)
inlineprivate

Definition at line 41 of file MorphineMdfr.c.

42 {
43
44 if (player.GetBrokenLegs() != eBrokenLegs.NO_BROKEN_LEGS)
45 player.m_ShockHandler.SetMultiplier(1); //Reset the shock multiplier when modifier stops
46 //if( player.GetNotifiersManager() ) player.GetNotifiersManager().DeactivateByType(eNotifiers.NTF_PILLS);
47 player.DecreaseHealingsCount();
48 m_Player.m_InjuryHandler.m_ForceInjuryAnimMask = m_Player.m_InjuryHandler.m_ForceInjuryAnimMask & ~eInjuryOverrides.MORPHINE;
49 }

References m_Player.

◆ OnReconnect()

override void MorphineMdfr::OnReconnect ( PlayerBase player)
inlineprivate

Definition at line 20 of file MorphineMdfr.c.

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

References OnActivate().

◆ OnTick()

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

Definition at line 61 of file MorphineMdfr.c.

62 {
63
64 }

Member Data Documentation

◆ LIFETIME

const int MorphineMdfr::LIFETIME = 60
private

Definition at line 3 of file MorphineMdfr.c.

Referenced by DeactivateCondition(), and GetDebugText().


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