Skip to content

Commit

Permalink
Add missing SFX when showing "banned" message
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 28, 2024
1 parent a78ca84 commit 9c593dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion EndlessClient/Audio/SoundEffectID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public enum SoundEffectID
ServerMessage = Login,
DeleteCharacter,
MapMutation = DeleteCharacter,
UnknownStaticSound,
Banned,
ScreenCapture = 8,
PrivateMessageReceived,
PunchAttack,
Expand Down
8 changes: 7 additions & 1 deletion EndlessClient/Dialogs/Actions/ErrorDialogDisplayAction.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using AutomaticTypeMapper;
using EndlessClient.Audio;
using EndlessClient.Dialogs.Factories;
using EOLib.Localization;
using EOLib.Net;
Expand All @@ -14,10 +15,13 @@ namespace EndlessClient.Dialogs.Actions
public class ErrorDialogDisplayAction : IErrorDialogDisplayAction
{
private readonly IEOMessageBoxFactory _messageBoxFactory;
private readonly ISfxPlayer _sfxPlayer;

public ErrorDialogDisplayAction(IEOMessageBoxFactory messageBoxFactory)
public ErrorDialogDisplayAction(IEOMessageBoxFactory messageBoxFactory,
ISfxPlayer sfxPlayer)
{
_messageBoxFactory = messageBoxFactory;
_sfxPlayer = sfxPlayer;
}

public void ShowError(ConnectResult connectResult)
Expand Down Expand Up @@ -112,6 +116,8 @@ public void ShowError(InitReply replyCode, InitInitServerPacket.IReplyCodeData i
EOMessageBoxStyle.SmallDialogLargeHeader);
messageBox.ShowDialog();
}

_sfxPlayer.PlaySfx(SoundEffectID.Banned);
}
break;
case 0:
Expand Down

0 comments on commit 9c593dc

Please sign in to comment.