DayZ 1.24
Loading...
Searching...
No Matches
DisplayElementBase Class Reference
Collaboration diagram for DisplayElementBase:
[legend]

Protected Member Functions

void DisplayElementTendency (PlayerBase player)
 
void SetSeriousnessLevel (DSLevels level)
 
override void UpdateHUD ()
 
void SetTendency (int tendency)
 

Protected Attributes

int TENDENCY_MASK = 7
 
int SERIOUSNESS_BIT_MASK = 7
 
int SERIOUSNESS_BIT_OFFSET = 3
 

Private Member Functions

void SetLevel (int level)
 
override void UpdateHUD ()
 
void ElementStance (PlayerBase player)
 
override void UpdateHUD ()
 

Detailed Description

Definition at line 1 of file DisplayElementBadge.c.

Member Function Documentation

◆ DisplayElementTendency()

void DisplayElementBase::DisplayElementTendency ( PlayerBase player)
inlineprotected

Definition at line 7 of file DisplayElementTendency.c.

8 {
9 NUM_OF_BITS = 6;//the overall num of bits this element occupies(can be calculated from masks, better leave it explicit)
10 }

◆ ElementStance()

void DisplayElementBase::ElementStance ( PlayerBase player)
inlineprivate

Definition at line 3 of file ElementStance.c.

4 {
5 NUM_OF_BITS = 2;
6 m_Type = eDisplayElements.DELM_STANCE;
7 m_IsClientOnly = true;
8 }
eBleedingSourceType m_Type

References m_Type.

◆ SetLevel()

void DisplayElementBase::SetLevel ( int level)
inlineprivate

Definition at line 3 of file DisplayElementBadge.c.

4 {
6 }
override void SetValue(int value, bool fire_event=true)

References SetValue().

◆ SetSeriousnessLevel()

void DisplayElementBase::SetSeriousnessLevel ( DSLevels level)
inlineprotected

Definition at line 12 of file DisplayElementTendency.c.

13 {
14 m_Value = (~(SERIOUSNESS_BIT_MASK << SERIOUSNESS_BIT_OFFSET)) & m_Value;//clear the last value
16 }
string m_Value
Definition EnEntity.c:805

References m_Value.

◆ SetTendency()

void DisplayElementBase::SetTendency ( int tendency)
inlineprotected

Definition at line 35 of file DisplayElementTendency.c.

36 {
37 m_Value = (~TENDENCY_MASK) & m_Value;//clear the last value
38 m_Value = tendency | m_Value;//insert the new one
39 //PrintString(m_Value.ToString());
40 }

References m_Value.

◆ UpdateHUD() [1/3]

override void DisplayElementBase::UpdateHUD ( )
inlineprivate

Definition at line 8 of file DisplayElementBadge.c.

9 {
10 super.UpdateHUD();
12 }
PluginPlayerStatus m_ModulePlayerStatus
string m_Key
Definition EnEntity.c:804

References m_Key, m_ModulePlayerStatus, and m_Value.

◆ UpdateHUD() [2/3]

override void DisplayElementBase::UpdateHUD ( )
inlineprotected

Definition at line 18 of file DisplayElementTendency.c.

19 {
20 super.UpdateHUD();
23 //PrintString(tendency.ToString());
24
25 if (tendency > 3)
26 tendency = -(tendency - 3);
27 /*
28 PrintString(this.ToString());
29 PrintString("ser:"+ seriousness.ToString());
30 PrintString("tnd:"+ tendency.ToString());
31 */
32 m_ModulePlayerStatus.DisplayTendency(m_Key, tendency, TranslateLevelToStatus(seriousness));
33 }

References m_Key, m_ModulePlayerStatus, m_Value, and DisplayElementTendency::TranslateLevelToStatus().

◆ UpdateHUD() [3/3]

override void DisplayElementBase::UpdateHUD ( )
inlineprivate

Definition at line 10 of file ElementStance.c.

11 {
12 super.UpdateHUD();
14 }

References m_ModulePlayerStatus, and m_Value.

Member Data Documentation

◆ SERIOUSNESS_BIT_MASK

int DisplayElementBase::SERIOUSNESS_BIT_MASK = 7
protected

Definition at line 4 of file DisplayElementTendency.c.

◆ SERIOUSNESS_BIT_OFFSET

int DisplayElementBase::SERIOUSNESS_BIT_OFFSET = 3
protected

Definition at line 5 of file DisplayElementTendency.c.

◆ TENDENCY_MASK

int DisplayElementBase::TENDENCY_MASK = 7
protected

Definition at line 3 of file DisplayElementTendency.c.


The documentation for this class was generated from the following files: