From e638f635c81d2b380840e33acdc33ee692422153 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 20 Sep 2016 16:45:42 +0300 Subject: MAINT-6735 Teleport offer sound does not play when the the destination region's maturity exceeds the current maturity settings --- indra/newview/llnotificationofferhandler.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 2657b84ef3..c29fdecefa 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -96,17 +96,21 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) LLUUID from_id = notification->getPayload()["from_id"]; - //Will not play a notification sound for inventory and teleport offer based upon chat preference - bool playSound = (!notification->isDND() - && ((notification->getName() == "UserGiveItem" - && gSavedSettings.getBOOL("PlaySoundInventoryOffer")) - || (notification->getName() == "TeleportOffered" - && gSavedSettings.getBOOL("PlaySoundTeleportOffer")))); - - if(playSound) - { - notification->playSound(); - } + if (!notification->isDND()) + { + //Will not play a notification sound for inventory and teleport offer based upon chat preference + bool playSound = (notification->getName() == "UserGiveItem" + && gSavedSettings.getBOOL("PlaySoundInventoryOffer") + || ((notification->getName() == "TeleportOffered" + || notification->getName() == "TeleportOffered_MaturityExceeded" + || notification->getName() == "TeleportOffered_MaturityBlocked") + && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))); + + if (playSound) + { + notification->playSound(); + } + } LLHandlerUtil::spawnIMSession(name, from_id); LLHandlerUtil::addNotifPanelToIM(notification); -- cgit v1.2.3 From 6e3acac4f0b47ee721f2e577484906de0240d76d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 20 Sep 2016 20:42:57 +0300 Subject: MAINT-6735 brackets fix --- indra/newview/llnotificationofferhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index c29fdecefa..63ab88da42 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -100,11 +100,11 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) { //Will not play a notification sound for inventory and teleport offer based upon chat preference bool playSound = (notification->getName() == "UserGiveItem" - && gSavedSettings.getBOOL("PlaySoundInventoryOffer") + && gSavedSettings.getBOOL("PlaySoundInventoryOffer")) || ((notification->getName() == "TeleportOffered" || notification->getName() == "TeleportOffered_MaturityExceeded" || notification->getName() == "TeleportOffered_MaturityBlocked") - && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))); + && gSavedSettings.getBOOL("PlaySoundTeleportOffer")); if (playSound) { -- cgit v1.2.3