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

Private Member Functions

void InventoryItemType ()
 
void ~InventoryItemType ()
 
void LoadSoundEvents ()
 
AnimSoundEvent GetSoundEvent (int event_id)
 
proto native owned string GetName ()
 

Private Attributes

ref array< ref AnimSoundEventm_animSoundEvents
 

Detailed Description

Definition at line 1 of file InventoryItemType.c.

Constructor & Destructor Documentation

◆ InventoryItemType()

void InventoryItemType::InventoryItemType ( )
inlineprivate

Definition at line 5 of file InventoryItemType.c.

6 {
8 }

References LoadSoundEvents().

◆ ~InventoryItemType()

void InventoryItemType::~InventoryItemType ( )
private

Member Function Documentation

◆ GetName()

proto native owned string InventoryItemType::GetName ( )
private

Referenced by LoadSoundEvents().

◆ GetSoundEvent()

AnimSoundEvent InventoryItemType::GetSoundEvent ( int event_id)
inlineprivate

Definition at line 50 of file InventoryItemType.c.

51 {
53 {
54 if (soundEvent.m_iID == event_id)
55 return soundEvent;
56 }
57
58 return null;
59 }
ref array< ref AnimSoundEvent > m_animSoundEvents

References m_animSoundEvents.

◆ LoadSoundEvents()

void InventoryItemType::LoadSoundEvents ( )
inlineprivate

Definition at line 12 of file InventoryItemType.c.

13 {
14 string cfgPath = "CfgVehicles " + GetName() + " AnimEvents SoundWeapon";
15
17
18 int soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
19
20 if (soundCount <= 0)//try other path
21 {
22 cfgPath = "CfgWeapons " + GetName() + " AnimEvents SoundWeapon";
23 soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
24 }
25
26 if (soundCount <= 0)//try other path
27 {
28 cfgPath = "CfgMagazines " + GetName() + " AnimEvents SoundWeapon";
29 soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
30 }
31
32 if (soundCount <= 0)//try other path
33 {
34 cfgPath = "CfgAmmo " + GetName() + " AnimEvents SoundWeapon";
35 soundCount = GetGame().ConfigGetChildrenCount(cfgPath);
36 }
37
38 for (int i = 0; i < soundCount; i++)
39 {
40 string soundName;
41 GetGame().ConfigGetChildName(cfgPath, i, soundName);
42 string soundPath = cfgPath + " " + soundName + " ";
44 if (soundEvent.IsValid())
46 }
47 }
proto native owned string GetName()
proto native CGame GetGame()

References GetGame(), GetName(), and m_animSoundEvents.

Referenced by InventoryItemType().

Member Data Documentation

◆ m_animSoundEvents

ref array<ref AnimSoundEvent> InventoryItemType::m_animSoundEvents
private

Definition at line 3 of file InventoryItemType.c.

Referenced by GetSoundEvent(), and LoadSoundEvents().


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