summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationofferhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r--indra/newview/llnotificationofferhandler.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 6e641575fa..8b7cac9f4b 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -117,6 +117,23 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);
+
+ bool playSound = true;
+
+ //Play notification sound for inventory offer and teleport offer based upon chat preference
+ if((notification->getName() == "UserGiveItem"
+ && gSavedSettings.getBOOL("PlaySoundInventoryOffer") == FALSE)
+ || notification->getName() == "TeleportOffered"
+ && gSavedSettings.getBOOL("PlaySoundTeleportOffer") == FALSE)
+ {
+ playSound = false;
+ }
+
+ if(playSound)
+ {
+ notification->playSound();
+ }
+
}
if (notification->canLogToIM())