DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс ShockMdfr
+ Граф наследования:ShockMdfr:

Закрытые члены

override void Init ()
 
override bool ActivateCondition (PlayerBase player)
 
override bool DeactivateCondition (PlayerBase player)
 
override void OnActivate (PlayerBase player)
 
override void OnDeactivate (PlayerBase player)
 
float GetRefillSpeed (PlayerBase player)
 
override void OnTick (PlayerBase player, float deltaT)
 
override void OnReconnect (PlayerBase player)
 

Закрытые данные

const float UNCONSCIOUS_LIMIT = 50
 
const float SHOCK_INCREMENT_PER_SEC = 1
 

Подробное описание

Методы

◆ ActivateCondition()

override bool ActivateCondition ( PlayerBase player)
inlineprivate
16 {
17 return true;
18 }

◆ DeactivateCondition()

override bool DeactivateCondition ( PlayerBase player)
inlineprivate
21 {
22 return false;
23 }

◆ GetRefillSpeed()

float GetRefillSpeed ( PlayerBase player)
inlineprivate
34 {
35 if ( player.m_IsDrowning )
36 {
37 return 0;
38 }
39 if ( player.IsUnconscious() )
40 {
41 return CfgGameplayHandler.GetShockRefillSpeedUnconscious() * player.m_UnconRefillModifier;
42 }
43 if (player.GetBrokenLegs() != eBrokenLegs.BROKEN_LEGS || (player.m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_PRONE || player.m_MovementState.m_iStanceIdx == DayZPlayerConstants.STANCEIDX_RAISEDPRONE))
44 {
46 }
47 if ( player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS && (player.IsSwimming() || player.IsClimbingLadder()) )
48 {
50 }
51 return 0; //Block shock regen when standing with broken legs
52 }
eBrokenLegs
Definition EBrokenLegs.c:2
Definition CfgGameplayHandler.c:2
static float GetShockRefillSpeedUnconscious()
Definition CfgGameplayHandler.c:387
static float GetShockRefillSpeedConscious()
Definition CfgGameplayHandler.c:382
Definition EntityAI.c:95
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Перекрестные ссылки CfgGameplayHandler::GetShockRefillSpeedConscious() и CfgGameplayHandler::GetShockRefillSpeedUnconscious().

Используется в OnTick().

◆ Init()

override void Init ( )
inlineprivate
7 {
8 m_ID = eModifiers.MDF_SHOCK;
11 //DisableActivateCheck();
13 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
void DisableDeactivateCheck()
Definition ModifierBase.c:86
float m_TickIntervalActive
Definition ModifierBase.c:18
float m_TickIntervalInactive
Definition ModifierBase.c:17
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки DisableDeactivateCheck(), m_ID, m_TickIntervalActive и m_TickIntervalInactive.

◆ OnActivate()

override void OnActivate ( PlayerBase player)
inlineprivate
26 {
27 }

◆ OnDeactivate()

override void OnDeactivate ( PlayerBase player)
inlineprivate
30 {
31 }

◆ OnReconnect()

override void OnReconnect ( PlayerBase player)
inlineprivate
73 {
74
75 }

◆ OnTick()

override void OnTick ( PlayerBase player,
float deltaT )
inlineprivate
55 {
56 //Print("m_UnconRefillModifier" + player.m_UnconRefillModifier);
57 if ( GetGame().GetTime() > player.m_LastShockHitTime + PlayerConstants.SHOCK_REFILL_COOLDOWN_AFTER_HIT && player.GetPulseType() == EPulseType.REGULAR)
58 {
59 if (!player.IsUnconscious())
60 player.m_UnconRefillModifier = 1;//reset this UnconRefillModifier some time after the player has been hit(we want the UnconRefillModifier to only apply to uncon induced by a projectile)
61
62 if (player.GetHealth01("","Shock") == 1)//no need to continue if the shock is full
63 return;
64
66 player.m_UnconRefillModifier = 1;
67
68 player.AddHealth("","Shock", deltaT * GetRefillSpeed(player) );
69 }
70 }
EPulseType
Definition EPulseType.c:2
float GetTime()
Definition NotificationSystem.c:35
static bool GetAllowRefillSpeedModifier()
Definition CfgGameplayHandler.c:392
Definition PlayerConstants.c:2
static const float SHOCK_REFILL_COOLDOWN_AFTER_HIT
Definition PlayerConstants.c:156
float GetRefillSpeed(PlayerBase player)
Definition Shock.c:33
proto native CGame GetGame()

Перекрестные ссылки CfgGameplayHandler::GetAllowRefillSpeedModifier(), GetGame(), GetRefillSpeed(), GetTime() и PlayerConstants::SHOCK_REFILL_COOLDOWN_AFTER_HIT.

Поля

◆ SHOCK_INCREMENT_PER_SEC

const float SHOCK_INCREMENT_PER_SEC = 1
private

◆ UNCONSCIOUS_LIMIT

const float UNCONSCIOUS_LIMIT = 50
private

Объявления и описания членов класса находятся в файле: