DayZ 1.24
Loading...
Searching...
No Matches
ContentDLC Class Reference

ContentDLC is for query installed DLC (only as entitlement keys, not content) More...

Collaboration diagram for ContentDLC:
[legend]

Private Member Functions

proto native int GetEntitlements (out TIntArray dlcIdList)
 
proto native bool IsDLCInstalled (EDLCId dlcId)
 
bool OwnsAllDLC ()
 
void OnChange (EDLCId dlcId)
 

Private Attributes

ref ScriptInvoker m_OnChange = new ScriptInvoker()
 void(EDLCId dlcId)
 

Detailed Description

ContentDLC is for query installed DLC (only as entitlement keys, not content)

Definition at line 10 of file ContentDLC.c.

Member Function Documentation

◆ GetEntitlements()

proto native int ContentDLC::GetEntitlements ( out TIntArray dlcIdList)
private

For getting current entitlements on device (console). Could be called after any entitlement change or before accessing locked content.

Parameters
dlcIdListthrough this list is returned all installed DLC with valid license for current user
Returns
count of installed and valid DLCs.

◆ IsDLCInstalled()

proto native bool ContentDLC::IsDLCInstalled ( EDLCId dlcId)
private
Parameters
dlcIdID of DLC
Returns
current state of availability of unlocking' dlc. Only DLC with valid license return true.

Referenced by OwnsAllDLC().

◆ OnChange()

void ContentDLC::OnChange ( EDLCId dlcId)
inlineprivate

Called from engine for notifing script after any change in additional content (installed, lost license). There should be check for current state of entitlements. On Xbox should be problem with event lost license! (system bug)

Parameters
dlcIdID of DLC that was changed. Could be empty string if console does not report concrete DLC ID.

Definition at line 49 of file ContentDLC.c.

50 {
51 m_OnChange.Invoke(dlcId);
52 }
ref ScriptInvoker m_OnChange
void(EDLCId dlcId)
Definition ContentDLC.c:13

References m_OnChange.

◆ OwnsAllDLC()

bool ContentDLC::OwnsAllDLC ( )
inlineprivate

Definition at line 29 of file ContentDLC.c.

30 {
32
33 // Start at 1, because 0 is DLC_UNKNOWN
34 for (int i = 1; i < length; ++i)
35 {
37 return false;
38 }
39
40 return true;
41 }
EDLCId
Definition ContentDLC.c:4
proto native bool IsDLCInstalled(EDLCId dlcId)
static int GetEnumSize(typename e)
Return amount of values in enum.
Definition EnConvert.c:620
static int GetEnumValue(typename e, int idx)
Return the nth value in the enum.
Definition EnConvert.c:631

References EnumTools::GetEnumSize(), EnumTools::GetEnumValue(), and IsDLCInstalled().

Member Data Documentation

◆ m_OnChange

ref ScriptInvoker ContentDLC::m_OnChange = new ScriptInvoker()
private

void(EDLCId dlcId)

Definition at line 13 of file ContentDLC.c.

Referenced by OnChange().


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