summaryrefslogtreecommitdiff
path: root/src/notifymanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/notifymanager.cpp')
-rw-r--r--src/notifymanager.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp
index 8f702c286..b889c66f3 100644
--- a/src/notifymanager.cpp
+++ b/src/notifymanager.cpp
@@ -22,6 +22,7 @@
#include "guildmanager.h"
#include "localplayer.h"
+#include "soundmanager.h"
#include "gui/widgets/chattab.h"
@@ -29,6 +30,8 @@
#include "net/net.h"
#include "net/partyhandler.h"
+#include "resources/sounddb.h"
+
namespace NotifyManager
{
static ChatTab *getGuildTab()
@@ -93,6 +96,7 @@ namespace NotifyManager
default:
break;
}
+ soundManager.playSfx(SoundDB::getSound(message));
}
void notify(const unsigned int message, const int num)
@@ -105,6 +109,7 @@ namespace NotifyManager
localChatTab->chatLog(strprintf(gettext(info.text),
num), BY_SERVER);
}
+ soundManager.playSfx(SoundDB::getSound(message));
}
void notify(const unsigned int message, const std::string &str)
@@ -140,5 +145,16 @@ namespace NotifyManager
default:
break;
}
+ soundManager.playSfx(SoundDB::getSound(message));
+ }
+
+ int getIndexBySound(const std::string &sound)
+ {
+ for (int f = 0; f < TYPE_END; f ++)
+ {
+ if (notifications[f].sound == sound)
+ return f;
+ }
+ return 0;
}
}