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

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

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

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

Методы

◆ ActivateCondition()

override bool ActivateCondition ( PlayerBase player)
inlineprivate
13 {
14 return true;
15 }

◆ DeactivateCondition()

override bool DeactivateCondition ( PlayerBase player)
inlineprivate
27 {
28 return false;
29 }

◆ Init()

override void Init ( )
inlineprivate
4 {
6 m_ID = eModifiers.MDF_HEALTH_REGEN;
10 }
int m_ID
ID of effect, given by SEffectManager when registered (automatically done when playing through it)
Definition Effect.c:49
bool m_TrackActivatedTime
overall time this modifier was active
Definition ModifierBase.c:14
void DisableDeactivateCheck()
Definition ModifierBase.c:86
float m_TickIntervalActive
Definition ModifierBase.c:18
float m_TickIntervalInactive
Definition ModifierBase.c:17
const int DEFAULT_TICK_TIME_INACTIVE
Definition ModifiersManager.c:29
enum eModifierSyncIDs DEFAULT_TICK_TIME_ACTIVE
eModifiers
Definition eModifiers.c:2

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

◆ OnActivate()

override void OnActivate ( PlayerBase player)
inlineprivate
18 {
19 }

◆ OnReconnect()

override void OnReconnect ( PlayerBase player)
inlineprivate
22 {
23
24 }

◆ OnTick()

override void OnTick ( PlayerBase player,
float deltaT )
inlineprivate
32 {
33 if (player.IsAlive())//this needs to be here, some of the other modifiers can kill the character during the same modifier tick, and not checking here can partially revive him(resulting in a broken char)
34 {
35
36 float regen_speed = player.GetHealthRegenSpeed() * deltaT;;
37 player.AddHealth("GlobalHealth", "Health" , regen_speed );
38
43
44 //Leg regen when legs are NOT BROKEN
45 if ( player.GetBrokenLegs() == eBrokenLegs.NO_BROKEN_LEGS )
46 {
47 player.AddHealth("RightLeg","Health", PlayerConstants.LEG_HEALTH_REGEN);
48 player.AddHealth("RightFoot","Health", PlayerConstants.LEG_HEALTH_REGEN);
49 player.AddHealth("LeftLeg","Health", PlayerConstants.LEG_HEALTH_REGEN);
50 player.AddHealth("LeftFoot","Health", PlayerConstants.LEG_HEALTH_REGEN);
51 }
52 else
53 {
54 //Leg regen when legs are BROKEN or SPLINTED
55 player.AddHealth("RightLeg","Health", PlayerConstants.LEG_HEALTH_REGEN_BROKEN);
56 player.AddHealth("RightFoot","Health",PlayerConstants.LEG_HEALTH_REGEN_BROKEN);
57 player.AddHealth("LeftLeg","Health", PlayerConstants.LEG_HEALTH_REGEN_BROKEN);
58 player.AddHealth("LeftFoot","Health", PlayerConstants.LEG_HEALTH_REGEN_BROKEN);
59 }
60
62
63 // We increase head health regeneration as it is unclear to players what health level individual zones have
64 player.AddHealth("Head","Health",( regen_speed * PlayerConstants.DAMAGE_ZONE_BLOOD_REGEN_MODIFIER ) * 2 );
65 }
66 }
eBrokenLegs
Definition EBrokenLegs.c:2
Definition EntityAI.c:95
Definition PlayerConstants.c:2
static const float LEG_HEALTH_REGEN
Definition PlayerConstants.c:141
static const float DAMAGE_ZONE_BLOOD_REGEN_MODIFIER
Definition PlayerConstants.c:92
static const float LEG_HEALTH_REGEN_BROKEN
Definition PlayerConstants.c:142

Перекрестные ссылки PlayerConstants::DAMAGE_ZONE_BLOOD_REGEN_MODIFIER, PlayerConstants::LEG_HEALTH_REGEN и PlayerConstants::LEG_HEALTH_REGEN_BROKEN.


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