summaryrefslogtreecommitdiff
path: root/src/itemsoundmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/itemsoundmanager.cpp')
-rw-r--r--src/itemsoundmanager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/itemsoundmanager.cpp b/src/itemsoundmanager.cpp
index 9107a4048..5fdd09ccb 100644
--- a/src/itemsoundmanager.cpp
+++ b/src/itemsoundmanager.cpp
@@ -35,7 +35,13 @@ void ItemSoundManager::playSfx(const Item *const item,
{
if (!item)
return;
- const ItemInfo &info = ItemDB::get(item->getId());
+ playSfx(item->getId(), sound);
+}
+
+void ItemSoundManager::playSfx(const int itemId,
+ const ItemSoundEvent sound)
+{
+ const ItemInfo &info = ItemDB::get(itemId);
std::string sfx = info.getSound(sound).sound;
if (sfx.empty())
{