diff --git a/EndlessClient/Rendering/NPC/NPCActions.cs b/EndlessClient/Rendering/NPC/NPCActions.cs index 3ca18d4df..ca70d08ca 100644 --- a/EndlessClient/Rendering/NPC/NPCActions.cs +++ b/EndlessClient/Rendering/NPC/NPCActions.cs @@ -1,4 +1,5 @@ using AutomaticTypeMapper; +using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.HUD.Chat; using EndlessClient.HUD.Controls; @@ -19,24 +20,24 @@ public class NPCActions : INPCActionNotifier private readonly INPCRendererRepository _npcRendererRepository; private readonly ICharacterRendererRepository _characterRendererRepository; private readonly IChatBubbleActions _chatBubbleActions; - private readonly IChatBubbleTextureProvider _chatBubbleTextureProvider; private readonly IESFFileProvider _esfFileProvider; + private readonly ISfxPlayer _sfxPlayer; public NPCActions(IHudControlProvider hudControlProvider, INPCStateCache npcStateCache, INPCRendererRepository npcRendererRepository, ICharacterRendererRepository characterRendererRepository, IChatBubbleActions chatBubbleActions, - IChatBubbleTextureProvider chatBubbleTextureProvider, - IESFFileProvider esfFileProvider) + IESFFileProvider esfFileProvider, + ISfxPlayer sfxPlayer) { _hudControlProvider = hudControlProvider; _npcStateCache = npcStateCache; _npcRendererRepository = npcRendererRepository; _characterRendererRepository = characterRendererRepository; _chatBubbleActions = chatBubbleActions; - _chatBubbleTextureProvider = chatBubbleTextureProvider; _esfFileProvider = esfFileProvider; + _sfxPlayer = sfxPlayer; } public void StartNPCWalkAnimation(int npcIndex) @@ -53,6 +54,8 @@ public void StartNPCAttackAnimation(int npcIndex) return; Animator.StartAttackAnimation(npcIndex); + + _sfxPlayer.PlaySfx(SoundEffectID.PunchAttack); } public void RemoveNPCFromView(int npcIndex, int playerId, Option spellId, Option damage, bool showDeathAnimation)