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

Private Member Functions

override void CreateActionComponent ()
 
override void EndActionComponent ()
 
override void OnStateChange (int pOldState, int pCurrentState)
 

Detailed Description

Definition at line 1 of file ActionWritePaper.c.

Member Function Documentation

◆ CreateActionComponent()

override void ActionWritePaperCB::CreateActionComponent ( )
inlineprivate

Definition at line 3 of file ActionWritePaper.c.

4 {
7 }
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
proto native void EnableStateChangeCallback()
enables state change callback OnStateChange

References EnableStateChangeCallback(), ActionData::m_ActionComponent, and ActionBaseCB::m_ActionData.

◆ EndActionComponent()

override void ActionWritePaperCB::EndActionComponent ( )
inlineprivate

Definition at line 9 of file ActionWritePaper.c.

10 {
11 }

◆ OnStateChange()

override void ActionWritePaperCB::OnStateChange ( int pOldState,
int pCurrentState )
inlineprivate

Definition at line 13 of file ActionWritePaper.c.

14 {
15 if (pCurrentState == STATE_NONE && (!GetGame().IsDedicatedServer()))
16 {
17 if (GetGame().GetUIManager() && GetGame().GetUIManager().IsMenuOpen(MENU_NOTE))
18 GetGame().GetUIManager().FindMenu(MENU_NOTE).Close();
19 }
20 else if (pCurrentState == STATE_LOOP_LOOP && pOldState != STATE_LOOP_LOOP && (!GetGame().IsMultiplayer() || GetGame().IsServer()))
21 {
23 if (m_ActionData.m_MainItem.ConfigIsExisting("writingColor"))
24 paper_item = ItemBase.Cast(m_ActionData.m_Target.GetObject());
25 else
27 Param1<string> text = new Param1<string>(paper_item.GetWrittenNoteData().GetNoteText());
28 paper_item.RPCSingleParam(ERPCs.RPC_WRITE_NOTE, text, true, m_ActionData.m_Player.GetIdentity());
29 }
30 }
ERPCs
Definition ERPCs.c:2
PlayerBase m_Player
Definition ActionBase.c:33
ref ActionTarget m_Target
Definition ActionBase.c:32
ItemBase m_MainItem
Definition ActionBase.c:28
proto native CGame GetGame()
const int MENU_NOTE
Definition constants.c:180
static const int STATE_NONE
undef state - not running anymore
Definition human.c:348
static const int STATE_LOOP_LOOP
Definition human.c:352

References GetGame(), ActionBaseCB::m_ActionData, ActionData::m_MainItem, ActionData::m_Player, ActionData::m_Target, MENU_NOTE, STATE_LOOP_LOOP, and STATE_NONE.


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