Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
epinephrinemdfr.c
Go to the documentation of this file.
2{
3 const int LIFETIME = 60;
4 const float STAMINA_DEPLETION_MULTIPLIER = 0;
5 override void Init()
6 {
9 m_IsPersistent = true;
10 m_ID = eModifiers.MDF_EPINEPHRINE;
14 }
15
16 override bool ActivateCondition(PlayerBase player)
17 {
18 return false;
19 }
20
21 override void OnReconnect(PlayerBase player)
22 {
23 OnActivate(player);
24 }
25
26 override string GetDebugText()
27 {
28 return (LIFETIME - GetAttachedTime()).ToString();
29 }
30
31 override void OnActivate(PlayerBase player)
32 {
33 player.IncreaseHealingsCount();
34 player.GiveShock(100);
35 player.GetStaminaHandler().SetStamina(100);
36 player.GetStaminaHandler().ActivateDepletionModifier(EStaminaMultiplierTypes.EPINEPHRINE);
37 }
38
39 override void OnDeactivate(PlayerBase player)
40 {
41 player.DecreaseHealingsCount();
42 player.GetStaminaHandler().DeactivateDepletionModifier(EStaminaMultiplierTypes.EPINEPHRINE);
43 }
44
45 override bool DeactivateCondition(PlayerBase player)
46 {
47 float attached_time = GetAttachedTime();
48
49 if( attached_time >= LIFETIME )
50 {
51 return true;
52 }
53 else
54 {
55 return false;
56 }
57 }
58}
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition effect.c:51
eModifiers
Definition emodifiers.c:2
@ LIFETIME
Float R/W.
Definition envisual.c:161
bool m_TrackActivatedTime
overall time this modifier was active
float GetAttachedTime()
void DisableActivateCheck()
bool m_AnalyticsStatsEnabled
float m_TickIntervalActive
float m_TickIntervalInactive
bool m_IsPersistent
should this modifier track overall time it was active ?
const int DEFAULT_TICK_TIME_INACTIVE
EStaminaMultiplierTypes
void OnActivate()