Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
epinephrinemdfr.c
Go to the documentation of this file.
2{
3 const int LIFETIME = 60;
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}
override bool DeactivateCondition(PlayerBase player)
override void OnReconnect(PlayerBase player)
override void OnActivate(PlayerBase player)
override string GetDebugText()
override void Init()
const float STAMINA_DEPLETION_MULTIPLIER
override bool ActivateCondition(PlayerBase player)
override void OnDeactivate(PlayerBase player)
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
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.
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()