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

Защищенные члены

override void Init ()
 
override bool ActivateCondition (PlayerBase player)
 
override void OnActivate (PlayerBase player)
 
override void OnDeactivate (PlayerBase player)
 
override bool DeactivateCondition (PlayerBase player)
 
override void OnTick (PlayerBase player, float deltaT)
 
void ApplyAgentsToBleedingSources (PlayerBase player, float deltaT)
 
void BleedingSourceCreateCheck (PlayerBase player)
 
float TransmitAgents (PlayerBase player, float count)
 

Защищенные данные

float m_NextEvent1
 
float m_Time1
 
const int EVENT_2_INTERVAL_MIN = 13
 
const int EVENT_2_INTERVAL_MAX = 18
 
const float AGENT_DOSE_PER_BS_SEC = 0.33
 
float m_NextEvent2
 
float m_Time2
 

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

const int EVENT_1_INTERVAL_MIN = 3
 
const int EVENT_1_INTERVAL_MAX = 5
 
const float AGENTS_PER_SEC = 5
 

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

Методы

◆ ActivateCondition()

override bool ActivateCondition ( PlayerBase player)
inlineprotected
35 {
36 return false;
37 }

◆ ApplyAgentsToBleedingSources()

void ApplyAgentsToBleedingSources ( PlayerBase player,
float deltaT )
inlineprotected
108 {
109
110 int count = player.GetBleedingSourceCount();
112 player.InsertAgent(eAgents.CHEMICAL_POISON, agent_dose);
113
114 }
eAgents
Definition EAgents.c:3
const float AGENT_DOSE_PER_BS_SEC
Definition AreaExposure.c:14
Definition EntityAI.c:95

Перекрестные ссылки AGENT_DOSE_PER_BS_SEC.

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

◆ BleedingSourceCreateCheck()

void BleedingSourceCreateCheck ( PlayerBase player)
inlineprotected
117 {
118 int free_bs_locations = 0;//bitmask where each bit set to 1 represents available bleeding source location
119 set<int> list = player.GetBleedingManagerServer().GetBleedingSourcesLocations();
120
121 foreach(int location: list)
122 {
123 float prot_level = PluginTransmissionAgents.GetProtectionLevelEx(DEF_CHEMICAL, location, player, true);
124 float dice_throw = Math.RandomFloat01();
126 {
127 free_bs_locations = player.GetBleedingManagerServer().GetFreeBleedingSourceBitsByInvLocation(location) | free_bs_locations;
128 }
129 }
130
131 int num_of_free_bs = Math.GetNumberOfSetBits(free_bs_locations);//gets us the number of bits set to 1, where each represents a free bleeding source location
132
133 if ( num_of_free_bs > 0 )
134 {
135 int random_bs_index = Math.RandomIntInclusive(0, num_of_free_bs - 1 );// - 1 on the max to convert count to index
137 player.GetBleedingManagerServer().AttemptAddBleedingSourceDirectly(random_bs_bit, eBleedingSourceType.CONTAMINATED);
138 }
139 }
eBleedingSourceType
Definition BleedingSource.c:2
Definition EnMath.c:7
const int DEF_CHEMICAL
Definition constants.c:490
static proto float Pow(float v, float power)
Return power of v ^ power.
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54
static proto int GetNthBitSet(int value, int n)
returns the the index of n-th bit set in a bit mask counting from the right, for instance,...
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:126
static proto int GetNumberOfSetBits(int i)
returns the number of bits set in a bitmask i

Перекрестные ссылки DEF_CHEMICAL, Math::GetNthBitSet(), Math::GetNumberOfSetBits(), Math::Pow(), Math::RandomFloat01() и Math::RandomIntInclusive().

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

◆ DeactivateCondition()

override bool DeactivateCondition ( PlayerBase player)
inlineprotected
61 {
62 return false;
63 }

◆ Init()

override void Init ( )
inlineprotected
22 {
25 m_ID = eModifiers.MDF_AREAEXPOSURE;
28 m_SyncID = eModifierSyncIDs.MODIFIER_SYNC_ZONE_EXPOSURE;
31
32 }
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
void DisableActivateCheck()
Definition ModifierBase.c:81
bool m_AnalyticsStatsEnabled
Definition ModifierBase.c:31
eModifierSyncIDs m_SyncID
Definition ModifierBase.c:28
float m_TickIntervalActive
Definition ModifierBase.c:18
float m_TickIntervalInactive
Definition ModifierBase.c:17
eModifierSyncIDs
Definition ModifiersManager.c:3
const int DEFAULT_TICK_TIME_ACTIVE_SHORT
Definition ModifiersManager.c:28
const int DEFAULT_TICK_TIME_INACTIVE_LONG
Definition ModifiersManager.c:30
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки DEFAULT_TICK_TIME_ACTIVE_SHORT, DEFAULT_TICK_TIME_INACTIVE_LONG, DisableActivateCheck(), DisableDeactivateCheck(), m_AnalyticsStatsEnabled, m_ID, m_SyncID, m_TickIntervalActive, m_TickIntervalInactive и m_TrackActivatedTime.

◆ OnActivate()

override void OnActivate ( PlayerBase player)
inlineprotected
40 {
42 if (data)
43 {
44 MiscGameplayFunctions.TeleportCheck(player, data.SafePositions);
45 player.SetPersistentFlag(PersistentFlag.AREA_PRESENCE, false);
46 }
47
48 //make the player cough immediately
50 if(transmitted)
51 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
52
54 }
PersistentFlag
Definition PersistentFlag.c:6
float TransmitAgents(PlayerBase player, float count)
Definition AreaExposure.c:141
const int EVENT_1_INTERVAL_MAX
Definition AreaExposure.c:4
float m_NextEvent1
Definition AreaExposure.c:7
const int EVENT_1_INTERVAL_MIN
Definition AreaExposure.c:3
Definition ContaminatedAreaLoader.c:3
static JsonDataContaminatedAreas GetData()
Definition ContaminatedAreaLoader.c:101
Definition JsonDataContaminatedArea.c:3
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки EVENT_1_INTERVAL_MAX, EVENT_1_INTERVAL_MIN, EffectAreaLoader::GetData(), m_NextEvent1, Math::RandomFloatInclusive() и TransmitAgents().

◆ OnDeactivate()

override void OnDeactivate ( PlayerBase player)
inlineprotected
57 {
58 }

◆ OnTick()

override void OnTick ( PlayerBase player,
float deltaT )
inlineprotected
66 {
67 #ifdef DEVELOPER
68 if(!player.GetCanBeDestroyed())
69 return;
70 #endif
71
73
74 m_Time2 += deltaT;
75
76 if (transmitted)
77 {
78 m_Time1 += deltaT;
79 if (m_Time1 >= m_NextEvent1 )
80 {
81 player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_COUGH);
82
83 if(Math.RandomFloat01() < 0.25)//creates a cough cooldown once in a while
84 {
86 }
87 else
88 {
90 }
91
92 m_Time1 = 0;
93 }
94 }
95
96 if ( m_Time2 >= m_NextEvent2 )
97 {
99 m_Time2 = 0;
101 }
102
104
105 }
void ApplyAgentsToBleedingSources(PlayerBase player, float deltaT)
Definition AreaExposure.c:107
float m_Time2
Definition AreaExposure.c:17
void BleedingSourceCreateCheck(PlayerBase player)
Definition AreaExposure.c:116
const int EVENT_2_INTERVAL_MIN
Definition AreaExposure.c:10
float m_Time1
Definition AreaExposure.c:8
const int EVENT_2_INTERVAL_MAX
Definition AreaExposure.c:11
float m_NextEvent2
Definition AreaExposure.c:16
const float AGENTS_PER_SEC
Definition AreaExposure.c:6

Перекрестные ссылки AGENTS_PER_SEC, ApplyAgentsToBleedingSources(), BleedingSourceCreateCheck(), EVENT_1_INTERVAL_MAX, EVENT_1_INTERVAL_MIN, EVENT_2_INTERVAL_MAX, EVENT_2_INTERVAL_MIN, m_NextEvent1, m_NextEvent2, m_Time1, m_Time2, Math::RandomFloat01(), Math::RandomFloatInclusive() и TransmitAgents().

◆ TransmitAgents()

float TransmitAgents ( PlayerBase player,
float count )
inlineprotected
142 {
143 PluginTransmissionAgents plugin = PluginTransmissionAgents.Cast(GetPlugin(PluginTransmissionAgents));
144 return plugin.TransmitAgentsEx(null, player, AGT_AIRBOURNE_CHEMICAL, count, eAgents.CHEMICAL_POISON);
145 }
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316
const int AGT_AIRBOURNE_CHEMICAL
Definition constants.c:484

Перекрестные ссылки AGT_AIRBOURNE_CHEMICAL и GetPlugin().

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

Поля

◆ AGENT_DOSE_PER_BS_SEC

const float AGENT_DOSE_PER_BS_SEC = 0.33
protected

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

◆ AGENTS_PER_SEC

const float AGENTS_PER_SEC = 5
private

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

◆ EVENT_1_INTERVAL_MAX

const int EVENT_1_INTERVAL_MAX = 5
private

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

◆ EVENT_1_INTERVAL_MIN

const int EVENT_1_INTERVAL_MIN = 3
private

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

◆ EVENT_2_INTERVAL_MAX

const int EVENT_2_INTERVAL_MAX = 18
protected

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

◆ EVENT_2_INTERVAL_MIN

const int EVENT_2_INTERVAL_MIN = 13
protected

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

◆ m_NextEvent1

float m_NextEvent1
protected

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

◆ m_NextEvent2

float m_NextEvent2
protected

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

◆ m_Time1

float m_Time1
protected

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

◆ m_Time2

float m_Time2
protected

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


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