From 9a0da2510f9eed57e4bc974084bf54832ee4c33c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 8 Oct 2013 18:30:40 +0300 Subject: add support for sounds take and put. "take" played if take item from container like inventory "put" played if put item into container. --- src/itemsoundmanager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/itemsoundmanager.cpp') 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()) { -- cgit v1.2.3-60-g2f50