58 InventoryItemType itemType =
m_Parent.GetInventoryItemType();
61 if (soundSet ==
string.
Empty)
63 Debug.Log(
"No soundset defined for sound event id " +
typename.EnumToString(SoundConstants,
id) +
". Item: " +
m_Parent.GetType() +
" | Slot ID: " + slotId);
82 Debug.Log(
"Null when creating sound from set: " + soundSet +
" Item: " +
m_Parent.GetType() );
90 InventoryItemType itemType =
m_Parent.GetInventoryItemType();
94 case SoundConstants.ITEM_ATTACH:
97 soundSet = itemType.GetSlotAttachSoundSet(slotId);
100 case SoundConstants.ITEM_DETACH:
103 soundSet = itemType.GetSlotDetachSoundSet(slotId);
117 if (
g_Game.IsDedicatedServer())
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
void SetSoundFadeOut(float fade_out)
Set the sound fade out duration.
void SoundStop()
Stops sound.
provides access to slot configuration
Manager class for managing Effect (EffectParticle, EffectSound).
static EffectSound PlaySoundCachedParams(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, using or creating cached SoundParams.
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
ref map< int, string > m_AvailableSoundsets
string GetSoundSetForEvent(int id, int slotId=InventorySlots.INVALID)
void PlayItemSoundClient(int id, int slotId=InventorySlots.INVALID)
void AddSound(int sound, string soundset, SoundParameters params=null)
void ItemSoundHandler(ItemBase parent)
void StopItemSoundClient(int id)
ref map< int, ref EffectSound > m_PlayingSounds
ref map< int, ref SoundParameters > m_SoundParamsMap