34 {
35 if ( player.m_IsDrowning )
36 {
37 return 0;
38 }
39 if ( player.IsUnconscious() )
40 {
41 if ( player.GetHealth("GlobalHealth", "Blood") <= PlayerConstants.SL_BLOOD_CRITICAL )
42 {
43 return CfgGameplayHandler.GetShockRefillSpeedUnconscious() * player.m_UnconRefillModifier * PlayerConstants.SHOCK_REFILL_UNCON_CRITICAL_BLOOD_MLTP;
44 }
45 else
46 {
47 return CfgGameplayHandler.GetShockRefillSpeedUnconscious() * player.m_UnconRefillModifier;
48 }
49 }
51 {
52 return CfgGameplayHandler.GetShockRefillSpeedConscious();
53 }
54 if ( player.GetBrokenLegs() ==
eBrokenLegs.BROKEN_LEGS && (player.IsSwimming() || player.IsClimbingLadder()) )
55 {
56 return CfgGameplayHandler.GetShockRefillSpeedUnconscious();
57 }
58 return 0;
59 }
DayZPlayerConstants
defined in C++