DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Файл ModifierBase.c

См. исходные тексты.

Перечисления

enum  eModifiersTickType { TICK = 1 , ACTIVATE_CHECK = 2 , DEACTIVATE_CHECK = 4 }
 

Функции

void ModifierBase ()
 
void InitBase (PlayerBase player, ModifiersManager manager)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
PlayerBase GetPlayer ()
 
bool IsPersistent ()
 
void MakeParamObjectPersistent (Param object)
 
void ResetLastTickTime ()
 
string GetDebugText ()
 
string GetDebugTextSimple ()
 
void DisableActivateCheck ()
 
void DisableDeactivateCheck ()
 
void Tick (float delta_time)
 
bool IsActive ()
 
void SetLock (bool state)
 
bool IsLocked ()
 
bool IsTrackAttachedTime ()
 
float GetAttachedTime ()
 
void SetAttachedTime (float time)
 
int GetModifierID ()
 
string GetName ()
 Gets the name which is set for the ParticleManager, default is "ParticleSourceManager".
 
bool ActivateCondition (PlayerBase player)
 
bool DeactivateCondition (PlayerBase player)
 
void OnActivate (PlayerBase player)
 is called when an inactive modifier gets activated during gameplay, is NOT called on activation upon player server connection(see OnReconnect)
 
void OnReconnect (PlayerBase player)
 is called when a modifier is being re-activated upon player server connection, use to activate systems which are not persistent and need to run alongside active modifiers
 
void OnDeactivate (PlayerBase player)
 
void Activate ()
 
void ActivateRequest (EActivationType trigger)
 
void Deactivate (bool trigger=true)
 
void OnStoreSave (ParamsWriteContext ctx)
 
void OnTick (PlayerBase player, float deltaT)
 
void AnalyticsRegisterStat (int modifierId, string keySuffix)
 
void AnalyticsSetState (int modifierId, float value)
 special treating of the value to set state only (without counter use)
 

Переменные

enum eModifiersTickType m_ID = 0
 
ModifiersManager m_Manager
 
string m_System = "Modifiers"
 the manager instance
 
float m_ActivatedTime
 
bool m_TrackActivatedTime
 overall time this modifier was active
 
bool m_IsPersistent
 should this modifier track overall time it was active ?
 
PlayerBase m_Player
 is this modifier saved to the DB ?
 
float m_TickIntervalInactive = 5
 
float m_TickIntervalActive = 3
 
bool m_IsActive
 
bool m_ShouldBeActive
 
float m_AccumulatedTimeActive
 
float m_AccumulatedTimeInactive
 
float m_LastTickedActive
 
int m_TickType = (eModifiersTickType.TICK | eModifiersTickType.ACTIVATE_CHECK | eModifiersTickType.DEACTIVATE_CHECK)
 
float m_LastTickedInactive
 
bool m_IsLocked = false
 
EActivationType m_ActivationType
 
eModifierSyncIDs m_SyncID
 
PluginPlayerStatus m_ModulePlayerStatus
 max 32 synced modifiers supported, 0 == no sync
 
bool m_AnalyticsStatsEnabled
 

Перечисления

◆ eModifiersTickType

Элементы перечислений
TICK 
ACTIVATE_CHECK 
DEACTIVATE_CHECK 
2{
3 TICK = 1,
6}
@ ACTIVATE_CHECK
Definition ModifierBase.c:4
@ TICK
Definition ModifierBase.c:3
@ DEACTIVATE_CHECK
Definition ModifierBase.c:5

Функции

◆ Activate()

void Activate ( )
protected
194 {
196 {
197 AnalyticsRegisterStat(m_ID, "state");
199 }
200
201 m_IsActive = true;
202 m_Player.m_SyncedModifiers = (m_Player.m_SyncedModifiers | m_SyncID);
203 if (m_ActivationType == EActivationType.TRIGGER_EVENT_ON_ACTIVATION)
205 else if (m_ActivationType == EActivationType.TRIGGER_EVENT_ON_CONNECT)
207
208 m_Player.SetSynchDirty();
209 }
enum eModifiersTickType m_ID
PlayerBase m_Player
is this modifier saved to the DB ?
Definition ModifierBase.c:16
void AnalyticsRegisterStat(int modifierId, string keySuffix)
Definition ModifierBase.c:239
bool m_AnalyticsStatsEnabled
Definition ModifierBase.c:31
bool m_IsActive
Definition ModifierBase.c:19
eModifierSyncIDs m_SyncID
Definition ModifierBase.c:28
EActivationType m_ActivationType
Definition ModifierBase.c:27
void OnReconnect(PlayerBase player)
is called when a modifier is being re-activated upon player server connection, use to activate system...
void AnalyticsSetState(int modifierId, float value)
special treating of the value to set state only (without counter use)
Definition ModifierBase.c:248
void OnActivate()
Definition Trap_LandMine.c:67
Definition EntityAI.c:95

Перекрестные ссылки AnalyticsRegisterStat(), AnalyticsSetState(), m_ActivationType, m_AnalyticsStatsEnabled, m_ID, m_IsActive, m_Player, m_SyncID, OnActivate() и ModifierBase::OnReconnect().

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

◆ ActivateCondition()

bool ActivateCondition ( PlayerBase player)
protected
177 {
178 return false;
179 }

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

◆ ActivateRequest()

void ActivateRequest ( EActivationType trigger)
protected
212 {
213 m_ShouldBeActive = true;
215 }
bool m_ShouldBeActive
Definition ModifierBase.c:20

Перекрестные ссылки m_ActivationType и m_ShouldBeActive.

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

◆ AnalyticsRegisterStat()

void AnalyticsRegisterStat ( int modifierId,
string keySuffix )
private
240 {
242 modifierIdName.ToLower();
243
244 m_Player.StatRegister(string.Format("%1_%2", modifierIdName, keySuffix));
245 }
Definition EnConvert.c:590
static string EnumToString(typename e, int enumValue)
Return string name of enum value.
Definition EnConvert.c:601
eModifiers
Definition eModifiers.c:2

Перекрестные ссылки EnumTools::EnumToString() и m_Player.

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

◆ AnalyticsSetState()

void AnalyticsSetState ( int modifierId,
float value )
private

special treating of the value to set state only (without counter use)

249 {
251 modifierStatKey.ToLower();
252
253 string formatttedKey = string.Format("%1_state", modifierStatKey);
254 if (value == -1.0)
255 {
256 if(m_Player.StatGet(formatttedKey) == 0.0)
257 return;
258 }
259
260 if (value == 1.0)
261 {
262 if(m_Player.StatGet(formatttedKey) == 1.0)
263 return;
264 }
265
266 m_Player.StatUpdate(formatttedKey, value);
267 }

Перекрестные ссылки EnumTools::EnumToString() и m_Player.

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

◆ Deactivate()

void Deactivate ( bool trigger = true)
protected
218 {
219 if (!m_IsActive)
220 return;
221
223 AnalyticsSetState(m_ID, -1.0);
224
225 m_Player.m_SyncedModifiers = (m_Player.m_SyncedModifiers & ~m_SyncID);
226 m_ShouldBeActive = false;
227 m_IsActive = false;
228 m_ActivatedTime = 0;
229 if (trigger)
231 }
float m_ActivatedTime
Definition ModifierBase.c:13
void OnDeactivate(PlayerBase player)
Definition HeavyMetal.c:211

Перекрестные ссылки AnalyticsSetState(), m_ActivatedTime, m_AnalyticsStatsEnabled, m_ID, m_IsActive, m_Player, m_ShouldBeActive и OnDeactivate().

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

◆ DeactivateCondition()

bool DeactivateCondition ( PlayerBase player)
protected
182 {
183 return false;
184 }

◆ DisableActivateCheck()

void DisableActivateCheck ( )
protected

◆ DisableDeactivateCheck()

◆ GetAttachedTime()

◆ GetDebugText()

override string GetDebugText ( )
protected
72 {
73 return "";
74 }

◆ GetDebugTextSimple()

string GetDebugTextSimple ( )
protected
77 {
78 return "";
79 }

◆ GetModifierID()

int GetModifierID ( )
protected
161 {
162 return m_ID;
163 }

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

◆ GetPlayer()

PlayerBase GetPlayer ( )
protected
52 {
53 return m_Player;
54 }

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

Используется в Actions_DoCancel(), Actions_DoInternalCommand(), Actions_Start(), ActivateModifier(), PluginBase::ActivateModifier(), MissionBase::AddActiveInputRestriction(), LayoutHolder::AddItemToQuickbarRadial(), ClientData::AddPlayerBase(), AddQuickbarItem(), VicinityItemManager::AddVicinityItems(), EntityAI::AdvancedCommunication(), DayZCreature::AttenuateSoundIfNecessary(), DayZPlayer::AttenuateSoundIfNecessary(), CameraShake::CameraShake(), UIScriptedMenu::CameraToolsMenu(), InventoryGridController::CanAddItemInHandToInventory(), LayoutHolder::CanAddToQuickbarEx(), Attachments::CanCombine(), Attachments::CanCombineAmmo(), Container::CanCombineAmmo(), VicinitySlotsContainer::CanCombineAmmo(), LayoutHolder::CanCombineEx(), BaseBuildingBase::CanDisplayAttachmentCategory(), BaseBuildingBase::CanDisplayAttachmentSlot(), LayoutHolder::CanDropEx(), LayoutHolder::CanEquipEx(), UIScriptedMenu::CanOpenMenu(), BaseBuildingBase::CanReceiveAttachment(), LayoutHolder::CanSwapOrTakeToHandsEx(), LayoutHolder::CanTakeToInventoryEx(), CheckAllowUpdate(), UIScriptedMenu::CheckForLightsAndNVG(), Attachments::Combine(), PlayerContainer::Combine(), VicinitySlotsContainer::Combine(), PluginDayzPlayerDebug_Ctrl::CommandHandler(), PluginDayzPlayerDebug_Weapons::CommandHandler(), DayZPlayer::CommandHandlerDebug(), MissionBase::CreateLogoutMenu(), DeactivateModifier(), PluginBase::DeactivateModifier(), PluginDayzPlayerDebug_OtherCmds::Death_Start(), PluginBase::DeleteSceneObject(), WeaponDebug::DisplayGeneralInfo(), Hud::DisplayPresence(), Hud::DisplayStance(), PoweredOptic_Base::DoMeasurement(), Icon::DoubleClick(), HandsContainer::DoubleClick(), AttachmentCategoriesRow::DoubleClick(), ClosableContainer::DoubleClick(), PlayerContainer::DoubleClick(), VicinitySlotsContainer::DoubleClick(), ZombieContainer::DoubleClick(), Icon::DraggingOver(), ClosableContainer::DraggingOver(), DraggingOverCenterPanel(), ClosableContainer::DraggingOverGrid(), ClosableContainer::DraggingOverGrid(), HandsArea::DraggingOverHandsPanel(), HandsContainer::DraggingOverHeader(), ClosableContainer::DraggingOverHeader(), VicinityContainer::DraggingOverHeader(), ZombieContainer::DraggingOverHeader(), Icon::DraggingOverSwap(), ScriptConsoleItemsTab::DrawItems(), ClosableContainer::DropReceived(), HandsContainer::DropReceived(), AttachmentCategoriesRow::DropReceived(), ClosableContainer::DropReceived(), Icon::DropReceivedFromMain(), EntityLightSource::EOnInit(), HandsContainer::EquipItem(), ItemManager::EvaluateContainerDragabilityDefault(), DayZPlayer::EvaluateDamageHit(), Event_OnClick(), AnalyticsManagerClient::Event_OnEntityKilled(), VicinityItemManager::ExcludeFromContainer_Phase1(), VicinityItemManager::ExcludeFromContainer_Phase2(), VicinityItemManager::ExcludeFromContainer_Phase3(), UIScriptedMenu::ExecuteSelectedItem(), UIScriptedMenu::GameRespawn(), UIScriptedMenu::GameRetry(), GestureMenuItem(), ItemManager::GetChosenCombinationFlag(), HandsContainer::GetCombinationFlags(), ItemManager::GetCombinationFlags(), ColorManager::GetItemColor(), UIScriptedMenu::GetItems(), InventoryGridController::GetQuickbarItemColor(), Attachments::GetRecipeCount(), HandsContainer::GetRecipeCount(), PlayerContainer::GetRecipeCount(), ItemManager::GetRecipeCount(), ActionDismantlePart::GetText(), ActionRepairPart::GetText(), ActionTransferLiquid::GetText(), ActionWorldCraft::GetText(), ActionBuildShelter::GetText(), WeaponDebug::GetWeaponInHands(), UIScriptedMenu::HandleLights(), UIScriptedMenu::HandleNVG(), HandsContainer::HandsContainer(), MissionBase::HideInventory(), PluginDayzPlayerDebug_OtherCmds::Hit_Start(), Init(), UIScriptedMenu::Init(), ScriptConsoleGeneralTab::Init(), ManBase::InitEditor(), PluginBase::InitLoad(), HandsContainer::InspectItem(), AttachmentsOutOfReach::IsAttachmentReachable(), DayZPlayerImplement::IsControlledPlayer(), HandsContainer::IsEmpty(), BoatScript::IsInventoryVisible(), IsInventoryVisible(), HandsContainer::IsItemActive(), HandsContainer::IsItemWithQuantityActive(), UIScriptedMenu::IsLocalPlayer(), PluginBase::IsModifierLocked(), IsObjectObstructed(), IsObjectObstructedFilterEx(), ScriptConsoleGeneralTab::LateInit(), PluginConfigHandler::LoadScenePlayer(), PluginBase::LockModifier(), LockModifier(), Icon::MouseClick(), AttachmentCategoriesRow::MouseClick(), PlayerContainer::MouseClick(), ZombieContainer::MouseClick(), HandsContainer::MouseClick2(), ClosableContainer::MouseClick2(), MoveFocusByArea(), ActionMenu::NextAction(), ActionMenu::NextActionCategory(), OnActivate(), OnCenterPanelDropReceived(), ScriptConsoleGeneralTab::OnChange(), HudDebugWinBase::OnChange(), PluginDayzPlayerDebug_Weapons::OnClick(), UIScriptedMenu::OnClick(), ScriptConsoleGeneralTab::OnClick(), ScriptConsoleItemsTab::OnClick(), UIScriptedMenu::OnDoubleClick(), ScriptConsoleGeneralTab::OnDoubleClick(), ScriptConsoleItemsTab::OnDoubleClick(), Icon::OnDraggingOverBackground(), PlayerContainer::OnDropReceivedFromGhostArea(), ZombieContainer::OnDropReceivedFromGhostArea(), AttachmentCategoriesRow::OnDropReceivedFromHeader(), ClosableContainer::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromHeader(), VicinitySlotsContainer::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromIcon(), Grenade_Base::OnExplosionEffects(), PluginBase::OnGUITimer(), HandsArea::OnHandsPanelDropReceived(), SlotsIcon::OnIconDrag(), InventoryGridController::OnItemDrag(), InventoryGridController::OnItemDrop(), InventoryGridController::OnItemDropReceived(), MissionBase::OnMissionFinish(), ScriptConsoleGeneralTab::OnMouseButtonDown(), ScriptConsoleSoundsTab::OnMouseButtonDown(), Icon::OnPerformCombination(), HandsContainer::OnPerformCombination(), Icon::OnPerformRecipe(), InventoryItem::OnRightClick(), OnRightPanelDropReceived(), OnScheduledTick(), OnSelectAction(), ScriptConsoleVicinityTab::OnSelectAction(), ScriptedWidgetEventHandler::OnSelectAction(), ScriptedWidgetEventHandler::OnSelectActionEx(), OnShow(), DayZPlayer::OnStepEvent(), PluginBase::OnUIEditorOpened(), DayZPlayerCameraBase::OnUpdate(), PoweredOptic_Base::OnWorkStart(), PoweredOptic_Base::OnWorkStop(), MissionBase::Pause(), Icon::PerformCombination(), UIScriptedMenu::Play(), MissionBase::PlayerControlDisable(), MissionBase::PlayerControlEnable(), PlayerPreview::PlayerPreview(), PlayerSyncDelete(), ScriptConsoleSoundsTab::PlaySoundEvent(), PluginDayzPlayerDebug_Weapons::PluginDayzPlayerDebug_Weapons(), ActionMenu::PrevAction(), ActionMenu::PrevActionCategory(), UIScriptedMenu::PrimaryAction(), UIScriptedMenu::ProcessEmoteConditionRequest(), ActionMenu::Refresh(), ScriptConsoleGeneralTab::RefreshPlayerPosEditBoxes(), Hud::RefreshPlayerTags(), VicinityItemManager::RefreshVicinityItems(), InventoryGridController::Remove(), EntityAI::RemoveAction(), RemoveAction(), InventoryItem::RemoveAction(), BoatScript::RemoveAction(), RequestDetailedInfo(), ResetModifiers(), HudDebugWinBase::ResetStats(), RightArea::RightArea(), HudDebugWinBase::RPCChangeStat(), ScriptConsoleEnfScriptTab::RunEnscript(), ScriptConsoleEnfScriptTab::RunEnscriptServer(), RunRPC(), SceneObject::SceneObjectSynch(), ScriptConsoleSoundsTab::ScriptConsoleSoundsTab(), UIScriptedMenu::SecondaryAction(), HandsPreview::Select(), PlayerContainer::Select(), VicinitySlotsContainer::Select(), ZombieContainer::Select(), PluginBase::SelectAndFocusPlayerObject(), ScriptConsoleWeatherTab::SendRPC(), HandsContainer::SetActive(), PluginBase::SetDeveloperItemClient(), PluginBase::SetDeveloperItemClientEx(), HandsContainer::SetLastActive(), Container::SetLock(), UIScriptedMenu::SetPreset(), Hud::SetStamina(), SetUpdate(), HudDebugWinBase::SetUpdate(), ScriptedWidgetEventHandler::ShowActionMenu(), MissionBase::ShowInventory(), ItemManager::ShowSourceDropzone(), Hud::ShowVehicleInfo(), PluginBase::SpawnEntityInInventory(), PluginBase::SpawnFromClipboard(), PluginBase::SpawnNewInfectedEntity(), ScriptConsoleItemsTab::SpawnPreset(), InventoryItem::SplitIntoStackMaxClient(), HandsContainer::SplitItem(), Icon::Swap(), HandsContainer::TakeAsAttachment(), ClosableContainer::TakeAsAttachment(), DeveloperTeleport::TeleportAtCursor(), DeveloperTeleport::TeleportAtCursorEx(), TestOwnership(), Tick(), PluginDayzPlayerDebug_Weapons::Tick(), MissionBase::TickScheduler(), ToggleDebugWindowEvent(), PluginBase::ToggleFreeCamera(), PluginBase::ToggleFreeCameraBackPos(), HandsContainer::TransferItem(), AttachmentCategoriesRow::TransferItem(), VicinitySlotsContainer::TransferItem(), Attachments::TransferItemToVicinity(), HandsContainer::TransferItemToVicinity(), AttachmentCategoriesRow::TransferItemToVicinity(), PluginDayzPlayerDebug_OtherCmds::Uncon_End(), PluginDayzPlayerDebug_OtherCmds::Uncon_Start(), HudDebugWinBase::Update(), UIScriptedMenu::Update(), ScriptConsoleGeneralTab::Update(), ScriptConsoleSoundsTab::Update(), Hud::UpdateBloodName(), UpdateConsoleToolbar(), MissionBase::UpdateDebugMonitor(), UIScriptedMenu::UpdateInfo(), Attachments::UpdateInterval(), HandsHeader::UpdateInterval(), VicinityContainer::UpdateInterval(), UpdateInterval(), PlayerPreview::UpdateInterval(), InventoryGridController::UpdateItems(), ScriptConsoleGeneralTab::UpdateMousePos(), ScriptConsoleSoundsTab::UpdateMousePos(), UpdateSpecialtyMeter(), PluginBase::UpdateStatsLocal(), ScriptConsoleGeneralTab::UpdateTime(), ActionMenu::UpdateWidgets(), UIScriptedMenu::~CameraToolsMenu(), InventoryItem::~ItemBase(), SceneObject::~SceneObject() и ScriptConsoleGeneralTab::~ScriptConsoleGeneralTab().

◆ Init()

void Init ( )
protected

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

46 {
49 }

Перекрестные ссылки AnalyticsRegisterStat(), m_AnalyticsStatsEnabled и m_ID.

◆ InitBase()

void InitBase ( PlayerBase player,
ModifiersManager manager )
protected
39 {
42 Init();
43 }
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition ModifierBase.c:45
ModifiersManager m_Manager
Definition ModifierBase.c:11

Перекрестные ссылки ModifierBase::Init(), m_Manager и m_Player.

◆ IsActive()

◆ IsLocked()

bool IsLocked ( )
protected
141 {
142 return m_IsLocked;
143 }
bool m_IsLocked
Definition ModifierBase.c:26

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

Используется в IsLockedOnGate(), MissionBase::OnUpdate() и Tick().

◆ IsPersistent()

bool IsPersistent ( )
protected
57 {
58 return m_IsPersistent;
59 }
bool m_IsPersistent
should this modifier track overall time it was active ?
Definition ModifierBase.c:15

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

◆ IsTrackAttachedTime()

bool IsTrackAttachedTime ( )
protected
146 {
148 }
bool m_TrackActivatedTime
overall time this modifier was active
Definition ModifierBase.c:14

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

◆ MakeParamObjectPersistent()

void MakeParamObjectPersistent ( Param object)
protected
62 {
63 m_Manager.m_ParamList.Insert(object);
64 }

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

Используется в TestDiseaseMdfr::Init() и SymptomBase::OnInit().

◆ ModifierBase()

void ModifierBase ( )
protected
34 {
35 Class.CastTo(m_ModulePlayerStatus, GetPlugin(PluginPlayerStatus));
36 }
PluginPlayerStatus m_ModulePlayerStatus
max 32 synced modifiers supported, 0 == no sync
Definition ModifierBase.c:29
PluginBase GetPlugin(typename plugin_type)
Definition PluginManager.c:316
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Class::CastTo(), GetPlugin() и m_ModulePlayerStatus.

◆ OnActivate()

void OnActivate ( PlayerBase player)
protected

is called when an inactive modifier gets activated during gameplay, is NOT called on activation upon player server connection(see OnReconnect)

204 {
205 super.OnActivate(player);
206
207 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
208 player.GetSymptomManager().QueueUpSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
209 }

Перекрестные ссылки m_NextEvent, PAIN_EVENT_INTERVAL_MAX, PAIN_EVENT_INTERVAL_MIN и Math::RandomFloatInclusive().

◆ OnDeactivate()

void OnDeactivate ( PlayerBase player)
protected
212 {
213 super.OnDeactivate(player);
214
215 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_DEAFNESS_COMPLETE);
216 player.GetSymptomManager().RemoveSecondarySymptom(SymptomIDs.SYMPTOM_HMP_SEVERE);
217 }

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

◆ OnReconnect()

void OnReconnect ( PlayerBase player)
protected

is called when a modifier is being re-activated upon player server connection, use to activate systems which are not persistent and need to run alongside active modifiers

◆ OnStoreSave()

void OnStoreSave ( ParamsWriteContext ctx)
protected
230 {
232
233 int modifierCount;
235 {
236 if (modifier.IsActive() && modifier.IsPersistent())
237 {
239 //save the modifier id
240 CachedObjectsArrays.ARRAY_INT.Insert(modifier.GetModifierID());
241 if (modifier.IsTrackAttachedTime())
242 {
243 //save the overall attached time
244 CachedObjectsArrays.ARRAY_INT.Insert(modifier.GetAttachedTime());
245 }
246 }
247 }
248
249 ctx.Write(modifierCount);
250
251 //write the individual modifiers and respective attached times
252 for (int i = 0; i < CachedObjectsArrays.ARRAY_INT.Count(); i++)
253 {
255 ctx.Write(item);
256 }
257
258 for (int z = 0; z < m_ParamList.Count(); z++)
259 {
260 m_ParamList.Get(z).Serialize(ctx);
261 }
262
263 }
ref array< ref Param > m_ParamList
Definition ModifiersManager.c:78
ref map< int, ref ModifierBase > m_ModifierList
Definition ModifiersManager.c:76
Definition UtilityClasses.c:41
static ref TIntArray ARRAY_INT
Definition UtilityClasses.c:51
Definition BreathVapourMdfr.c:4

Перекрестные ссылки CachedObjectsArrays::ARRAY_INT, id_bit_offset, m_Armed, m_CaptureSoundHash, m_CaptureState, m_Combination, m_CombinationLocked, m_CreatureType, m_DangerSound, m_FuelBurnRateMP, m_HasAshes, m_IsActive, m_IsBurning, m_IsInProgress, m_ModifierList, m_ParamList, m_ParScale, m_PlayerStats, m_ReleaseSoundHash, m_State, m_StomachContents, m_Value, PlayerStomach() и quantity_bit_offset.

◆ OnTick()

void OnTick ( PlayerBase player,
float deltaT )
private
220 {
221 float healthLoss = (deltaT * (HEALTH_LOSS_HEAVYMETAL_MAX * Math.Max(HEALTH_LOSS_HEAVYMETAL_MIN, player.GetSingleAgentCountNormalized(eAgents.HEAVYMETAL))));
222 player.AddHealth(-healthLoss);
223
224 m_Time += deltaT;
225
226 if (m_Time >= m_NextEvent)
227 {
228 SymptomBase symptom = player.GetSymptomManager().QueueUpPrimarySymptom(SymptomIDs.SYMPTOM_VOMIT);
229 if (symptom)
230 {
231 CachedObjectsParams.PARAM1_FLOAT.param1 = 30.0; //percentage of stomach
233 }
234
235 m_Time = 0;
237 }
238 }
eAgents
Definition EAgents.c:3
static const int VOMIT_EVENT_INTERVAL_MAX
Definition HeavyMetal.c:179
static const int VOMIT_EVENT_INTERVAL_MIN
Definition HeavyMetal.c:178
float m_NextEvent
Definition WoundInfection.c:21
float m_Time
Definition WoundInfection.c:22
Definition UtilityClasses.c:10
static ref Param1< float > PARAM1_FLOAT
Definition UtilityClasses.c:13
Definition EnMath.c:7
Definition StateBase.c:2
static proto float Max(float x, float y)
Returns bigger of two given values.
static float RandomFloatInclusive(float min, float max)
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:106

Перекрестные ссылки m_NextEvent, m_Time, Math::Max(), PAIN_EVENT_INTERVAL_MAX, PAIN_EVENT_INTERVAL_MIN, CachedObjectsParams::PARAM1_FLOAT, Math::RandomFloatInclusive(), SHIVER_EVENT_INTERVAL_MAX, SHIVER_EVENT_INTERVAL_MIN, VOMIT_EVENT_INTERVAL_MAX и VOMIT_EVENT_INTERVAL_MIN.

◆ ResetLastTickTime()

void ResetLastTickTime ( )
protected
67 {
69 }
float m_LastTickedActive
Definition ModifierBase.c:23

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

◆ SetAttachedTime()

void SetAttachedTime ( float time)
protected
156 {
158 }

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

◆ SetLock()

void SetLock ( bool state)
protected
136 {
138 }

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

Используется в Container::SetEntity() и Container::~CargoContainer().

◆ Tick()

void Tick ( float delta_time)
protected
92 {
94 Activate();
95
96 if (m_IsActive)
97 {
100 {
101 if (m_TickType & eModifiersTickType.DEACTIVATE_CHECK && DeactivateCondition(m_Player) && !IsLocked())
102 {
103 Deactivate();
104 }
105 else
106 {
109 }
110
112 }
113 }
114 else if (m_TickType & eModifiersTickType.ACTIVATE_CHECK)
115 {
118 {
120 {
121 if (!IsLocked())
122 ActivateRequest(EActivationType.TRIGGER_EVENT_ON_ACTIVATION);
123 }
124
126 }
127 }
128 }
bool ActivateCondition(PlayerBase player)
Definition ModifierBase.c:176
float m_AccumulatedTimeInactive
Definition ModifierBase.c:22
float m_AccumulatedTimeActive
Definition ModifierBase.c:21
bool DeactivateCondition(PlayerBase player)
Definition ModifierBase.c:181
void OnTick(PlayerBase player, float deltaT)
Definition HeavyMetal.c:219
bool IsLocked()
Definition ModifierBase.c:140
float m_TickIntervalActive
Definition ModifierBase.c:18
float m_TickIntervalInactive
Definition ModifierBase.c:17
void ActivateRequest(EActivationType trigger)
Definition ModifierBase.c:211
void Deactivate(bool trigger=true)
Definition ModifierBase.c:217
void Activate()
Definition ModifierBase.c:193

Перекрестные ссылки Activate(), ModifierBase::ActivateCondition(), ActivateRequest(), Deactivate(), ModifierBase::DeactivateCondition(), IsLocked(), m_AccumulatedTimeActive, m_AccumulatedTimeInactive, m_ActivatedTime, m_IsActive, m_Player, m_ShouldBeActive, m_TickIntervalActive, m_TickIntervalInactive, m_TickType и ModifierBase::OnTick().

Переменные

◆ m_AccumulatedTimeActive

float m_AccumulatedTimeActive

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

◆ m_AccumulatedTimeInactive

float m_AccumulatedTimeInactive

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

◆ m_ActivatedTime

float m_ActivatedTime

Используется в Deactivate(), GetAttachedTime(), SetAttachedTime() и Tick().

◆ m_ActivationType

EActivationType m_ActivationType

Используется в Activate(), ActivateRequest() и BrokenLegsMdfr::Init().

◆ m_AnalyticsStatsEnabled

◆ m_ID

◆ m_IsActive

◆ m_IsLocked

◆ m_IsPersistent

◆ m_LastTickedActive

float m_LastTickedActive

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

◆ m_LastTickedInactive

float m_LastTickedInactive

◆ m_Manager

◆ m_ModulePlayerStatus

PluginPlayerStatus m_ModulePlayerStatus

max 32 synced modifiers supported, 0 == no sync

Используется в Debug(), MessageReceiverBase::DisplayElementBase(), ManBase::Init(), ModifierBase(), ManBase::SetStamina() и DisplayElementBase::UpdateHUD().

◆ m_Player

PlayerBase m_Player

is this modifier saved to the DB ?

◆ m_ShouldBeActive

bool m_ShouldBeActive

Используется в ActivateRequest(), Deactivate() и Tick().

◆ m_SyncID

◆ m_System

string m_System = "Modifiers"

the manager instance

Используется в MessageReceiverBase::DisplayElementBase().

◆ m_TickIntervalActive

◆ m_TickIntervalInactive

◆ m_TickType

◆ m_TrackActivatedTime