Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing SFX #332

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions EndlessClient/Dialogs/PaperdollDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ protected override void UpdateDisplayedData(PaperdollData paperdollData)
{
// packet reply handles updating the paperdoll for the character which will unrender the equipment
_inventoryController.UnequipItem(equipLocation);
_sfxPlayer.PlaySfx(SoundEffectID.InventoryPlace);
}
});
}
Expand Down
11 changes: 8 additions & 3 deletions EndlessClient/Rendering/ContextMenuRenderer.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using EndlessClient.ControlSets;
using EndlessClient.Audio;
using EndlessClient.ControlSets;
using EndlessClient.Dialogs.Actions;
using EndlessClient.Dialogs.Factories;
using EndlessClient.HUD;
using EndlessClient.HUD.Controls;
using EndlessClient.Input;
using EndlessClient.Rendering.Character;
using EndlessClient.Services;
using EndlessClient.UIControls;
Expand Down Expand Up @@ -60,6 +60,7 @@ private enum MenuAction
private readonly ICurrentMapStateProvider _currentMapStateProvider;
private readonly IEOMessageBoxFactory _messageBoxFactory;
private readonly IClientWindowSizeProvider _clientWindowSizeProvider;
private readonly ISfxPlayer _sfxPlayer;

private static DateTime? _lastTradeRequestedTime;
private static DateTime? _lastPartyRequestTime;
Expand All @@ -78,7 +79,8 @@ public ContextMenuRenderer(INativeGraphicsManager nativeGraphicsManager,
ICharacterRenderer characterRenderer,
ICurrentMapStateProvider currentMapStateProvider,
IEOMessageBoxFactory messageBoxFactory,
IClientWindowSizeProvider clientWindowSizeProvider)
IClientWindowSizeProvider clientWindowSizeProvider,
ISfxPlayer sfxPlayer)
{
_menuActions = new Dictionary<Rectangle, Action>();
_inGameDialogActions = inGameDialogActions;
Expand All @@ -95,6 +97,7 @@ public ContextMenuRenderer(INativeGraphicsManager nativeGraphicsManager,
_currentMapStateProvider = currentMapStateProvider;
_messageBoxFactory = messageBoxFactory;
_clientWindowSizeProvider = clientWindowSizeProvider;
_sfxPlayer = sfxPlayer;

//first, load up the images. split in half: the right half is the 'over' text
_backgroundTexture = nativeGraphicsManager.TextureFromResource(GFXTypes.PostLoginUI, 41, true);
Expand Down Expand Up @@ -223,6 +226,8 @@ protected override bool HandleClick(IXNAControl control, MouseEventArgs eventArg
});
}

_sfxPlayer.PlaySfx(SoundEffectID.DialogButtonClick);

Game.Components.Remove(this);
Dispose();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using AutomaticTypeMapper;
using EndlessClient.Audio;
using EndlessClient.ControlSets;
using EndlessClient.Dialogs.Actions;
using EndlessClient.Dialogs.Factories;
Expand Down Expand Up @@ -31,6 +32,7 @@ public class ContextMenuRendererFactory : IContextMenuRendererFactory
private readonly ICurrentMapStateProvider _currentMapStateProvider;
private readonly IEOMessageBoxFactory _messageBoxFactory;
private readonly IClientWindowSizeProvider _clientWindowSizeProvider;
private readonly ISfxPlayer _sfxPlayer;

public ContextMenuRendererFactory(INativeGraphicsManager nativeGraphicsManager,
IInGameDialogActions inGameDialogActions,
Expand All @@ -45,7 +47,8 @@ public ContextMenuRendererFactory(INativeGraphicsManager nativeGraphicsManager,
IPartyDataProvider partyDataProvider,
ICurrentMapStateProvider currentMapStateProvider,
IEOMessageBoxFactory messageBoxFactory,
IClientWindowSizeProvider clientWindowSizeProvider)
IClientWindowSizeProvider clientWindowSizeProvider,
ISfxPlayer sfxPlayer)
{
_nativeGraphicsManager = nativeGraphicsManager;
_inGameDialogActions = inGameDialogActions;
Expand All @@ -61,6 +64,7 @@ public ContextMenuRendererFactory(INativeGraphicsManager nativeGraphicsManager,
_currentMapStateProvider = currentMapStateProvider;
_messageBoxFactory = messageBoxFactory;
_clientWindowSizeProvider = clientWindowSizeProvider;
_sfxPlayer = sfxPlayer;
}

public IContextMenuRenderer CreateContextMenuRenderer(ICharacterRenderer characterRenderer)
Expand All @@ -79,7 +83,8 @@ public IContextMenuRenderer CreateContextMenuRenderer(ICharacterRenderer charact
characterRenderer,
_currentMapStateProvider,
_messageBoxFactory,
_clientWindowSizeProvider);
_clientWindowSizeProvider,
_sfxPlayer);
}
}

Expand Down