89 {
92 g_Game.ConfigGetTextArray(
m_CfgPath +
" detachSoundSet", cfgSoundsetArray);
93 g_Game.ConfigGetTextArray(
m_CfgPath +
" detachSoundSlot", cfgSlotArray);
94
95 if (cfgSoundsetArray.Count() > 0 && cfgSoundsetArray.Count() == cfgSlotArray.Count())
96 {
98
99 for (int i = 0; i < cfgSoundsetArray.Count(); ++i)
100 {
101 string soundSet = cfgSoundsetArray[i];
102 if (soundSet == "")
103 {
104 ErrorEx(
string.Format(
"[%1] Try to register detach sound set %2 but sting is empty! Please check detachSoundSet configuration for item %3", i, soundSet,
m_Name));
105 continue;
106 }
107
110 {
111 ErrorEx(
string.Format(
"[%1] Try to register detach sound set %2 with invalid slot name %3. Please check detachSoundSlot configuration for item %4", i, soundSet,
slotName,
m_Name));
112 continue;
113 }
114
115 int slotId = InventorySlots.GetSlotIdFromString(
slotName);
116 if (slotId == InventorySlots.INVALID)
117 {
118 ErrorEx(
string.Format(
"[%1] Try to register detach sound set %2 with invalid slot ID %3 (slot name: %4). Please check detachSoundSlot configuration for item %5", i, soundSet, slotId,
slotName,
m_Name));
119 continue;
120 }
121
123 {
125 #ifdef ITEM_SOUND_EVENTS_DEBUG
127 #endif
128 }
129 }
130 }
131 #ifdef ITEM_SOUND_EVENTS_DEBUG
132 else
133 {
135 }
136 #endif
137 }
PlayerSpawnPreset slotName
ref map< int, string > m_DetachSoundSets
array< string > TStringArray