Merge pull request #396 from daemitus/bgm

This commit is contained in:
goaaats 2021-07-12 16:11:40 +02:00 committed by GitHub
commit 2a25455ee2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -221,7 +221,15 @@ namespace Dalamud.Interface.Internal
private void OnBgmSetCommand(string command, string arguments)
{
this.dalamud.Framework.Gui.SetBgm(ushort.Parse(arguments));
if (ushort.TryParse(arguments, out var value))
{
this.dalamud.Framework.Gui.SetBgm(value);
}
else
{
// Revert to the original BGM by specifying an invalid one
this.dalamud.Framework.Gui.SetBgm(9999);
}
}
private void OnDebugDrawDevMenu(string command, string arguments)