Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
modifierbase.c File Reference

Go to the source code of this file.

Enumerations

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

Functions

void Activate ()
bool ActivateCondition (PlayerBase player)
void ActivateRequest (EActivationType trigger)
void AnalyticsRegisterStat (int modifierId, string keySuffix)
void AnalyticsSetState (int modifierId, float value)
 special treating of the value to set state only (without counter use)
void Deactivate (bool trigger=true)
bool DeactivateCondition (PlayerBase player)
void DisableActivateCheck ()
void DisableDeactivateCheck ()
float GetAttachedTime ()
string GetDebugText ()
string GetDebugTextSimple ()
int GetModifierID ()
string GetName ()
 Test name getter. Strictly for UI porposes!
PlayerBase GetPlayer ()
void Init ()
void InitBase (PlayerBase player, ModifiersManager manager)
bool IsActive ()
bool IsLocked ()
bool IsPersistent ()
bool IsTrackAttachedTime ()
void MakeParamObjectPersistent (Param object)
void ModifierBase ()
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 OnDeactivate (PlayerBase player)
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 OnStoreSave (ParamsWriteContext ctx)
void OnTick (PlayerBase player, float deltaT)
void ResetLastTickTime ()
void SetAttachedTime (float time)
void SetLock (bool state)
void Tick (float delta_time)

Variables

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

Enumeration Type Documentation

◆ eModifiersTickType

Enumerator
TICK 
ACTIVATE_CHECK 
DEACTIVATE_CHECK 

Definition at line 1 of file modifierbase.c.

Function Documentation

◆ Activate()

◆ ActivateCondition()

bool ActivateCondition ( PlayerBase player)
protected

Definition at line 176 of file modifierbase.c.

◆ ActivateRequest()

void ActivateRequest ( EActivationType trigger)
protected

Definition at line 211 of file modifierbase.c.

References m_ActivationType, and m_ShouldBeActive.

Referenced by Tick().

◆ AnalyticsRegisterStat()

void AnalyticsRegisterStat ( int modifierId,
string keySuffix )
private

Definition at line 239 of file modifierbase.c.

References EnumTools::EnumToString(), and string::ToLower().

Referenced by Activate(), and Init().

◆ AnalyticsSetState()

void AnalyticsSetState ( int modifierId,
float value )
private

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

Definition at line 248 of file modifierbase.c.

References EnumTools::EnumToString(), and string::ToLower().

Referenced by Activate(), and Deactivate().

◆ Deactivate()

void Deactivate ( bool trigger = true)
protected

◆ DeactivateCondition()

bool DeactivateCondition ( PlayerBase player)
protected

Definition at line 181 of file modifierbase.c.

Referenced by Tick().

◆ DisableActivateCheck()

◆ DisableDeactivateCheck()

◆ GetAttachedTime()

◆ GetDebugText()

override string GetDebugText ( )
protected

Definition at line 71 of file modifierbase.c.

◆ GetDebugTextSimple()

string GetDebugTextSimple ( )
protected

Definition at line 76 of file modifierbase.c.

◆ GetModifierID()

int GetModifierID ( )
protected

Definition at line 160 of file modifierbase.c.

References m_ID.

◆ GetPlayer()

◆ Init()

void Init ( )
protected

Definition at line 45 of file modifierbase.c.

References AnalyticsRegisterStat(), m_AnalyticsStatsEnabled, and m_ID.

◆ InitBase()

void InitBase ( PlayerBase player,
ModifiersManager manager )
protected

Definition at line 38 of file modifierbase.c.

References ModifierBase::Init(), m_Manager, and ModifiersManager().

◆ IsActive()

◆ IsLocked()

bool IsLocked ( )
protected

Definition at line 140 of file modifierbase.c.

References m_IsLocked.

Referenced by IsLockedOnGate(), MissionBase::OnUpdate(), and Tick().

◆ IsPersistent()

bool IsPersistent ( )
protected

Definition at line 56 of file modifierbase.c.

References m_IsPersistent.

◆ IsTrackAttachedTime()

bool IsTrackAttachedTime ( )
protected

Definition at line 145 of file modifierbase.c.

References m_TrackActivatedTime.

◆ MakeParamObjectPersistent()

void MakeParamObjectPersistent ( Param object)
protected

Definition at line 61 of file modifierbase.c.

References m_Manager.

Referenced by TestDiseaseMdfr::Init().

◆ ModifierBase()

void ModifierBase ( )
protected

Definition at line 33 of file modifierbase.c.

References Class::CastTo(), GetPlugin(), and 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)

Definition at line 203 of file heavymetal.c.

References m_NextEvent, HeavyMetalMdfr::OnActivate(), PAIN_EVENT_INTERVAL_MAX, PAIN_EVENT_INTERVAL_MIN, and Math::RandomFloatInclusive().

◆ OnDeactivate()

void OnDeactivate ( PlayerBase player)
protected

Definition at line 211 of file heavymetal.c.

Referenced by 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()

◆ OnTick()

◆ ResetLastTickTime()

void ResetLastTickTime ( )
protected

Definition at line 66 of file modifierbase.c.

References m_LastTickedActive.

◆ SetAttachedTime()

void SetAttachedTime ( float time)
protected

Definition at line 155 of file modifierbase.c.

References m_ActivatedTime.

◆ SetLock()

void SetLock ( bool state)
protected

Definition at line 135 of file modifierbase.c.

References m_IsLocked.

◆ Tick()

Variable Documentation

◆ m_AccumulatedTimeActive

float m_AccumulatedTimeActive

Definition at line 21 of file modifierbase.c.

Referenced by Tick().

◆ m_AccumulatedTimeInactive

float m_AccumulatedTimeInactive

Definition at line 22 of file modifierbase.c.

Referenced by Tick().

◆ m_ActivatedTime

float m_ActivatedTime

Definition at line 13 of file modifierbase.c.

Referenced by Deactivate(), GetAttachedTime(), SetAttachedTime(), and Tick().

◆ m_ActivationType

EActivationType m_ActivationType

Definition at line 27 of file modifierbase.c.

Referenced by Activate(), ActivateRequest(), and BrokenLegsMdfr::Init().

◆ m_AnalyticsStatsEnabled

◆ m_ID

enum eModifiersTickType m_ID = 0

◆ m_IsActive

◆ m_IsLocked

bool m_IsLocked = false

◆ m_IsPersistent

◆ m_LastTickedActive

float m_LastTickedActive

Definition at line 23 of file modifierbase.c.

Referenced by ResetLastTickTime().

◆ m_LastTickedInactive

float m_LastTickedInactive

Definition at line 25 of file modifierbase.c.

◆ m_Manager

◆ m_ModulePlayerStatus

PluginPlayerStatus m_ModulePlayerStatus

max 32 synced modifiers supported, 0 == no sync

Definition at line 29 of file modifierbase.c.

Referenced by Debug(), ModifierBase(), and DisplayElementBase::UpdateHUD().

◆ m_Player

is this modifier saved to the DB ?

Definition at line 16 of file modifierbase.c.

◆ m_ShouldBeActive

bool m_ShouldBeActive

Definition at line 20 of file modifierbase.c.

Referenced by ActivateRequest(), Deactivate(), and Tick().

◆ m_SyncID

◆ m_System

string m_System = "Modifiers"

the manager instance

Definition at line 12 of file modifierbase.c.

◆ m_TickIntervalActive

◆ m_TickIntervalInactive

◆ m_TickType

◆ m_TrackActivatedTime